[linux-lvm] lvconvert parameters to remove mirror
ben scott
benscott at nwlink.com
Thu Apr 3 03:14:15 UTC 2008
I have a question about how to remove a mirror. On a test
set up I have the following mirrors:
bedroom:~/kvpm# lvs --all --segments -o +devices
LV VG Attr #Str Type SSize Devices
lvol0 trurg mwn-a- 3 mirror 23.68G lvol0_mimage_2
(0),lvol0_mimage_1(0),lvol0_mimage_3(0)
[lvol0_mimage_1] trurg iwi-ao 1 linear 23.68G /dev/hdg6(155008)
[lvol0_mimage_2] trurg iwi-ao 1 linear 19.53G /dev/hde2(0)
[lvol0_mimage_2] trurg iwi-ao 1 linear 4.15G /dev/hdg5(0)
[lvol0_mimage_3] trurg iwi-ao 1 linear 23.68G /dev/hde3(0)
[lvol0_mlog] trurg lwn-ao 1 linear 64.00K /dev/hde1(0)
So to remove the mirror "[lvol0_mimage_1]" on /dev/hdg6
I do the following:
bedroom:~/kvpm# lvconvert --mirrors -1 trurg/lvol0 /dev/hdg6
Logical volume lvol0 converted.
bedroom:~/kvpm# lvs --all --segments -o +devices
LV VG Attr #Str Type SSize Devices
lvol0 trurg mwn-a- 2 mirror 23.68G lvol0_mimage_2
(0),lvol0_mimage_3(0)
[lvol0_mimage_2] trurg iwi-ao 1 linear 19.53G /dev/hde2(0)
[lvol0_mimage_2] trurg iwi-ao 1 linear 4.15G /dev/hdg5(0)
[lvol0_mimage_3] trurg iwi-ao 1 linear 23.68G /dev/hde3(0)
[lvol0_mlog] trurg lwn-ao 1 linear 64.00K /dev/hde1(0)
And indeed it is gone. However when I do this:
bedroom:~/kvpm# lvconvert --mirrors -1 trurg/lvol0 /dev/hde2
No free extents on physical volume "/dev/hde2"
No specified PVs have space available
Or this:
bedroom:~/kvpm# lvconvert --mirrors -1 trurg/lvol0 /dev/hde2 /dev/hdg5
No free extents on physical volume "/dev/hde2"
No mirror images found using specified PVs.
So how do I delete a mirror that spans multiple segments? Wouldn't it make
sense to have a command such as:
bedroom:~/kvpm# lvconvert --mirrors -1 trurg/lvol0 [lvol0_mimage_2]
Thank you for any help.
More information about the linux-lvm
mailing list