DragonFly BSD
DragonFly users List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: theoretical question about disks and os


From: Max Okumoto <okumoto@xxxxxxxx>
Date: Fri, 01 Apr 2005 16:35:00 -0800

Raphael Marmier wrote:
Is it possible for a poorly written disk driver/filesystem to trash blocks on a hard disk? By trashing I mean that subsequent access result in an i/o error, aven accross reboot.

It is more likely that the block was bad even before the OS wrote to it. Previous reads of that block would have any problems, but when the OS wrote to that block, you would "detect" the problem.

If there was a flaw in the media, a bit could be stuck on '1' or stuck
off '0' and depending on the value written to it, the block would fail
the checksum.  The firmware on the diskdrive should detect this and
return an error.

I have such a disk where it happened a few years ago. Curiously, the damaged blocks where the first blocks of partitions that where mounted. The maker's test software says the drive's ok, as well as s.m.a.r.t., although it needed a "reformat" with the same tool to get rid of the bad blocks.

Reformating drives these days causes the firmware to map good blocks in place of bad blocks. So your problem would "disapear". In this case you need to obtain the list of bad blocks before you format the drive and compare it to the last after the format is complete.

I would think it must be some kind of hardware failure, but a recent discussion about linux filesystems makes me wonder... linux was running on that disk, after all, with reaiserfs. And it was 3 years ago.

Raphael

So, I would really not blame the filesystem for bad blocks.


Max



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