CentOS 7.3 分布式存储Glusterfs部署使用(二)

Glusterfs_Client:

一、配置hosts

cat < /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.101.8 makekvm01
192.168.101.5 glusterfs1
192.168.101.6 glusterfs2
192.168.101.7 glusterfs3
192.168.101.12 glusterfs4
EOF

二、配置YUM源

rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
wget -P /etc/yum.repos.d https://download.gluster.org/pub/gluster/glusterfs/3.7/3.7.19/CentOS/glusterfs-epel.repo

三、安装glusterfs软件包

yum -y install glusterfs glusterfs-fuse

四、挂载gfs

mkdir /mnt/gv0
mount.glusterfs glusterfs1:/gv0 /mnt/gv0
echo 'gluster1:/gv0   /mnt/gv0  glusterfs defaults,_netdev 0 0' >> /etc/fstab

五、附加存储IO测试用例

#顺序读
fio -filename=/mnt/gv0/test -iodepth=64 -ioengine=libaio -direct=1 -rw=read -bs=512 -size=5G -numjobs=64 -runtime=30 -group_reporting -name=test-read
#顺序写
fio -filename=/mnt/gv0/test -iodepth=64 -ioengine=libaio -direct=1 -rw=write -bs=512 -size=5G -numjobs=64 -runtime=30 -group_reporting -name=test-write
#顺序读写
fio -filename=/mnt/gv0/test -iodepth=64 -ioengine=libaio -direct=1 -rw=rw -bs=512 -size=5G -numjobs=64 -runtime=30 -group_reporting -name=test-rw
#随机读
fio -filename=/mnt/gv0/test -iodepth=64 -ioengine=libaio -direct=1 -rw=randread -bs=512 -size=5G -numjobs=64 -runtime=30 -group_reporting -name=test-randread
#随机写
fio -filename=/mnt/gv0/test -iodepth=64 -ioengine=libaio -direct=1 -rw=randwrite -bs=512 -size=5G -numjobs=64 -runtime=30 -group_reporting -name=test-randwrite
#随机读写
fio -filename=/mnt/gv0/test -iodepth=64 -ioengine=libaio -direct=1 -rw=randrw -bs=512 -size=5G -numjobs=64 -runtime=30 -group_reporting -name=test-randrw

以上用例仅供参考,具体参数根据实际环境配置


你可能感兴趣的:(glusterfs,linux)