LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Splitting a mirror with LVM (https://www.linuxquestions.org/questions/linux-server-73/splitting-a-mirror-with-lvm-790791/)

jcaplette 02-22-2010 09:58 AM

Splitting a mirror with LVM
 
Hi guys,

I'm running Red Hat Enterprise Linux ES release 4 (Nahant Update 6).

I've created a mirror of a Logical Volume with this command:

# lvconvert -m1 --corelog /dev/datavg/data /dev/dm-16

Now I've this:

# lvs -a -o name,copy_percent,devices
LV Copy% Devices
data 100.00 data_mimage_0(0),data_mimage_1(0)
[data_mimage_0] /dev/dm-11(0)
[data_mimage_0] /dev/dm-10(0)
[data_mimage_0] /dev/dm-14(0)
[data_mimage_1] /dev/dm-16(0)
ctrlmlv /dev/sda2(800)
homelv /dev/sda2(608)
slashlv /dev/sda2(0)
swaplv /dev/sda2(960)
tmplv /dev/sda2(832)


What I want to do is to remove the copy of that LV from my PV dm-11, dm-10 and dm-14.

I tried this:

# lvconvert -m0 /dev/datavg/data /dev/dm-10 /dev/dm-11 /dev/dm-14
No free extents on physical volume "/dev/dm-10"
No free extents on physical volume "/dev/dm-11"
No mirror images found using specified PVs.

What did I do wrong? My goal was to remove devices dm-10, dm-11 and dm-14 from my VG, so I decided to extend the VG with dm-16 and mirror my data LV to that device, then split that mirror from the other devices. The FS is mounted and need to stay online...

Thanks
Jonathan

hubr1s 03-09-2010 03:14 AM

Hi,
We have splitted our mirror with the same command, good luck.

[root@aq01 scsi_host]# pvs
PV VG Fmt Attr PSize PFree
/dev/cciss/c0d0p2 rootvg lvm2 a- 67.31G 27.78G
/dev/dm-10 aq0110 lvm2 a- 70.00G 1.95G
/dev/dm-6 aq0110 lvm2 a- 70.00G 1.88G
/dev/dm-7 aq0110 lvm2 a- 70.00G 1.88G
/dev/dm-8 aq0110 lvm2 a- 70.00G 1.88G
/dev/dm-9 aq0110 lvm2 a- 70.00G 1.88G
/dev/sdl aq0110 lvm2 a- 68.11G 0
/dev/sdm aq0110 lvm2 a- 68.11G 0
/dev/sdn aq0110 lvm2 a- 68.11G 0
/dev/sdo aq0110 lvm2 a- 68.11G 64.00M
/dev/sdp aq0110 lvm2 a- 68.11G 0

[root@aq01 scsi_host]# lvconvert -m0 aq0110/aq0110_01 /dev/sdl /dev/sdm /dev/sdn /dev/sdo /dev/sdp
Logical volume aq0110_01 converted.

[root@aq01 scsi_host]# pvs
PV VG Fmt Attr PSize PFree
/dev/cciss/c0d0p2 rootvg lvm2 a- 67.31G 27.78G
/dev/dm-10 aq0110 lvm2 a- 70.00G 1.95G
/dev/dm-6 aq0110 lvm2 a- 70.00G 1.88G
/dev/dm-7 aq0110 lvm2 a- 70.00G 1.88G
/dev/dm-8 aq0110 lvm2 a- 70.00G 1.88G
/dev/dm-9 aq0110 lvm2 a- 70.00G 1.88G
/dev/sdl aq0110 lvm2 a- 68.11G 68.11G
/dev/sdm aq0110 lvm2 a- 68.11G 68.11G
/dev/sdn aq0110 lvm2 a- 68.11G 68.11G
/dev/sdo aq0110 lvm2 a- 68.11G 68.11G
/dev/sdp aq0110 lvm2 a- 68.11G 68.11G


All times are GMT -5. The time now is 11:00 PM.