Description
zfs-auto-snapshot/src/zfs-auto-snapshot.sh
Lines 460 to 469 in 92db087
If com.sun:auto-snapshot
is true
, with opt_default_exclude
enabled, then every label is enabled, even if com.sun:auto-snapshot:label
is false
.
If com.sun:auto-snapshot
is false
, with opt_default_exclude
disabled, then even if com.sun:auto-snapshot:label
is true
, it will be disabled.
This contradicts the default behavior on Solaris as documented here (See: "Choose to only take snapshots under a given schedule for a dataset and all direct descendent datasets from the command line").
I'd expect the default behavior with opt_default_exclude
disabled to enable a label if com.sun:auto-snapshot:label
is not false
and com.sun:auto-snapshot
is not false
or com.sun:auto-snapshot:label
is true
, even if com.sun:auto-snapshot
is false
. That second case is not handled right now, so if you want snapshots enabled by default, but have a label "whitelist" for a given dataset/pool, you have to explicitly disable every label you use instead of being able to disable snapshots globally and override that setting for some of the labels.
With it enabled it should probably disable every label unless both com.sun:auto-snapshot
and com.sun:auto-snapshot:label
are true
.