1753824 Members
8569 Online
108805 Solutions
New Discussion юеВ

Add new disk (mirror)

 
Akif_1
Super Advisor

Add new disk (mirror)

Hi,

OS:HP-UX 11.11
Server:rp5410

Iam bit new to this mirror disk concept need an expert view upon my below issue.

#This problem of up gradation related to DATA DISK only NOT boot disk's(vg00)

Planned to upgrade mirror data disk (ex 50GB) to new disk (ex 100GB).

Scenario 1:

How to restore old disk data on new disk, Is it possible to insert new disk one by one and later increase VG&LV's for more space requirement.

Scenarios 2:

Forget about restoring old data.

If i remove old disk and insert both new disk, how to MIRROR those disk and rest process will be to make VG & LV as per client requirements.

I appreciate all who contribute a worth info.

Have a nice day :)

T(ogether) E(very one) A(chive) M(ore)
17 REPLIES 17
Michal Kapalka (mikap)
Honored Contributor

Re: Add new disk (mirror)

hi,

both of you scenarios are posible to do :

1, just simple reduce 1 mirror copy and replace the disk to bigger size, and them if its mirrored, them replace with the same procedure the second disk, of course at the end you can increase the LVOLS/fs size.

offline = extendfs
online = fsadm

2, backup your system via ignite (tape/server),
restore the system to the new disk ( in advanced type of restoration/installation you will be able change the size of LVOLs, and them mirror it together.

i'm using this commands in simple shell script :
#primary disk : c2t0d0 / hwpath : 0/1/1/0.0.0
#for mirroring disk : c2t1d0 / hwpath : 0/1/1/0.1.0


set -x
pvcreate -B -f /dev/rdsk/c2t1d0
mkboot /dev/rdsk/c2t1d0
mkboot -a "hpux -lq" /dev/rdsk/c2t0d0
mkboot -a "hpux -lq" /dev/rdsk/c2t1d0
vgextend /dev/vg00 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t1d0
.....
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t1d0
lvlnboot -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot -a 0/1/1/0.1.0
setboot

Best regards.

mikap
Michal Kapalka (mikap)
Honored Contributor

Re: Add new disk (mirror)

hi,

and i forgot to say :

in the second option, if you do not need the OLD data, just remove the LVOLS, from the vg, and them remove the PVs from VG, remove vg , pvcreate on the new disks, ( pvcreate -f /dev/rdsk/diskx )

create a new VG with all PVs, and them create lvol(s) and mirror it ( maybe you will do PVG groups ).

mikap
Torsten.
Acclaimed Contributor

Re: Add new disk (mirror)

This procedure is related to boot disks, for "normal" data disks it is even easier.

The problem is if you use a new bigger disk. Most of the times the current configuration does not allow the bigger disk (check vgdisplay -v -> max_PE and PE size).

In such case backup data, re-create the vg, create and mirror the LVOL and restore data.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Akif_1
Super Advisor

Re: Add new disk (mirror)

Hi Michal & Torsten,

I appreciate your quick response.

I will try to replace the new disk one by one if succeed nothing to worry about data and mirroring,

In case any failure if i opt scenario 2 on normal data disk NOT boot disk (vg00). let sat vgoracle.

to create mirror on two new data disk can i follow below steps.


2, backup your system via ignite (tape/server),

#NO tape drive attach backup not possible.

i'm using this commands in simple shell script :
#primary disk : c2t0d0 / hwpath : 0/1/1/0.0.0
#for mirroring disk : c2t1d0 / hwpath : 0/1/1/0.1.0


set -x
pvcreate -B -f /dev/rdsk/c2t1d0
mkboot /dev/rdsk/c2t1d0
mkboot -a "hpux -lq" /dev/rdsk/c2t0d0 (4 normal disk mkboot ok/not)
mkboot -a "hpux -lq" /dev/rdsk/c2t1d0
vgextend /dev/vgoracle /dev/dsk/c2t1d0
lvextend -m 1 /dev/vgoracle/lvol1 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vgoracle/lvol2 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vgoracle/lvol3 /dev/dsk/c2t1d0
lvextend -m 1 /dev/vgoracle/lvol4 /dev/dsk/c2t1d0
.....
lvextend -m 1 /dev/vgoracle/lvol8 /dev/dsk/c2t1d0
lvlnboot -r /dev/vgoracle/lvol3
lvlnboot -s /dev/vgoracle/lvol2
lvlnboot -d /dev/vgoracle/lvol2
lvlnboot -b /dev/vgoracle/lvol1
lvlnboot -R
lvlnboot -v
setboot -a 0/1/1/0.1.0


Rgd's
T(ogether) E(very one) A(chive) M(ore)
Prabhi
Advisor

Re: Add new disk (mirror)

You can use the below command to restore the data

#vgcfgrestore -n vg00 /dev/rdsk/c1tXdX
#Vgchange -a y vg00
# vgsync vg00
Akif_1
Super Advisor

Re: Add new disk (mirror)

Hi All,

#vgcfgrestore -n /dev/vg03 /dev/rdsk/c2t0d0
#vgchange -n y /dev/vg03
#vgsync vg03

After successful migration of mirror disk from 73GB to 146GB still the FREE PE 0 , how to recover the space to extend LV's.

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

Rgd's
T(ogether) E(very one) A(chive) M(ore)
Akif_1
Super Advisor

Re: Add new disk (mirror)

Any update will be appreciated ..........
T(ogether) E(very one) A(chive) M(ore)
Torsten.
Acclaimed Contributor

Re: Add new disk (mirror)

You replaced the disk with a larger disk and used vgcfgrestore? So you are using exactly the same size as the older disk. You need to pvcreate the larger disk!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Akif_1
Super Advisor

Re: Add new disk (mirror)

Hi Torsten,

You replaced the disk with a larger disk and used vgcfgrestore?
#Yes i used #vgcfgrestore #
vgchange -a y vgxx
#vgsync vgxx

Kindly provide me the steps after this to claim new disk space.

Regard's
T(ogether) E(very one) A(chive) M(ore)