Operating System - HP-UX
1752808 Members
5758 Online
108789 Solutions
New Discussion юеВ

extending mirrored volumes

 
Dan Ryan_6
New Member

extending mirrored volumes

have a vg with 1 lv, 4 pv, using strict allocation.
So the lv consists of 2 pv mirrored onto the other 2 pv. I've added two more
pv to the vg, and want to
increase the lv to 3 pv mirrored onto to 3 pv.

I've done the pvcreate and vgextend. What is the lvextend command that will
result in the lv size incease by the size of one pv and that new sets of
extents being mirrored on the other new pv?.
2 REPLIES 2
Stephen White_3
New Member

Re: extending mirrored volumes

Hi Dan,

You are trying to extend a mirrored logical volume. I will start with some
background and you will have to change the information pertaining to your
device drivers, disk size and volume group names.

It is best when doing this stuff to get a good full backup before proceeding. I
am throwing this together without knowledge of your hardware addessing and disk
sizes.

Assumptions:

no other logical volume in that volume group
controller = c1txd0
volume group: = /dev/vg01
logical volume = /dev/vg01/lvol1
disk drives: = 2 GB = 508 P.E.
= 4.3 GB = 1023 P.E.
= 9.1 GB = 2170 P.E.

original disk addresses = /dev/dsk/c1t6d0 /dev/dsk/c1t5d0 /dev/dsk/c2t6d0
/dev/dsk/c2t5d0

new disk devices = /dev/dsk/c1t4d0 /dev/dsk/c2t4d0

lvreduce -m 0 /dev/vg01/lvol1

If the disks are new to your system and not boot disks:

pvcreate -f /dev/rdsk/c1t4d0
pvcreate -f /dev/rdsk/c2t4d0
vgextend /dev/vg01 /dev/dsk/c1t6d0 /dev/dsk/c2t4d0

Verify what disks your logical volume is currently occupying:

vgdisplay -v /dev/vg01 |more

Assume that the logical is occupying /dev/dsk/c1t6d0 /dev/dsk/c1t5d0 and that
these are 4.3 GB drives.

Your current size of the that lvol1 would be 2046 P.E. or 8+ GB.
The number after the -l should half of the total Physical extents.

lvextend -l 3069 /dev/vg01/lvol1 /dev/dsk/c1t4d0
lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c2t6d0 /dev/dsk/c2t5d0 /dev/dsk/c2t4d0

extendfs -F filesystemstype /dev/vg01/lvol1

If you have any questions or are not sure send me an e-mail.

swhite@compmore.net
Dan Ryan_6
New Member

Re: extending mirrored volumes

Than you for your help Steve I used your doc to add the disks and mirrors.
After dropping the original mirrors and adding the new disks, I extended the
primaries without a problem. I was concerned that the primaries wouldn't end up
mirrored on the particular disks I wanted. All I did was list the target
mirrors in the sequence that the primaries were listed (lvdisplay -v) and
everything went fine.

Thanks again.