salt.modules.zpool

zfs support.

Assumes FreeBSD

depends:
  • mkfile
salt.modules.zpool.add(pool_name, vdisk)

Add a single device to mirror

CLI Example:

salt '*' zfs.add myzpool /disk2
salt.modules.zpool.create_file_vdevice(size, *names)

Creates file based virtual devices for a zpool

*names is a list of full paths for mkfile to create

CLI Example:

salt '*' zfs.create_file_vdevice 7g /disk1 /disk2

Depending on file size this may take a while to return
salt.modules.zpool.list_installed()

Returns a list of installed packages

salt.modules.zpool.pool_exists(pool_name)

Check if a zfs storage pool is active

salt.modules.zpool.replace(pool_name, old, new)

Replace a disk in a pool with another disk.

CLI Example:

salt '*' zfs.replace myzpool /disk1 /disk2
salt.modules.zpool.zpool_create(pool_name, *disks)

Create a simple storage pool

CLI Example:

salt '*' zfs.zpool_create myzpool /disk1 /disk2
salt.modules.zpool.zpool_destroy(pool_name)

Destroys a storage pool

CLI Example:

salt '*' zfs.zpool_destroy myzpool
salt.modules.zpool.zpool_detach(zpool, device)

Detach a device from a storage pool

THIS FUNCTION IS NOT YET IMPLEMENTED

CLI Example:

salt '*' zfs.detach myzpool /disk1
salt.modules.zpool.zpool_list()

List zpool's size and usage

salt.modules.zpool.zpool_status(name='')

Return the status of the named zpool

CLI Example:

salt '*' zpool.zpool_status

Previous topic

salt.modules.yumpkg

Next topic

salt.modules.zypper