On Feb 22 07:52:11, n...@holland-consulting.net wrote:
> (this is a request for a "that's stupid", not a suggestion
> of something people should do at this point)
> 
> An idea that's been floating around in my head, inspired
> by the ZFS "scrubbing" idea: rather than build that "check
> your data" process into the file system, just do something
> periodically like this:
> 
>   # dd if=/dev/rsd0c of=/dev/null bs=1m

Yes; this line has been in my weekly.local for years now,
for every disk that matters.

> and repeat against all physical drives.  The logic being,
> all hard drives have some kind of error detection logic
> in them, at least a checksum of some kind on all data blocks.
> See if you can read every block on the disk.  No errors, your
> data might be intact.  Errors, it probably isn't (or won't
> be in the future).  Crypto-grade integrity, probably not...
> but probably quite sufficient for spotting most bad spots
> on the disk.

Exactly. This has been an early warning to me more than once.
Any IO errors, throw the disk out.

Some disks are supposed to replace a bad block with a spare,
as long as they have spare blocks. Running this, I hope to
trigger that before I see IO errors in production.

> So...I tried it against disks with mounted file systems and
> softraid partitions on them.
> 
> It...seems to work. I did have one laptop with a softraid
> encrypted drive that gave a nice, clear "Input/output error",
> but I can't reproduce it (maybe it got locked out?  Seems
> odd on a read, but ...
> 
> Is this sane?  is it safe to attempt to read all the blocks
> on an entire 'c' partition of a disk that's doing "other
> things" at the same time, including a layers of softraid?

Being run in weekly.local, which is 03:30 in the Sat morning,
my machines are not doing much; but I have also run that
on workstations while firefoxing as usual, no problems
except the occassional slowdown.

I keep a log of the times it takes for each disk,
observing how they get slower over time, gradually
replacing rotating plates with SSDs everywhere.

(Strangely, it seems to matter in which of the "same"
PCIe slots you put an NVME disk, for example.)

        Jan

Reply via email to