get snpshots from list of datasets

query the existing snapshots only from the configured datasets to avoud spinning up disks that are not in the config
This commit is contained in:
Björn 2025-06-17 13:32:59 +02:00 committed by GitHub
parent 940a84e21f
commit 510becee2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

3
sanoid
View File

@ -883,7 +883,8 @@ sub getsnaps {
print "INFO: cache expired - updating from zfs list.\n"; print "INFO: cache expired - updating from zfs list.\n";
} }
} }
open FH, "$zfs get -Hrpt snapshot creation |"; # just get snapshots from configured datasets to not spin up the disks
open FH, "$zfs get -Hrpt snapshot creation ".join(" ",keys %$config)." |";
@rawsnaps = <FH>; @rawsnaps = <FH>;
close FH; close FH;