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

Dodd, Tony tony at last.fm
Thu Aug 7 12:55:35 CEST 2008

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


Hi Guys,

I'm attempting to set up high availability nfs with heartbeat and DRBD
as the block device,
my problem arises when attempting to fail over from master->slave.

The process is as follows:

Kill nfsd with signal 9 (to prevent state/lock file deletion).
Unmount the drbd block device
Change drbd state to secondary

It is in this last step that I'm facing issues, and receiving this
error:

hanfs1:~# drbdadm secondary export
/dev/drbd1: State change failed: (-12) Device is held open by someone
Command 'drbdsetup /dev/drbd1 secondary' terminated with exit code 11

There are no other services running on these machines, and looking at
lsof output, the only
things that are accessing anything drbd related are the worker, receiver
and asender.

hanfs1:~# lsof | grep drbd
drbd1_wor 2797 root  cwd       DIR              254,0    4096        128
/
drbd1_wor 2797 root  rtd       DIR              254,0    4096        128
/
drbd1_wor 2797 root  txt   unknown
/proc/2797/exe
drbd1_rec 2802 root  cwd       DIR              254,0    4096        128
/
drbd1_rec 2802 root  rtd       DIR              254,0    4096        128
/
drbd1_rec 2802 root  txt   unknown
/proc/2802/exe
drbd1_ase 2808 root  cwd       DIR              254,0    4096        128
/
drbd1_ase 2808 root  rtd       DIR              254,0    4096        128
/
drbd1_ase 2808 root  txt   unknown
/proc/2808/exe

Is there any way to work around this locking - forcefully or otherwise?
Heartbeat is resorting
to hard rebooting the machine when failing over due to this message.
Alternatively, has anyone
successfully resolved this issue when utilizing drbd in a ha-nfs
setting?

Many thanks

--
Tony Dodd
Last.fm | http://www.last.fm
Karen House 1-11 Baches Street
London N1 6DL

check out my music taste at:
http://www.last.fm/user/hawkeviper





More information about the drbd-user mailing list