Skip to content

Instantly share code, notes, and snippets.

@sjenning
Last active December 6, 2016 23:32
Show Gist options
  • Save sjenning/71761200697afc059c05d1d3d96660f4 to your computer and use it in GitHub Desktop.
Save sjenning/71761200697afc059c05d1d3d96660f4 to your computer and use it in GitHub Desktop.
manual (fedora 25)
nodes:
gluster-node1
gluster-node2
per node:
setenforce 0
dnf install glusterfs-server
systemctl enable --now glusterd.service
fdisk /dev/vdb
mkfs.xfs /dev/vdb1
echo "/dev/vdb1 /srv xfs defaults 0 0" >> /etc/fstab
mount /srv
mkdir -p /srv/myvol
node1 only:
gluster peer probe gluster-node2
gluster volume create myvol replica 2 gluster-node1:/srv/myvol gluster-node2:/srv/myvol
gluster volume start myvol
client:
dnf install glusterfs-fuse -y
mount -t glusterfs gluster-node1:/myvol /mnt
heketi:
server (gluster-node1):
dnf install heketi -y
vi /etc/heketi/heketi.json
FILL IN HERE
sudo -u heketi ssh-keygen
systemctl enable --now heketi
curl http://127.0.0.1:8080/hello
add ssh key to root authorized_hosts on gluster nodes
client:
dnf install heketi-client -y
export HEKETI_CLI_SERVER=http://gluster-node1:8080
heketi-cli cluster create mycluster
heketi-cli node add --cluster=$CLUSTER_ID --zone=1 --management-host-name=gluster-node1 --storage-host-name=gluster-node1
heketi-cli node add --cluster=$CLUSTER_ID --zone=1 --management-host-name=gluster-node2 --storage-host-name=gluster-node2
heketi-cli device add --name=/dev/vdb1 --node=$NODE1_ID
heketi-cli device add --name=/dev/vdb1 --node=$NODE2_ID
heketi-cli volume create --size=8 --replica=2
NOTES:
on device add, a VG is create on the specified node device(s)
on volume create, an LV is created, and xfs filesystem is formatted, and mounted under /var/lib/heketi/mounts as a brick for the gluster volume (on enough nodes to satisfy replication/distribution)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment