Operating System - HP-UX
1834771 Members
3366 Online
110070 Solutions
New Discussion

Replacing root mirrored hot swappable disk

 
SOLVED
Go to solution
PR_4
Advisor

Replacing root mirrored hot swappable disk

Hi all

My disk became flaky and it was pulled out. The disk has been replaced and ioscan now shows the disk is claimed. Before replacement however the lvreduce or vgreduce was not performed and therefore "strings /etc/lvmtab" shows the /dev/dsk/cxtyd0.
please let me know if the following procedure is OK for remirroring the new disk. Thanks very much

1) vgcfgrestore -n vg00 /dev/rdsk/cxtydz
2) mkboot -l /dev/rdsk/cxtydz
3) mkboot -a hpux /dev/rdsk/cxtydz
4) lvextend -m /dev/vg00/lvol(1-6) /dev/rdsk/cxtydz

9 REPLIES 9
S.Arunkumar
Trusted Contributor

Re: Replacing root mirrored hot swappable disk

Hi PR

First you have to vgreduce
Then you can go ahead and do the vgcfgrestore and rest is same as similar to creating a new mirror copy for root disk

Regards
S.Arunkumar
Mel Burslan
Honored Contributor

Re: Replacing root mirrored hot swappable disk

after vgcfgrestore you need to run

vgchange -a y vg00

also my mkbood commands are as follows:

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

then

cd /usr/sbin/diag/lif
mkboot -b updatediaglif2 -p ISL -p AUTO -p HPUX -p LABEL /dev/rdsk/cxtxdx


(if you are on a 32 bit platform, change updatediaglif2 with updatediaglif)

and to do this, you do not need to do vgreduce command. If you vgreduce'd the vg then you need to use vgextend instead of vgcfgrestore.

________________________________
UNIX because I majored in cryptology...
DCE
Honored Contributor

Re: Replacing root mirrored hot swappable disk



I would suggest you use the -lq option on the mkboot command. This will allow the system to boot without a quorom of disks.

mkboot -a "hpux -lq" /dev/rdsk/cxtydz


be sure to run the same command against the other boot disk as well.


generic_1
Respected Contributor

Re: Replacing root mirrored hot swappable disk

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

This link will explain how to fix your disk in very great detail. It was written for situations just like yours.
Devender Khatana
Honored Contributor

Re: Replacing root mirrored hot swappable disk

Hi,

It could display error.
If required you should use vgreduce -f option to reduce otherwise it will report an error.

Once done with lvreduce you should be able to extend the VG and remirror.

Also do a lvlnboot -R.

Here is the official guide to achive this.
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

HTH,
Devender
Impossible itself mentions "I m possible"
Devender Khatana
Honored Contributor

Re: Replacing root mirrored hot swappable disk

Here is another good document to be referred for online disk replacement.

http://docs.hp.com/en/6430/LVM_OLR_whitepaper.pdf

HTH,
Devender
Impossible itself mentions "I m possible"
Eknath
Trusted Contributor

Re: Replacing root mirrored hot swappable disk

Here is what you can do...



1. ioscan -H path### (eg 0/4/0/0 do not use .) # put disk as claimed from no-hw
2. ioscan -funC disk|more # check to see hw is claimed
3. mv /etc/lvmtab /etc/lvmtab.old # pvcreate fails if disk is in lvmtab
4. pvcreate -f -B /dev/rdsk/c_t_d0 # sets aside a boot area
5. mv /etc/lvmtab.old /etc/lvmtab # moves it back
6. vgcfgrestore -n vg00 /dev/rdsk/c_t_d0 # restores headers on drive
7. vgchange -a y /dev/vg00 # puts drive online
8. vgsync vg00 # if disk does not automatically start syncing (if stale)
9. mkboot /dev/rdsk/c_t_d0 # puts the boot sector in the boot area
10. mkboot -a "hpux -lq" /dev/rdsk/c_t_d0 # puts HPUX in the auto file
11. lvlnboot -Rv /dev/vg00 # updates the LIF with the info from the BDRA
12. cd /usr/sbin/diag/lif
13. mkboot -b updatediaglif -p ISL -p HPUX -p LABEL -p AUTO /dev/rdsk/c_t_d0 # to put ODE, etc. back on boot area
14. vgdisplay -v vg00 # to check it



Cheers!!!
eknath
Torsten.
Acclaimed Contributor
Solution

Re: Replacing root mirrored hot swappable disk

Do NOT perform your step 4!
If your disk is gone and you inserted a new one, you need to restore all config to the disk (including mirror information) - step 1.
Then activate the VG (vgchange -a y vgxx).
Then make it bootable (your step 2). Set the bootstring (your step 3). Update the offline diag (mkboot -b updatediaglif ...). Write the boot information (lvlnboot -r/-b/-s/-d ...). Now you only have to resync your vg (vgsync vgxx). That's all.

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!   
PR_4
Advisor

Re: Replacing root mirrored hot swappable disk

Thanks everyone. I had to use vgsync vg00 instead of the final step and it worked. Thanks again guys.