salt.modules.glusterfs

Manage a glusterfs pool

salt.modules.glusterfs.create(name, bricks, stripe=False, replica=False, device_vg=False, transport='tcp', start=False)

Create a glusterfs volume.

name
Name of the gluster volume
bricks
Bricks to create volume from, in <peer>:<brick path> format. For multiple bricks use list format: '["<peer1>:<brick1>", "<peer2>:<brick2>"]'
stripe
Stripe count, the number of bricks should be a multiple of the stripe count for a distributed striped volume
replica
Replica count, the number of bricks should be a multiple of the replica count for a distributed replicated volume
device_vg
If true, specifies volume should use block backend instead of regular posix backend. Block device backend volume does not support multiple bricks
transport
Transport protocol to use, can be 'tcp', 'rdma' or 'tcp,rdma'
start
Start the volume after creation

CLI Example:

salt host1 glusterfs.create newvolume host1:/brick

salt gluster1 glusterfs.create vol2 '["gluster1:/export/vol2/brick",         "gluster2:/export/vol2/brick"]' replica=2 start=True
salt.modules.glusterfs.delete(target, stop=True)

Deletes a gluster volume

target
Volume to delete
stop
Stop volume before delete if it is started, True by default
salt.modules.glusterfs.list_peers()

Return a list of gluster peers

CLI Example:

salt '*' glusterfs.list_peers
salt.modules.glusterfs.list_volumes()

List configured volumes

CLI Example:

salt '*' glusterfs.list_volumes
salt.modules.glusterfs.peer(name)

Add another node into the peer list.

name
The remote host to probe.

CLI Example:

salt 'one.gluster.*' glusterfs.peer two
salt.modules.glusterfs.start_volume(name)

Start a gluster volume.

name
Volume name

CLI Example:

salt '*' glusterfs.start mycluster
salt.modules.glusterfs.status(name)

Check the status of a gluster volume.

name
Volume name

CLI Example:

salt '*' glusterfs.status myvolume
salt.modules.glusterfs.stop_volume(name)

Stop a gluster volume.

name
Volume name

CLI Example:

salt '*' glusterfs.stop_volume mycluster