DRBD – Fix for Diskless status

Posted March 15th, 2010 by bryanr

Here is something I found very useful when working with DRBD.  After running some system updates on my Openfiler server that is running DRBD and Heartbeat, my logical volumes were showing up as “Diskless” when I looked at the DRBD status.  Looks something like this:

vg0             Connected       Secondary/Primary     Diskless/UpToDate    C

When I tried to run the attach command to sync up the volumes, I just received an error that said the disk could not be mounted.  And the error led me to believe the device was already mounted and in use.  I found that when the disk is mounted correctly through DRBD when it has the Primary role it will show up with a mount point here:

/dev/mapper/<volumename>

If the DRBD node is in the Secondary role, these folders will not be present.  If they are, it’s good evidence that something is wrong.  Run this command on the Diskless server and reboot.  Your volumes should then sync up like normal.

kpartx -d /dev/mapper/<volumename>

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>