[Techtalk] finding bad files
Miriam English
mim at miriam-english.org
Mon Apr 13 22:05:46 UTC 2015
Lots of great suggestions. Thanks.
Using tar was a terrific idea. Using find and cat to send to /dev/null
was the perfect solution.
I should have waited longer before trying what I did. I ran e2fsck to
check for errors, then thought, hell, I might as well get it to fix all
the errors at the same time and then I could restore the files from my
backup because now the damaged files will be different from the backups.
But I didn't think long enough about this, because I also have some new
files that haven't yet been backed up from that drive. And some will
almost certainly be affected by the errors, with no chance of recovering
them now. Oops.
The good news is that although many blocks had erroneous data, there
were none listed as "bad blocks". I assume that bad blocks are
physically faulty regions on the disk.
The drive may be failing, though it isn't terribly old and being an
external drive I only connect and switch it on when I actually need to
read or write data from/to it. The data may have become affected during
one of the very frequent blackouts we have here. Or I wonder if dust on
the USB connectors could have damaged the data, though I think that they
use checksums to guard against that. Looks like I'll have to save the
money to buy another 2 terabyte (or larger) drive. (I wish solid state
drives would get cheaper more quickly.)
I used to have an uninterruptible power supply, but it got destroyed a
while back when lightning struck while I was shutting everything down
because I heard a storm approaching. Since then I've become a big fan of
ultra-low-power computing and want to move entirely to solar panels and
batteries in the near future. I'm sick of having thousands of dollars in
computers and other equipment destroyed by the electrical grid over the
years.
There is also the human-unfriendly problem of unmounting a drive before
disconnecting it. Everybody knows this must be done, but everybody has
lost data because of it. I have, on odd occasions, usually when
over-tired, made the mistake of pulling out the wrong USB connector or
switching off the wrong external drive.
<rant>I'm certain the design of peripherals could have been made to take
account of the flawed nature of humans so that data was buffered in
drive electronics, and capacitors supplied just enough power to ensure
pointers were updated correctly. But USB, while having terrific
advantages over previous kinds of data connectors, was nevertheless a
good example of an over-complex, yet flawed, spec designed by committee.
The main USB document is more than 600 pages long!</rant>
Cheers,
- Miriam
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs: http://miriam-e.dreamwidth.org
http://miriam-e.livejournal.com
More information about the Techtalk
mailing list