You are not logged in.

#1 2005-04-24 01:53:31

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

[XFS] Mount error - Cannot read superblock

I've got two XFS partitions on seperate hard drives striped to one md-array. While I was out, I got an error about XFS and the drive became inaccessible:

Apr 23 23:46:24 ferro hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error }
Apr 23 23:46:24 ferro hdc: dma_intr: error=0x40 { UncorrectableError }, LBAsect=59768759, sector=59768759
Apr 23 23:46:24 ferro ide: failed opcode was: unknown
Apr 23 23:46:24 ferro end_request: I/O error, dev hdc, sector 59768759
Apr 23 23:46:24 ferro xfs_force_shutdown(md2,0x1) called from line 422 of file fs/xfs/xfs_trans_buf.c.  Return address = 0xc025878f

After rebooting, it wasn't mounted either. The error I get is:

Apr 24 03:20:10 ferro XFS mounting filesystem md2
Apr 24 03:20:10 ferro Starting XFS recovery on filesystem: md2 (dev: md2)
Apr 24 03:20:33 ferro XFS: log mount/recovery failed: error 5
Apr 24 03:20:33 ferro XFS: log mount failed

I also get many hard drive errors:

Apr 24 03:20:13 ferro hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error   }
Apr 24 03:20:13 ferro hdc: dma_intr: error=0x01 { AddrMarkNotFound }, LBAsect=11  5876615, sector=115876615
Apr 24 03:20:13 ferro ide: failed opcode was: unknownApr 24 03:20:21 ferro ide: failed opcode was: unknown
Apr 24 03:20:21 ferro hdc: DMA disabled
Apr 24 03:20:21 ferro hdd: DMA disabled
Apr 24 03:20:21 ferro ide1: reset: success

When I try to repair the md-partition, this is what xfs_check says:

[03:49:21] root@ferro:/home/fubar $ xfs_check /dev/md/2 
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_check.  If you are unable to mount the filesystem, then use
the xfs_repair -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

If I run xfs_repair -L, it says it'll probably destroy some data. As it's a RAID0 partition, I'd rather not risk it. Does anyone have a better idea?


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#2 2005-04-24 12:47:33

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: [XFS] Mount error - Cannot read superblock

It seems there's one screwed up sector on the second disk of the RAID-0 array.

Buffer I/O error on device hdc5, logical block 46720769
hdc: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdc: task_in_intr: error=0x40 { UncorrectableError }, LBAsect=71427920, sector=71427920
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 71427920
Buffer I/O error on device hdc5, logical block 46720769

I can't run xfs_repair on any of the devices: not on hda5, hdc5 or md2. Not even after stopping md2.

First breakfast/lunch, then more info.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2005-04-24 14:16:01

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [XFS] Mount error - Cannot read superblock

They way I saved (most of) my data (the case of one partition):
1. get a new HDD (or somebody elses' HDD)
2. create partition of the same size using fdisk on /dev/newhdd
3. dd if=/dev/oldhdd/badpartition of=/dev/newhdd/goodpartition conv=noerror # this will skip errors are put zeros instead of bad blocks
3'. if dd-ing pauses for some reason, you can restart from the last sector where it found an error (errors are displayed) with ibs/obs and skip/seek params (see man) // a short calculus will give you the right params // don't use big values for ibs/obs because, the bigger they are, the bigger the zeros chunk will be if a bad block is found-> more data is lost
4. repair /dev/newhdd/goodpartition with reiserfsck
5. recover data from /dev/newhdd/goodpartition

You are using RAID.. and unfortunately RAID 0.

I would recommend:
1. dd your broken disk to something else (considering the restrictions imposed by RAID 0 - that might require getting a new identical disk, or maybe it works with some other disk, but with the RAID0 partition of the same size).
1'. I would backup the first HDD in the RAID0 array also
2. after you dd the old disk, try repairing the RAID0 array but with the newhdd(s) inside. You can't *fsck on a bad disk, because it needs to write good sectors over sectors marked as bad.

!!! Data gets lost when zeros are put instead of bad sectors.

Take into account that I have repaired only reiserfs partitions and I don't use RAID. Try to ADAPT my solution to your case.
I believe it can be done, but only if you use some other good HDD.

Disclaimer: I cannot be held resonsable for data loss.. bla bla bla. I will write a more detailed recovery howto when I'll have some time, based on my experience on recovering my Linux partitions.

Good luck.

IceRAM

Offline

#4 2005-04-24 22:24:52

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: [XFS] Mount error - Cannot read superblock

I took the easy way out and kissed my data goodbye. I formatted both partitions as ReiserFS and didn't turn them back into RAID0.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#5 2005-04-24 23:06:16

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: [XFS] Mount error - Cannot read superblock

It took me a week to recover everything.
Now I've got many bits and pieces lying around... some of them are very difficult to track.

Offline

#6 2005-06-18 07:38:12

robot5x
Member
Registered: 2004-01-26
Posts: 266

Re: [XFS] Mount error - Cannot read superblock

Hi all -
I've just installed arch again after a while trying some other things - first thing I had to face was a hard disk failure. My situation seems similar to FUBAR - I have two discs, /dev/hda and /dev/hdb. /dev/hda has 3 partitions - swap, root and another large one for data. All of a sudden I couldn't mount my third partition thru this error.

mount: wrong fs type, bad option, bad superblock on /dev/hda3,
       or too many mounted file systems

I did a badblocks test, and the output file gave a massive list of blocks that I suppose are bad. This is the first time this has happened so I have no idea what to do - even more annoying was that there were no signs there would be a failure so I didn't get a chance to back up my data recently.
Basically - I don't care about keeping the hard disk, but I REALLY need to get the data from /dev/hda3. Is there a way I can access the data despite it being unmountable?
thanks.

edit: some extra info.
Disk geometry for /dev/hda: 0.000-29325.515 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031    502.031  primary   linux-swap 
2        502.031   5640.007  primary   reiserfs    boot
3       5640.007  29321.762  primary   reiserfs   

I'm running arch fine off of /dev/hda2 which appears unaffected - only hda3 is unmountable, for some reasons.

Offline

Board footer

Powered by FluxBB