1754974 Members
3072 Online
108828 Solutions
New Discussion юеВ

Extending Mirror L2000

 
SOLVED
Go to solution
grace white
Advisor

Extending Mirror L2000

Hi

Thank you for reading this at present I have 2 x 18 Gig Disks, which are mirrored to volume group vg01. What I want to achieve is to add a third disk to this mirror, which is 36 Gig in size.

I am a bit confused on how I would go about this because my first thought was to:

1. pvcreate
2. vgextend /dev/vg01 /dev/dsk/
3. lvextend -m 2 /dev/vg00/lvol6 /dev/dsk/

But I have been told I need to export the 18Gig to the new disk can anyone please advise me on the correct way to achieve this.

Thanks
Grace


O/P from lvdisplay
--- 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
00001 /dev/dsk/c5t9d0 00001 current /dev/dsk/c7t9d0 00001 current
00002 /dev/dsk/c5t9d0 00002 current /dev/dsk/c7t9d0 00002 current

UNIX/ORACLE DBA
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: Extending Mirror L2000

Grace,

At the risk of repeating myself from your last posting, I'll say again: the PE size of the VG won't allow full utilization of the new 36GB drive.

The easiest way to do this will be to create a new VG on the 36GB disk, copy the contents of vg01 into the new VG, destroy vg01 (you can just vgextport it), then add the two 18GB disks into the new vg and then lvextend the mirror(s) onto the newly added disks.


Pete



Pete
grace white
Advisor

Re: Extending Mirror L2000

I have got what you say there but how do i do this as i am not sure about.

Do i simple just do as followed :-

1. pvcreate /dev/rdsk/
2. vgchange -a n /dev/vg01
3. vgexport -p -m mapfile vg01
4. vgexport -m mapfile vg01
5. vgimport -p -v -m mapfile /dev/dsk/cxtydz /dev/dsk/

then simply just do a lvextend -m 2 /dev/vg00/lvol6 /dev/dsk/

This is where i am not sure

Thanks
Grace
UNIX/ORACLE DBA
Steven E. Protter
Exalted Contributor

Re: Extending Mirror L2000

If you have resolved the issue Pete points out, your procedure is correct.

Try it.

A second mirror copy will not really help performance at all. It helps reliability to the extent that you're on a different disk, but almost always 1 copy is enough.

Seems its time to try it.

Nothing you have posted is dangerous.

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
Pete Randall
Outstanding Contributor

Re: Extending Mirror L2000

Grace,

1. mkdir /dev/vg00
2. mknod /dev/vg02/group c 64 0x020000
3. pvcreate /dev/rdsk/
4. vgcreate -s 2 /dev/vg02 /dev/dsk/
5. lvcreate /dev/vg02
6. newfs /dev/vg02/rlvol1
7. Copy the contents of the existing vg01 to vg02 using backup/restore or cpio
8. vgexport vg01 (no preview, no mapfile, we're destroying it)
9. Use vgextend to extend vg02 onto the disks that used to be in vg01
10 Use lvextend to create the mirror(s) on the just added disks.


Pete



Pete
grace white
Advisor

Re: Extending Mirror L2000

Thanks

Guys i am about to issue this in production next Thursday so that has been a great help.

Grace
UNIX/ORACLE DBA
Dave Wherry
Esteemed Contributor

Re: Extending Mirror L2000

A small correction and a couple of additional steps you'll need.
In Step 1, that should be vg02. You likely already have a vg00 for your operating system. That mkdir as written should just generate an error.

Between Steps 6 and 7, you will need to create a temporary mount point and mount the new file system you have just created. Then you can copy all of your data over to the new file system.
After the copy is completed you can unmount the opiginal and new file systems. Then mount the new file system on the original mount point. That way all paths remain the same.