Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change disk on vg00 need help please

Status
Not open for further replies.

oliverbeat

Technical User
Sep 3, 2004
86
0
0
NZ
change disk on vg00 need help please

Hello

If I want to change the disk on vg00 (system mirror) without outage but with new disks bigger size is it possible ?

Actually I have 2 disks on vg00 of 8GB and want to change to 36GB... (the same for the volume group data vg01)

If it is possible, did the following step that I thought are enough or did I miss some steps (I want to do this on vg00 and also on vg01) ?

1- Check the boot definition
# lvnlboot –v
# setboot

2- unmirror the volume group vg00
There is no command on hp-ux ? on AIX it is unmirrorvg vgname hdiskname …
Did I have to use lvreduce for each logical volume ?
# lvreduce –m 0 –A n /dev/vgname/lvname pvname

Do we have to put –m 0 or -m 1? I don’t understand this if I have 2 disk on vg00 and mirrored.

3- extend vg00 with the new disks (bigger size 36GB actual size of the current disks 8GB)
(First create the new disks: # pvcreate /dev/rdsk/cntmd0 etc…)
# vgextend /dev/vg00 /dev/dsk/cntmd0
# vgextend /dev/vg00 /dev/dsk/cn’tm’d0

4- copy disk to disk the data
Let say vg00 have the 2 disks: cxtxd0 and cytzd0 and 2 new disks cntmd0 and cn’dm’d0
Do we have to do like this below?
# pvmove /dev/dsk/cxtxd0 /dev/dsk/cntmd0
# pvmove /dev/dsk/cytzd0 /dev/dsk/cn’tm’d0

5- reduce the vg of the old disks
# vgreduce vg00 /dev/dsk/cxtxd0
# vgreduce vg00 /dev/dsk/cxtxd0

6- mirror the volume group vg00
No command to mirror a volume group? On AIX we use the command mirrorvg vgname
Have to do something like this on HP-UX ?
for LV in /dev/vg00/lv*
do
lvextend -m 1 $LV
done

7- Rebuild the boot disk image
On AIX we do this:
# bosboot -ad /dev/hdisk0
the check the bootlit:
# bootlist –m normal –o

But don't know how to do it on hp-ux … if someone can help me


8 - Make a system backup (make_tape_recovery)

Did I miss a step?

Thanks in advance

Cheers

Al.
 
You've got the right idea, but persoanlly I'd make my life simple and use ignite.

Create a make recover tape, include all vg00

Shutdown box, remove disks (both), insert new.

Boot off make recovery tape.

Interupt boot, and modify the size of the filesystems to fit new disk. Kinda obvious once your in as to how it works, once you change the size of a filesystem, you have to tab round to the modify button to accept. Ensure you only add one disk (physical vol) to vg00, make sure the other is "unused"

Rebuild off tape.

Remirror onto other disk. Job done.

If you have problems, "recover" by putting the old disks back.

To do it your way, I'd split the mirror, (-m 0 is correct), remove one disk (the alt. boot disk pref) from the vg (vgreduce command) and then insert the new disk and remirror, then repeat process to get the 2nd bigger disk in. Problem you then have is that you have to extend all the filesystems still, whereas with the make_recovery_tape, you can do this very easily.

I've done this many times, and always use the make_recovery_tape.

You do hawever, need ignite installed.

Martin
 
Thanks Martin,

Your way is the most easy but the problem is can't power off the system it is Production so I was thinking of a way to avoid an outage.

Thank you Martin, I will use your advise when I will do my restore from scratch of the prod on the test machine...

Cheers
Al
 
Is it not possible to arrange downtime ???

Whot model is it, the server may not have hot swappable disks, so you would have to power off to change them.

I would allow 4 hrs to do the work, can it be done at night.

Do you have onlineJFS, would be useful if you need to do the swapover 'your way'.

M
 
sorry for the delay I was traveling.
I have now my outage! Tonight. So I will follow your advise.
Replace the disks by 2 new and restore with my ignite backup
Hope everything will be fine.
I just have a question as I have 4 disks: 2 for vg00 (that will be replace) and 2 for vg01 when I will finished the restore normally my system will keep the information of the volume group vg01 with the lv (are they are not standard I mean the name of the lv data are not lvol... but lvu01 etc...)

Thanks in advance.
Regards
Al.
 
sorry for the delay I was traveling.
I have now my outage! Tonight. So I will follow your advise.
Replace the disks by 2 new and restore with my ignite backup
Hope everything will be fine.
I just have a question as I have 4 disks: 2 for vg00 (that will be replace) and 2 for vg01 when I will finished the restore normally my system will keep the information of the volume group vg01 with the lv (are they are not standard I mean the name of the lv data are not lvol... but lvu01 etc...)

The model is L class 2000

Thanks in advance.
Regards
Al.
 
Replace the vg00 disks, use ignite as we discussed ...

Make sure the tape is created with the command ...

make_tape_recovery -A

You need to ensure the tape contains all of vg00 (think it does by default, but -A forces it), oh, check man page on that, it's from memory.

You could get the make_recovery_tape to also include vg01, but you may not have enough space.

I would therefore replace vg00, boot and check all is ok.

You could then do one of two things ...

Use vgcfgrecover to recover the vg01 info onto the new "vg01" disks, then restore data.
or
manually rectrate vg01 and lvols, then recovry data from backup.

Personally, I recommend keeping lvols standard if poss, makes life easier.

Hope that this is of help to you.

Martin

Martin
 
Thanks Martin,

But the disk wasn't recognise by the server:
I have unmirror all the lvs then reduce the disk failure from vg01.
When the HW guy replace the disk by a new one the system didn't recognise it:
the old disk is a model SCSI LVD/SE, the new disk is a model typ ULTRA3 SCSI Drive.

When he plugged the new disk, I run ioscan -fnC disk
the result was NO_HW on the status

The HW guy believed that the new disk should be abslutly the same model type of the old one ie LVD/SE

My question is: there is another command on hp-ux that give me more details/info when we replace a disk ? ioscan should not be the only command... I want to be sure of the status etc...
Thanks in advance
 
run ioscan without options. sometimes ioscan -fnC behaves like ioscan -fnkC.
Anyway: what can be a better command to do an ioscan than ioscan? solaris guys would probably love it.
 
Thanks it was just in case another command exists! Thanks a lot.
 
There is another command, but it will not help you ...

diskinfo /dev/rdsk/cXtXdX

but, the device must be seen by the system (ie. ioscan should produce something other than NO_HW.

You must run ioscan without the k option, otherwise it just re-reads what's in the kernel, run ioscan -fn forces it to re-scan.

Yep, the Solaris guys would love ioscan ... makes life very easy.

I suspect that the different disk is not compatable. You need to be very careful and check that the new disks you have will work with the system.

Martin
 
Forgot to say ...

diskinfo command will give you the model no. of the disk if I recall correctly ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top