Operating System - HP-UX
1832891 Members
1902 Online
110048 Solutions
New Discussion

Replace a bad internal disk

 
SOLVED
Go to solution
Sp4admin
Trusted Contributor

Replace a bad internal disk

Hello,

I have a question on replacing a bad disk. I have one bad internal disk. my question is about the mirroring. I can't break the mirror because the disk is bad. So after replace the disk how do I resyn the mirror? I need the commands like vgcfgrestore and do I do a pvchange -a y pvname? This is a HOT Swapable disk.

rp8400
11.11

Thanks in advance
sp,
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Replace a bad internal disk

Why would you want to break the mirror? You also don't need to do any pvchange nonsense.
Pvcreate and vgsync do the heavy lifting.

The procedure varies a bit if this is a boot disk or simply a data disk.

In any event, slide the bad drive out a few centimeters and allow it to spin down. Wait about 90 seconds or so -- this also has the effect of converting a failing disk into a failed disk. Now remove the old disk and insert the new disk. Allow it to spin up (60 seconds or so).

Now let's suppose that your bad disk is /dev/rdsk/c1t6d0 AND that it is a boot drive (or mirror).

vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t6d0
vgchange -a y /dev/vg00
mkboot /dev/rdsk/c1t6d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t6d0
lvlnboot -R
vgsync /dev/vg00 # will take a few tens of minutes.
--------------------------------------------
Now if the disk is not a boot disk then it's even simpler (let's assume the same disk and /dev/vg01):

vgcfgrestore -n /dev/vg01 /dev/rdsk/c1t6d0
vgchange -a y /dev/vg01
vgsync /dev/vg01

--------------------------------------------
In both cases, you can verify the status of each LVOL using vgdisplay -v /dev/vgxx.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Replace a bad internal disk

Ooops, I'm stupid.

This:
Pvcreate and vgsync do the heavy lifting.
should be:
Vgcfgrestore and vgsync do the heavy lifting.
If it ain't broke, I can fix that.
Sp4admin
Trusted Contributor

Re: Replace a bad internal disk

So using the commands you provided will rebuild my mirror ans sync the two. This is a bootable disk.

sp,
Aussan
Respected Contributor

Re: Replace a bad internal disk

hello

here are the steps needed after replacing the disk, i'm assuming this is a boot disk

1. Use the vgcfgrestore command to restore the LVM configuration data from a configuration backup file to the physical volume:

# vgcfgrestore -n vg00 /dev/rdsk/c1t1d0

2. Activate the volume group for including any physical volumes that were previously listed as missing:

# vgchange -a y vg00

3. Use mkboot to place boot utilities and an AUTO file in the boot LIF area

# mkboot -l /dev/rdsk/c1t1d0
# mkboot -a "hpux -lq" /dev/rdsk/c1t1d0

then do

# 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

4. sync the volume group

# vgsync vg00
The tongue weighs practically nothing, but so few people can hold it
A. Clay Stephenson
Acclaimed Contributor

Re: Replace a bad internal disk

If this is a question:
So using the commands you provided will rebuild my mirror ans sync the two. This is a bootable disk.

then the answer is yes if you follow the steps I outlined for a boot disk substituting your actual disk device node, of course.
If it ain't broke, I can fix that.
Sp4admin
Trusted Contributor

Re: Replace a bad internal disk

Let me ask another stuipd question. How long does the resync take? this is a 36GB drive.

sp,
Aussan
Respected Contributor

Re: Replace a bad internal disk

the vgsync depends on the amount of data you have, i saw a system that took up to 45min to sync


The tongue weighs practically nothing, but so few people can hold it
Sp4admin
Trusted Contributor

Re: Replace a bad internal disk

Thanks for the help!