Operating System - HP-UX
1829589 Members
6751 Online
109992 Solutions
New Discussion

Re: Extending a mirrored filesystem

 
SOLVED
Go to solution
Stephen Young_1
Occasional Advisor

Extending a mirrored filesystem

Can someone tell me the syntax for extending
a mirrored lv when there are more than two pv's
in the volume group.

Cheers in advance
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Extending a mirrored filesystem

Hi Stephen:

To mirror onto a specific disk use this syntax:

# lvextend -m 1 /dev/vgXX/lvolX /dev/dsk/cXtYdZ

...JRF...
Vincent Stedema
Esteemed Contributor

Re: Extending a mirrored filesystem

Hi Stephen,

lvextend the primary lvol to the disk you want the newly allocated PE's to reside on. Use lvdisplay to determine on which disk in your vg the mirrored PE's are located and then use pvmove to move the mirrored data to the disk you want to use as the secondary disk.

Hope this helps.

Vincent
Vincenzo Restuccia
Honored Contributor

Re: Extending a mirrored filesystem

#lvextend -m 1 /dev/vg00/lvolx /dev/dsk/cxtxd0
and see http://docs.hp.com/hpux/onlinedocs/B2355-90672/B2355-90672.html
Carsten Krege
Honored Contributor
Solution

Re: Extending a mirrored filesystem

James gave you the syntax of how to create a mirror copy of an unmirrored lvol.

The following gives you the syntax of increasing the size of an mirrored lvol.

lvextend -l /dev/vgXX/lovlX /dev/dsk/ /dev/dsk/

This will extend the size of the lvol to newsize (numbers of physical extents), taking the extents from disk1 and disk2. With the allocation policy set to "strict" (default) the two mirror copies of the disk will always be on different disks.

You might be interested in using physical volume groups. A full descriptiuon of this feature, together with examples, is in the manpage lvmpvg(4). Once setup, it will always take care that the allocation of extents is done properly.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG