Operating System - HP-UX
1835961 Members
1959 Online
110088 Solutions
New Discussion

Breaking and recreating a mirrorred disk

 
SOLVED
Go to solution
Jason Shannon
Occasional Advisor

Breaking and recreating a mirrorred disk

On a machine running HPUX 11.23 I have a SAN data disk of 36GB which is mirrored to a local disk of the same size.

The space used on the SAN disk will shortly be exhausted and I am going to extend it to 146GB. In order to continue with the mirror to the local disk, I am going to replace it with a 146GB physical disk i have purchased.

Here is the current volume group status:

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 4095
VGDA 4
PE Size (Mbytes) 8
Total PE 8190
Alloc PE 8190
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 32760
Current LE 4095
Allocated PE 8190
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c20t0d3
PV Status available
Total PE 4095
Free PE 0
Autoswitch On

PV Name /dev/dsk/c2t1d0
PV Status available
Total PE 4095
Free PE 0
Autoswitch On

I am just seeking confirmation that the steps to perform are:

lvreduce -m 0 /dev/vg01/lvol1 /dev/dsk/c20t0d3
vgreduce /dev/vg01 /dev/dsk/c20t0d3

then once the new physical disk is added and scanned in:

#pvcreate /dev/rdsk/xxxxxx
#vgextend /dev/vg01 /dev/dsk/xxxxxx
#lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/xxxxxx

Any advice greatly appreciated (and rewarded with suitable points :-) )
4 REPLIES 4
Ivan Krastev
Honored Contributor

Re: Breaking and recreating a mirrorred disk

Yes, this is the exact procedure.

regards,
ivan
TTr
Honored Contributor
Solution

Re: Breaking and recreating a mirrorred disk

Your proposed steps is the standard approach. However, if you look at your vgdisplay output,

PE size (Mbytes) 8
Max PE per PV 4095

This means that you can only have 4095 physical extends in each physical volume in this volume group and at 8MB per extend the most space you can use for any physical volume in this VG is 32760MB.

So you need to either allow more PE in the vg or increase the extend size.
In HP-UX 11.23, vgmodify is available to increase the max PE in the vg. Look in the man page for vgmodify. If you don't have it in 11.23, you need to install it via some patches. Search for vgmodify in this forum to get more details.
YAQUB_1
Respected Contributor

Re: Breaking and recreating a mirrorred disk

Hi,

>>> In order to continue with the mirror to the local disk

==> Local disk means in system disk?

>>> # pvcreate /dev/rdsk/xxxxxx

==> # pvcreate -fB /dev/rdsk/cxtxdx

U can also follow below URL links:-

http://www.docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

http://www.docs.hp.com/en/7161/LVM_OLR_whitepaper.pdf

BR/
Yaqub
Jason Shannon
Occasional Advisor

Re: Breaking and recreating a mirrorred disk

Thanks for your responses.

FYI, I am creating a new PV altogther with the 146GB LUN that is being presented from the SAN