Is the configuration-file format that DRBD uses a somewhat standard one with existing parsers in Python or is it not which would require me to write my own parser?
Example:
resource server42 {
volume 0 {
device /dev/drbd9;
disk /dev/vg01/server42-root-drbd;
meta-disk /dev/vg01/server42-root-metadata;
}
volume 1 {
device /dev/drbd10;
disk /dev/vg01/server42-swap-drbd;
meta-disk /dev/vg01/server42-swap-metadata;
}
volume 2 {
device /dev/drbd11;
disk /dev/vg01/server42-temp-drbd;
meta-disk /dev/vg01/server42-temp-metadata;
}
volume 3 {
device /dev/drbd12;
disk /dev/vg01/server42-var-drbd;
meta-disk /dev/vg01/server42-var-metadata;
}
on server23 {
address 10.20.30.40:7796;
}
on server24 {
address 10.20.30.41:7796;
}
}
It's proprietary. The DRBD utils ship drbdadm
which has a dump-xml
option, you could use that to translate the configurations from their proprietary format into xml. Hope that helps!