[DRBD-user] RBD device held open by someone

Matt Graham danceswithcrows at usa.net
Thu Jun 16 17:57:19 CEST 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Dileep Nayak wrote:
> [*root@]# /etc/ha.d/resource.d/drbddisk drbd0 stop*
> *State change failed: (-12) Device is held open by someone*
> *'/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11

> I checked the status of the LVM resource which is already stopped
> and seems to be offline.

> *[root@]# /etc/ha.d/resource.d/LVM vgdrbd0 status*
> *    Using volume group(s) on command line*
> *    Finding volume group "vgdrbd0"*
> *2011/06/16_12:01:40 INFO: LVM Volume vgdrbd0 is offline*

Some process somewhere has opened /dev/drbd0.  You have to find what that
process is and either tell it to close the DRBD device, or kill the process. 
Or /dev/drbd0 is mounted.  Make sure that the device isn't mounted first, then
use lsof or fuser to find out which process has the file open.  Once you've
figured out what's holding the file open, kill it or tell it to release the
resource, and you should be able to set it to secondary.

A while back, I had a problem like this, but it was related to bind mounts. 
/data was the DRBD resource, and it had been umounted.  /data/stuff was
bind-mounted on /somewhere/stuff , and that was preventing the resource from
going secondary.  Once I umounted all the bind mounts, stuff started working. 
This showed up in the output from mount, but not in lsof or fuser, so it took
a bit longer to fix than I would've liked.

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see




More information about the drbd-user mailing list