Operating System - HP-UX
1829598 Members
1644 Online
109992 Solutions
New Discussion

Faulty Harddisk Replacement

 
SOLVED
Go to solution
Cliff Lim Kok Hwee
Regular Advisor

Faulty Harddisk Replacement

Gd Day Forum,

Currently I have a faulty disk inside a volume group vgA (comprising of 3 harddisks).

All the 3 harddisks are configured with logical volumes for raw partitions and is used by the database informix.

The database team will perform data restoration when the faulty harddisk is being replaced.

Query:
- I would like the LV settings to remain the same after the faulty harddisk is being replaced. Can anyone advise on what needs to be done prior the replacement in order to ensure all LV settings are saved and can be restored onto the replaced harddisk.

Thanks n Regards/cliff
10 REPLIES 10
Slawomir Gora
Honored Contributor

Re: Faulty Harddisk Replacement

Hi,

use vgcfgrestore command to restore LVM structure.
Ravi_8
Honored Contributor

Re: Faulty Harddisk Replacement

Hi,

Insert the new disk in the same slot of the faulty disk.
#pvcreate -f /dev/rdsk/ (can obtain from ioscan -FnC disk command)
If any lvol's exist in the faulty disk, create the same lvol(s) in the new inserted disk. and restore
never give up
Robert-Jan Goossens
Honored Contributor

Re: Faulty Harddisk Replacement

Hi Cliff,

You can't do anything before changing the disk. The only thing you have to do is to restore the LVM configuration on the new disk.

# vgcfgrestore -n /dev/vgXX /dev/rdsk/cxtydz

and restore the data to the raw partitions.

Best regards,
Robert-Jan
Sunil Sharma_1
Honored Contributor

Re: Faulty Harddisk Replacement

Hi,

1. connect new hard disk in same slot
2. run ioscan and see it should be in claimed status
3. run vgcfgrestore command on this disk
#vgcfgrestore -n vgA /dev/dsk/cxtydz

4. vgchange vgA(not must but should be)

you are ready to data restoration.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Franky_1
Respected Contributor

Re: Faulty Harddisk Replacement

Hi,

run vgcfgrestore -n /dev/vgXX /dev/rdsk/cXtXdX after replacing the HD

The settings are stored by default in /etc/lvmconf/vgXX.conf

Regards

Franky
Don't worry be happy
Cliff Lim Kok Hwee
Regular Advisor

Re: Faulty Harddisk Replacement

Gd Day Forum,

I will be using the suggested command, vgcfgrestore -n vgA /dev/dsk/cxtydz

Query: The faulty harddisk currently has Logical Volume spanned across to another harddisk. It also have Logical Volume from another harddisk spanned over to it. Since the 3 harddisks belong to the same volume group vgA. Is it a concern when running the vgcfgrestore command?

Thanks n regards/cliff
Sridhar Bhaskarla
Honored Contributor

Re: Faulty Harddisk Replacement

Hi Cliff,

It is not a concern for running 'vgcfgrestore' command. But note that you probably don't get the data on the logical volumes that share this faulty disk. You can try the following.

1. vgcfgrestore -n vgxx /dev/rdsk/cxtydz
2. vgchange -a y vgxx
3. fsck /dev/vgxx/rlvolx (repeat for all lvols)
3. Try mounting them. If you see data, then you can try copy it but I doubt it.

If you are not able to mount them, then run 'newfs -F vxfs /dev/vg00/rlvolx' to create fresh filesystems and restore the data.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Cliff Lim Kok Hwee
Regular Advisor

Re: Faulty Harddisk Replacement

Hi Sri,

The logical volumes on all the 3 harddisks in vgA are configured as raw partitions for informix database. The db data restoration will be performed after the faulty harddisk is being replaced.

Just want to ensure that the logical volumes configuration configured on the faulty harddisk will be restored using vgcfgrestore command. Regardless of whether LV are spanned onto the faulty harddisk from other harddisk or LV on faulty harddisk are spanned onto other harddisk. (vgA comprises 3 harddisks).
Am I right to say that?

regards/cliff
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Faulty Harddisk Replacement

Yes that is correct. If you had taken the precaution of mirroring each lvol then you could have replaced the faulty disk "on the fly" without even shutting down the database.
If it ain't broke, I can fix that.
Cliff Lim Kok Hwee
Regular Advisor

Re: Faulty Harddisk Replacement

Thanks to the All So Talented Forumers.../cliff