Operating System - Linux
1771219 Members
2685 Online
109004 Solutions
New Discussion

mirror in LV with 4 disks twisted

 
Romy_LWN
Occasional Contributor

mirror in LV with 4 disks twisted

Hi all

i have several logical volumes within vg09 where one logical volume lv_266 uses 4 disks:

--- Physical volume groups ---
PVG Name naprimera01
PV Name /dev/disk/disk75
PV Name /dev/disk/disk92

PVG Name naprimera03_Mirror
PV Name /dev/disk/disk74
PV Name /dev/disk/disk93

where /dev/disk/disk75 and  /dev/disk/disk92 are the original and the other 2 are the mirror, but now i notices within the logical volume lv_266 this is twisted for /dev/disk/disk74 and /dev/disk/disk75; 

(lvdisplay -v /dev/vg09/lv_266 |more)

....

00000446 /dev/disk/disk74 00025589 current /dev/disk/disk75 00025589 current
00000447 /dev/disk/disk74 00025590 current /dev/disk/disk75 00025590 current
00000448 /dev/disk/disk74 00025591 current /dev/disk/disk75 00025591 current
00000449 /dev/disk/disk74 00025592 current /dev/disk/disk75 00025592 current
00000450 /dev/disk/disk92 00000000 current /dev/disk/disk93 00000000 current
00000451 /dev/disk/disk92 00000001 current /dev/disk/disk93 00000001 current
00000452 /dev/disk/disk92 00000002 current /dev/disk/disk93 00000002 current
00000453 /dev/disk/disk92 00000003 current /dev/disk/disk93 00000003 current
00000454 /dev/disk/disk92 00000004 current /dev/disk/disk93 00000004 current

..

is it possibel to change /dev/disk/disk74 and /dev/disk/disk75 within this lvol ?

Had same problem only with 2 disks where mirror and original where twisted and i solved it with lvsplit and lvmerge,.. but how can i do it if only a part is correct and a part not ?

Any idea ?
thank you 
regards Romana

1 REPLY 1
georgek_1
HPE Pro

Re: mirror in LV with 4 disks twisted


Hello Romana,

Whats the lvol policy set for this lvol - lv_266 ? is it strict or PVG-strict.
This kind of mix up will not happenen with PVG-strict policy in place , the lvol will be extended to the next disk in same PVG and will always mirrored to the other PVG set . 

To correct the situation , you may reduce the lvol mirror copy from disk74 and disk92 .
# lvreduce -m 0 /dev/vg_name/lvol_name /dev/disk/disk74 /dev/disk/disk92 
This will result lvol only available on disks 75 & 93 .
At this time you may perform pvmove disk93 to disk92 , # pvmove /dev/disk/disk93 /dev/disk/disk92
After pvmove, the lvol will be on disk75 and disk92 which is from same PVG pair (original set as you mentioned) .

You may change the lvol policy to PVG-strict at this time using # lvchange -s g /dev/vg_name/lvol_name.
And mirror the lvol , so that the mirror copy will go to 74 & 93 , the other PVG set ,since you have PVG-Strict policy in place .

Note: Please make sure that you have data backup available before making any changes .

Hope this helps .
I work for HPE/ I am an HPE Employee (HPE Community)


I am an HPE Employee. .
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo