[Linux-cluster] corrupt 5.2.1 filesystem

Bob Peterson rpeterso at redhat.com
Fri Nov 2 20:17:38 UTC 2007


On Fri, 2007-11-02 at 18:55 +0100, Schlett, Matthias wrote:
> We have an old  GFS 5.2.1 cluster which is running without problems since 2004.
> Unfortunally during a RAID-5 rebuild one of our filesystems was corrupted and cannot be mounted.
> We also tried to check it by gfs_fsck, but it cannot find the superblock.
> With the help of dd  I dumped the first blocks of the device and compared it with a working filesystem.
> It seems that the filesystem information is only moved an not destroyed.
> 
> So my questions is, how can I restore the superblock and maybe restore the whole filesystem ?
> 
> 
> m.schlett

Hi Matthias,

I would suggest extreme caution here.  It depends on what exactly is wrong.
If it's just the superblock, that's one thing, but if the superblock is
relocated, chances are, so are lots of things, like the rgindex and the
bitmaps telling which blocks are used.  The preferred method, I would
think, is to restore from backup after doing mkfs.  If you don't have
a backup and really need to get the information back, I would first
use the gfs_edit util to examine what's really out there and how sane it
is.  Actually, if possible, I'd use gfs2_edit because it has a lot more
features than gfs_edit and can operate, for the most part, on gfs1
file systems as well as gfs2.  Of course, gfs2_edit only exists on
newer releases.  Also, on older systems, I don't think gfs2_edit was
part of the cluster packages so you would have to build it from source
code.  If the superblock is bad, gfs_edit and/or gfs2_edit may not be able
to read the file system either.  You may not want to overwrite what's
at the superblock's location, because it may be some other vital piece
that should be relocated somewhere else.  In short, the situation is not
good.  You really shouldn't mess with it unless you're intimately
familiar with how a gfs file system looks on disk.

Regards,

Bob Peterson
Red Hat Cluster Suite





More information about the Linux-cluster mailing list