You are not logged in.

#1 2009-04-16 23:58:01

Feynman
Member
From: Atlanta, GA, USA
Registered: 2008-05-06
Posts: 24

Hard disk failing -- how to safely backup data / remove bad sectors?

I'm sorry if this is posted in the wrong forums, I wasn't sure where to go.

It appears that I have a bad block on my hard drive.  During normal boot-up, arch ran its regular scan of my / partition, and failed giving an error that looked something like:

Error reading block 13303898 (something here about a short read) while getting next inode from scan.

It then let me login as root for maintenance and mounted / as read only.  By doing some work with du, I was able to narrow the problem to a bunch of files in a single folder.  Attempting to access them with du gave the error

Ext3-fs error (device sda4):  ext3_get_inode_loc: unable to read inode block - inode=3328795, block=13303898

The block was the same for all of the bad files, although the inode changed. 

First question (probably the most important):  Is it safe to mount my hard drive in read-write mode to try to backup my data?  If I do so, what is the best way to proceed?

Second question (hopeful here, but not optimistic):  The folder with the bad block is not critical at all.  I've had the harddrive for less than a year, so I'm hoping it just got bumped and isn't completely dying.  I'd like to think I can back up my data, use some software to ignore the bad block, and go on my merry way using the rest of my hard drive.  Is this feasible or even possible?  If so, how would I go about fixing this?

(Sigh) all of this the week before my final exams too, with critical data on the hard drive.  Oh well, when it rains it pours I guess...

Offline

#2 2009-04-17 02:52:45

darthaxul
Member
Registered: 2008-09-24
Posts: 156

Re: Hard disk failing -- how to safely backup data / remove bad sectors?

If ur drive is goin bad its not going to get any better. u should never try writing to a bad harddrive, use only read. just grab a new hard drive and copy over the stuff from the bad hd. then throw the bad hd away

Offline

#3 2009-04-17 03:05:24

SkonesMickLoud
Arch Linux f@h Team Member
From: The D of C
Registered: 2008-09-20
Posts: 178

Re: Hard disk failing -- how to safely backup data / remove bad sectors?

darthaxul wrote:

then throw the bad hd away

After wiping it.

Offline

#4 2009-04-22 10:52:40

citral
Member
Registered: 2005-05-07
Posts: 87

Re: Hard disk failing -- how to safely backup data / remove bad sectors?

Also, `shred` is preferred to simply deleting the files.

http://unixhelp.ed.ac.uk/CGI/man-cgi?shred+1


One of the main causes of the fall of the Roman Empire was that, lacking zero,
they had no way to indicate successful termination of their C programs.

Offline

#5 2009-04-22 14:47:41

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Hard disk failing -- how to safely backup data / remove bad sectors?

I would backup all the data I could to another HD, then I would zero de drive with dd and try to read it back with dd and see if it complains.
It may be a transient problem due to a failed write and not a physical problem.

Something similar happened to me before. But either way if dd solves your problem I would still keep a close eye on that disk.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB