salt.modules.zpool¶
Module for running ZFS zpool command
-
salt.modules.zpool.
add
(pool_name, vdev)¶ Add the specified vdev to the given pool
CLI Example:
salt '*' zpool.add myzpool /path/to/vdev
-
salt.modules.zpool.
create
(pool_name, *vdevs)¶ Create a new storage pool
CLI Example:
salt '*' zpool.create myzpool /path/to/vdev1 [/path/to/vdev2] [...]
-
salt.modules.zpool.
create_file_vdev
(size, *vdevs)¶ Creates file based
virtual devices
for a zpool*vdevs
is a list of full paths for mkfile to createCLI Example:
salt '*' zpool.create_file_vdev 7g /path/to/vdev1 [/path/to/vdev2] [...] Depending on file size this may take a while to return
-
salt.modules.zpool.
destroy
(pool_name)¶ Destroys a storage pool
CLI Example:
salt '*' zpool.destroy myzpool
-
salt.modules.zpool.
exists
(pool_name)¶ Check if a ZFS storage pool is active
CLI Example:
salt '*' zpool.exists myzpool
-
salt.modules.zpool.
iostat
(name='')¶ Display I/O statistics for the given pools
CLI Example:
salt '*' zpool.iostat
-
salt.modules.zpool.
replace
(pool_name, old, new)¶ Replaces old device with new device.
CLI Example:
salt '*' zpool.replace myzpool /path/to/vdev1 /path/to/vdev2
-
salt.modules.zpool.
scrub
(pool_name=None)¶ Begin a scrub
CLI Example:
salt '*' zpool.scrub myzpool
-
salt.modules.zpool.
status
(name='')¶ Return the status of the named zpool
CLI Example:
salt '*' zpool.status
-
salt.modules.zpool.
zpool_list
()¶ Return a list of all pools in the system with health status and space usage
CLI Example:
salt '*' zpool.zpool_list