Accessing Gluster FS from the client machine

Accessing Gluster FS from the client machine

for this test case since I run Manjro (arch based) I will install the client on Manjaro, you can install it on your own machine

Search for glusterfs-client

pacman -Ss glusterfs
extra/qemu-block-gluster 6.2.0-2
    QEMU GlusterFS block module
community/glusterfs 1:10.0-3 [installed]
    a cluster file-system capable of scaling to several peta-bytes.

Install glusterfs-client

Mine ia Manjaro, you can you dnf , yum, apt, etc

pacman -Sy glusterfs

In Arch the server and client are part the same package, but on you distro , they are different, e.g.

  • gulsterfs-server

  • glusterfs-client

Add name resolution

Now add name resolutoin to your own /etc/hosts file, for me:

### gluster-fs ###
192.168.1.192 gluster1
192.168.1.11  gluster2
192.168.1.249 gluster3

Create the mount point

It is up to you where you want to mount it, I am going to mount it at:

mkdir /mnt/glusterfs/gv0

Mount the volume

mount -t glusterfs gluster1:gv0 /mnt/glusterfs/gv0

The name gv0 means glusterfs-volume-0 which I have created already.

Verify the mounted volume

 df -h 
Filesystem      Size  Used Avail Use% Mounted on
dev             7.8G     0  7.8G   0% /dev
run             7.8G  1.5M  7.8G   1% /run
/dev/sdb2       234G   17G  206G   8% /
tmpfs           7.8G  183M  7.6G   3% /dev/shm
tmpfs           7.8G  387M  7.4G   5% /tmp
/dev/sdb1       300M  288K  300M   1% /boot/efi
tmpfs           1.6G   56K  1.6G   1% /run/user/1000
/dev/sdc4       629G  273G  325G  46% /backup
gluster1:gv0     16G  213M   16G   2% /mnt/glusterfs/gv0
verify the mounted volume

Also we can see mount command

mount | grep gv0
gluster1:gv0 on /mnt/glusterfs/gv0 type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)

Use the mounted volume

You can now go to /mnt/glusterfs/gv0 and add files, etc and it will be stored there.

Check the data added from the server

Now we can check the server if we have the data we added or not

Last updated

Was this helpful?