From: Anton Lavrentiev <anton_lavrentiev@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: Strange I/O errors for hard-disk driver with bad sectors
Date: Tue, 16 Nov 2004 08:22:30 -0800 (PST) [thread overview]
Message-ID: <20041116162230.74768.qmail@web52302.mail.yahoo.com> (raw)
Hi,
I have a situation when a hard disk, which is on the warranty,
has got too many bad sectors, and has to be replaced with exact
same model of exact same geometry and characteristics. Most data
is still readable (there are just few bad sectors), so I used
dd to transfer the contents to a new disk.
dd if=/dev/hdb1 of=/dev/hda1 conv=sync,noerror
What is strange is that dd reports multiple read failures
around certain sectors, like this (thus writing zeroes on the
output device in several consequtive sectors):
27559069+1 in
27559070+0 out
27559069+2 in
27559071+0 out
27559069+3 in
27559072+0 out
27559069+4 in
27559073+0 out
27559069+5 in
27559074+0 out
but in the kernel log, there are few messages about the same
sector number, 27559072, with LBA sector reported as 63 more
(which is usual offset for the 1st partition), but again
the reports are all for the same sector.
So here comes the question, does the kernel mean that only one
sector 27559072 is actually bad. If so, why read() in dd for
sectors around the bad one had returned -1. Looks like the kernel
reads sectors in bundles, and if a bad one falls within the bundle,
the entire read operation (even if it was about a good sector)
marked as failed? Isn't it a bug if the kernel behaves this way,
causing dd to replace sectors which are not bad, with
zeroes on the output?
Or, there are indeed few bad sectors in a row that kernel
reports by using sector number of the first one, which it
couldn't read?
I also used dd to skip to the sectors that it reported as
unreadable, and read them one by one -- no success, but the
kernel keeps reporting the same "magic" sector number for
all these attempts:
dd if=/dev/hdb1 of=/dev/null skip=27559068 count=1 # OK
dd if=/dev/hdb1 of=/dev/null skip=27559069 count=1 # I/O Error
dd if=/dev/hdb1 of=/dev/null skip=27559070 count=1 # I/O Error
dd if=/dev/hdb1 of=/dev/null skip=27559071 count=1 # I/O Error
...etc...
dd if=/dev/hdb1 of=/dev/null skip=27559074 count=1 # OK
I use 2.4 series kernel and dd from fileutils 4.1.
Any help/clarification would be highly appreciated.
Please CC at my yahoo.com address, if possible.
Thanks!
Anton Lavrentiev
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
next reply other threads:[~2004-11-16 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 16:22 Anton Lavrentiev [this message]
2004-11-17 15:42 ` Strange I/O errors for hard-disk driver with bad sectors Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041116162230.74768.qmail@web52302.mail.yahoo.com \
--to=anton_lavrentiev@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox