LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   drive failed - attempting recovery (https://www.linuxquestions.org/questions/linux-server-73/drive-failed-attempting-recovery-798856/)

draeath 03-30-2010 06:19 AM

drive failed - attempting recovery
 
So, my hard drive failed yesterday. I managed to use ddrescue to salvage it, but there were 8 errors (totaling in at about 30gB) at the end of the process.

I copied each partition and the MBR seperately. I /boot, swap, and the MBR were saved. I'm having problems with root, however. The filesystem is XFS.

When I initially ran xfs_check on the file, it reported that the log needed to be written with a mount, or removed with xfs_repair -L. I tried to mount it, but get "mount: /dev/loop0: can't read superblock" (using either mount -o loop on the file, or using losetup manually). So, I ran xfs_repair -L and it did a LOT of stuff. I reran xfs_repair (without -L) and yet more changes were made. At this point, it is 'clean' however I still get "mount: /dev/loop0: can't read superblock".

xfs_check prints no information. xfs_repair prints this info:
Code:

pandora:/home/pbransford/fail-recovery # blkid /dev/loop0
/dev/loop0: LABEL="root" UUID="16a2ed09-8455-4e4e-9537-bec5d4918f4e" TYPE="xfs"

pandora:/home/pbransford/fail-recovery # xfs_repair /dev/loop0
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 3
        - agno = 1
        - agno = 2
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done

Ideas? Obviously there's enough of the primary and backup superblocks... however mount still cannot do it's magic. I'm aware that 30gB is a large hunk of drive to lose - but I'm hoping to get what I can get.

Note this isn't an emergency. There is nothing irreplaceable on the drive - I know enough to keep backups of critical information ;)


EDIT:

More information. This is from dmesg when I try to mount it:
Code:

[39727.296253] attempt to access beyond end of device
[39727.296278] loop0: rw=0, want=479733024, limit=427692312
[39727.296298] I/O error in filesystem ("loop0") meta-data dev loop0 block 0x1c98251f
              ("xfs_read_buf") error 5 buf count 512
[39727.296322] XFS: size check 2 failed

This is bad, I gather. Still though - any ideas?

lspiehler 04-02-2010 08:15 AM

HD Recovery
 
I've never had dd rescue or any other program really be able to do anything other than just ignore the bad blocks on a dying hard drive, except for norton ghost. I've watched dd rescue fail miserably, and then follow with an attempt using norton, and have a full, flawless recovery. I don't know if ghost technically "supports" any linux file systems, but you should be able to do it with a sector-by-sector copy. Good luck.

draeath 04-02-2010 09:03 AM

Strangely, this is the first time I've not been able to use ddrescue to save it. Indeed, xfs_check and xfs_repair can read the filesystem just fine. Only 'mount' seems to be having an issue.

www.rzr.free.fr 06-25-2011 08:00 PM

Quote:

Originally Posted by draeath (Post 3921668)
Strangely, this is the first time I've not been able to use ddrescue to save it. Indeed, xfs_check and xfs_repair can read the filesystem just fine. Only 'mount' seems to be having an issue.

please detail more

--
http://rzr.online.Fr/q/recover

draeath 06-25-2011 09:18 PM

It's been over a year since this occurred.


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