Operating System - HP-UX
1833053 Members
2521 Online
110049 Solutions
New Discussion

Replacing a mirrored LVM disk

 
SOLVED
Go to solution
Jason Martens
Frequent Advisor

Replacing a mirrored LVM disk

I am replacing a bad disk on a 9000 D class running 10.2. I have every logical volume on the disk mirrored, and all the drives are hot-swappable. Following are the commands I was going to use to replace the drive, and I was wondering if anyone had any comments. I've never done this before and want to make sure it works. HP Recommended restarting after all this, is that really necessary? I don't want to take the server down if I don't have to. Thanks

vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t4d0

vgchange -a y /dev/vg00

mkboot /dev/rdsk/c0t4d0

mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c0t4d0

lvlnboot -R

lvlnboot -v

vgsync /dev/vg00

Never swap out a tape drive at 3 AM!!!
5 REPLIES 5
Patrick Wallek
Honored Contributor
Solution

Re: Replacing a mirrored LVM disk

I think your steps sounds OK. That is the same thing I would do.

I don't see any reason to restart your machine after you finish. You should, when you get the opportunity, make sure that you can boot from that drive just to make sure it works.

After the vgsync is done, I would do a 'vgdisplay -v /dev/vg00' and make sure that all the LVs are showing 'synced'.
James R. Ferguson
Acclaimed Contributor

Re: Replacing a mirrored LVM disk

Hi Jason:

The steps look good given that it appears from your post that you're still up-and-running on the primary boot disk.

Personally, since this is the boot disk, I would shutdown and reboot the server as the last step. You might also want to boot from the newly restored disk to verify that it is, in fact, as you expect. Better to verify this now than when you need it.

I would also add the the low-quorum string to the 'mkboot' command:

# mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/c0t4d0

Regards!

...JRF...
John Waller
Esteemed Contributor

Re: Replacing a mirrored LVM disk

Jason,

If this is a boot disk I would use a pvcreate -B before issueing the vgcfgrestore command or else you may not get the LIF area required for a system disk. The rest look fine.
Vincenzo Restuccia
Honored Contributor

Re: Replacing a mirrored LVM disk

Ok mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c0t4d0
Ok pvcreate -B /dev/rdsk/c0t4d0
Verify integrity of disk with ioscan and diskinfo.

Joseph A Benaiah_1
Regular Advisor

Re: Replacing a mirrored LVM disk

Jason,

I would do the following:

vgchange -a y /dev/vg00

pvcreate -B -f /dev/rdsk/c0t4d0 as this diskwill be in the lvmtab.

vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t4d0

mkboot /dev/rdsk/c0t4d0

mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c0t4d0. You could also copy this from the good disk with the same command.

mkboot -a "hp-ux -lq (;0)/stand/vmunix" /dev/rdsk/c0t4d0

vgsync /dev/vg00

lvlnboot -R /dev/vg00

lvlnboot -v /dev/vg00

setboot -p HW_PATH_PRIMARY
setboot -a HW_PATH_SECONDARY

Cheers,

Joseph.