# rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm # yum install glusterfs glusterfs-fuse glusterfs-rdma glusterfs-server glusterfs-vim # gzip /etc/glusterfs/*
# chkconfig glusterd off # chkconfig glusterfsd on # service glusterd stop # service glusterfsd start or /etc/init.d/glusterd start /etc/init.d/glusterfsd start
mkdir -p /home/export cat >> /etc/hosts <<EOF 192.168.80.107 gluster1 192.168.80.33 gluster2 192.168.80.1 gluster3 EOF # glusterfs-volgen --name store1 --raid 1 gluster1:/home/export gluster2:/home/export Generating server volfiles.. for server gluster2 as '/root/gluster2-store1-export.vol' Generating server volfiles.. for server gluster1 as '/root/gluster1-store1-export.vol' Generating client volfiles.. '/root/store1-tcp.vol' cp ./store1-tcp.vol /etc/glusterfs/glusterfs.vol scp gluster1-store1-export.vol root@gluster1:/etc/glusterfs/glusterfsd.vol scp gluster2-store1-export.vol root@gluster2:/etc/glusterfs/glusterfsd.vol ssh root@gluster1 service glusterfsd restart ssh root@gluster2 service glusterfsd restart # mkdir -p /mnt/glusterfs # glusterfs /mnt/glusterfs/ or # glusterfs -l /tmp/glusterfs.log -f /etc/glusterfs/glusterfs.vol /mnt/glusterfs/
Umount
umount /mnt/glusterfs
注意:请使用umount 卸载,不要kill glusterfs进程
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。
时间: 2024-09-30 12:04:57