Operating System - HP-UX
1752749 Members
5139 Online
108789 Solutions
New Discussion юеВ

how to replace failing disk

 
SOLVED
Go to solution
GraceO
Regular Advisor

how to replace failing disk

I have a disk that is showing read and write errors in stm. I have an unused disk of the same size that I would like to replace it with. The failing disk is not the root volume, and it is not mirrored. It is part of a volume group that has two disks. Can someone please outline the steps I need to follow to replace the drive?

Any help is greatly appreciated...
6 REPLIES 6
Sandman!
Honored Contributor
Solution

Re: how to replace failing disk

This procedure assumes that the failing disk is hot swappable...which it most likely does but worth checking whether it is or not.

1. Swap the failed disk for the good one

2. Restore the LVM header onto the new disk
# vgcfgrestore -n /dev/vg??

3. Reattach the new PV to the VG
# vgchange -a y /dev/vg??

4. Restore the data from backup onto the new disk.

~hope it helps
GraceO
Regular Advisor

Re: how to replace failing disk

Sorry, I'm not familiar with the vgcfgrestore. Do I need to do a vgcfgbackup before I replace the disk?
Sandman!
Honored Contributor

Re: how to replace failing disk

Too late for that now but it is possible that a configuration backup file exists in the /etc/lvmconf directory.

# ll /etc/lvmconf

~hope it helps
GraceO
Regular Advisor

Re: how to replace failing disk

Found a cfg backup.

I also have a 'unused' disk in another volume group that I can use, rather than physically replacing the disk. Can I add this disk to the volume group with the failing disk and somehow get the data off the failing disk onto the new one? Then, vgreduce the failing disk?
Sandman!
Honored Contributor

Re: how to replace failing disk

>I also have a 'unused' disk in another volume group that I can use, rather than >physically replacing the disk. Can I add this disk to the volume group with the >failing disk and somehow get the data off the failing disk onto the new one?
>Then, vgreduce the failing disk?

Yes you can add that unused disk to the bad VG (the one with the failed disk) instead of physically replacing the failed disk with a new one. Ofcourse you will have to vgreduce that disk out of the good VG; pvcreate it with the "-f" option; vgextend it into the bad VG; and finally restore the data onto this PV from backup. See the URL below for details:

http://docs.hp.com/en/5991-6481/ch04s09.html

~hope it helps
GraceO
Regular Advisor

Re: how to replace failing disk

Thanks for all the help. I think I have enough information to do this now!