PVG Mirroring

 
SOLVED
Go to solution
Robin King_1
Regular Advisor

PVG Mirroring

I posted a question about this earliler in the month, but can't find the post now, and I'm still having problems.

/dev/vg03/lwswap uses /dev/dsk/c1t13d0 and /dev/dsk/c1t14d0, these two disk are PVG0. /dev/dsk/c7t13d0 and /dev/dsk/c7t14d0 are PVG1.

VG /dev/vg03
PVG PVG0
/dev/dsk/c1t13d0
/dev/dsk/c1t14d0
PVG PVG1
/dev/dsk/c7t13d0
/dev/dsk/c7t14d0

When I do an lvdisplay it shows the two primary disks, but only seems to mirror onto /dev/dsk/c1t13d0:

--- Logical volumes ---
LV Name /dev/vg03/lvswap6
VG Name /dev/vg03
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 512
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t13d0 128 128
/dev/dsk/c1t14d0 128 128
/dev/dsk/c7t13d0 256 256

I want it to mirror onto both /dev/dsk/c7t14d0. I have broken the mirror, and reinstated it using:

lvextend -m 1 /dev/vg03/lvswap6 PVG1

This only extends onto the single disk. I have also tried lvextend -m 1 /dev/vg03/lvswap6 /dev/dsk/c7t13d0 /dev/dsk/c7t14d0, but this still only extdns to one disk.

Can anyone help?


6 REPLIES 6
Dietmar Konermann
Honored Contributor
Solution

Re: PVG Mirroring

By default, LVM fills up a PV completely until it fetches the next one for extent allocation.

To get the desired layout your would need to create a 512MB mirrored lvol 1st. Then perform an lvextend to 1024MB specifying the other two disks for allocation.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Jochen Heuer
Respected Contributor

Re: PVG Mirroring

Hi,

I am not sure why you want to distribute the mirror onto two disks since you are not using extent based striping.

Why do you want to distribute the mirror onto two disks? For performance reasons? Then you should use extent based striping for the 'original' side also.

Right now the first half of the lvol is on the first disk and the second half on the second ...

Regards,

Jochen
Well, yeah ... I suppose there's no point in getting greedy, is there?
Jean-Louis Phelix
Honored Contributor

Re: PVG Mirroring

hi,

I also don't see why you want to use both disks, but it's your choice :-) ! As Dietmar explained to you, LVM will first try to fill a PV before using the second one. The only solution I can see would be to create a 'dummy' lvol leaving only 128 LE free on /dev/dsk/c7t13d0, create your mirror and finally delete the dummy lvol.

Regards.
It works for me (© Bill McNAMARA ...)
Robin King_1
Regular Advisor

Re: PVG Mirroring

Thanks all that's cleared it up. The fact that LVM fills one disk first makes total sense, and explains why I couldn't do what I was trying to do.

I'll leave it as it is.

Thanks
leyearn
Regular Advisor

Re: PVG Mirroring

what's the version of you hpux
if 11i or later
#lvcreate -s g -m 1 -D y -L 1024 -n lvswap6 /dev/vg03
the D option can make the pe allocation among all the pvs
Tim D Fulford
Honored Contributor

Re: PVG Mirroring

Robin

off subject... to get to your old posts hit "my profile" on the left of the window. There will be a section/link called "my questions".

As far as the extent based mirrored stripe, at lv create time

lvcreate -m1 -D y -s g -L 1024 -n lvswap06 vg03

I do this..

Regards

Tim
-