通过nfs-ganesha实现nfs客户端挂载glusterfs虚拟卷

server端

首先创建一个虚拟卷

 

 chmod 777 /bricks -R

 

安装nfs-ganesha

yum -y install centos-release-gluster6

yum -y install nfs-ganesha nfs-ganesha-gluster

修改nfs-ganesha配置文件cat /etc/ganesha/ganesha.conf#都是注释直接在后面添

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
EXPORT_DEFAULTS {
        Access_Type = RW;
}
EXPORT
 
{
        Export_Id = 1 ;
        Path = "/gv0";
        Pseudo = "/gv0";
        Disable_ACL = True;
        Protocols = "3","4";
        Access_Type = RW;
        Squash = No_root_squash;
        Sectype = "sys";
        Transports = "UDP","TCP";
 
        FSAL {
                Name = "GLUSTER";
                Hostname = "192.168.30.157";
                Volume = "gv0";
        }
}
LOG {
        Default_Log_Leve1 = WARN;
}

  启动nfs-ganesha

1
2
3
4
5
6
7
8
systemctl start nfs-ganesha
systemctl enable nfs-ganesha
systemctl status nfs-ganesha
 
启动nfs-ganesha会和nfs端口冲突需要先停掉nfs
 
查看日志
tail -f /var/log/ganesha/ganesha.log

  

 

 

检查挂载

 

 

Client端

linux

安装nfs服务

yum install nfs-utils

mount -t nfs 192.168.30.157:/gv0 /mnt

 

posted @   惊蛰2020  阅读(984)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· winform 绘制太阳,地球,月球 运作规律
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示