[linux-lvm] lvm2 vgchange -a n problem
Michael Ossmann
mike at ossmann.com
Wed Mar 10 16:14:07 UTC 2004
On Mon, Mar 08, 2004 at 09:39:19AM +0000, Joe Thornber wrote:
>
> i) do a 'dmsetup info <dev>' and confirm that the 'open count' is 0
# dmsetup info
Name: pvfoo
State: ACTIVE
Tables present: LIVE
Open count: 3
Event number: 0
Major, minor: 254, 1
Number of targets: 1
Name: vgfoo-lvfoo
State: ACTIVE
Tables present: LIVE
Open count: 0
Event number: 0
Major, minor: 254, 3
Number of targets: 1
UUID: [snipped]
Name: vgfoo-lvbar
State: ACTIVE
Tables present: LIVE
Open count: 1
Event number: 0
Major, minor: 254, 2
Number of targets: 1
UUID: [snipped]
> ii) use 'lsof' to find out who has opened the device.
# lsof /dev/mapper/vgfoo-lvfoo
# lsof /dev/mapper/vgfoo-lvbar
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
[snipped many lines of output]
# lvchange -a n vgfoo/lvfoo
LV vgfoo/lvfoo in use: not removing
Hmmmm. Looks to me like it shouldn't be complaining. I
don't know if this would affect anything at the lv layer,
but the only unusual thing here is that my pv happens to be
built on top of device mapper (dm-crypt). Everything has
been working fine except for lv and vg deactivation.
mossmann
More information about the linux-lvm
mailing list