-
-
Save dazinator/ab6790e7bac1c82e21082112fa5907bc to your computer and use it in GitHub Desktop.
Quick and dirty single-node GlusterFS setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 | |
# 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 | |
# Mount! | |
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