Management zfs datasets
maintainer: | Jorge Schrauwen <sjorge@blackdot.be> |
---|---|
maturity: | new |
depends: | zfs |
platform: | smartos, illumos, solaris, freebsd, linux |
2016.3.0 新版功能.
test/shares/yuki:
zfs.filesystem_present:
- create_parent: true
- properties:
quota: 16G
test/iscsi/haruhi:
zfs.volume_present:
- create_parent: true
- volume_size: 16M
- sparse: true
- properties:
readonly: on
test/shares/yuki@frozen:
zfs.snapshot_present
moka_origin:
zfs.hold_present
- snapshot: test/shares/yuki@frozen
test/shares/moka:
zfs.filesystem_present:
- cloned_from: test/shares/yuki@frozen
test/shares/moka@tsukune:
zfs.snapshot_absent
salt.states.zfs.
bookmark_absent
(name, force=False, recursive=False)¶ensure bookmark is absent on the system
salt.states.zfs.
bookmark_present
(name, snapshot)¶ensure bookmark exists
salt.states.zfs.
filesystem_absent
(name, force=False, recursive=False)¶ensure filesystem is absent on the system
..warning:
If a volume withname
exists, this state will succeed without destroying the volume specified byname
. This module is dataset type sensitive.
salt.states.zfs.
filesystem_present
(name, create_parent=False, properties=None, cloned_from=None)¶ensure filesystem exists and has properties set
..note:
``cloned_from`` is only use if the filesystem does not exist yet,
when ``cloned_from`` is set after the filesystem exists it will be ignored.
..note:
properties do not get cloned, if you specify the properties in the state file
they will be applied on a subsequent run.
salt.states.zfs.
hold_absent
(name, snapshot, recursive=False)¶ensure hold is absent on the system
salt.states.zfs.
hold_present
(name, snapshot, recursive=False)¶ensure hold is present on the system
salt.states.zfs.
promoted
(name)¶ensure a dataset is not a clone
..warning:
only one dataset can be the origin,
if you promote a clone the original will now point to the promoted dataset
salt.states.zfs.
scheduled_snapshot
(name, prefix, recursive=True, schedule=None)¶maintain a set of snapshots based on a schedule
..warning:
snapshots will only be created and pruned every time the state runs.
a schedule must be setup to automatically run the state. this means that if
you run the state daily the hourly snapshot will only be made once per day!
salt.states.zfs.
snapshot_absent
(name, force=False, recursive=False)¶ensure snapshot is absent on the system
salt.states.zfs.
snapshot_present
(name, recursive=False, properties=None)¶ensure snapshot exists and has properties set
..note:
properties are only set at creation time.
salt.states.zfs.
volume_absent
(name, force=False, recursive=False)¶ensure volume is absent on the system
..warning:
If a filesystem withname
exists, this state will succeed without destroying the filesystem specified byname
. This module is dataset type sensitive.
salt.states.zfs.
volume_present
(name, volume_size, sparse=False, create_parent=False, properties=None, cloned_from=None)¶ensure volume exists and has properties set
..note:
``cloned_from`` is only use if the volume does not exist yet,
when ``cloned_from`` is set after the volume exists it will be ignored.
..note:
properties do not get cloned, if you specify the properties in the state file
they will be applied on a subsequent run.
volume_size is considered a property so it the volume's size will be corrected
when the properties get update if it differs from the original volume.
the sparse parameter is ignored when using cloned_from.