States for managing zfs datasets
maintainer: | Jorge Schrauwen <sjorge@blackdot.be> |
---|---|
maturity: | new |
depends: | salt.utils.zfs, salt.modules.zfs |
platform: | smartos, illumos, solaris, freebsd, linux |
New in version 2016.3.0.
Changed in version 2018.3.1: Big refactor to remove duplicate code, better type converions and improved consistancy in output.
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
ensure bookmark is absent on the system
ensure bookmark exists
ensure filesystem is absent on the system
Warning
If a volume with name
exists, this state will succeed without destroying the volume specified by name
. This module is dataset type sensitive.
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.
ensure hold is absent on the system
ensure hold is present on the system
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
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!
Changed in version 2018.3.0: switched to localtime from gmtime so times now take into account timezones.
ensure snapshot is absent on the system
ensure snapshot exists and has properties set
ensure volume is absent on the system
Warning
If a filesystem with name
exists, this state will succeed without destroying the filesystem specified by name
. This module is dataset type sensitive.
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 the volume's size will be corrected when the properties get updated if it differs from the original volume.
The sparse parameter is ignored when using cloned_from
.
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.zfs.html