Skip to content

Instantly share code, notes, and snippets.

@maksim-se
Forked from smola/GLUSTER_SETUP.sh
Last active August 2, 2019 03:39
Show Gist options
  • Save maksim-se/4d63ed50dfe5ba624c1e499dcdccad40 to your computer and use it in GitHub Desktop.
Save maksim-se/4d63ed50dfe5ba624c1e499dcdccad40 to your computer and use it in GitHub Desktop.
Quick and dirty single-node GlusterFS setup
#
# Instructions for quick gluster server (1 node) setup with a volume on LVM.
# No replication, just using localhost.
#
# See https://docs.gluster.org/en/latest/Administrator%20Guide/Brick%20Naming%20Conventions/
#
# Install GlusterFS
add-apt-repository ppa:gluster/glusterfs-4.0
apt-get install glusterfs-server
# disable firewall
# Create an LVM volume, format with XFS
lvcreate -L 10G -n gluster lvm-vg-main
apt-get install xfsprogs
mkfs.xfs /dev/lvm-vg-main/gluster
# Create directory for brick and mount LVM volume
mkdir -p /data/glusterfs/myvol1/brick1
mount /dev/lvm-vg-main/gluster /data/glusterfs/myvol1/brick1
# Create volume in gluster
gluster volume create myvol1 $HOSTNAME:/data/glusterfs/myvol1/brick1/brick
gluster volume start myvol1
# for old clients
gluster volume set myvol1 ctime off
# Mount!
yum install glusterfs-fuse -y
mkdir -p /mnt/glusterfs
mount -t glusterfs $HOSTNAME:myvol1 /mnt/glusterfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment