** Description changed: mdadm automatically checks MD arrays. ZFS should automatically scrub - pools too, to detect and (when possible) correct on-disk corruption. + pools too. Scrubbing a pool allows ZFS to detect and (when the pool has + redundancy) correct on-disk corruption. I've attached a debdiff which accomplishes this. It builds and installs cleanly. - The meat of it is the scrub script I've been using (and recommending in - my HOWTO) for years, which scrubs all *healthy* pools. If a pool is not - healthy, scrubbing it is bad for two reasons: 1) It adds a lot of disk - load which could theoretically lead to another failure. We should save - that disk load for resilvering. 2) Performance is already less on a - degraded pool and scrubbing will make that worse. + The meat of it is the scrub script I've been using on production + systems, both servers and laptops, and recommending in my Ubuntu root- + on-ZFS HOWTO, for years, which scrubs all *healthy* pools. If a pool is + not healthy, scrubbing it is bad for two reasons: 1) It adds a lot of + disk load which could theoretically lead to another failure. We should + save that disk load for resilvering. 2) Performance is already less on a + degraded pool and scrubbing can make that worse, even though scrubs are + throttled. Arguably, I might be being too conservative here, but the + marginal benefit of scrubbing a *degraded* pool is pretty minimal as + pools should not be left degraded for very long. The cron.d in this patch scrubs on the second Sunday of the month. mdadm scrubs on the first Sunday of the month. This way, if a system has both MD and ZFS pools, the load doesn't all happen at the same time. If the system doesn't have both types, it shouldn't really matter which week. + If you'd rather make it the same week as MD, I see no problem with that.
** Summary changed: - ZFS pools should be automatically scrubbed + [FFe] ZFS pools should be automatically scrubbed ** Description changed: mdadm automatically checks MD arrays. ZFS should automatically scrub - pools too. Scrubbing a pool allows ZFS to detect and (when the pool has - redundancy) correct on-disk corruption. + pools too. Scrubbing a pool allows ZFS to detect on-disk corruption and + (when the pool has redundancy) correct it. Note that ZFS does not + blindly assume the other copy is correct; it will only overwrite bad + data with data that is known to be good (i.e. it passes the checksum). I've attached a debdiff which accomplishes this. It builds and installs cleanly. The meat of it is the scrub script I've been using on production systems, both servers and laptops, and recommending in my Ubuntu root- on-ZFS HOWTO, for years, which scrubs all *healthy* pools. If a pool is not healthy, scrubbing it is bad for two reasons: 1) It adds a lot of disk load which could theoretically lead to another failure. We should save that disk load for resilvering. 2) Performance is already less on a degraded pool and scrubbing can make that worse, even though scrubs are throttled. Arguably, I might be being too conservative here, but the marginal benefit of scrubbing a *degraded* pool is pretty minimal as pools should not be left degraded for very long. The cron.d in this patch scrubs on the second Sunday of the month. mdadm scrubs on the first Sunday of the month. This way, if a system has both MD and ZFS pools, the load doesn't all happen at the same time. If the system doesn't have both types, it shouldn't really matter which week. If you'd rather make it the same week as MD, I see no problem with that. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1548009 Title: [FFe] ZFS pools should be automatically scrubbed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1548009/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
