SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does Slackware have automatic scrubbing of software RAID arrays implemented? I don't think it does, but it can't hurt to ask here and get a definitive answer.
Related question: how can one tell when the last scrubbing was performed on a particular array?
Reading your first sentence, I understood "scrubbing" to simply mean wiping with extreme prejudice. For that I would have used "dd if=/dev/zero of=raiddevice bs=5120 count=a_gazillion". But then your second sentence has confused me, as after a scrubbing you would essentially not have an array anymore. Can you be a bit more clear by what you mean by 'scrubbing", or describe the after-effects of "scrubbing".
Scrubbing of md arrays has to be done by a cron job, and Slackware has no such job configured by default (I'm not aware of any distribution that has).
As for your second question, it seems (I'm hoping someone will prove me wrong) there's no field in the md metadata that keeps track of scrubbing once the job is completed. In other words, you can't tell from the metadata when (if ever) an array was last scrubbed; you'll have to check the logs.
Can you be a bit more clear by what you mean by 'scrubbing", or describe the after-effects of "scrubbing".
The term "Scrubbing" means verifying every sector on every RAID member. It's also called "verifying" by some vendors. AMD calls it "synchronization", which is misleading to say the least.
The point is to detect and possibly correct errors before they become critical. Given the size of modern hard drives and the increasing popularity of delta backup schemes, large parts of an array can sit idle for very long periods. Should a sector in such a part of an array suffer silent corruption ("bit rot"), the sysadmin will be in for a nasty surprise when another drive eventually fails and is replaced, and the rebuild job runs into the bad sector.
Scrubbing/verifying means that any bad sector will be detected and, since the array is still redundant, possibly fixed if the affected drive can perform a sector remapping.
Thank you @Ser. To be honest, it is a rather poor name, as the connotation of "wiping clean" lurks. The other two you mention are far better. I would have have possibly preferred "repair", or even "preventative maintained".
To be honest, it is a rather poor name, as the connotation of "wiping clean" lurks.
True, but the same term, "scrubbing", is used to describe basically the same function on systems with ECC RAM. It may not be very descriptive of the process, but at least it's consistently used.
Thanks mRgOBLIN. I was thinking of writing something myself, but now that I see the awk/sed magic that you put into it, I realize I can't possibly come up with something better.
Just one question about your script: why did you choose to make it an always-running process, with a PID file etc? Are there any advantages of doing it this way, that are not immediately evident?
As Mr Cranium alluded, having the monitor process running is a good idea. If you have put your email (e.g. MAILADDR root@mydomain.tld) into the mdadm.conf (as suggested by the comments in that file) you will get an email alert with any failures or other events that may need your attention.
[4821916.745073] md: data-check of RAID array md0
[4821916.745076] md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
[4821916.745077] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for data-check.
[4821916.745081] md: using 128k window, over a total of 976559104 blocks.
[4833410.755520] md: md0: data-check done.
While the scan is running, you can use "cat /proc/mdstat" to monitor the progress.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.