Operating System - HP-UX
1833758 Members
2753 Online
110063 Solutions
New Discussion

Mirroring Striped Logical Volumes

 
JoAnn Nagel
Occasional Contributor

Mirroring Striped Logical Volumes

Is there a way to mirror a logical volume group which is already striped on HP-UX 11.11 using LVM? We are migrating to a new SAN and had hoped to mirror the existing volumes to the new SAN. However, our striped logical volume groups are getting an error below:
Striped mirrors are not supported. To enable mirroring options (-m, -M, -c),
do not specify the striping options (-i, -I) when creating logical volumes.

Thanks for any ideas/suggestions.
6 REPLIES 6
Geoff Wild
Honored Contributor

Re: Mirroring Striped Logical Volumes

I think it has to be created a certain way - with EXTENT BASED MIRRORED STRIPES:

man page show:

Distributed Allocation Policy
This example shows how the -D y option can be used to create EXTENT-
BASED MIRRORED STRIPES.

Assume that volume group /dev/vgtest has two physical volume groups:
pvg1 and pvg2.

Assume that each physical volume group has 2 physical volumes.

Assume that the first physical volume in each pvg has 3 extents free
and the second physical volume in each pvg has 2 extents free.

The following command creates a logical volume in vgtest with EXTENT-
BASED MIRRORED STRIPES:

lvcreate -D y -s g -m 1 -l 5 /dev/vgtest

The distributed allocation proceeds as follows:
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ Mirrors for the five extents are then allocated from the
free extents in pvg2 in a similar manner.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: Mirroring Striped Logical Volumes

JoAnn,

The error message you're getting seems to be pretty definitive. The man page, however, doesn't mention any such restriction. The only thing I did pick up was this:

"LVM striped logical volumes are always allocated using a strict allocation policy. Consequently, striped logical volumes may only be extended by a number extents that is a multiple of disks the logical volume is striped across."

If you've complied with that restriction then I guess the error message is your final answer.


Pete

Pete
Geoff Wild
Honored Contributor

Re: Mirroring Striped Logical Volumes

Okay - you won't be able to do what you want - unless you upgrade to 11.31:

http://docs.hp.com/en/5991-7518/5991-7518.pdf

Page 6:

"The following feature is new with the HP-UX 11i v3 release of MirrorDisk/UX:
â ¢ Striped Mirrors: In previous releases, LVM supported a limited extent-based striped mirror
functionality, as described in the lvcreate(1M) manpage. This type of striped mirror required
the stripe size to be a multiple of extent size. In HP-UX 11i v3, LVM supports mirroring of
striped logical volumes with the entire range of stripe sizes. The lvcreate command
options -m and -i/-I can be used together, and the -m option of the lvextend and
lvreduce commands can be applied to striped logical volumes."

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Torsten.
Acclaimed Contributor

Re: Mirroring Striped Logical Volumes

Sounds very clear:

"Striped mirrors are not supported. To enable mirroring options (-m, -M, -c),
do not specify the striping options (-i, -I) when creating logical volumes."

Once it is striped, it cannot be mirrored.

Consider to backup the data and restore to the new device.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
JoAnn Nagel
Occasional Contributor

Re: Mirroring Striped Logical Volumes

Thanks to all! This is sort of what I thought, but needed confirmation.
Sandman!
Honored Contributor

Re: Mirroring Striped Logical Volumes

Striped lvols cannot be migrated without taking an outage by mirroring them at the LVM layer. Instead create the destination lvol in the target VG and unmount the striped lvol which is the source and then copy it over with dd(1) viz.,

# dd if=/dev/vgOLD/rlvol1?? of=/dev/vgNEW/rlvol?? bs=1024k