jimsalterjrs / sanoid

These are policy-driven snapshot management and replication tools which use OpenZFS for underlying next-gen storage. (Btrfs support plans are shelved unless and until btrfs becomes reliable.)
http://www.openoid.net/products/
GNU General Public License v3.0
3.13k stars 308 forks source link

Restrict sanoid to single pool or list of pools #929

Open therrmann-adwin opened 5 months ago

therrmann-adwin commented 5 months ago

I use sanoid for a NVME on my workstation to create snapshots and everything works like a charm.

But this workstation also has a 20TB zfs hard disk with a large number of backups and snapshots that sanoid should simply ignore. But I often hear loud noise from the hard drive that should normally be spun down and has no config entries in the sanoid.conf. I notice that sanoid calls this:

zfs get -Hrpt snapshot creation

which explains the current behaviour. This call takes 4 minutes to run through on my machine, causing lots of I/O on the hard drive. Is it possible to restrict sanoid to a single pool (or a set of pools)?

tobox commented 5 months ago

As a crude workaround, I added my pool to the "zfs get" call and it works.

open FH, "$zfs get -Hrpt snapshot creation tank |";