Operating System - HP-UX
1833476 Members
2911 Online
110052 Solutions
New Discussion

how to recover from disk with invalid super-block

 
Govind Tatachari
New Member

how to recover from disk with invalid super-block

The original boot disk, c2t6d0, failed to boot after rebuilding the kernel. We would like to recover data (especially /home) from this disk but have run into "an invalid super-block" problem. The fsck fails as follows:
-----------------------------------------------
# fsck -F vxfs -o full,nolog -y /dev/dsk/c2t6d0
invalid super-block
search for auxiliary super-block? (ynq)y
alternate super-block not found
vxfs fsck: read failure at 1114112
file system check failure, aborting ...
#
-----------------------------------------------
Mirroring was not set and it is not clear when the super-block got corrupted.

Earlier we had experimented to recover - after booting the system from the alternate disk, c2t5d0, - but did not succeed to mount c2t6d0.

We can also boot from /stand/vmunix.prev on c2t6d0 but only in single user mode. Though the IPL can see both /stand/vmunix.prev and /stand/vmunix, ls on /stand lists only
the ioconfig file. We can see the file structure on / but most directories are empty since the logical volumes are not mounted.

Does anyone know how to recover from this ?
SolveIT
8 REPLIES 8
Govind Tatachari
New Member

Re: how to recover from disk with invalid super-block

See correction below to fsck messages:
-----------------------------------------------
# fsck -F vxfs -o full,nolog -y /dev/rdsk/c2t6d0
invalid super-block
search for auxiliary super-block? (ynq)y
vxfs fsck: read failure at 1114112
file system check failure, aborting ...
#
-----------------------------------------------

-----------------------------------------------
# fsck -F vxfs -o full,nolog -y /dev/dsk/c2t6d0
invalid super-block
search for auxiliary super-block? (ynq)y
alternate super-block not found
vxfs fsck: cannot initialize aggregate
file system check failure, aborting ...
#
-----------------------------------------------
SolveIT
Roger Baptiste
Honored Contributor

Re: how to recover from disk with invalid super-block

Hi,

After you boot from single user mode,
mount the /home Filesystem manually.
If you don't remember the LV to /home belonged,
check /etc/fstab file.
If the mount does not work, run
fsck on the /home LV.

Once you are able to mount /home, tar
the files onto the tape;

-Raj
Take it easy.
Animesh Chakraborty
Honored Contributor

Re: how to recover from disk with invalid super-block

Hi,
VxFS file systems do not use auxiliary superblocks. The primary superblock is
created along with a copy. It is placed in the Allocation Unit Header (similar
to HFS's Cylinder Group). If the superblock and it's copy (located in the
Allocation Unit Header) are overwritten, then there is not an available
superblock to recover from. The only alternative is to newfs the
filesystem and restore the file system(s) contents from a current backup.


Regards
Animesh

Did you take a backup?
Frank Slootweg
Honored Contributor

Re: how to recover from disk with invalid super-block

I think there is some confusion here: You say that this is a boot disk and say/imply that it is vxfs. If vxfs+boot, then it must be a *LVM* disk, not a 'whole-disk' disk.

For a LVM disk you use /dev/vg??/rlvol? device files for fsck (and mount), not /dev/[r]dsk/c?t?6d? ones!

However before you can fsck/mount a disk on *another* system, which you are probably doing, you first have to vgimport it. See the vgimport manual page on how to do this or do it with SAM.
Sanjay_6
Honored Contributor

Re: how to recover from disk with invalid super-block

Hi Govind,

don't think you can recover from a superblock error. You have to recreate the filesystem and load the data from the backup.

Hope this helps.

Regds
Govind Tatachari
New Member

Re: how to recover from disk with invalid super-block

Clearly this a "hope against hope" situation but please help our attempt to give "/home data recovery" the best shot (chance) based on as "surgical" an insight and exercise as possible.
1. c2t6d0 is a "vxfs+boot" (the original boot disk).
2. on c2t6d0, the /etc/fstab is
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
3. The /etc/lvmtab is messed up and hence "vgscan" fails. It can't access the list of physical volumes for /dev/vg00 (which is just /dev/dsk/c2t6d0).

How can we rebuild this and fsck the /dev/vg00/lvol[n](s).
SolveIT
Frank Slootweg
Honored Contributor

Re: how to recover from disk with invalid super-block

You say that you can boot in single user mode.
You also say that you have some problem with vgscan, but it is not clear what kind of problem, because vgscan is intended to *fix* /etc/lvmtab, so it does not matter that it is "messed up".

In any case, while in single user mode, can you *access* the desired LV (/dev/vg00/lvol5 (/home)), and, more specifically, can you fsck it? (fsck -F vxfs -o full,nolog -y /dev/vg00/rlvol5 (note *r*lvol5)? If so, then you can probably mount it, back it up (for example fbackup is (also) in /sbin), etc..

When you respond again, please give as much detail as possible, because until now we don't even know *how* you are trying to do the recovery (i.e. just using the original system, or having the problem disk connected to another, working, 'host' system, or ...). If something does not work, then please post the commands/options/parameters used and the resulting messages.

Good luck!
Govind Tatachari
New Member

Re: how to recover from disk with invalid super-block

Thanks to all of you (and Frank for his tenacity). My "gut" feel had been that this "super-block" problem was not fatal
since I was able to boot. Dmitri Zogin of WTEC (Cupertino) took a look at my machine and restored the previous configuration (a calculated risk) using vgcfgrestore. Ofcourse this was done as part of a series of commands to diagnose and fix the "invalid super-block" problem.
SolveIT