GlusterFS is a scalable network file system. Using common off-the-shelf hardware, you can create large, distributed storage solutions for media streaming, data analysis, and other data- and bandwidth-intensive tasks. GlusterFS is free and open source software. In this Article we are going to see Introduction Gluster File System Install Configure Gluster HA.
Why GlusterFS – Introduction to Gluster File System
- GlusterFS is a distributed file system defined to be used in user space that can scale out in building-block fashion to store multiple petabytes of data under a single mount point.
- It is a software based file system which accounts to its own flexibility feature.
- It uses already available disk file systems like ext3, ext4, xfs etc to store data and client will able to access the storage as a local file system.
- GlusterFS cluster aggregates storage blocks over Infiniband
- RDMA (Remote Direct Memory Access) and/or TCP/IP interconnect in a single global namespace. Introduction Gluster File System Install Configure Gluster HA
Advantages of GlusterFS
- Gluster File system uses replication to survive hardware failures and automatically performs self-healing to restore performance. Aggregates on top of existing file systems.
- GlusterFS has no single point of failure. Completely distributed. No centralised meta-data server like Lustre.
- Extensible scheduling interface with modules loaded based on user’s storage I/O access pattern.
- Supports Infiniband RDMA and TCP/IP. Introduction Gluster File System Install Configure Gluster HA
- Entirely implemented in user-space. Easy to port, debug and maintain. Scales on demand. Too easy to deploy and maintain
Targeted Audience
Anyone who is having basic knowledge in Linux/Unix and ability to understand the file system concepts.
How to install and Configure Gluster in HA
Before implementing the Gluster setup, let’s go through the storage concepts in Gluster.
- Brick – Brick is nothing but a directory which can be shared among the trusted storage pool.
- Trusted Storage Pool – Collection of shared files or directories Block Storage – Devices through which the data is being moved across systems in form of blocks
- Cluster – Collaboration of storage servers based on a defined protocol
- Distributed File System – A file system in which data is spread across multiple nodes where users can access the files without knowing the actual location of the server
- FUSE – Loadable kernel module which allows users to create a file system without involving any of the kernel code
- Glusterd – GlusterFS management daemon which is the backbone of the file system which will be running all the time
- Volume – A logical collection of bricks Introduction Gluster File System Install Configure Gluster HA
Ports required
- 24007 TCP for the Gluster Daemon
- 24008 TCP for Infiniband management (optional unless you are using IB (InfiniBand) )
- One TCP port for each brick in a volume. So, for example, if you have 4 bricks in a volume, port 24009 – 24012 would be used in GlusterFS 3.3 & below, 49152 – 49155 from GlusterFS 3.4 & later.
Note: by default Gluster/NFS does not provide services over UDP, it is TCP only. You would need to enable the nfs.mount-udp option if you want to add UDP support for the MOUNT protocol. That’s completely optional and is up to your requirement to use.
Installation and Configuration Gluster HA
Now let us start installing and configuring the GlusterFS. Take two Centos 7 servers and name them as per your choice say Glusterfs1 and Glusterfs2.
Note: Make Sure that SELinux and firewall are not blocking the above ports between the two servers.
In /etc/hosts create an entry of like below in both the servers. Make sure that you are able to reach both the servers in both servers.
Glusterfs1
Glusterfs2
Enable the Gluster Repo in both the servers. Create a repo file and add the contents as shown below.
Install Glusterfs server and start the service. Introduction Gluster File System Install Configure Gluster HA
Install the gluster server on both the servers Introduction to Gluster File System Install Configure Gluster HA
Now that installation has been completed. Let’s create the trusted storage pool.
From glusterfs1 Host
From Glusterfs2 Host
Now verify whether both the servers are in the pool or not with the below command, from any of the two servers.
From the above, it is clear that both the servers are added to Trusted storage Pool.
To add extra servers to the pool list follow the same process as mentioned above.
Attach a new disk to each server and mount on any directory of your choice. We will use this mounted directory as a brick while creating the volumes.
Now we have the GlusterFS server is up and running, let’s create volumes and start accessing the data.
I have two new disks attached to both the servers, which will be used as a brick.
From any of the Gluster server run the following command to create a Gluster volume.
Gluster volume has been created successfully. Now let us start the Gluster volume.
Gluster volume has been started successfully and now it is ready to serve the data. Before mounting this in client side, let us first check the gluster volume information.
Mount the Gluster in clients (Windows and Linux)
Linux
Let us mount the gluster volume gvol in client machines to access the data. Add the Gluster servers IP addresses to /etc/hosts in the client machine.
Enable the Gluster Repo as we did on the servers. Create a repo file and add the contents as shown below.
Install the client packages with the following command
Create a directory.
Mount it with the following command.
If all goes well, you will be able to see the gluster volume mounted successfully.
Create files from client and you will be able to see the files in the server
Mount GlusterFS in Windows
For windows machines we need to setup Samba configuration to export the mount point of the Gluster volume. Example, if a Gluster volume is mounted on /mnt/glusterclient1, you must edit smb.conf file to enable exporting this through CIFS.
Open smb.conf file in an editor and add the following lines for a simple configuration:
Go to the windows machine and follow the steps below.
- Open “Computer” then “Network”
- Then search for the storage network \glusterserverip
- The CIFS exported volume will appear.
- Double click on it.
- Enter username and password specified during smb user creation and then connect and access the share.
Gluster file system supports different types of volumes based on the requirements. Some volumes are good for scaling storage size, some for improving performance and some for both which are explained below.
source:-https://arkit.co.in Introduction Gluster File System Install Configure Gluster HA
No comments:
Post a Comment