Having Fun with the DRBD Manage Control Volume

As you might know, DRBD Manage is a tool that is used in the DRBD9 stack to manage (create, remove, snapshot) DRBD resources in a multi-node DRBD cluster. DRBD Manage stores the cluster information in the so called Control Volume. The control volume is a DRBD9 resource itself which is then replicated across the whole cluster. This means that the control volume itself is just a block device, like all the regular DRBD resources.

ap1_blockdev

The control volume is just a regular DRBD block device

In this case the control volume contains the cluster information for 4 nodes with 3 resources. Usually, the user shows this information with the according drbdmanage commands.

ap1_dm_nodes_resources

Status information of drbdmanage

The cluster information is stored at known offsets in the control volume, which gives some space to sneak in some additional information. Let’s see what else is hidden in the control volume.

ap1_UUID

UUID in the control volume

The control volume contains a magic, which is used by the blkid command and a UUID that is generated on initialization time.

Oh, and it contains some nice ASCII Art if you show the first 10 lines:

The output of the head command

But this is not all, that part nicely fits into the first 512 bytes:

The output of the dd command

Maybe it has some extra magic powers? Let’s try and execute it with Perl:

ap1_perlsucc

The control volume can print itself

See? It can print its own content 😉

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *