[linux-lvm] Cant remove a locked volume
Jason Wilson
jay at kylesfamily.com
Sun May 7 11:17:20 UTC 2006
All,
I have managed to get one of my systems into a bit of a mess. It a Fedora
Core 5 running with recent patches.
During an attempted pvmove from one physical volume to another I had my
server crash (not sure exactly what, may have been a power fluctuation).
When attempting to reboot the server it would fail to mount the root
filesystem. After much messing around I finally determined that it was
failing to mount as my new disk was on a SATA card I had just added and
the initrd did not have the relevant driver loaded.
In sorting this out I rolled back my lvm configuration to a version
prior to me attempting the pvmove.
The problem I now has is when I try and remove one the volumes that was
in the middle of the pvmove it says the volume is locked:
# lvremove /dev/VolGroup00/swap
Can't remove locked LV swap
A lvs shows:
# lvs /dev/VolGroup00/swap
LV VG Attr LSize Origin Snap% Move Log Copy%
swap VolGroup00 -wI-a- 2.00G
>From the man pages it says that the capital 'I' means the volume is
locked.
I cannot find anywhere to remove this lock. I have tried changing the
allocation, this works, but the lock persists.
In the lgcfgbackup file I can see:
swap {
id = "6IBwtq-sw2f-4Bss-A7W5-D1J2-XiAR-XHSlnJ"
status = ["READ", "WRITE", "VISIBLE", "LOCKED"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 64 # 2 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 3509
]
}
}
Is there any way I can remove these locks? Can I edit the file and
manually reload the config with vgcfgrestore? Will this other
side-affects?
Your help is appreciated.
Jason
More information about the linux-lvm
mailing list