GlusterFS volume is the disk that is going to be exported to client. it is built on top op of glusterfs cluster.
To create a GlusterFS volume you need a specific folder on all peer nodes for file and metadata storage on all nodes. You'll also need to consider the type of the volume that you want to create. Each volume type provides different level of scalability and performance level and you'll need to choose the one that best fit your requirement.
$ sudo firewall-cmd --zone=public --add-port=24009/tcp --permanent && sudo firewall-cmd --reload # CentOS, Fedora, Red Hat
$ sudo ufw allow 24009 # Ubuntu and Debian variance Rules updated Rules updated (v6) # Ubuntu and Debian
Each volume requires a dedicated port, starting from 24009. If you're to create more than one volume, also allow access to port 24010, 24011 and so on accordingly.
$ sudo mkdir -p /var/data/gluster/brick
For the production server, it’s recommended to create the brick or GlusterFS volume on dedicated partition instead of in a system directory.
XFS is the recommended filesystem type for GlusterFS volume though other filesystem types can still be used.
$ sudo gluster volume create volume1 replica 2 transport tcp node1:/var/data/gluster/brick node2:/var/data/gluster/brick force volume create: volume1: success: please start the volume to access data
Related: Types of GlusterFS volumes
Recommended to use more than 3 nodes to prevent split brain.
$ sudo gluster volume start volume1 volume start: volume1: success
$ sudo gluster volume info all Volume Name: volume1 Type: Replicate Volume ID: 19550419-3495-45d7-bdc6-cab4fa4fb516 Status: Started Snapshot Count: 0 Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: node1:/var/data/gluster/brick Brick2: node2:/var/data/gluster/brick Options Reconfigured: cluster.granular-entry-heal: on storage.fips-mode-rchecksum: on transport.address-family: inet nfs.disable: on performance.client-io-threads: off
Comment anonymously. Login not required.