Manage a glusterfs pool
Add brick(s) to an existing volume
CLI Example:
salt '*' glusterfs.add_volume_bricks <volume> <bricks>
Create a glusterfs volume
If true, specifies volume should use arbiter brick(s). Valid configuration limited to "replica 3 arbiter 1" per Gluster documentation. Every third brick in the brick list is used as an arbiter brick.
New in version 2019.2.0.
CLI Examples:
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
True
, stop volume before deleteCLI Example:
salt '*' glusterfs.delete_volume <volume>
Disable quota on a glusterfs volume.
CLI Example:
salt '*' glusterfs.disable_quota_volume <volume>
Enable quota on a glusterfs volume.
CLI Example:
salt '*' glusterfs.enable_quota_volume <volume>
New in version 2019.2.0.
Returns the glusterfs volume's max op-version value Requires Glusterfs version > 3.9
CLI Example: .. code-block:: bash
salt '*' glusterfs.get_max_op_version
New in version 2019.2.0.
Returns the glusterfs volume op-version
CLI Example:
salt '*' glusterfs.get_op_version <volume>
New in version 2019.2.0.
Returns the version of glusterfs. CLI Example: .. code-block:: bash
salt '*' glusterfs.get_version
New in version 2015.8.4.
Return gluster volume info.
CLI Example:
salt '*' glusterfs.info
List quotas of glusterfs volume
CLI Example:
salt '*' glusterfs.list_quota_volume <volume>
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
Return peer status information
The return value is a dictionary with peer UUIDs as keys and dicts of peer information as values. Hostnames are listed in one list. GlusterFS separates one of the hostnames but the only reason for this seems to be which hostname happens to be used first in peering.
CLI Example:
salt '*' glusterfs.peer_status
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)
New in version 2019.2.0.
Set the glusterfs volume op-version
CLI Example:
salt '*' glusterfs.set_op_version <volume>
Set quota to glusterfs volume.
CLI Example:
salt '*' glusterfs.set_quota_volume <volume> <path> <size> enable_quota=True
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
Force stop the volume
New in version 2015.8.4.
CLI Example:
salt '*' glusterfs.stop_volume mycluster
Unset quota on glusterfs volume
CLI Example:
salt '*' glusterfs.unset_quota_volume <volume> <path>
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.glusterfs.html