Operating System - HP-UX
1834903 Members
2764 Online
110071 Solutions
New Discussion

Re: Primary boot disk replacement

 
brian_31
Super Advisor

Primary boot disk replacement

I have two disks c1t2d0 (primary) and c2t2d0. I have to replace the primary disk as there are some stale extents. should i shutdown the box to change the disk since the machine was booted off the primary disk? since these are hot swappable disk what would be the best way to replace them without shutting down the box.

Please help

Thanks

Brian.
11 REPLIES 11
Robert-Jan Goossens
Honored Contributor

Re: Primary boot disk replacement

Hi Brian,

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

What kind of server is this?

# uname -a

# model

Regards,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: Primary boot disk replacement

Brian,

Here's a great reference for exactly your situation:

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


Pete

Pete
F Verschuren
Esteemed Contributor

Re: Primary boot disk replacement

if mirrored corecly shuting down is not needed, but when you are making the replacement make sure the os know that the disk is removed befor you are putting in the new disk, if you do it to fast you will os will be lost! so make sure it is on NO_HW before you are pleasing the new disk in the server.
you can prevent this by unmirroring it in the first please,
I this shuting down will give you more problems than it solves.....

ater repleasment (whitout the unmirroring)
Restore LVM info
vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtYdZ
Re-activate vg
vgchange -a y vgname
Synchronise vg
vgsync vgname
For boot disk:
mkboot /dev/rdsk/cXtYdZ
XtYdZ
mkboot -a "hpux (0;)/stand/vmunix" /dev/rdsk/cXtYdZ
Check:

lvdisplay -v /dev/vgname/lvol*
vgdisplay -v vgname
brian_31
Super Advisor

Re: Primary boot disk replacement

this is a lclass server. when i do the the lvdisplay the alternate mirrors are in current state.

Thanks

Brian.
Shrikant Lavhate
Esteemed Contributor

Re: Primary boot disk replacement

Replacing mirrored primary boot disk is discussed here:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1179693

Will it remain a personal, if I broadcast it here!
James R. Ferguson
Acclaimed Contributor

Re: Primary boot disk replacement

Hi Brian:

Save yourself grief and take a few minutes to read the whitepaper cited by Robert-Jan: 'When_Good_Disks_Go_Bad'. Then proceed.

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: Primary boot disk replacement

No need to shutdown anything.
Read and follow the mentioned manual.
If this is an L-class server (aka rp54xx), hardware pathes are written next to the disks - you cannot go wrong.

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!   
Prashanth.D.S
Honored Contributor

Re: Primary boot disk replacement

Hi Brian,

I would suggest you to ensure the is installed with LVM OLR patches before replacing the disk online (if os is 11.11 or 11.23).

If yes then you can deactivate the PV with the below command.

#pvchange -a n /dev/dsk/c1t2d0
Replace the disk
Run ioscan
Check the the disk status in ioscan if its claimed or not.

then run

#vgcfgrestore /dev/rdsk/c1t2d0
#pvchange -a y /dev/dsk/c1t2d0
#vgchnage -a y vg00
# mkboot -l /dev/rdsk/c1t2d0
# mkboot -a "hpux -lq" /dev/rdsk/c1t2d0

# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
# lvlnboot -R
# lvlnboot -v
# vgsync vg00

NOTE: The synchronization process can be time consuming, depending on the hardware characteristics and the amount of data

Best Regards,
Prashanth


skt_skt
Honored Contributor

Re: Primary boot disk replacement

Here is what i follow

To list and verify the VG configuration backup file

root [/root] vgcfgrestore -n /dev/vg00 -l
Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
VG Name /dev/vg00
---- Physical volumes : 2 ----
/dev/rdsk/c0t0d0 (Bootable)
/dev/rdsk/c3t0d0 (Bootable)

Pvchange -a n /dev/dsk/c0t0d0
Replace the disk
Ioscan -fnH path #Make sure path is CLAIMED
Diskinfo /dev/rdsk/c0t0d0 #verify disk

pvcreate â B /dev/rdsk/c0t0d0

mkboot /dev/rdsk/c0t0d0

mkboot -b /usr/lib/uxbootlf /dev/dsk/c0t0d0 #If -b option is given, boot programs in the pathname specified by boot_file_path are installed on the given device.



vgcfgrestore -F -n vg00 /dev/rdsk/c0t0d0
Pvchange -a y /dev/dsk/c0t0d0
vgchange -a y vg00
vgsync vg00

lvlnboot -R

for lif_comp in `lifls /dev/dsk/c3t0d0`
do
/usr/bin/lifcp /dev/dsk/c3t0d0:${lif_comp} /dev/dsk/c0t0d0:${lif_comp}

yulianto piyut
Valued Contributor

Re: Primary boot disk replacement

hi brian,

Last moonth, I have changed my primary boot disk with same problem with your system. No need to reboot to replace the primary boot disk failed (disk is hot swappable). First, I try to break mirror but failed, system said the lvol is busy. Than i unplug the primary disk (make sure that all logical volume is mirrored and the all PE of secondary disk is on "current" state), than plug your new disk.

below the steps i have done (primary disk is c0t0d0):
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t0d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c0t0d0",
Detach the PV or detactivate the VG, before restoring the PV.
# pvchange -a n /dev/dsk/c0t0d0
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t0d0
# pvchange -a y /dev/dsk/c0t0d0
# vgchange -a y /dev/vg00
# mkboot -l /dev/dsk/c0t0d0
# mkboot -a "hpux -lq" /dev/rdsk/c0t0d0
# lvlnboot -R

VG will automatically sysc data from secondary to primary when I run "vgchange -a y /dev/vg00".

-yut-
Indrajit Bhagat
Regular Advisor

Re: Primary boot disk replacement

Hi,

#pvchange -a n /dev/c0t0d0

Replace the disk.

#vcfgrestore -n /dev/vg00 /dev/rdsk/c0t0d0

#pvchange -a y /dev/cotodo

#vgsync /dev/vg00

#mkboot /dev/rdsk/cotodo

#mkboot -a "hp -ux" /dev/rdsk/c0t0d0

#shutdown -r -y now