[DRBD-user] stopping drbd fails

Patrick Westphal patrick.westphal at inqbus.de
Mon Jun 20 16:07:40 CEST 2011


Hi everybody,


I set up a testing environment and got into trouble stopping drbd.

I'm running Debian and so use the standard deb-packages (module version: 
8.3.9,  userland version: 8.3.7).

I did not touch the global_common.conf and I think I'm also using a 
pretty common setup:
just one RAID 10 device (LSI controller), internal metadata, replication 
over Infiniband

I created two partitions on the /dev/drbd0 device:

   root at helios:~# fdisk -l /dev/drbd0
   [...]
   Device Boot      Start         End      Blocks     Id  System
   /dev/drbd0p1     1             3112     24997108+  83  Linux
   /dev/drbd0p2     69696         72807    24997140   83  Linux


After having made them "visible" via

   kpartx -a /dev/drbd0

I mounted one of the two

   root at helios:~# mount /dev/mapper/drbd0p1 /mnt/drbd

and ran my tests. Having finished I just wanted to stop the drbd-service 
getting the following error:

   root at helios:~# /etc/init.d/drbd stop
   [...]
   Stopping all DRBD resources:/dev/drbd0: State change failed: (-12) 
Device is held open by someone
   ERROR: Module drbd is in use
   .

This error was just reasonable, because I forgot to unmount the 
/dev/mapper/drbd0p1 device. But, unmounting it afterwards and retrying 
gives me the same error ever and ever again. (I also tested, if there 
are processes having access to the device using lsof.) The only way of 
getting out of this was rebooting the whole server. (reproducible)

Now I'm wondering if this is a bug or if I made something wrong.
Do you know a way, stopping drbd without a reboot?
Is drbd, just caring about blocks, at all able to recognize if there are 
mounted partitions of a drdbX device?



Thanks in advance

Patrick

-- 
inqbus it consulting

Herloßsohnstraße 12
04155 Leipzig

+49 (341) 5643800

http://inqbus.de




More information about the drbd-user mailing list