Manage a glusterfs pool
Add brick(s) to an existing volume
Create a glusterfs volume.
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
Deletes a gluster volume
Return a list of gluster peers
CLI Example:
salt '*' glusterfs.list_peers
GLUSTER direct CLI example (to show what salt is sending to gluster):
$ gluster peer status
GLUSTER CLI 3.4.4 return example (so we know what we are parsing):
Number of Peers: 2
Hostname: ftp2 Port: 24007 Uuid: cbcb256b-e66e-4ec7-a718-21082d396c24 State: Peer in Cluster (Connected)
Hostname: ftp3 Uuid: 5ea10457-6cb2-427b-a770-7897509625e9 State: Peer in Cluster (Connected)
List configured volumes
CLI Example:
salt '*' glusterfs.list_volumes
Add another node into the peer list.
CLI Example:
salt 'one.gluster.*' glusterfs.peer two
GLUSTER direct CLI example (to show what salt is sending to gluster):
$ gluster peer probe ftp2
#if the "peer" is the local host: peer probe: success: on localhost not needed
#if the peer was just added: peer probe: success
#if the peer was already part of the cluster: peer probe: success: host ftp2 port 24007 already in peer list
Start a gluster volume.
CLI Example:
salt '*' glusterfs.start mycluster
Check the status of a gluster volume.
CLI Example:
salt '*' glusterfs.status myvolume
Stop a gluster volume.
CLI Example:
salt '*' glusterfs.stop_volume mycluster
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2015.5.2