[DRBD-user] wipe-md causes lvm to think logical volume is open after command completes

Lars Ellenberg lars.ellenberg at linbit.com
Mon Jun 4 11:47:45 CEST 2012

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


On Sat, Jun 02, 2012 at 01:11:10PM -0400, Chris Dickson wrote:
> Hey guys,
> 
> I ran into an odd issue with LVM and the wiping the drbd meta data from a
> logical volume. Here is what my wipe md command looks like, this is all
> done via a script:
> 
> drbdmeta --force num v08 /dev/vg0/vol100 internal wipe-md
> 
> Which succeeds, but then when the script performs a back to back lvremove:
> 
> lvremove -f /dev/vg0/vol100
> 
> I get this error a few times, but after a few retries of lvremove succeeds:
> 
> Can't remove open logical volume "vol100"
> 
> So I'm thinking even after the drbdmeta command returns, somehow there is
> still a file descriptor open on the logical volume. Could it be udev doing
> something? In my situation, when I remove the wipe-md command before the
> lvremove, the issue goes away completely.

Most likely this is some udev screwup, yes.
Maybe triggered by the "last write fd to some block device was closed" event.
Nothing we can fix in drbd, I think.

> In a related question, is it necessary at all to wipe the drbd meta data?

No, depending on what is supposed to happen later.
But it is impolite to leave your garbage behind ;)

> I did it to avoid those 'strange bm offset' messages, but could it
> cause problems if I just ignore wiping it?

"Yes, but no guarantees" ...

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com



More information about the drbd-user mailing list