{"id":6121,"date":"2021-02-15T13:10:17","date_gmt":"2021-02-15T07:40:17","guid":{"rendered":"https:\/\/www.skynats.com\/?p=6121"},"modified":"2021-10-28T10:48:37","modified_gmt":"2021-10-28T05:18:37","slug":"install-glusterfs-server-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/","title":{"rendered":"How To Install GlusterFS Server On CentOS 7"},"content":{"rendered":"\n<p><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/strong><\/p>\n\n\n\n<p>The glusterFS is an open-source, simple, elastic, and scalable file storage system that is suitable for high data such as media streaming, cloud storage, and the content delivery network (CDN).<\/p>\n\n\n\n<p>We often get a request from our client to install the GlusterFS server on centOS 7 as it is part of our <a href=\"https:\/\/www.skynats.com\/linux-server-management\/\" target=\"_blank\" rel=\"noreferrer noopener\">server management plan<\/a>. You can also take assistance from our technical team support 24\/7 for further installation and configuration.<\/p>\n\n\n\n<p><strong>Set up GlusterFS storage on RHEL 7.x and CentOS 7.x<\/strong><\/p>\n\n\n\n<p>Here we are considering 4 RHEL 7\/centOS 7 servers with minimal installation in order to assume the additional disk which is attached to the server to set up the glustesfs.<\/p>\n\n\n\n<p>Add and follow the below lines in the \/ etc\/ hosts file as you considered to have DNS server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>192.xxx.xx.10 server1.com server1\n192.xxx.xx.20 server2.com server2\n192.xxx.xx.30 server3.com server3\n192.xxx.xx.40 server4.com server4\n<\/code><\/pre>\n\n\n\n<p>Run the following below commands to set up the gluster repo and EPEL repo.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install wget\nyum install centos-release-gluster -y\nyum install epel-release -y\nyum install glusterfs-server -y\n<\/code><\/pre>\n\n\n\n<p>Once you have done with the setup, start and enable the GlusterFS services by using the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start glusterd\nsystemctl enable glusterd\n<\/code><\/pre>\n\n\n\n<p>Later, allow the port on the firewall so that server can communicate and form the storage cluster. Run the commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --zone=public --add-port=24007-24008\/tcp --permanent\nfirewall-cmd --zone=public --add-port=24009\/tcp --permanent\nfirewall-cmd --zone=public --add-service=nfs --add-service=samba --add-service=samba-client --permanent\nfirewall-cmd --zone=public --add-port=111\/tcp --add-port=139\/tcp --add-port=445\/tcp --add-port=965\/tcp --add-port=2049\/tcp --add-port=38465-38469\/tcp --add-port=631\/tcp --add-port=111\/udp --add-port=963\/udp --add-port=49152-49251\/tcp --permanent\nfirewall-cmd --reload\n<\/code><\/pre>\n\n\n\n<p><strong>Distribute the volume setup:<\/strong><\/p>\n\n\n\n<p>Let form the trusted storage pool that consists of server 1 and server 2. Then will create the brick on that and after that will create the distributed volume. Assume the raw space of 16 GB to allocate both servers.<\/p>\n\n\n\n<p>Run the commands from the server 12 consoles to form a trusted storage pool with server2.\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster peer probe server2.com<\/code><\/pre>\n\n\n\n<p>Run commands and check the peer status in server 1.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster peer status\n\n<\/code><\/pre>\n\n\n\n<p><strong>Creating brick on server 1.<\/strong><\/p>\n\n\n\n<p>To set up the brick we need to create the logical volumes on the raw disk.<\/p>\n\n\n\n<p>Run the following command on server 1.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb \/dev\/vg_bricks\/dist_brick1 \/bricks\/dist_brick1 xfs rw,noatime,inode64,nouuid 1 2\nvgcreate vg_bricks \/dev\/sdb\nlvcreate -L 14G -T vg_bricks\/brickpool1\n<\/code><\/pre>\n\n\n\n<p>The above command is the brickpool1 in the name of a thin pool.<\/p>\n\n\n\n<p>Then create the logical volume of 3 GB.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool1 -n dist_brick1<\/code><\/pre>\n\n\n\n<p>Format the logical volume by using the xfs file system.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/dist_br<\/code><\/pre>\n\n\n\n<p>&nbsp;Then mount the brick using the mount command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/dist_brick1 \/bricks\/dist_brick1\/<\/code><\/pre>\n\n\n\n<p>If you want to mount it permanently and add the following line in \/etc\/ fsatb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/vg_bricks\/dist_brick1 \/bricks\/dist_brick1 xfs rw,noatime,inode64,nouuid 1 2<\/code><\/pre>\n\n\n\n<p>Then create the directory with a brick under the mount point.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/dist_brick1\/brick\n\n<\/code><\/pre>\n\n\n\n<p>Perform a similar set of commands on server 2.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@server2 ~]# pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb\n&#91;root@server2 ~]# lvcreate -L 14G -T vg_bricks\/brickpool2\n&#91;root@server2 ~]# lvcreate -V 3G -T vg_bricks\/brickpool2 -n dist_brick2\n&#91;root@server2 ~]# mkfs.xfs -i size=512 \/dev\/vg_bricks\/dist_brick2\n&#91;root@server2 ~]# mkdir -p \/bricks\/dist_brick2\n&#91;root@server2 ~]# mount \/dev\/vg_bricks\/dist_brick2 \/bricks\/dist_brick2\/\n&#91;root@server2 ~]# mkdir \/bricks\/dist_brick2\/brick\n<\/code><\/pre>\n\n\n\n<p>Follow the below gluster commands and create the distributed volume.<\/p>\n\n\n\n<p>[root@server1 ~]# gluster volume create distvol server1.example.com:\/bricks\/dist_brick1\/brick server2.example.com:\/bricks\/dist_brick2\/brick<\/p>\n\n\n\n<p>[root@server1 ~]# gluster volume start distvol<\/p>\n\n\n\n<p>volume start: distvol: success<\/p>\n\n\n\n<p>[root@server1 ~]#<\/p>\n\n\n\n<p>Verify the volume status. Run the commands.<\/p>\n\n\n\n<p>[root@server1 ~]# gluster volume info distvol<\/p>\n\n\n\n<p><strong>MOUNT DISTRIBUTE VOLUMES ON CLIENT:<\/strong><\/p>\n\n\n\n<p>First, mount the volume by using the GlusterFS and then ensure the glusterfs-fuse package is installed on the client.<\/p>\n\n\n\n<p>Then log into the client console and run the following commands to install the glusterfs-fuse.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install glusterfs-fuse -y<\/code><\/pre>\n\n\n\n<p>Later, try to create the mount for distributed volume<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/distvol<\/code><\/pre>\n\n\n\n<p>Mount the &#8216;distvol&#8217; by using the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -t glusterfs -o acl server1.com:\/distvol \/mnt\/distvol\/<\/code><\/pre>\n\n\n\n<p>For the permanent mount, we need to add the below entry in the \/etc\/fstab file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server1.com:\/distvol \/mnt\/distvol glusterfs _netdev 0 0<\/code><\/pre>\n\n\n\n<p>Then run the DF command in order to verify the mount status volume.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df -Th<\/code><\/pre>\n\n\n\n<p><strong>Replicating the volume setup.<\/strong><\/p>\n\n\n\n<p><strong>For the replication, use <\/strong>server 3 and server 4. <strong>and then assume the additional disk (\/dev\/sdb) for glusterfs is already assigned to the server.<\/strong><\/p>\n\n\n\n<p>Follow the steps to add server 3 and server 4 to the trusted storage pool.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster peer probe server3.com<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster peer probe server4.com<\/code><\/pre>\n\n\n\n<p>Run the commands to create and mount the brick on server 3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 14G -T vg_bricks\/brickpool4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/shadow_brick2\/brick<\/code><\/pre>\n\n\n\n<p>For the permanent mounting, run the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/vg_bricks\/shadow_brick1 \/bricks\/shadow_brick1\/ xfs rw,noatime,inode64,nouuid 1 2<\/code><\/pre>\n\n\n\n<p>Run the commands to create and mount the brick on server 3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 14G -T vg_bricks\/brickpool4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/shadow_brick2\/brick<\/code><\/pre>\n\n\n\n<p>For the permanent mounting, run the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/vg_bricks\/shadow_brick1 \/bricks\/shadow_brick1\/ xfs rw,noatime,inode64,nouuid 1 2<\/code><\/pre>\n\n\n\n<p>Run the commands to create and mount the brick on server 3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 14G -T vg_bricks\/brickpool4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/shadow_brick2\/brick<\/code><\/pre>\n\n\n\n<p>For the permanent mounting, run the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/vg_bricks\/shadow_brick1 \/bricks\/shadow_brick1\/ xfs rw,noatime,inode64,nouuid 1 2<\/code><\/pre>\n\n\n\n<p>Run the commands to create and mount the brick on server 3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 14G -T vg_bricks\/brickpool4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/shadow_brick2\/brick<\/code><\/pre>\n\n\n\n<p>For the permanent mounting, run the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/vg_bricks\/shadow_brick1 \/bricks\/shadow_brick1\/ xfs rw,noatime,inode64,nouuid 1 2<\/code><\/pre>\n\n\n\n<p>Run the commands to create and mount the brick on server 3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 14G -T vg_bricks\/brickpool4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/shadow_brick2\/brick<\/code><\/pre>\n\n\n\n<p>For the permanent mounting, run the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/vg_bricks\/shadow_brick1 \/bricks\/shadow_brick1\/ xfs rw,noatime,inode64,nouuid 1 2<\/code><\/pre>\n\n\n\n<p>Run the commands to create and mount the brick on server 3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -L 14G -T vg_bricks\/brickpool4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/shadow_brick2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/shadow_brick2\/brick<\/code><\/pre>\n\n\n\n<p>For the permanent mounting, run the below commands.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\/dev\/vg_bricks\/shadow_brick1 \/bricks\/shadow_brick1\/ xfs rw,noatime,inode64,nouuid 1 2\n<\/code><\/pre>\n\n\n\n<p>Perform a similar set of commands on server 4 for the creation and mounting of the brick by navigating the server 4 console.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sdb ; vgcreate vg_bricks \/dev\/sdb\nlvcreate -L 14G -T vg_bricks\/brickpool4\nlvcreate -V 3G -T vg_bricks\/brickpool4 -n shadow_brick2\nmkfs.xfs -i size=512 \/dev\/vg_bricks\/shadow_brick2\nmkdir -p \/bricks\/shadow_brick2\nmount \/dev\/vg_bricks\/shadow_brick2 \/bricks\/shadow_brick2\/\nmkdir \/bricks\/shadow_brick2\/brick\n\n<\/code><\/pre>\n\n\n\n<p>Use the below gluster commands to create the replicated volume.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster volume create shadowvol replica 2 \nserver3.com:\/bricks\/shadow_brick1\/brick \nserver4.com:\/bricks\/shadow_brick2\/brick\n<\/code><\/pre>\n\n\n\n<p>volume create: shadowvol: success: please start the volume to access data.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster volume start shadowvol<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">Run the commands to verify the volume info.<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster volume info shadowvol<\/code><\/pre>\n\n\n\n<p>Add the below entry in the file &#8220;\/etc\/nfsmount.conf&#8221; on both storage server3 and the serevr4.<\/p>\n\n\n\n<p>Defaultvers=3<\/p>\n\n\n\n<p>Reboot both servers. Run following mount commands to volume &#8220;shadowvol&#8221;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -t nfs -o vers=3 server4.com:\/shadowvol \/mnt\/shadowvol\/<\/code><\/pre>\n\n\n\n<p>For permanent mount add the below entry in \/etc\/fstab file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server4.com:\/shadowvol \/mnt\/shadowvol\/ nfs vers=3 0 0<\/code><\/pre>\n\n\n\n<p>Later, verify the size and the mount status of the volume.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df -Th<\/code><\/pre>\n\n\n\n<p><strong>Distribute- replicate volume setup<\/strong>:&nbsp;<\/p>\n\n\n\n<p>In order to set up the distributed replicated volume use one brick from each server and then form the volume. let&#8217;s create the logical volume from the existing thin pool on the corresponding server.<\/p>\n\n\n\n<p>Run the command to create a brick on all 4 servers.<\/p>\n\n\n\n<p>Server 1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool1 -n prod_brick1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/prod_brick1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/prod_brick1<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/prod_brick1 \/bricks\/prod_brick1\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/prod_brick1\/brick<\/code><\/pre>\n\n\n\n<p>Server 2<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool2 -n prod_brick2\nmkfs.xfs -i size=512 \/dev\/vg_bricks\/prod_brick2\nmkdir -p \/bricks\/prod_brick2\nmount \/dev\/vg_bricks\/prod_brick2 \/bricks\/prod_brick2\/\nmkdir \/bricks\/prod_brick2\/brick<\/code><\/pre>\n\n\n\n<p>Server 3<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool3 -n prod_brick3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.xfs -i size=512 \/dev\/vg_bricks\/prod_brick3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/bricks\/prod_brick3<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/vg_bricks\/prod_brick3 \/bricks\/prod_brick3\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/bricks\/prod_brick3\/brick<\/code><\/pre>\n\n\n\n<p>Server 4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -V 3G -T vg_bricks\/brickpool4 -n prod_brick4\nmkfs.xfs -i size=512 \/dev\/vg_bricks\/prod_brick4\nmkdir -p \/bricks\/prod_brick4\nmount \/dev\/vg_bricks\/prod_brick4 \/bricks\/prod_brick4\/\nmkdir \/bricks\/prod_brick4\/brick<\/code><\/pre>\n\n\n\n<p><strong>Use the gluster commands and create the volume with the name &#8216;dist-rep-vol&#8217;.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster volume create dist-rep-vol replica 2 server1.example.com:\/bricks\/prod_brick1\/brick server2.example.com:\/bricks\/prod_brick2\/brick server3.example.com:\/bricks\/prod_brick3\/brick server4.example.com:\/bricks\/prod_brick4\/brick force<\/code><\/pre>\n\n\n\n<p>gluster volume start dist-rep-vol<\/p>\n\n\n\n<p>Run and verify the volume.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gluster volume info dist-rep-vol<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"602\" height=\"404\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png\" alt=\"\" class=\"wp-image-6122\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png 602w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image-300x201.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<p>Therefore, the volume of the first files will be distributed on any of the two bricks and then the files will be replicated into the remaining two bricks.<\/p>\n\n\n\n<p>Now, mount the volume on the client machine via gluster.<\/p>\n\n\n\n<p>Create the mount point to the volume.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/dist-rep-vol<\/code><\/pre>\n\n\n\n<p>mount.glusterfs server1.com:\/dist-rep-vol \/mnt\/dist-rep-vol\/<\/p>\n\n\n\n<p>&nbsp;Later, add the below entry in fstab for the permanent entry.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server1.com:\/dist-rep-vol \/mnt\/dist-rep-vol\/ glusterfs _netdev 0 0<\/code><\/pre>\n\n\n\n<p>Run the following df commands and verify the size and volume.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;<code>df -Th<\/code><\/pre>\n\n\n\n<p><strong>conclusion:&nbsp;<\/strong><\/p>\n\n\n\n<p>This blog will demonstrate how to install and configure the GlusterFS storage on RHEL7.x and CentOS 7.X.You can also take our technical team&#8217;s support for further installation and configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The glusterFS is an open-source, simple, elastic, and scalable file storage system that is suitable for high data such as media streaming, cloud storage, and the content delivery network (CDN). We often get a request from our client to install the GlusterFS server on centOS 7 as it is part of our server management [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[208,253,230,68],"tags":[254,25,52,233,72],"class_list":["post-6121","post","type-post","status-publish","format-standard","hentry","category-centos-7","category-glusterfs","category-rhel-7","category-server-management","tag-centros-7","tag-cloud-management","tag-glusterfs","tag-rhel-8-7","tag-server-management"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How To Install GlusterFS Server On CentOS 7 | Skynats<\/title>\n<meta name=\"description\" content=\"The glusterFS is an open-source, simple, elastic and scalable file storage system that suitable for high data such as media streaming,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install GlusterFS Server On CentOS 7\" \/>\n<meta property=\"og:description\" content=\"The glusterFS is an open-source, simple, elastic and scalable file storage system that suitable for high data such as media streaming,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"Server Management Services | Cloud Management | Skynats\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/skynats\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-15T07:40:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-28T05:18:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png\" \/>\n<meta name=\"author\" content=\"Nabeela\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:site\" content=\"@skynatstech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nabeela\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/\"},\"author\":{\"name\":\"Nabeela\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/2968118a72bea0868796abf1237ab3e0\"},\"headline\":\"How To Install GlusterFS Server On CentOS 7\",\"datePublished\":\"2021-02-15T07:40:17+00:00\",\"dateModified\":\"2021-10-28T05:18:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/\"},\"wordCount\":932,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"keywords\":[\"centros 7\",\"cloud management\",\"glusterfs\",\"RHEL 8\\\/7\",\"server management\"],\"articleSection\":[\"CentOs 7\",\"GlusterFS\",\"RHEL 7\",\"server management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/\",\"name\":\"How To Install GlusterFS Server On CentOS 7 | Skynats\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"datePublished\":\"2021-02-15T07:40:17+00:00\",\"dateModified\":\"2021-10-28T05:18:37+00:00\",\"description\":\"The glusterFS is an open-source, simple, elastic and scalable file storage system that suitable for high data such as media streaming,\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/image.png\",\"width\":602,\"height\":404},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/install-glusterfs-server-on-centos-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install GlusterFS Server On CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"name\":\"Server Management Services | Cloud Management | Skynats\",\"description\":\"Server Management and Cloud Management\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#organization\",\"name\":\"Skynats Technologies\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"contentUrl\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Sknats-Logo-New-whole.png\",\"width\":989,\"height\":367,\"caption\":\"Skynats Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/skynats\",\"https:\\\/\\\/x.com\\\/skynatstech\",\"https:\\\/\\\/www.instagram.com\\\/skynatstech\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/skynats-technologies\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCvTAjrFJ4_E2MJKwlDHomlg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.skynats.com\\\/blog\\\/#\\\/schema\\\/person\\\/2968118a72bea0868796abf1237ab3e0\",\"name\":\"Nabeela\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g\",\"caption\":\"Nabeela\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How To Install GlusterFS Server On CentOS 7 | Skynats","description":"The glusterFS is an open-source, simple, elastic and scalable file storage system that suitable for high data such as media streaming,","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How To Install GlusterFS Server On CentOS 7","og_description":"The glusterFS is an open-source, simple, elastic and scalable file storage system that suitable for high data such as media streaming,","og_url":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/","og_site_name":"Server Management Services | Cloud Management | Skynats","article_publisher":"https:\/\/www.facebook.com\/skynats","article_published_time":"2021-02-15T07:40:17+00:00","article_modified_time":"2021-10-28T05:18:37+00:00","og_image":[{"url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png","type":"","width":"","height":""}],"author":"Nabeela","twitter_card":"summary_large_image","twitter_creator":"@skynatstech","twitter_site":"@skynatstech","twitter_misc":{"Written by":"Nabeela","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/"},"author":{"name":"Nabeela","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/2968118a72bea0868796abf1237ab3e0"},"headline":"How To Install GlusterFS Server On CentOS 7","datePublished":"2021-02-15T07:40:17+00:00","dateModified":"2021-10-28T05:18:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/"},"wordCount":932,"commentCount":0,"publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png","keywords":["centros 7","cloud management","glusterfs","RHEL 8\/7","server management"],"articleSection":["CentOs 7","GlusterFS","RHEL 7","server management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/","url":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/","name":"How To Install GlusterFS Server On CentOS 7 | Skynats","isPartOf":{"@id":"https:\/\/www.skynats.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png","datePublished":"2021-02-15T07:40:17+00:00","dateModified":"2021-10-28T05:18:37+00:00","description":"The glusterFS is an open-source, simple, elastic and scalable file storage system that suitable for high data such as media streaming,","breadcrumb":{"@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#primaryimage","url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png","contentUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/02\/image.png","width":602,"height":404},{"@type":"BreadcrumbList","@id":"https:\/\/www.skynats.com\/blog\/install-glusterfs-server-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.skynats.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install GlusterFS Server On CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.skynats.com\/blog\/#website","url":"https:\/\/www.skynats.com\/blog\/","name":"Server Management Services | Cloud Management | Skynats","description":"Server Management and Cloud Management","publisher":{"@id":"https:\/\/www.skynats.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.skynats.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.skynats.com\/blog\/#organization","name":"Skynats Technologies","url":"https:\/\/www.skynats.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","contentUrl":"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/08\/Sknats-Logo-New-whole.png","width":989,"height":367,"caption":"Skynats Technologies"},"image":{"@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/skynats","https:\/\/x.com\/skynatstech","https:\/\/www.instagram.com\/skynatstech\/","https:\/\/www.linkedin.com\/company\/skynats-technologies","https:\/\/www.youtube.com\/channel\/UCvTAjrFJ4_E2MJKwlDHomlg"]},{"@type":"Person","@id":"https:\/\/www.skynats.com\/blog\/#\/schema\/person\/2968118a72bea0868796abf1237ab3e0","name":"Nabeela","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/12a999d0e3cd16cf2383c5551b39d00d6ddc2d035a2581ce5d85fce0762d0372?s=96&d=mm&r=g","caption":"Nabeela"}}]}},"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=6121"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6121\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=6121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=6121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=6121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}