brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: scrub a btrfs or ZFS pool now and then to catch bit rot

Unraid
~/tips/tip-unraid-scrub-pool

zpool scrub poolname

Reads all data on a pool, checks the checksums and repairs bad blocks from a redundant copy.

A file can go bad without anything telling you. A scrub is how a pool finds out before you do.

For a btrfs pool, click the pool on the Main tab, choose Scrub and press Start. For ZFS the docs give the command line, with the array in normal mode:

zpool scrub poolname
zpool status -v poolname

A scrub reads all the data on the pool and checks the checksums. When there is a redundant copy, it repairs the bad block from it. It only checks allocated data and runs while the pool stays online. The docs suggest weekly for a busy pool and monthly otherwise, and an Unraid moderator adds that you should also run one after an unclean shutdown.

The caveats: performance can drop while it runs, a btrfs pool with a single device cannot repair anything, and a ZFS pool without redundancy can detect damage but not fix it. I could not find a docs page that explains how to schedule it, so I will not guess.

Further reading: Unraid docs: File systems, On this site: click Backup now in Sonarr and Radarr, then take the zip off the server, On this site: turbo write speeds up array writes, and the price is every disk spinning

More Unraid tips Change the RAID profile of a Unraid BTRFS pool with Balance Replace a disk in a redundant Unraid pool from the Main tab Test every Unraid drive with the DiskSpeed container See the XML behind a VM with the inline XML view in Unraid 7 Choose where a new VM's disk image is created with Unraid's storage override All Unraid tips (77) All topics

Link