Gluster & nfs-ganesha installation

yum -y update

yum -y install centos-release-gluster310

yum -y install install glusterfs glusterfs-server glusterfs-ganesha

cat <<EOF >> /etc/hosts

172.1.1.111 store1

172.1.1.112 store2

172.1.1.113 store3

172.1.1.114 store4

EOF

systemctl start glusterd

systemctl enable glusterd

systemctl disable NetworkManager.service

systemctl disable NetworkManager-wait-online.service

systemctl enable pcsd

systemctl start pcsd

systemctl disable firewalld

ssh-keygen -t rsa -f /var/lib/glusterd/nfs/secret.pem

scp id_rsa /var/lib/glusterd/nfs/secret.pem

scp id_rsa.pub /var/lib/glusterd/nfs/secret.pem.pub

scp /var/lib/glusterd/nfs/secret.* hostname:/var/lib/glusterd/nfs/

systemctl disable firewalld

systemctl start firewalld

systemctl enable firewalld

firewall-cmd –add-service glusterfs

firewall-cmd –add-service glusterfs –permanent

firewall-cmd –add-service high-availability

firewall-cmd –add-service high-availability –permanent

firewall-cmd –add-service nfs

firewall-cmd –add-service nfs –permanent

gluster peer probe store2

gluster peer probe store3

gluster peer probe store4

gluster volume create vol1 replica 3 transport tcp store1:/gluster_bricks/brick1 store2:/gluster_bricks/brick1 store3:/gluster_bricks/brick1

store4:/gluster_bricks/brick1

gluster volume start vol1

gluster volume set all cluster.enable-shared-storage enable

mkdir /var/run/gluster/shared_storage/nfs-ganesha

echo 1234qwer | sudo passwd –stdin hacluster                                                 //노드별

pcs cluster auth store1 store2 store3 store4 -u hacluster -p 1234qwer

cat <<EOF > /var/run/gluster/shared_storage/nfs-ganesha/ganesha-ha.conf

HA_NAME=”nfs_cluster”

HA_CLUSTER_NODES=”store1,store2,store3,store4″

VIP_store1=172.1.1.121

VIP_store2=172.1.1.122

VIP_store2=172.1.1.123

VIP_store2=172.1.1.124

EOF

/usr/libexec/ganesha/ganesha-ha.sh setup /var/run/gluster/shared_storage/nfs-ganesha

systemctl enable pacemaker

systemctl enable corosync

systemctl enable nfs-ganesha

systemctl start nfs-ganesha

/usr/libexec/ganesha/create-export-ganesha.sh /var/run/gluster/shared_storage/nfs-ganesha on volume

/usr/libexec/ganesha/ganesha-ha.sh –refresh-config /var/run/gluster/shared_storage/nfs-ganesha volume

/usr/libexec/ganesha/ganesha-ha.sh –add /var/run/gluster/shared_storage/nfs-ganesha store1 172.1.1.121 // host 추가

댓글 남기기

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin