LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 03-16-2008, 04:06 AM   #1
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Rep: Reputation: 0
xfs partitioned disk unmountable (superblock errors) - any hope of rescuing data?


For reasons unknown, my Ubuntu upgrade was interrupted mid-install by an automated shutdown of my machine. On restart I get these errors shortly after Grub loads:

Code:
[ 27.466347] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0.0)

Kernel alive
kernel direct mapping tables up to 10000000 @ 8000-4000
I booted off a Live CD and tried to mount the hard drive. On boot I noticed a bunch of console lines like this when the OS was trying to mount file systems...
Code:
Buffer I/O error on device sda1, logical block 0
Buffer I/O error on device sda1, logical block 1
...
Once loaded I tried to mount the disk manually...

$mount -t xfs /dev/sda /mnt/temp

But got a superblock read failed error.

Similarly with:

$xfs_repair /dev/sda
Code:
   - creating 4 worker thread(s)
   Phase 1 - find and verify superblock
   superblock read failed, offset 0, size 524288, ag 0, rval 0
   
   fatal error -- Invalid argument
I don't think it's an xfs issue though, because, following other threads, I tried running this test:

$dd if=/dev/hdd1 bs=512 count=1 | hexdump

But got read errors instead of the expected hex values.

The HD is a Seagate Barracuda, less than a year old. It seems unlikely there's been a hardware failure - particularly after that shutdown mid-install. I opened the case and isolated the drive - it's definitely spinning and not making any odd noises.

What are my options here? As a relative noob, it seems to me the disk geometry or partition map is corrupted. Is there any possibility of repairing the disk to a point where I can at least mount it and retrieve my data. Does SystemRescue disk provide tools to do this?

Thanks for you help!
 
Old 03-16-2008, 09:54 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
First, run
Code:
fdisk -l
to see the partition list. You seem to use /dev/sda - which is entire disk, most likely, your HDD - instead of /dev/sda1 or whatever you need, which represents actual partition - a slice of space of the disk where FS normally resides. Probably just doing all you tried in the beginning but with correct partition argument will do the trick. /dev/hdd1 returned errors because it, well, doesn't exist. It should be someting like IDE secondary slave (fourth disk on an old ATA data bus system).
 
Old 03-16-2008, 04:11 PM   #3
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the reply. I did also try the commands with /dev/sda1 thru to /dev/sda3 but with the same result. The second example was a typo sorry. The correct commands and output were:

Code:
$dd if=/dev/sda bs=512 count=1 | hexdump
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0 seconds, Infinity B/s
Code:
$dd if=/dev/sda1 bs=512 count=1 | hexdump
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0 seconds, Infinity B/s
I had also tried fdisk but the command returns no output at all (just returns a new command prompt).

$fdisk -l
$fdisk -l /dev/sda
$fdisk -l /dev/sda1
etc.
 
Old 03-16-2008, 04:43 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,801

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
With Ubuntu you need sudo - even for fdisk
 
Old 03-16-2008, 04:59 PM   #5
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, SolydK 2013
Posts: 7,434

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by mattp52 View Post
Once loaded I tried to mount the disk manually...

$mount -t xfs /dev/sda /mnt/temp



$xfs_repair /dev/sda
Code:
   - creating 4 worker thread(s)
   Phase 1 - find and verify superblock
   superblock read failed, offset 0, size 524288, ag 0, rval 0
   
   fatal error -- Invalid argument
You have to mount a partition, not an entire hard drive.

You have to run xfs_repair against a partition, not an entire hard drive.

So what partition is your filesystem on? If it is on /dev/sda1 then run:

xfs_repair /dev/sda1

-----------------
Steve Stites
 
Old 03-16-2008, 05:33 PM   #6
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Assuming the xfs module is built into the kernel or is loaded from initrd or initramfs. Also assuming the module for IDE/SCSI/SATA controller is loaded. Try running xfs_check. If that comes up with some problems, run the hard drive utility from the hard drive manufacture to scan the sectors to make sure they are not corrupted. IMHO, Seagate is poor at this. I prefer Hitachi because their hard drive utility is very thorough. Then use xfs_repair using the -n option to find out what will it do. If all else fails try to use the -L option to zero out the metadata log. If the drive is good, there is a higher chance of getting the data back. However, the files will be stored in lost+found.

Check the logs to make sure the drive is being detected at startup.

If there is no partitions found, the partition table is corrupted and needs to be created. I suggest use gpart to guess the partitions and where they start and end. Changing the partition table will not effect the data.

I strongly recommend make an image of the drive before doing any data recovery. This gives you a chance to repeat the steps or do the steps differently.

TIP:
Always include the kernel option ro (read only) for any file system. This way the boot loader will not corrupt the data. The distribution should remount it as read-write to continue the boot process.
 
Old 03-16-2008, 06:32 PM   #7
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for all your tips. Syg00, I have been running these commands under sudo, left that out for brevity - sorry should have mentioned that.

Running either the mount or the xfs_repair commands against a partition also fails with the same output, i.e.:

$mount -t xfs /dev/sda1 /mnt/temp
$xfs_repair /dev/sda1

Electro wrote:
Quote:
assumingng the xfs module is built into the kernel or is loaded from initrd or initramfs. Also assuming the module for IDE/SCSI/SATA controller is loaded. Try running xfs_check
I'm assuming this is the case as the live CD is Ubuntu 7.10 with an upt-to-date kernel and includes tools for manipulating xfs disks. Unfortunately I get errors similar to what I'm getting for xfs_repair with xfs_check - the tools
cannot even read the device.

So I've built a disk from the latest SystemRescueCD as I wanted to try running TestDisk on it to rebuild the partition map. Unfortunately during the boot-up it goes it cycles through various SATA link speed and UDMA settings trying to mount the device. I'm getting this kind of output on each cycle (with small variations with each setting tried):

Code:
ata4: SATA link up x.xGps (SStatus 123 Scontrol 3xx) (Attempts 300,310 etc.)
ata4.00: configured for UDMA/1xx (attempts 133,100 etc)
ata4:EH complete
ata4.00: exception Emask 0x0 SAct 0x0 Serr 0x0 action 0x2 frozen
ata4.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
sta4.00:status: {DRDY}
ata4: soft resetting link
Occasionally I also get Buffer I/O errors showing up. None are successful in mounting the disk. Eventually the screen goes black and I have to reboot.


I'm going to try and hunt out a tool from the disk manufacturer and see if I can get anywhere with that, otherwise it's not looking good!
 
Old 03-16-2008, 10:40 PM   #8
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, so I ran Seagate's diagnostic tool (SeaGateTools v2.07) which runs on FreeDOS. The software scanned for devices and found the disk. It said SMART was activated and hadn't been tripped. So I ran the short and long tests and the tool passed both.

Then I downloaded the 7.04 build of Rescubuntu... a live CD with rescue tools on it. On boot I got similar startup errors (Buffer I/O errors etc) as I got on other Linux Live CDs. Unfortunately no tools, including testdisk seem to be able to read the drive.

This is really frustrating as I'm confident the data is still intact on the disk but I cannot get anything to mount the thing!
 
Old 03-17-2008, 12:00 AM   #9
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
S.M.A.R.T. is dumb. It is not accurate telling about failure. Running the short and long tests is not enough. To check if the drive is going, check for the noise. A sector to sector scan will be better to check the quality of the platters.

IMHO, Ubuntu just sucks because is not reliable. I suggest Knoppix or System Rescue CD.


Good luck.
 
Old 03-17-2008, 03:25 PM   #10
mattp52
LQ Newbie
 
Registered: Jul 2007
Posts: 17

Original Poster
Rep: Reputation: 0
OK, success! Basically I went into the BIOS set-up and reset the ACPI control. The system booted up into console mode. From there I was able to recover the partially installed upgrade with:

$dpkg --configure -a

The package manager completed it's configuration and the system reboots cleanly into GDM with all services running. Not sure what tripped the ACPI controller - I did a BIOS Flash upgrade a couple of months ago but experienced no problems after it.

Ah, well. Good to have the drive back - thanks again for all your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xfs cannot read superblock edemark Linux - Hardware 3 12-22-2012 02:44 AM
How to find out which tables are partitioned and info about data files in Postgres nautilus Linux - Server 0 01-14-2008 06:57 AM
Rescuing Data from old kernel Taleya Slackware 12 05-18-2007 10:11 AM
Find out how a disk was partitioned flycast Linux - Hardware 4 04-14-2007 08:04 PM
Need help pulling ASCII off of an unmountable disk. Travis86 Programming 6 06-28-2003 09:46 PM


All times are GMT -5. The time now is 07:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration