Operating System - HP-UX
1831995 Members
3154 Online
110034 Solutions
New Discussion

Primary root disk replace without reboot HP UX 11.11

 
SOLVED
Go to solution
vmatulis
Occasional Advisor

Primary root disk replace without reboot HP UX 11.11

HP recommends booting the server from alternate boot disk in order to replace primary boot disk. Is there a way to change it without reboot? 11.11 hot swap disk.
14 REPLIES 14
IT_2007
Honored Contributor

Re: Primary root disk replace without reboot HP UX 11.11

Yes . you can do it if it is completely DEAD.

ioscan -fnCdisk

and check if it is CLAIMED or NO_HW.

Also you need to make sure how server is booted off.

echo "boot_string/S" |adb /stand/vmunix /dev/mem

replace mem to kmem if it is a vpar.

If is completely dead then pull dead one and replace with new one.

pvcreate -B /dev/rdsk/cXXtYYdZZ
vgcfgrestore -n /dev/vg00 /dev/dsk/cXXtYYdZZ
vgsync /dev/vg00
john D_3
Frequent Advisor

Re: Primary root disk replace without reboot HP UX 11.11

If disk is still showing CLAIMED in ioscan. Break the mirror, change the disk and re-create the mirror.
IT_2007
Honored Contributor

Re: Primary root disk replace without reboot HP UX 11.11

If it is not completely dead and still shows CLAIMED in ioscan.

then

lvreduce -m 0 all logical volumes
vgreduce /dev/vg00
repalce it.

pvcreate -B
mkboot newdisk
mkboot -a "hpux -lq" newdisk
vgextend /dev/vg00 newdisk

You need to mirror /stand swap and / in the following order otherwise server won't be bootable.

lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol2
and then remaining logical volumes.
vmatulis
Occasional Advisor

Re: Primary root disk replace without reboot HP UX 11.11

Sorry, but both answers refer to HP recommended procedure to replace secondary boot drive.
I was advised that vgreduce command will not work trying to remove primary drive.
Drive is not dead.
IT_2007
Honored Contributor

Re: Primary root disk replace without reboot HP UX 11.11

Ok, if you want to replace existing primary disk which server was booted off then above procedure won't work. You need to reboot server with alternate disk and follow above procedure.
vmatulis
Occasional Advisor

Re: Primary root disk replace without reboot HP UX 11.11

Got it...
Bill Hassell
Honored Contributor

Re: Primary root disk replace without reboot HP UX 11.11

If both disks are hot swap, then you can 'fail' the primary pulling it out. The system will discover the missing disk and start using the mirror copy. Now the disk no longer working and you can follow the steps above. All of this assumes you have a good mirror copy (no stale extents).


Bill Hassell, sysadmin
vmatulis
Occasional Advisor

Re: Primary root disk replace without reboot HP UX 11.11

HP engineer said to that procedure that last step vgreduce of primary disk probably will not work. Have you actually tried that step?. I did swap the drive, but only tried using pvcreate -fB command and it did not like it.
I guess if that steps vgreduce works, then should be no problem.
john D_3
Frequent Advisor
Solution

Re: Primary root disk replace without reboot HP UX 11.11

Hi,

I tried this in my environment several time and it should work. HP offer true active/active mirroring. It doesnt matter you boot your machine from primary disk or alternate both disk. Under mirroring both disks always work active/active. If you remove one disk by vgreduce the other disk will take its place.
Yang Qin_1
Honored Contributor

Re: Primary root disk replace without reboot HP UX 11.11

Hi, Mehmood, I think vmatulis got a corrupted vg00. He is trying to remove that old / replaced device from vg00.

vmatulis, did you try to run "lvreduce -m 0 /dev/vg01/lvol# /dev/dsk/olddev" and then "vgreduce -f vg00"?

Yang
vmatulis
Occasional Advisor

Re: Primary root disk replace without reboot HP UX 11.11

Mahmood's approach was correct.
Thanks!
Geoff Wild
Honored Contributor

Re: Primary root disk replace without reboot HP UX 11.11

Here's my 2 cents - as this happened to me:

For a root disk:

After failed disk has been replaced by HP (assuming the disk is c1t5d0):

vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t5d0

mkboot /dev/rdsk/c1t5d0

mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/c1t5d0

vgchange -a y /dev/vg00

lvlnboot -Rv /dev/vg00

vgsync /dev/vg00



For a non root disk:

After failed disk has been replaced by HP (assuming the disk is c1t6d0):

vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t6d0

vgchange -a y /dev/vg00

lvlnboot -Rv /dev/vg00

vgsync /dev/vg00



However:

1) If the disk is completely "dead", such as if you run ioscan and status is "no_hw" then you can hot swap the disk online.

2) However in circumstances where the disk has not fully failed please do one of the following to avoid data corruption :

a) reduce mirror before replacing the disk
b) deactivate VG before replacing the disk
c) shutdown system to replace the disk



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: Primary root disk replace without reboot HP UX 11.11

I have literally replaced hundreds of these disks without a single "hiccup" and everyone of them was an "on the fly" replacement. If the disk is "hot pluggable" then you can convert a flaky or failing drive to a failed drive by the simple expedient of simply pulling the drive out of its slot a few centimeters and allowing it to spin down before removing it completely. Wait about 90 seconds to give the system plenty of time to detect the "failed" drive and proceed with the normal replacement starting with vgcfgrestore. No vgreduce is needed or wanted.
If it ain't broke, I can fix that.
vmatulis
Occasional Advisor

Re: Primary root disk replace without reboot HP UX 11.11

Hmm, before I took Mahmood's approach I was trying to do almost!!!! just that.. Since this was primary disk (at least that is an explanation), after the swap, system was not allowing me to do vgcfgrestore, or pvcreate -fB command. I had to do lvreduce vgreduce before I succeded.
I ended up putting failing disk back, doing vgsync vg00.

I guess my mistake was, that after taking old disk back I did not give system enough time to detect bad disk. I will keep that in mind.
Thanks a lot!!!