[notes] glusterfs server (Replicated mode) on CentOS 6.X
install on two glusterfs servers (g1, g2)
# yum install centos-release-gluster
# yum install glusterfs-server
# mkfs.xfs -i size=512 /dev/sdb1
# mkdir -p /glusterfs/gv0/brick0
# vi /etc/fstab
/dev/sdb1 /glusterfs/gv0/brick0 xfs rw,noatime,nouuid,inode64 0 0
# mount /glusterfs/gv0/brick0
# mkdir /glusterfs/gv0/brick0/brick
# service glusterd start
# chkconfig glusterd on[root@g1 ~]# gluster peer probe g2
peer probe: success
[root@g2 ~]# gluster peer probe g1
peer probe: success
[root@g1 ~]# gluster volume create gv0 replica 2 g1:/glusterfs/gv0/brick0/brick g2:/glusterfs/gv0/brick0/brick
volume create: gv0: success: please start the volume to access data
[root@g1 ~]# gluster volume start gv0
volume start: gv0: success
[root@g1 ~]# gluster volume infoVolume Name: gv0
Type: Replicate
Volume ID: d637121a-576a-4320-a42b-7b18b89183ea
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: g1:/glusterfs/gv0/brick0/brick
Brick2: g2:/glusterfs/gv0/brick0/brick
Options Reconfigured:
performance.readdir-ahead: on
glusterfs client mount & test
# yum install glusterfs-fuse
# mount -t glusterfs g1:/gv0 /dataor edit fstab
# vi /etc/fstab
g1:/gv0 /data glusterfs _netdev,rw,acl 0 0# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.8G 883M 8.4G 10% /
tmpfs 931M 0 931M 0% /dev/shm
g1:/gv0 10G 33M 10G 1% /data
shutdown one of glusterfs servers you still can access your data
Distributed Dispersed Volumes notes : gluster volume create gv0 disperse 4 g{1..4}:/glusterfs/gv0/brick0/brick g{1..4}:/glusterfs/gv0/brick1/brick g{1..4}:/glusterfs/gv0/brick2/brick