Operating System - HP-UX
1753539 Members
4864 Online
108795 Solutions
New Discussion юеВ

Bad JBOD disk and need help restoring...

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

Bad JBOD disk and need help restoring...

Hi folks,

I have a guy who lost a disk on his hpux 11.0 system. It is a jamaica disk and it was part of or all of vg01. The problem is that he has no record of what disk(s) made up vg01. All he has is a map file. He wants me to "fix" it. When I go into SAM I find there are 4 disks that do not belong to a volume group...so I assume that after the one disk died, the whole vg01 disappeared and the other three disks that probably belonged to that volume group are now not belonging to anything. None of this stuff was mirrored either. So can someone tell me what I have to do (step by step) to get these disks back into vg01 so that I can restore from tape. Do I have to just vgimport or pvcreate first....then only the one disk that was replaced, or that and the other three disks that in SAM don't belong to a volume group?
18 REPLIES 18
paolo barila
Valued Contributor

Re: Bad JBOD disk and need help restoring...

Geoff Wild
Honored Contributor
Solution

Re: Bad JBOD disk and need help restoring...

Your vg01 should still be there in /dev

Do a ll /dev/vg01 > /tmp/vg01.listing

To see which disks were in it

Do a strings /etc/lvmtab

Look for vg01 - the disks devs should be there...

Compare to the one that was replaced...

Then do a vgcfgrestore

vgcfgrestore -n /dev/vg01 /dev/rdsk/cXtXdX

Then you should be able to do a vgchange -a y /dev/vg01

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Patrick Wallek
Honored Contributor

Re: Bad JBOD disk and need help restoring...

To find which disks are in each VG do a:

# strings /etc/lvmtab

(Don't worry about the strange characters that appear. Those are normal).

Another good resource for replacing disks is "Chapter 16 - LVM" of the Software Recovery Handbook.

Software Recovery Handbook:
http://www2.itrc.hp.com/service/iv/node.do?node=prodITRC%2FWW_Start%2FN1%7C16

Chapter 16 - LVM:
http://www2.itrc.hp.com/service/iv/docDisplay.do?docId=prodITRC/DE_SW_UX_swrec_EN_01_E/LVM.pdf
Coolmar
Esteemed Contributor

Re: Bad JBOD disk and need help restoring...

Thanks!! That strings command is just what I needed :0)

Now, I doubt he even knows which disk was replaced other than pointing to it physically. I am in another city, so I have to figure it out somehow. Can I just do a vgcfgrestore to all 4 disks in that vg01 rather than trying to figure out which disk it was?
Geoff Wild
Honored Contributor

Re: Bad JBOD disk and need help restoring...

Sure you can vgcfgrestore to all of the disks if you like.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Coolmar
Esteemed Contributor

Re: Bad JBOD disk and need help restoring...

thanks Geoff!
Well the vgcfgresore worked on all disks, then the vgchange seemed to work. When I try and mount the vg01 stuff (mount -a) I get:

vxfs mount: /dev/vg01/lvol4 is corrupted. needs checking
vxfs mount: /dev/vg01/lvol3 is corrupted. needs checking
Geoff Wild
Honored Contributor

Re: Bad JBOD disk and need help restoring...

Try to fsck those lvols

fsck -F vxfs -o full -Y /dev/vg01/rlvol3

fsck -F vxfs -o full -Y /dev/vg01/rlvol4

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Coolmar
Esteemed Contributor

Re: Bad JBOD disk and need help restoring...

log replay in progress
pass0 - checking structural files
pass1 - checking inode sanity and blocks
pass2 - checking directory linkage
warning - no lost+found directory for fileset 999
pass3 - checking reference counts
pass4 - checking resource maps
OK to clear log? (ynq)y
set state to CLEAN? (ynq)y

Can I just create that lost+found directory? or is that not even the problem?
Geoff Wild
Honored Contributor

Re: Bad JBOD disk and need help restoring...

You can just mkdir lost+found - but might as well just do your restore.

Can you mount the file systems now?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.