mirror of https://github.com/jimsalterjrs/sanoid
Merge 24b0293b0f into dbcaeef1ac
This commit is contained in:
commit
5325e0c263
9
sanoid
9
sanoid
|
|
@ -883,10 +883,17 @@ sub getsnaps {
|
|||
print "INFO: cache expired - updating from zfs list.\n";
|
||||
}
|
||||
}
|
||||
# just get snapshots from configured datasets to not spin up the disks
|
||||
open FH, "$zfs get -Hrpt snapshot creation ".join(" ",keys %$config)." |";
|
||||
@rawsnaps = <FH>;
|
||||
close FH;
|
||||
$exit_code = $? >> 8;
|
||||
if ($exit_code != 0) {
|
||||
print "INFO: zfs list shapshots with dataset names does not work.. retrying without dataset names (this will spin-up all disks)\n";
|
||||
open FH, "$zfs get -Hrpt snapshot creation |";
|
||||
@rawsnaps = <FH>;
|
||||
close FH;
|
||||
|
||||
}
|
||||
open FH, "> $cache.tmp" or die "Could not write to $cache.tmp!\n";
|
||||
print FH @rawsnaps;
|
||||
close FH;
|
||||
|
|
|
|||
Loading…
Reference in New Issue