目次

03 Ubuntu GlusterFS

Ubuntu 20.04にGlusterFSをインストール

# glusterd --version
glusterfs 7.2

1.install

apt install -y glusterfs-server

2.hosts

cat << EOF >> /etc/hosts
172.16.0.93 g-work01
172.16.0.153 g-work02
172.16.0.166 g-work03
EOF

3.peer

1台目から実行

gluster peer probe g-work02
gluster peer probe g-work03

4.Directory

mkdir -p /gluster/volume
mkfs.xfs /dev/sdb 
mount /dev/sdb /gluster/volume/

5.volume create

gluster volume create k8s-volume replica 2 arbiter 1 transport tcp \
  g-work01:/gluster/volume \
  g-work02:/gluster/volume \
  g-work03:/gluster/volume \
  force

6.mount

mount.glusterfs g-work01:k8s-volume /mnt/