If I have a single bad sector, how many failed reads should simple dd report?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

I just ran a test against a IDE drive (/dev/sdb) and slightly older
kernel (2.6.32).

Similar to:

dd if=/dev/sdb of=/dev/null conv=noerror,sync bs=4k

With a good drive it ran fine.

Then I used hdparm --make-bad-sector to intentionally corrupt a sector
on the drive.

When I re-ran it, /var/log/messages reported 10 bad logical blocks.
And even worse, dd reported 20 bad blocks.  I examined the data dd
read and it had 80KB of zero'ed out data.  So that's 160 sectors worth
of data lost because of a single bad sector.  At most I was expecting
4KB of zero'ed out data.

I haven't started troubleshooting, but I want to know if this is
expected behavior due to read-ahead or something.  (Is there
read-ahead on the raw device, or just if a file system is involved.)

I can redo my test with 2.6.34 and get logs if that is a bug.

And if not a bug, is there a hdparm command I can issue to eliminate
this behaviour.

Thanks
Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux