2008-12-21 14:36:42

by Norbert Preining

[permalink] [raw]
Subject: linux ext3 partition hosed, is this hardware of software error?

Hi everyone,

(please cc)

since a few month I have a new Sony laptop and yesterday shutting down
didn't work out, but due to a graphics bug (which I reported already
several times) I couldn't see anything going on (console garbled). After
some time the laptop still flashed madly (which it usually does for some
time before turning off) I decided that something has gone mad, no idea
what. I used Sysrc-s u o and went to bed.

THis morning grub didn't boot. Booting from an usb stick did give error
messages, bummer. INterestingly the second partition with ntfs I could
mount from my rescue stick (riplinux), but the third=linux did not work.
Here are the error messages from dmesg:

scsi 2:0:0:0: Direct-Access ATA TOSHIBA MK3252GS LV01 PQ: 0 ANSI: 5
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3 sda4
sd 2:0:0:0: [sda] Attached SCSI disk
sd 2:0:0:0: Attached scsi generic sg0 type 0
scsi 3:0:0:0: CD-ROM MATSHITA DVD-RAM UJ862AS 1.21 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 3:0:0:0: Attached scsi CD-ROM sr0
sr 3:0:0:0: Attached scsi generic sg1 type 5
scsi8 : pata_legacy
ata7: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14
scsi9 : pata_legacy
ata8: PATA max PIO4 cmd 0x170 ctl 0x376 irq 15
ACPI: PCI Interrupt Link [LNKF] enabled at IRQ 10
ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 10
sd 10:0:0:0: [sdb] 15794176 512-byte hardware sectors (8087 MB)
sd 10:0:0:0: [sdb] Write Protect is off
sd 10:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 10:0:0:0: [sdb] Assuming drive cache: write through
sd 10:0:0:0: [sdb] 15794176 512-byte hardware sectors (8087 MB)
sd 10:0:0:0: [sdb] Write Protect is off
sd 10:0:0:0: [sdb] Mode Sense: 00 00 00 00
sd 10:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 10:0:0:0: [sdb] Attached SCSI removable disk
sd 10:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: cmd 60/40:08:28:3d:95/00:00:0a:00:00/40 tag 1 ncq 32768 in
res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
ata1: EH complete
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: cmd 60/40:00:28:3d:95/00:00:0a:00:00/40 tag 0 ncq 32768 in
res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
ata1: EH complete
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: cmd 60/40:08:28:3d:95/00:00:0a:00:00/40 tag 1 ncq 32768 in
res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
ata1: EH complete
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: cmd 60/40:00:28:3d:95/00:00:0a:00:00/40 tag 0 ncq 32768 in
res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
ata1: EH complete
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: cmd 60/40:08:28:3d:95/00:00:0a:00:00/40 tag 1 ncq 32768 in
res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
ata1: EH complete
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
ata1.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000008
ata1.00: cmd 60/40:00:28:3d:95/00:00:0a:00:00/40 tag 0 ncq 32768 in
res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
sd 2:0:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
sd 2:0:0:0: [sda] Sense Key : 0x3 [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
0a 95 3d 38
sd 2:0:0:0: [sda] ASC=0x11 ASCQ=0x4
end_request: I/O error, dev sda, sector 177552696
Buffer I/O error on device sda3, logical block 12
Buffer I/O error on device sda3, logical block 13
Buffer I/O error on device sda3, logical block 14
Buffer I/O error on device sda3, logical block 15
Buffer I/O error on device sda3, logical block 16
Buffer I/O error on device sda3, logical block 17
Buffer I/O error on device sda3, logical block 18
Buffer I/O error on device sda3, logical block 19
Buffer I/O error on device sda3, logical block 20
Buffer I/O error on device sda3, logical block 21
ata1: EH complete
sd 2:0:0:0: [sda] 625142448 512-byte hardware sectors (320073 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA



I tried fsck, no chance, nothing did work.

Is there any way to get at the stuff on the disk?

Is the disk hosed? Is the controller hosed? Is something else hosed?

Thanks a lot for any suggestion, I am a bit destroyed...

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
BRADWORTHY
One who is skilled in the art of naming loaves.
--- Douglas Adams, The Meaning of Liff


2008-12-21 14:49:08

by Alan Cox

[permalink] [raw]
Subject: Re: linux ext3 partition hosed, is this hardware of software error?

> res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
> ata1.00: status: { DRDY ERR }
> ata1.00: error: { UNC }

Bad sectors

> Buffer I/O error on device sda3, logical block 12
> Buffer I/O error on device sda3, logical block 13

Right near the start of the disk.

Make a copy of the partition with a recovery tool and write it somewhere
(file on another disk whatever) and keep it safe. Make a copy of that and
fsck the copy. You may need to use the alternate superblock option on
fsck for this.

Alan

2008-12-21 15:03:04

by Norbert Preining

[permalink] [raw]
Subject: Re: linux ext3 partition hosed, is this hardware of software error?

Hi Alan,

On So, 21 Dez 2008, Alan Cox wrote:
> > res 41/40:40:38:3d:95/91:00:0a:00:00/6a Emask 0x409 (media error) <F>
> > ata1.00: status: { DRDY ERR }
> > ata1.00: error: { UNC }
>
> Bad sectors

Umpf. 4 month old. INcredible rubbish.

> > Buffer I/O error on device sda3, logical block 12
> > Buffer I/O error on device sda3, logical block 13
>
> Right near the start of the disk.

Ah, that is the reason why grub is gone.

> Make a copy of the partition with a recovery tool and write it somewhere

ddrescue? partimage? Any other suggestion?

> (file on another disk whatever) and keep it safe. Make a copy of that and
> fsck the copy. You may need to use the alternate superblock option on
> fsck for this.

Thanks, good hint, didn't know about that.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
MALIBU (n.)
The height by which the top of a wave exceeds the height to which you
have rolled up your trousers.
--- Douglas Adams, The Meaning of Liff

2008-12-21 15:57:16

by Alan Cox

[permalink] [raw]
Subject: Re: linux ext3 partition hosed, is this hardware of software error?

> > > Buffer I/O error on device sda3, logical block 12
> > > Buffer I/O error on device sda3, logical block 13
> >
> > Right near the start of the disk.
>
> Ah, that is the reason why grub is gone.

To be accurate - start of partition but the effect is the same yes.

> > Make a copy of the partition with a recovery tool and write it somewhere
>
> ddrescue? partimage? Any other suggestion?

ddrescue should do the trick - anything which will copy all the valid
sectors and write out the lost ones as zero or similar preserving what is
left of the file.

>
> > (file on another disk whatever) and keep it safe. Make a copy of that and
> > fsck the copy. You may need to use the alternate superblock option on
> > fsck for this.
>
> Thanks, good hint, didn't know about that.

It's there for exactly this kind of situation.

Alan

2008-12-25 09:55:36

by Norbert Preining

[permalink] [raw]
Subject: Re: linux ext3 partition hosed, is this hardware of software error?

Hi Alan,

On So, 21 Dez 2008, Alan Cox wrote:
> ddrescue should do the trick - anything which will copy all the valid
> sectors and write out the lost ones as zero or similar preserving what is
> left of the file.

Again thanks for your help. I rescued most of the hard disc, fsck
succeeded in finding another superblock by itself, and AFAIS (still
checking) all the stuff is still there.

The only thing I hate is the reinstallation procedure (many system files
are hosed, inconsistent md5sums, ...) and that they will carry away my
laptop for quite a lot of days (still under warranty, 2.5months!)

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
ARDSCULL (n.)
Excuse made by rural Welsh hairdresser for deep wounds inflicted on
your scalp in an attempt to rectify whatever it was that induced the
ardscalpsie (q.v.).
--- Douglas Adams, The Meaning of Liff