Re: Failed disk

 
Mike Duffy_1
Honored Contributor

Failed disk

Hi,

Failed disk in jamaca enclosure. Does not show up in ioscan.
New disk inserted, now shows up in ioscan and diskinfo -v show details.
Next step...create the pv

pvcreate -f /dev/rdsk/c7t13d0
pvcreate: The physical volume "/dev/dsk/c7t13d0" is already recorded in the "/etc/lvmtab" file.


Any one got any ideas? Quick please I would like to go home
10 REPLIES 10
Slawomir Gora
Honored Contributor

Re: Failed disk

Hi,

you have to use vgcfgrestore command to restore
disk structures because your disk c7t13d0 belongs to some vg group.

vgcfgrestore -n vg_name /dev/rdsk/c7t13d0

Steven E. Protter
Exalted Contributor

Re: Failed disk

The new disk is not going to have any data structures on it. Your /etc/lvmtab information may be confused.

If vgcfgrestore doews not work, you'll need to vgreduce /dev/vg01 /dev/rdsk/c7t13d0

then vgextend /dev/vg01 dev/rdsk/c7t13d0

Use the actual volume group, not vg01 which I gave for example purposes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
SS_6
Valued Contributor

Re: Failed disk

You have to do vgcfgrestore to restore LVM volume group configuration and than restore from backup. If this disk is a part of vg00 than you have to do more steps. Pl. clarify and I can post more information.Because device file is same and it already present in /etc/lvmtab.
By providing solutions I am helping myself
OZ_4
Occasional Advisor

Re: Failed disk

Hi
you don't need to do the pvcreate command, all that you need to do is the vgcfgrestor
vgcfgrestore -n /dev/vg01 /dev/rdsk/c7t13d0
vgchange -a y /dev/vg01

that should restore your volume group structure, then you have to restore the lvols and data attached to it..

hope this helps
Mike Duffy_1
Honored Contributor

Re: Failed disk

Thanks for all the info but I have tried all the stuff and nothing worked.

I have now logged a call with Hp anf they are looking into it.

I will let you know how it goes.

Bill Hassell
Honored Contributor

Re: Failed disk

All of the suggestions assume that you have disk mirroring enabled. Without disk mirroring, all you will have with the new disk is empty disk space. If this volume group has files stored on all the disks, the filesystem is completely corrupt so you'll have to rebuild the VG and restore the data from your backups.

Now if this disk is indeed mirrored, the vgcfgrestore should work just fine. If you are getting error messages, please post them so we can provide more help.


Bill Hassell, sysadmin
SYS ADMIN_7
Advisor

Re: Failed disk

Hi Mike

As mentioned in other posts, if mirror ux is there , then just vgcfgrstore will work. do like this
#vgcfgrestore -n /dev/ /dev/rdsk/
#vgchange -a y /dev/

In above case you will not loose the data,as mirror copy exists.

If mirroring is not ther, then
1) Remove the disk from VG
#ioscan -f ( This may take time)
#ioscan -funC disk
#vgreduce -f /dev/
This will remove the disk, which is not accesible .
2) Then create PV in new disk
#ioscan -f
#ioscan -funC disk
( confirm the corect device)
#pvcreate /dev/rdsk/
#vgextend /dev/ /dev/dsk/
#vgdisplay -v /dev/
( This will display the disks in VG)

Hope this helps

Rgds
Suraj
Ian Foster_2
Frequent Advisor

Re: Failed disk

I would expect that you should be able to restore the LVM structure to the disk using vgcfgrestore as already discussed - this should work even if the volumes aren't mirrored using Mirrordisk-UX - this will simply re-write the LVM information to the new physical device - difference is that if you had no mirroring you will have lost data and will subsequently have to restore that from tape.

I have had these sort of issues before. A good start point is to run :

#strings /etc/lvmtab

This will at least tell you what the system THINKS is in LVM at the moment.

Hope this helps.
Mike Duffy_1
Honored Contributor

Re: Failed disk

Thanks for all the replies.
HP could not do much with this problem because although the disk was find it would not allow the cfg restore.
I have unmounted the vg, disabled it, performed the cfg restore and activated it in exclusive mode.
The syncing is now taking place.

Again thanks for all the replies