xfs
[Top] [All Lists]

Re: xfs_repair Input/output error

To: xfs@xxxxxxxxxxx
Subject: Re: xfs_repair Input/output error
From: Michael Monnerie <michael.monnerie@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 29 Apr 2009 06:28:16 +0200
In-reply-to: <ff2243530904282040i1bb2cf12v3a329b045edf2f50@xxxxxxxxxxxxxx>
Organization: it-management http://it-management.at
References: <ff2243530904282040i1bb2cf12v3a329b045edf2f50@xxxxxxxxxxxxxx>
User-agent: KMail/1.10.3 (Linux/2.6.29.1-ZMI; KDE/4.1.3; x86_64; ; )
On Mittwoch 29 April 2009 Cory Coager wrote:
> When attempting to mount the partition the drive makes some funny
> noises and these messages spit out on the console:
>
> hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
> hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=268552872,
> high=16, low=117416, sector=268552868
> ide: failed opcode was: unknown
> end_request: I/O error, dev hda, sector 268552868

This is definitely your drive gone bad.

> I believe the drive is fine because check_ide_smart reports:

If the drive "makes funny noises" and I/O errors are logged, it has bad 
sectors. Try with
# smartctl -a /dev/sda
and look for a line like this:
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always  -  0

If the last number is >0, your drive has problems - replace it!

For a full SMART check, please try:
smartctl --smart=on --offlineauto=on --saveauto=on --test=long /dev/sda

This tells your drive to make a long selftest. It prints the estimated 
time for the test to run (usually 1-3h). Then check your smart values 
again. You should try to not use your drive during this time.

> I can xxd and dd this partition without getting any console errors. 

It is possible the drive remapped the bad sectors itself.

> I can also mount the partition with -o ro,norecovery.  How do I repair
> this and recover my data?

Plug in new drive.
Boot from recovery cd
dd if=/dev/sda of=/dev/sdb 
remove old drive
xfs_repair
enjoy

mfg zmi
-- 
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0660 / 415 65 31                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38  500E CE14 91F7 1C12 09B4
// Keyserver: wwwkeys.eu.pgp.net                  Key-ID: 1C1209B4

Attachment: signature.asc
Description: This is a digitally signed message part.

<Prev in Thread] Current Thread [Next in Thread>