LVM and VxVM

removing mirrored bad root disk

 

removing mirrored bad root disk

I have an L class that had a mirrored root disk go bad.
I have hot swapped the disk.
I couldn't break the mirror before nor can I now.
I can't pvcreate it because it's part of vg00.
I can't remove it because it can't query it.
I did do the makeboot and makeboot -a commands.
I did the vgcfgrestore and it complained that it couldn't query it but it did say that it did restore the vg configuration to the disk.

I haven't rebooted.

Any thoughts?
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: removing mirrored bad root disk

Your mkboots followed by vgcfgrestore is correct way.

However, you will still have to do

#vgchange -a y vg00
#vgsync

Once this is done, do a lvlnboot -R and lvlnboot -v to make sure they show up correctly.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
S.K. Chan
Honored Contributor

Re: removing mirrored bad root disk

This is the process I used on my L .. ie after you pluged in the new disk run ..(say c2t2d0 is the new disk)

# pvcreate -B /dev/rdsk/c2t2d0
# mkboot -l /dev/rdsk/c2t2d0
# mkboot -a "hpux -lq" /dev/rdsk/c2t2d0
# vgcfgrestore -n vg00 /dev/rdsk/c2t2d0
# vgchange -a y vg00
# vgsync vg00

If the above does not work out (for some reason) then I would do this (only do this if you're very sure your vg00.conf file is good !!)..

Reboot the machine escape the quorum in single user mode.
ISL> hpux -is -lq (;0)/stand/vmunix
# pvcreate -f -B /dev/rdsk/c2t2d0
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t2d0
# vgchange -a y /dev/vg00
# vgsync /dev/vg00
# mkboot -l /dev/rdsk/c2t2d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t2d0
# lvlnboot -R
# lvlnboot -v


Michael Steele_2
Honored Contributor

Re: removing mirrored bad root disk

Regarding:

"...I can't remove it because it can't query it...."

Can you dd it?

dd if=/dev/dsk/c2t2d0 of=/dev/null count=1000000
control c (* break after a minute to get past the cache *)

### blocks in / out

If the cursor doesn't come back after the control c then the disk is bad.

Also, use the following to verify you can't see the PV Number of the old disk.

vgdisplay -v vg00

If so, then use :

reboot
interrupt
ISL > hpux -lm -is (* LVM maintenance mode *)
vgchagne -a y -q y /dev/vg00 (* activate without quorum *)
vgreduce -f /dev/vg00 (* reduce out old disk *)
Support Fatherhood - Stop Family Law
Helen French
Honored Contributor

Re: removing mirrored bad root disk

This document will be helpful TKB #KBRC00009115:

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062909815
Life is a promise, fulfill it!
S.K. Chan
Honored Contributor

Re: removing mirrored bad root disk

One more time ..
1)I have an L class that had a mirrored root disk go bad.
-ok
2) I have hot swapped the disk.
-ok
3) I couldn't break the mirror before nor can I now.
-You need not break the mirror, just followed the process I had earlier.
4) I can't pvcreate it because it's part of vg00.
-The pvcreate will fail if the disk that you've inserted belong to another VG previously. You can use "-f" option to force it. Extra CAUTIOUS .. don't pvcreate the wrong disk.
5) I can't remove it because it can't query it.
-There's no need to remove it.

The rest of the steps are part of the recovery process after step 2.

Re: removing mirrored bad root disk

Well I finally rebooted the machine. It came up and showed the disk properly and I was able to mirror what I needed. I didn't have to go into single user or less than quorom.
Thanks!
Michael Steele_2
Honored Contributor

Re: removing mirrored bad root disk

Hey that's great!

Any points to award?
Support Fatherhood - Stop Family Law