当前位置: 首页 > 工具软件 > NFS-Ganesha > 使用案例 >

Centos8.3 nfs-ganesha使用GlusterFS后端

连翰
2023-12-01

在任意一台GlusterFS节点部署nfs-ganesha相关包

dnf install centos-release-nfs-ganesha30 -y
dnf install nfs-ganesha-gluster -y

配置ganesha

cat /etc/ganesha/ganesha.conf
EXPORT{
    Export_Id = 1 ;   # Export ID unique to each export
    Path = "/gv0";  # Path of the volume to be exported. Eg: "/test_volume"

    FSAL {
        name = GLUSTER;
        hostname = "${ip}"; #one of the nodes in the trusted pool
        volume = "gv0";  # Volume name. Eg: "test_volume"
    }

    Access_type = RW;    # Access permissions
    Squash = No_root_squash; # To enable/disable root squashing
    Disable_ACL = TRUE;  # To enable/disable ACL
    Pseudo = "/gv0_pseudo";  # NFSv4 pseudo path for this export. Eg: "/test_volume_pseudo"
    Protocols = "3","4" ;    # NFS protocols supported
    Transports = "UDP","TCP" ; # Transport protocols supported
    SecType = "sys";     # Security flavors supported
}

启动nfs-ganesha并设置开机自启动

systemctl start nfs-ganesha
systemctl enable nfs-ganesha

检测nfs export

showmount -e localhost
Export list for localhost:
/gv0 (everyone)

在客户端部署nfs-utils

dnf -y install nfs-utils

在客户端机器进行挂载

mount -t nfs glusterfs01:/gv0 /mnt
df -h #可以看到挂载成功则完成

 

 类似资料: