Skip to content

Instantly share code, notes, and snippets.

@trinhpham
Last active January 9, 2021 09:22
Show Gist options
  • Save trinhpham/b90f4b2741f01948f9165a13a0cfd986 to your computer and use it in GitHub Desktop.
Save trinhpham/b90f4b2741f01948f9165a13a0cfd986 to your computer and use it in GitHub Desktop.
GlusterFS & NFS Ganesha on Centos 8
echo fastestmirror=1 >> /etc/dnf/dnf.conf
dnf update -y
dnf install centos-release-gluster centos-release-nfs-ganesha30 hostname -y
dnf install glusterfs-server nfs-ganesha nfs-ganesha-gluster -y
systemctl enable --now glusterd
mkdir -p /data/gnfs
gluster volume create gnfs $(hostname):/data/gnfs force
gluster volume start gnfs
gluster volume info gnfs
gluster volume status
#gluster volume add-brick gnfs replica 2 $(hostname):/data/gnfs force
mkdir /etc/ganesha/exports
cat << EOF > /etc/ganesha/exports/export.gnfs.conf
EXPORT
{
# Export Id (mandatory, each EXPORT must have a unique Export_Id)
Export_Id = 9;
# Exported path (mandatory)
Path = "/gnfs";
# Exporting FSAL
FSAL {
name = GLUSTER;
hostname="localhost";
volume="gnfs";
Up_poll_usec = 10; # Upcall poll interval in microseconds
Transport = rdma; # tcp or rdma
}
Access_type = RW;
#Disable_ACL = true;
Squash = No_Root_Squash;
# Pseudo Path (required for NFS v4)
Pseudo="/gnfs";
Protocols = "3", "4" ;
#Transports = "UDP","TCP";
SecType = "sys";
}
EOF
cat /etc/ganesha/exports/export.gnfs.conf
echo "%include "/etc/ganesha/exports/export.gnfs.conf"" >>/etc/ganesha/ganesha.conf
systemctl restart nfs-ganesha
systemctl status nfs-ganesha
showmount -e localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment