kaldi NFS/GlusterFS

来源:互联网 发布:王者数据分析师 编辑:程序博客网 时间:2024/06/06 00:05

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 startchkconfig rpcbind onchkconfig nfs onchkconfig 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/hpc192yum install centos-release-glusteryum --enablerepo=centos-gluster*-test install glusterfs-serverservice glusterd startservice glusterd status#2.Configure the trusted poolgluster peer probe hpc192 #on hpc191gluster peer probe hpc191 #on hpc192#3.Set up a GlusterFS volumemkdir -p /euler/glusterfs/gv1 #on hpc191/hpc192gluster volume create gv1 hpc191:<DIR>/gv1 hpc192:<DIR>/gv1 #on hpc191gluster volume start gv1 #on hpc191gluster volume info #on hpc191#4.mountmount -t glusterfs hpc191:/gv1 /glfs #on hpc191mount -t glusterfs hpc192:/gv1 /glfs #on hpc192

扩展节点

新增加hpc193

#1.在client安装yum install centos-release-glusteryum --enablerepo=centos-gluster*-test install glusterfs-serverservice glusterd startservice glusterd status#2.Configure the trusted pool,在hpc191或者hpc192执行gluster peer probe hpc193#3.add brick to volumegluster volume add-brick gv1 hpc193:<DIR>/gv1gluster volume status#4.mount mount -t glusterfs hpc193:/gv1 /glfs#5.rebalance:add/delete brick 以后都需要rebalancegluster volume rebalance gv1 fix-layout start #第一种方式:不迁移已有的数据gluster volume rebalance gv1 start            #第二种方式:迁移已有的数据

卸载

#hpc191gluster volume stop gv1 gluster volume delete gv1gluster peer detach hpc192gluster peer detach hpc193#hpc191/hpc192/hpc193service glusferfsd stop

其他操作

service启动

/etc/init.d/glusterd start/etc/init.d/glusterd stop/etc/init.d/glusterd status

pool操作

#add server to poolgluster peer probe server#status of poolgluster peer status#remove from poolgluster 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