Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install&configure gluster FS
06-26-2017, 05:46 PM (This post was last modified: 08-31-2017 05:54 PM by rayluk.)
Post: #1
Install&configure gluster FS
A good refer is http://gluster.readthedocs.io/en/latest/...http://gluster.readthedocs.io/en/latest/Administrator%20Guide/Setting%20Up%2



.pdf  gluster.pdf (Size: 416.45 KB / Downloads: 7)


Installation & configuration:

Definition:
Server means the node/host offers the file store service and Client means the node use client tool to store files into Server. volume means the basic storage unit in glusterfs, it combines some PH partition in different Server nodes and abstract them into one File System.

Installation:
Server:
Code:
dnf/yum install glusterfs-server

Client:
Code:
dnf/yum install glusterfs-fuse


Configuration:
Configuration only focus on Server.

The main point is format some partitions with xfs and mount in Server nodes, such as
Code:
mkfs.xfs /dev/sdb3
mount /dev/sdb3 /files


start the service on server nodes
Code:
systemctl start glusterd

Login in any one of the server nodes, run follow command to add other server nodes into the gluster cluster:

Code:
gluster peer probe $IP
where $IP is other server node's IP value, run this command times according the number of other server nodes.
Domain name can also be used here.

there assume there's 2 Server nodes 10.16.11.11 and 10.16.11.12 with the same OS such as CentOS7.2 and 1 Client node with CentOS7.2. and both 'gls' under '/files' on 2 Server node will be used for storage.

there's some modes on glusterfs, such as support replication or not and split one file into chunks or not. Follow let's create volume 'vol-test' with no replication and no block:
   
Code:
gluster volume create vol-test 10.16.11.11:/files/gls 10.16.11.12:/files/gls
it will show create successfully if works well. then start the volume:
Code:
gluster volume start vol-test
After this, the volume 'vol-test' can be used now. On Client, mount the remote gfs into local dir:
Code:
mount -t glusterfs 10.16.11.11:/vol-test mnt/
Then just like operate a normal file system to read/write files.

Other commands
Stop volume
Code:
gluster volume stop $volumename
delete volume
Code:
gluster volume delete $volumename



Other mount mode:

1. replicated volume
   
Code:
gluster volume create vol-test repl 2  server1:/media server2:/media
there will be 2 replication in 2 nodes.

2. striped volume
   
Code:
$gluster volume create vol-test stripe 2 server1:/media server2:/media
one file will be split into many parts and stored in 2 nodes.

3. distribute replication volume
   
Code:
gluster volume create vol-test repl 2 server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4
there will be two replication volumes. server1/server2 is one and server3/server4 is another. about why there will be 2 replication volumes is '4 servers / 2 factory'(repl 2 set the factory).

4.distribute striped volume
   
Code:
gluster volume create vol-test stripe 2 server1:/exp1 server1:/exp2 [&] server2:/exp3 server2:/exp4

This specify one file split into many parts and stored in one server's different dirs.

5.striped replicated volume
   
Code:
gluster volume create vol-test stripe 2 replica 2 server1:/exp1 server2:/exp2 server3:/exp3 server4:/exp4

6. distributed striped replicated vlume
   


Note: in practice seems the client sub-network should be in same with each server's networking environment. or it will cause mounting failed.


A Chinese blog: http://blog.csdn.net/zzulp/article/details/39527441


.pdf  gluster-ch.pdf (Size: 1.38 MB / Downloads: 0)
Find all posts by this user
Quote this message in a reply
08-31-2017, 05:46 PM
Post: #2
RE: Install&configure gluster FS
(( gluster delete $volumename ) -> (gluster volume delete $volumename))
Find all posts by this user
Quote this message in a reply
08-31-2017, 05:53 PM
Post: #3
RE: Install&configure gluster FS
Quote:
Code:
gluster peer probe $IP
where $IP is other server node's IP value, run this command times according the number of other server nodes.

domain name can also be used here.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: