Operating System - HP-UX
1828976 Members
2147 Online
109986 Solutions
New Discussion

replacing a mirrored boot drive

 
SOLVED
Go to solution
Timothy P. Jackson
Valued Contributor

replacing a mirrored boot drive

I have an rp5470 running HP-UX 11i version 1 with only two internal drives. These two drives are obviously the primary boot drive and the other is the mirror for it. Because these are both bootable drives how do I replace the bad one? I am assuming that there is something special seeing that it is a bootable drive.

Any help would be greatly appreciated!

Tim
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: replacing a mirrored boot drive

Here is an excellent document outlining the procedure you need to follow:

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


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: replacing a mirrored boot drive

It's straightforward and you don't even have to shutdown.

1) Slide the bad drive out of its slot a few centimeters and allow it to spin down. Wait about 45 seconds and then pull the drive completely out of the slot.
2) Insert the replacement drive in the slot and allow it to "spin up" (~45 seconds or so).
3) I'll assume the replacement drive is /dev/rdsk/c1t6d0.
vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t6d0
4) vgchange -a y /dev/vg00
5) mkboot /dev/rdsk/c1t6d0
6) mkboot -a "hpux -lq (;0)/stand/vmin" /dev/rdsk/c1t6d0
7) lvlnboot -R
8) vgsync /dev/vg00

The sync will take a few tens of minutes. If possible, it would be a good idea to schedule some downtime and attempt to boot from the newly restored drive but if you are careful that is not necessary.

If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: replacing a mirrored boot drive

Shalom,

There are a couple of approaches.

I like the pdf Pete postd, its the best availalbe doc on the subject.

For static systems I've simply restored a weekly make_tape_recovery or make_net_recovery image after replacing the disk.

This will work, but I did it due to the fact I had 10,000 things to do at the time and needed something that would more or less run unattended.

I've had two scenarios other than that.

1 is where the disk is clearly broken but I can split the mirrors and vgreduce. This saves me the trouble of more complex steps where you put a disk into a system that lvmtab thinks is active but has no lvm structure.

The other is the disk is suddenly non-responsive and the mirrors can't be split and the volume group reduced. Then its pretty much follow the manual and re-mirror, and I will post that sequence in because its helpful to have it handy.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Timothy P. Jackson
Valued Contributor

Re: replacing a mirrored boot drive

Thanks Pete!

I saw that you referenced this doc in a previous link and I had aready printed it out. I am still kind of fuzzy as to what the best plan of attack is. It looks to me like it is better to unmirror all the logical volumes, replace the drive and then recreate the mirrors.

Does this sound right?

Tim
Torsten.
Acclaimed Contributor

Re: replacing a mirrored boot drive

If the disk is still CLAIMED in ioscan and have only a few stale extends, unmirroring will be the safe method.

If it is in NO_HW status in ioscan and unavailable in vgdisplay, IMHO it is safe to pull out the disk without un-mirror.

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!   
Timothy P. Jackson
Valued Contributor

Re: replacing a mirrored boot drive

Thanks everyone!!

You have given me all the direction that I needed. I sincerely appreciate all your help!

Tim
Torsten.
Acclaimed Contributor

Re: replacing a mirrored boot drive

I want to add: if you have the latest patches including the

"pvchange -a n ..."

command, you only need to de-activate the disk prior to pull it out.

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!