[DRBD-user] DRBD device held open by someone

Dileep Nayak tech.disscuss2011 at gmail.com
Tue Jun 21 06:40:41 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.


TThanks Matt for your reply to the issue "*DRBD device held open by someone*
".
Today the below problem has been seen again.


 State change failed: (-12) Device is held open by someone

Command '/sbin/drbdsetup /dev/drbd0 secondary' terminated with exit code 11

/sbin/drbdadm secondary drbd0: exit code 11, mapping to 1


Then we have run the following commands after the above issue has been
occurred:

 *[root at abaco-a bin]# grep drbd /proc/mounts*

* *

* *

*root at abaco-a bin]# lsof | grep drbd*

*drbd0_wor 13993      root  cwd       DIR        9,2     1024          2 /*

*drbd0_wor 13993      root  rtd       DIR        9,2     1024          2 /*

*drbd0_wor 13993      root  txt   unknown
/proc/13993/exe*

* *

*root at abaco-a bin]# ps -eaf | grep drbd*

*root     13993     1  0 Jun16 ?        00:00:00 [drbd0_worker]*

*root     17368 11285  0 04:23 pts/0    00:00:00 grep drbd*

*[root at abaco-a bin]#*

* *

* *

Should we think that drbd0_worker should have been exited once this issue is
occurred?



Then we stopped the heartbeat service which caused system to reboot. After
that the problem is gone away.


Please can anybody explain me what could be the problem at this moment.


>
>
> Today's Topics:
>
>
>
>   3. Re: RBD device held open by someone (Matt Graham)
>
>
> Message: 3
> Date: Thu, 16 Jun 2011 08:57:19 -0700
> From: "Matt Graham" <danceswithcrows at usa.net>
> Subject: Re: [DRBD-user] RBD device held open by someone
> To: <drbd-user at lists.linbit.com>
> Message-ID: <606PFPP5T3168S04.1308239839 at web04.cms.usa.net>
> Content-Type: text/plain; charset=ISO-8859-1
>
> 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
>
>
>
> -
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20110621/57001e8a/attachment.htm>


More information about the drbd-user mailing list