Operating System - HP-UX
1833788 Members
2421 Online
110063 Solutions
New Discussion

Re: Replacing the failed disk

 
Manoj_36
Advisor

Replacing the failed disk

I have three disk c1t1d0, c2t2d0 and c3t3d0 in my vg00 without having any mirror volume on it and my c3t3d0 disk got corrupted and I want to replace the disk. I simply replaced this disk by new disk and If I don't create pv on the new disk and I simply do vgcfgbackup on new disk by our previous backup and do 'vgchange -a y' too, will it automatically give me all the logical volumes there on replaced disk which were earlier there on the faulty disk. If yes please telll me what vgcfgrestore is actually doing does it create whole structure on the disk or it writes just the physical volume and volume group header on the disk. Why we don't require to give pvcreate and lvcreate on new disk and how simple vgcfgrestore is working.

Thanks & Regards
4 REPLIES 4
twang
Honored Contributor

Re: Replacing the failed disk

In your case, you need
1. Replace the failed disk.
2. To detect the new add disk
# ioscan -fnC disk
3. Restore the LVM header on the disk:
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t3d0
4. Activate the volume group:
# vgchange -a y /dev/vg00
5. Check, which logical volumes have extents on the hard disk:
# pvdisplay -v /dev/dsk/c3t3d0 |more
6. The backup of these logical volumes has to be restored.
For logical volumes with file systems a newfs has to be executed prior to restoring the data.
# newfs -F vxfs /dev/vg01/rlvol5
# newfs -F vxfs /dev/vg01/rlvol6
...
7. Then reboot the server
# shutdown -ry 0

Now you need to restore your filesystem backup.
Eknath
Trusted Contributor

Re: Replacing the failed disk

Hi Manoj,

The steps given by twang are absolutely right except what i feel is that you may have to boot the system in lvm maintenance mode (hpux -lm) to do these steps. Now since you are saying that you dont have mirror, hope c3t3d0 is not a boot disk. if its a boot disk, then you may have to reignite the server. Best Luck

Cheers!!!
eknath
Sยภเl Kย๓คг
Respected Contributor

Re: Replacing the failed disk

Dear Manoj

The vgcfgrestore command restores the LVM header informations(LVM structuaral info) from a backup config file which is created using vgcfgbackup.
However vgcfgrestore doesn't restore the LIF volume. So for a bootable disk you may have to use mkboot to create the lfi volume, after the vgcfgrestore.
Use #vgcfgrestore -l -n vgxx will display the content of the backup file(vgxx)

Regards
SK
Your imagination is the preview of your life's coming attractions
Devender Khatana
Honored Contributor

Re: Replacing the failed disk

Hi,

All these steps needs to be executed in LVM maintenance mode if the failed disk was a mirrored bootable disk. For disks in other than root VG's the vgcfgrestore can be done without reboot for hot pluggable disks by stopping access to VG & deactivating VG.

For non-hot pluggabe disks also it can be done provided you have some spare disk allready connected to the systm & you can wait for removing defective till next reboot.

HTH,
Devender
Impossible itself mentions "I m possible"