I have a backup system (Raspberry Pi 4) for my home TrueNAS which the latter replicates data to each day. The backup system has a single pool consisting of a single external USB hard drive (no redundancy, but that’s ok for the backup system). I have set the disk to spin down after 10 minutes since it’s only accessed once a day (there are no shares on this system).
Today I noticed that the drive wouldn’t spin down after the replication completed and it immediately spins back up after spinning it down manully. Turns out there is a scrub scheduled for the second sunday of each month. Looking at the output of
zpool status, I get this:
scan: scrub in progress since Sun Sep 12 00:24:10 2021 3.05T scanned at 436K/s, 3.05T issued at 436K/s, 3.17T total 0B repaired, 95.99% done, no estimated completion time
This is as of now, some 17 hours after the task started. This reveals that the data is checked at a speed of what I presume is 436 KiB/s. That seems rather slow. How can I speed this up? I’d like to keep scrubbing the pool on a monthly basis as there is never any data read from it under normal circumstances. I get that for a production server, it makes sense to have the scrub be a very low priority task. But for a server that is purely for backups, that strategy doesn’t make a whole lot of sense. I want the scrub to be done as fast as possible, so the drive can spin down.
Researching this, I found out about
zfs_top_maxinflight tunables, both of which seem to be deprecated.