ZFS already limits the amount of IO that a scrub can do. Putting multiple pools on the same disk defeats ZFS's IO scheduler.* Scrubs are just one example of the performance problems that will cause. I don't think we should complicate the scrub script to accommodate this scenario.
My suggestion is that you comment out the default scrub job in /etc/cron.d/zfsutils-linux and replace it with something that meets your needs. Don't change /usr/lib/zfs-linux/scrub, as that will get overwritten on package upgrades. For example, you might scrub the pools on different weeks with something like this: 24 0 0-7 * * root [ $(date +\%w) -eq 0 ] && zpool list -H -o health POOL1 2> /dev/null | grep -q ONLINE && zpool scrub POOL1 24 0 8-14 * * root [ $(date +\%w) -eq 0 ] && zpool list -H -o health POOL2 2> /dev/null | grep -q ONLINE && zpool scrub POOL2 I'm going to boldly mark this Invalid. Others can override me, obviously. Or, if you want to make more of a case, go for it. * As a side note, in the general case, such a configuration also implies that one is using partitions. This means they have the Linux IO scheduler also in the mix, unless they're doing root-on-ZFS, in which case zfs-initramfs is setting the noop scheduler. I assume you're doing root-on-ZFS, since you mentioned "One pool holds OS", so that's not an issue for you personally. ** Changed in: zfs-linux (Ubuntu) Status: Incomplete => Invalid -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to zfs-linux in Ubuntu. https://bugs.launchpad.net/bugs/1731735 Title: zfs scrub starts on all pools simultaneously Status in zfs-linux package in Ubuntu: Invalid Bug description: # Environment Description: Ubuntu 16.04.3 LTS Release: 16.04 Linux 4.10.0-38-generic-tuxonice #42~ppa1-Ubuntu SMP Mon Oct 30 20:21:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux zfsutils-linux 0.6.5.6-0ubuntu18 amd64 # Current behaviour `/usr/lib/zfs-linux/scrub` starts `zfs scrub` on all pools at the same time. If pools are located on the same disk - scrub performance degrades badly. # Proposed behaviour * simplest one - start scrub of one pool after another scrub is finished * advanced - detect pools which are located on the same disk and start scrubs on them sequentially, if they are on different disks it is fine to run them in parallel To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1731735/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp