Operating System - HP-UX
1830168 Members
12215 Online
109999 Solutions
New Discussion

RE adding new disk to mirrored volume

 
SOLVED
Go to solution
grace white
Advisor

RE adding new disk to mirrored volume

Hi
I am about to add a new disk to a mirrored volume what I want to know is the following :

a. how do I split the volume to enable me to lvexend existing mirrored volume with new disk.
b. should I take a backup using vgcfgbackup of volume as well


The following configuration is as followed at present :

Bdf

Filesystem kbytes used avail %used Mounted on
/dev/vg01/lvol12 17776640 16272844 1410625 92% /home3
/dev/vg00/lvol6 573440 479731 87910 85% /opt


--- Logical volumes ---
LV Name /dev/vg01/lvol12
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 17360
Current LE 4340
Allocated PE 8680
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/c5t9d0 4340 4340
/dev/dsk/c7t9d0 4340 4340

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c5t9d0 00000 current /dev/dsk/c7t9d0 00000 current

Thanks
Grace
UNIX/ORACLE DBA
4 REPLIES 4
Stefan Farrelly
Honored Contributor
Solution

Re: RE adding new disk to mirrored volume

a. to split the volume - ie. remove the mirror so you can add in the new disk do;

lvreduce -m 0 /dev/vg01/lvol12

b. No need to to a vgcfgbackup, normal vg commands automatically do one. When you now add in the new disk using vgextend it will run vgcfgbackup.

But your problem is you have disk A (17GB) mirrored to disk B (17GB) and you want to add a third disk ? If the size of the new disk is also 17GB you wont be able to mirror it (not easily anyway). Normally to extend a mirrored lvol you add 2 new disks, one to extend the data and one to extend the mirror.

If your new disk is 36GB then youre fine, you can do it. Just lvextend vg01/lvol12 onto the old mirror disk (c7t9d0), then when you do lvextend -m 1 /dev/vg01/lvol12 it will mirror to the new disk.

If youre adding a new disk also 17GB then you should only increase vg01/lvol12 by half that amount (8.5GB) to leave enough space to mirror it all also. Even then it wont be easy to have a mirrored lvol using 3 disks (normally you use an even number of disks). It will take some precise lvextend and mirror commands to accomplish it, but it is possible.

Im from Palmerston North, New Zealand, but somehow ended up in London...
grace white
Advisor

Re: RE adding new disk to mirrored volume

Hi Stefan

Thanks for the reply there is just one thing i want to clarify with you. I have two disks both 17Gb each the new disk is 36Gb so when i come to mirror this do i just do lvextend -m 1 /dev/vg01/lvol12 not a -m2 as i thought.

Regards
Grace
UNIX/ORACLE DBA
Stefan Farrelly
Honored Contributor

Re: RE adding new disk to mirrored volume

Hi Grace,

yes, reduce your mirror, extend your volume to the 17Gb mirror drive which is now free, then add the 36GB drive, and when you reapply the mirror with lvextend -m 1 it will automatically use the new spare 36GB drive.

Im from Palmerston North, New Zealand, but somehow ended up in London...
grace white
Advisor

Re: RE adding new disk to mirrored volume

Great

Thanks for that.

Grace
UNIX/ORACLE DBA