[DRBD-user] State change failed: Device is held open by someone

Peter Funk pf at artcom-gmbh.de
Mon Mar 16 19:33:52 CET 2009

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

Maros Timko wrote on Monday, 16.03.2009 10:46:
> Very detailed answer Lars, however we are missing the basic info from Peter.
> Peter, do you use Xen on top of DRBD (or some other virtualisation technology)?
> Do you use heartbeat to start/stop resources?
Yes.  heartbeat 2.1.3 in r1 style configuration.

Heartbeat did shutdown all services (Samba, NFS, netatalk) and than
successfully umounted the XFS filesystem residing on the DRBD volume
before trying to stop the DRBD device.  At least the syslog said so:

  ... Filesystem[27893]: INFO: unmounted /shared successfully
  ... Filesystem[27882]: INFO:  Success
  ... ResourceManager[27380]: debug: /etc/ha.d/resource.d/Filesystem \
                    /dev/drbd0 /shared xfs stop done. RC=0
As Lars Ellenberg mentiond lazy umount I had a look into 
and there was no lazy umount (umount -l) in there.

Unfortunately after a number of unsuccessful tries to stop the DRBD
device heartbeat finally decided to reboot the machine.  This makes
further forensic analysis of this incident a little bit hard to say
the least. ;-)

Hopefully I will be able to setup two other test machines soon and
will be able to try what Lars Ellenberg suggested as a test.

> If you use your own HA RA you should not return control to heartbeat before VM
> is really shutdown. Even after that you usually will notice such log messages, 
> and thus have to sleep for ~1 second.

I understand that.  But I wasn't using such RA on the machine which
showed the behaviour described in my original post.

Nevertheless thanks to everybody and in particular to Lars.

Regards, Peter
Peter Funk, ✉Oldenburger Str.86, D-27777 Ganderkesee
office: ArtCom GmbH, ✉Haferwende 2, D-28357 Bremen, Germany 
tel:+49-421-20419-0 cell:+49-179-640-8878 <http://www.artcom-gmbh.de/>

More information about the drbd-user mailing list