Operating System - HP-UX
1831137 Members
2650 Online
110020 Solutions
New Discussion

Re adding new disk to current mirror

 
SOLVED
Go to solution
grace white
Advisor

Re adding new disk to current mirror

Hi All

I have a mirrored volume group vg01 which is as followed :

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c5t9d0 4340 4340
/dev/dsk/c7t9d0 4340 4340

these are mirrored and I need to break this mirror to add a new disk and then mirror them back in to enable me more space .

Mirror copies 1

--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4341
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 8680
Free PE 0
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0

Do I simply just do the same as mirroring one volume but issue the following command :

lvextend -m 2 /dev/vg00/lvol6 /dev/dsk/

Regards
Grace
UNIX/ORACLE DBA
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Re adding new disk to current mirror

You will need to run pvcreate to prepare the disk for use.

Then you will need to run vgextend

vgextend /dev/vg01 /dev/dsk/

then

lvextend -m 2 ... as you posted it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
grace white
Advisor

Re: Re adding new disk to current mirror

Thanks
UNIX/ORACLE DBA
Denver Osborn
Honored Contributor

Re: Re adding new disk to current mirror

Did you need to create another mirrored copy of the lvol or increase the size of the lvol? From your post, it sounds like you needed to increase the size.. but your lvextend syntax shows you making 2 mirrored copies.

You'll need to add atleast two more disks to the VG before you can extend that lvol.

The lvextend syntax you posted would not work if your intent is to extend the lvol. Simply put, add to PV to the VG then lvextend to add more space to your lvol.

pvcreate, vgextend then lvextend to increase the size of the lovl.

hope this helps,
-denver
Todd McDaniel_1
Honored Contributor

Re: Re adding new disk to current mirror

Im not totally clear on your objective here so I will offer a few scenarios...

______________________________
First of all, if you are simply adding a disk to vg01 for more available space, then you dont need to mess with removing/readding the mirroring... however, you may need another disk to make the mirroring work properly...

Just leave that alone...

With mirroring currently used on vg01, in order to mirror properly, your disks on m0 must = total extents of the m1 mirror...

If you add 1 more disk to m0 and don't add a disk of the same size to m1, you will not be able to mirror them properly. If you have a disk fail with out proper mirrors you will be in trouble.


Second, that command you have shown... lvextend -m 2... Implies that you are making a 3rd mirror... if that is the case. Then you only need to run it and your 3rd mirror will be established and you can then break the mirror and move that disk where ever you want to move it... possibly to another box or for backup purposes...


Please tell us your objective clearly...

1) is it to add additional disk space to the vg01

2) is it to assign a 3rd mirror?

Unix, the other white meat.
Dave Wherry
Esteemed Contributor

Re: Re adding new disk to current mirror

One other issue to think about. Your volume group was set up with Max PE per PV = 4341. You can only use 18GB drives in this volume group. If you put in a larger drive only the first 18GB will be available.