LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
Search this Thread
Old 05-19-2011, 10:17 AM   #1
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
DDRescue - advice needed in rescuing failed disk


Hi,

I have an Ext3 formatted 750GB Seagate (enterprise SATAII) drive connected to an obsolete PIV (non HT) based server through a PCI SATA adapter card.

This machine runs FreeBSD 8.0 x32 (disk migrated over from a dead Linux box) however since the disk is Ext3 I reckon that Linux would be the best backup solution for it.

The error I'm getting is not dissimilar to this:

Code:
# /sbin/dump -0 -f - -I 32767 /dev/hda7 | rsh ...
  DUMP: Date of this level 0 dump: Sun Aug 10 14:39:51 2008
  DUMP: Dumping /dev/hda7 (an unlisted file system) to standard output
  DUMP: Added inode 8 to exclude list (journal inode)
  DUMP: Added inode 7 to exclude list (resize inode)
  DUMP: Label: /cricket1
  DUMP: mapping (Pass I) [regular files]
/dev/hda7: Can't read next inode while scanning inode #212576
Taken from here:

http://comments.gmane.org/gmane.comp....dump.user/407

another example is this:

http://lists.samba.org/archive/linux...ay/007140.html

http://www.linuxquestions.org/questi...-error-312768/

Even though I was running e2fsck on it through the Gentoo based System Rescue CD.

From my reading it occurs to me that I won't be able to recover this disk without either a full format or alternatively the hardware maybe on it's way out!

As a temporary measure I've disconnected the drive for the moment so it's sitting idly in the chassis with no Power or SATA connection.

Having a look through various ddrescue sources:

http://www.gnu.org/software/ddrescue/ddrescue.html

http://www.gnu.org/software/ddrescue...ue_manual.html

http://ubuntu-rescue-remix.org/node/80

I am a bit confused as to which backup method I should use???

The disk has only one partition on it spanning the full drive.

My guess would be to do something like so:

Code:
ddrescue -f -n /dev/hda /dev/hdb logfile
of course giving correct ID's for the disk.


I think the thing that confuses me most is that this disk is 750GB but I don't have anything similar which means I need to go out and buy a new disk. If I got myself a 1TB or 2TB SATA drive would I still be able to use the above method or would I need to give separate options???

I couldn't find any mailing list for DDrescue so I have no idea really where the best help could be attained from?


Many thanks for any responses!


Regards
 
Old 05-19-2011, 10:23 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,368
Blog Entries: 2

Rep: Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981
If your backup disk is similar or larger you will have no problems with the command you mentioned.
 
Old 05-19-2011, 11:43 AM   #3
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Thanks Tobi!

What confused me with the above is that I wasn't quite sure if the program copies the raw disk data across to the new raw device or if it creates an image..... due to the MBR of the disk having a fixed size if copied across wouldn't the new disk's MBR either think that the drive is lower capacity then is or would there be some kind of physical mess-up due to more blocks being seen then is allocated at the head of the drive?

I'm guessing if by your statement the tool already allocates for the new size then the procedure would be to first run the above command coupled with:

Code:
e2fsck -p /dev/hd_device
after before mounting.

However, coming back to what I mentioned before will the new space then be available for use or would I need to bounce it to another drive then reformat and transfer again before the disk is in a 'stable' situation?


Thanks :-)
 
Old 05-19-2011, 11:52 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,368
Blog Entries: 2

Rep: Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981Reputation: 3981
I have done that many times, the copying of the partition table will "create" a partition in the same size as on the old disk. The rest of the disk will be unpartitioned. I never had any problems with that, but I think that an e2fsck can not be an disadvantage.
 
Old 05-19-2011, 11:59 AM   #5
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Ok cool :-)

Thanks so much for all the help!!!

This was the backup drive for my network so..... lol. Yeah. erm anyway.


Regards,


Kaya
 
Old 05-29-2011, 04:39 AM   #6
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Hi, coming back to this thread after attempting a recovery; unfortunately I am getting the error:

Code:
Bad superblock on device, use alternate superblock....
after e2fsck -p /dev/sdc.

I was using the command:

Code:
ddrescue -n -r3 /dev/sdd /dev/sdc logfile
where sdd is a 750GB drive and sdc is a 2TB drive.

I google'd around but unfortunately found no responses to people with the same problem?


At this moment I have got:

Code:
dd_rescue -e 1 -A /dev/sdd /dev/sdc
running, which seems to actually work faster. The only thing is that if I get the same error again what do I do?


I guess alternately I could run the command and use a .dd image as output on an already created filesystem then attempt the rescue and mount from there?


Can anyone suggest anything?


Many thanks.
 
Old 05-29-2011, 10:54 AM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
One idea: get System Rescue CD and use testdisk to locate an alternate superblock.
 
Old 05-29-2011, 11:38 AM   #8
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Thanks!

Yeah I see that; I actually found it through this thread post responding:

http://bashinglinux.wordpress.com/tag/dd_rescue/

I have the system rescue cd currently in the machine which I was using from the beginning :-) as it's kinda my life line.

We'll see if that works however, as the data should be intact - the error size that ddrescue is coming up with is only ~90kB.


Hopefully the testdisk command will work:

http://www.cgsecurity.org/wiki/Advan...kup_SuperBlock

is how to use for 'alternate superblock'.

Cross-fingers :-)

- will have to wait till tomorrow evening though until the thing finishes recopying :-( yeah it takes all be it round 15 hours for 750GB.
 
Old 06-02-2011, 03:48 PM   #9
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Can you post the outcome - including what you did, what worked, what didn't, etc.? These types of threads are often helpful for future reference.
 
Old 06-02-2011, 04:49 PM   #10
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Quote:
Can you post the outcome - including what you did, what worked, what didn't, etc.? These types of threads are often helpful for future reference.
Sure :-)

Sorry I was about to however I just got extremely busy in my personal life and ended up on a semi-vacation!


What happened was that I ran:

Code:
ddrescue -n -r3 /dev/sdd /dev/sdc logfile
eventually. As per before.

This coupled together with one thing I missed before which was the command:

Code:
e2fsck -p /dev/sdc
The reason for the:

Code:
Bad superblock....
message previously was due to the fact that I didn't include the partition number:

Code:
e2fsck -p /dev/sdc1
....you would think out of nearly 10 years UNIX experience I wouldn't have missed that????


Anyway, due to what seemed to be a corrupted file system I needed to run:

Code:
e2fsck -y /dev/sdc1
This fixed a lot inode issues and I ended up with quite a few items in the: lost + found directory

I don't know yet what they were as the disk I used is a backup disk and currently disconnected from the machine due to lack of drive and power support within as it's an ancient pre-HT PIV with no SATA so I have an additional PCI based SATA card in there which is compatible with both BSD and Linux.

The crazy thing is however now that I managed to rescue this drive another much newer drive seems to be having I/O issues as through NFS when connected with my Ubuntu notebook I get system freeze on my BSD server.

Once I managed to catch a dmesg output on the TTY claiming:
Quote:
"Read Error"
however the next time I tried to read from the disk nothing was mentioned however the system just froze :-(

I just rebooted now and am waiting for the disk checks to go through even though last time it claimed the disk was clean....?


To be honest I really need to get the disk into a proper SATA port hardwired on a system board and see what happens then rather then Frankensteining as per what I have done.


Assumptions though is that if my hunch is correct and the disk is suffering from I/O issues then dd_rescue tool will be better as that caters for those kinds of errors much better then ddrescue which seems to cater for block errors better.

That will most likely have to be run through FreeBSD however, as my Gentoo based System Rescue CD may not like the UFS2 partition on it.


Will post more on my findings when I actually have achieved a recovery, will need to buy a new disk first though! :-)
 
1 members found this post helpful.
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup of disk using ddrescue vijay_babu1981 Linux - Newbie 7 05-31-2012 04:07 PM
xfs partitioned disk unmountable (superblock errors) - any hope of rescuing data? mattp52 Linux - Hardware 9 03-17-2008 03:25 PM
Advice needed: data recovery from NTFS disk using ddrescue and Ubuntu afzal_b Linux - Newbie 10 09-20-2006 09:14 AM
disk to disk backup for debian/Mempis on bootable cd-- advice loninappleton Linux - Software 3 05-27-2005 01:00 AM
Disk Storage Advice Needed vdi_nenna Linux - Hardware 1 06-26-2003 07:42 PM


All times are GMT -5. The time now is 10:27 AM.

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