[sclug] file system errors on SATA drive

Alex Butcher lug at assursys.co.uk
Thu Feb 15 23:51:58 UTC 2007


On Thu, 15 Feb 2007, Darren Davison wrote:

> hi,
>
> I recently started getting errors on a new (3 mth old) SATA drive...

[snip]

> Feb 14 20:59:36 hepburn kernel: [19843609.396000] EXT3 FS on sda1, internal
                                                                ^^^^
> journal

[snip]

> Attempting to run e2fsck fails due to a bad superblock, and using any of the
> other superblocks gives the same error:
>
> root at hepburn:~# mke2fs -n /dev/sda
> mke2fs 1.39 (29-May-2006)
> /dev/sda is entire device, not just one partition!
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[snip]

The above is probably why the below:

> Superblock backups stored on blocks:
>        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
> 		2654208, 4096000, 7962624, 11239424, 20480000, 23887872
>
> root at hepburn:~# e2fsck -b 32768 /dev/sda
> e2fsck 1.39 (29-May-2006)
> e2fsck: Bad magic number in super-block while trying to open
> /dev/sda

doesn't work. Try running mke2fs -n /dev/sda1, then e2fsck -b <foo>
/dev/sda1.

As far as fixing the problem goes, it's probably a block which now generates
read errors. From the kernel log, find the LBA of it, write to it, and the
problem will almost certainly go away. Obviously, any data relying on the
failed block(s) will be gone. If you don't care about the data, you can just
dd if=/dev/zero the entire disc from a bootable CD or similar, which may be
easier than trying to find the failed blocks. For future reference, it may
be worth skipping to a console when commissioning a new disc and running
badblocks in write test mode over it before putting it into service with
live data, with the goal of forcing any failed blocks to be remapped
/before/ they store Real Data.

> Any idea what I need to do here?
> Thanks!

HTH,
Alex.
-- 
Alex Butcher, Bristol UK.                           PGP/GnuPG ID:0x5010dbff

"[T]he whole point about the reason why I think it is important we go for
identity cards and an identity database today is that identity fraud and
abuse is a major, major problem. Now the civil liberties aspect of it, look
it is a view, I don't personally think it matters very much."
  - Tony Blair, 6 June 2006 <http://www.number-10.gov.uk/output/Page9566.asp>


More information about the Sclug mailing list