Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2011 10:54:56 +0200
From:      "DA Forsyth" <d.forsyth@ru.ac.za>
To:        freebsd-fs@freebsd.org, freebsd-questions@freebsd.org
Subject:   Re: How to fix bad superblock on UFS2?
Message-ID:  <4E2697E0.27289.3E5BF8BB@d.forsyth.ru.ac.za>
In-Reply-To: <alpine.BSF.2.00.1107201037320.25966@mp2.macomnet.net>
References:  <4E257889.12343.39F99213@d.forsyth.ru.ac.za>, <alpine.BSF.2.00.1107201037320.25966@mp2.macomnet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 20 Jul 2011 , Maxim Konovalov entreated about
 "Re: How to fix bad superblock on UFS2?":

> Try to use tools/tools/find-sb to locate superblocks.

Thankyou Maxim
I may yet need to use that on another partition, but last night I 
achieved some success by hacking fsck_ffs to display what it is 
doing.  By doing this I found that it considers the 'first alternate' 
superblock to be the one in the LAST cylinder group.

So, by using dd to copy a working superblock to block 128 and to the 
last one listed by 'newfs -N', fsck_ffs could then actually recover 
some files.  Since I probably broke more things on this partition 
than were broken by the 'disk smoke event', I was not surprised when 
only about half the drives files showed up in lost+found and the 
primary folder is now empty (the whole drive is a Samba share with 
quotas, so I create a folder to share so that users cannot mess with 
the quota.* files).   Not a problem for this partition as I have a 
full level 0 dump.

I now have 2 more partitions to resurrect....
both report 'Cannot find file system superblock' though 'newfs -N' 
shows a sensible list of them, so I have hope.

But, further thanks to you for pointing out find-sb, because in 
googling for that I found various other very useful things, including
http://www.chakraborty.ch/tag/raid-filesystem-partition-recovery-ufs-
freebsd/
which at the least, points out things to avoid doing (-:

thanks

--
       DA Fo rsyth            Network Supervisor
Principal Technical Officer -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E2697E0.27289.3E5BF8BB>