1830169 Members
6329 Online
109999 Solutions
New Discussion

replace bootdisk

 
Vlad_9
Occasional Contributor

replace bootdisk

Hi all!
I have two physical boot volumes in vg00.
Primary Boot /dev/dsk/c2t2d0 (0/0/2/0.2) and Mirror Boot /dev/dsk/c1t2d0 (0/0/1/1.2)
Primary bootdisk failed, i need replace it.

Sequence of actions:

Installed old disk.
1. Remove mirror:
# lvreduce -m 0 -A n -k /dev/vg00/lvol1 /dev/dsk/c2t2d0
- for all logical volumes (1-8), included root(3) and swap(2)

2. Remove disk from volume group:
# vgreduce /dev/vg00 /dev/dsk/c2t2d0

3.Turn off server, remove old disk and install new one.
Turn on server, it's boot from secondary disk.

4.Create physical volume PV:
#pvcreate -B -f /dev/rdsk/c2t2d0

5. Add disk into volume group:
#vgextend /dev/vg00 /dev/dsk/c2t2d0

6. Make this disk as boot:
#mkboot /dev/rdsk/c2t2d0
#mkboot -a "hpux /stand/vmunix" /dev/dsk/c2t2d0

6. Make mirror:
#lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
- for all logical volumes(1-8)

7. And after:

#lvlnboot -r /dev/vg00/lvol3 #root
#lvlnboot -s /dev/vg00/lvol2 #swap
#lvlnboot -b /dev/vg00/lvol1 #boot
#lvlnboot -d /dev/vg00/lvol2 #dump

Verify result of mirroring:
#lvlnboot -v


So, it's ok?
Have I not missed something?
9 REPLIES 9
Luk Vandenbussche
Honored Contributor

Re: replace bootdisk

Sandy Chen
Honored Contributor

Re: replace bootdisk

Hi Vlad,

Looks okay for me. May I know what type of machine you have? Is it necessary to turn off server? Most of the disk are hot swap nowadays.

Regards,
Sandy
I never think of the future. It comes soon enough.
Vlad_9
Occasional Contributor

Re: replace bootdisk

Sandy, it's 9000 series L1000 enterprise server solution.

Luk, thanks for link.
Sandy Chen
Honored Contributor

Re: replace bootdisk

Okay then, you're right, you should turn off the server.

Good luck

regards,
Sandy
I never think of the future. It comes soon enough.
Geoff Wild
Honored Contributor

Re: replace bootdisk

You don't need to lvreduce...

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


That said, read the following:

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: replace bootdisk

I would amend Geoff's statement slightly:

0) Confirm that all extents are current on the remaining "good" disk.

1a) 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.

1b) If the disk is not completely dead, convert it to completely dead status by sliding the disk module out a few centimeters and allowing it to spin down. Wait one minute or so so that the failure is detected.

I've used this method for well over ten years and have never shutdown to replace a disk (boot disk or otherwise) and have never had a problem --- but maybe The Force is with me. During that time I have replaced many tens of disks.

If it ain't broke, I can fix that.
Vlad_9
Occasional Contributor

Re: replace bootdisk

Hi Geoff!

Unfortunately, i run lvreduce for lvol1 and
get this output:
'logical volume "/dev/vg00/lvol1" has been successfully reduced'
and
lvlnboot: logical volume has no extents

Then i stopped...
How i can correct this?

Vlad_9
Occasional Contributor

Re: replace bootdisk

Thanx to all.

vgcfgrestore should be added to my list of commands.

Geoff, thank you for advice.
Marcel Burggraeve
Trusted Contributor

Re: replace bootdisk

Might be a bit late but personally I would never ( if possible at least ) turn off a server when one disk of a mirror has failed.
If you're unlucky you'll end up with the other disk failing as well because it doesn't wanna spin up anymore or start working properly after it has been spin down.