kaldi NFS/GlusterFS

NFS

详细介绍参考《鸟哥的LINUX私房菜-服务器架设篇》第十三章
主要流程

server端配置

  1. 安装两个软件:rpcbind和nfs-utils
  2. 配置/etc/exports
<DIR> *(rw,no_root_squash)
  1. 启动nfs
/etc/init.d/rpcbind start
/etc/init.d/nfs start
/etc/init.d/nfslock start
chkconfig rpcbind on
chkconfig nfs on
chkconfig nfslock on
  1. 如果更新了/etc/exports文件,需要重新挂载
exportfs -arv

client端配置

  1. 安装两个软件:rpcbind和nfs-utils
  2. 启动相关服务
/etc/init.d/rpcbind start
/etc/init.d/nfslock start
  1. 查看服务器提供了哪些共享目录
showmount -e hostname
  1. 建立挂载点并且挂载
mkdir -p <DIR>
mount -t nfs hostname:<DIR> <DIR>
umount <DIR> #卸载

glusterfs

官方文档:http://gluster.readthedocs.io/en/latest/

Brick:对应一台服务器上面的存储空间
Volume:多个brick组成一个volume,对应于多台服务器组成的存储空间
Trusted Storage Pool:多台服务器组成的服务器集群

CENTOS安装

https://wiki.centos.org/SpecialInterestGroup/Storage/gluster-Quickstart
http://gluster.readthedocs.io/en/latest/Quick-Start-Guide/Quickstart/
安装到以下机器:hpc191、hpc192

#1.install on hpc191/hpc192
yum install centos-release-gluster
yum --enablerepo=centos-gluster*-test install glusterfs-server
service glusterd start
service glusterd status

#2.Configure the trusted pool
gluster peer probe hpc192 #on hpc191
gluster peer probe hpc191 #on hpc192

#3.Set up a GlusterFS volume
mkdir -p /euler/glusterfs/gv1 #on hpc191/hpc192
gluster volume create gv1 hpc191:<DIR>/gv1 hpc192:<DIR>/gv1 #on hpc191
gluster volume start gv1 #on hpc191
gluster volume info #on hpc191

#4.mount
mount -t glusterfs hpc191:/gv1 /glfs #on hpc191
mount -t glusterfs hpc192:/gv1 /glfs #on hpc192

扩展节点

新增加hpc193

#1.在client安装
yum install centos-release-gluster
yum --enablerepo=centos-gluster*-test install glusterfs-server
service glusterd start
service glusterd status

#2.Configure the trusted pool,在hpc191或者hpc192执行
gluster peer probe hpc193

#3.add brick to volume
gluster volume add-brick gv1 hpc193:<DIR>/gv1
gluster volume status

#4.mount 
mount -t glusterfs hpc193:/gv1 /glfs

#5.rebalance:add/delete brick 以后都需要rebalance
gluster volume rebalance gv1 fix-layout start #第一种方式:不迁移已有的数据
gluster volume rebalance gv1 start            #第二种方式:迁移已有的数据

卸载

#hpc191
gluster volume stop gv1 
gluster volume delete gv1
gluster peer detach hpc192
gluster peer detach hpc193

#hpc191/hpc192/hpc193
service glusferfsd stop

其他操作

service启动
/etc/init.d/glusterd start
/etc/init.d/glusterd stop
/etc/init.d/glusterd status
pool操作
#add server to pool
gluster peer probe server
#status of pool
gluster peer status
#remove from pool
gluster peer detach server
volume操作
创建设置

类型包括:
Distributed
Striped
Distributed Striped
Distributed Replicated
Distributed Striped Replicated
Striped Replicated
Dispersed
Distributed Dispersed

其他操作

操作包括:
Tuning Volume Options
Configuring Transport Types for a Volume
Expanding Volumes
Shrinking Volumes
Replacing Bricks
Migrating Volumes
Rebalancing Volumes
Stopping Volumes
Deleting Volumes
Triggering Self-Heal on Replicate
Non Uniform File Allocation(NUFA)

log路径
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值