概述
一 nfs-ganesha在centos7上安装
yum -y install centos-release-gluster
yum install -y nfs-ganesha.x86_64
yum install -y nfs-ganesha-vfs.x86_64
yum install -y nfs-ganesha-proxy.x86_64
通过以上命令就可成功安装了。
systemctl start nfs-ganesha.service 启动服务
二 使用dbus命令动态更新nfs-ganesha配置
To add export:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/path-to-new-export-file string:"EXPORT(Path=/volname)"
ex:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/test.conf string:"export(path=/opt/testnfs)"
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/test.conf string:"export(export_id=3)"
To remove export:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:export_id
ex:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport uint16:3
To update export:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/path-to-new-export-file string:"EXPORT(Path=/volname)"
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/path-to-new-export-file string:"EXPORT(export_id=uint16)"
ex:
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport string:/etc/ganesha/test.conf string:"export(path=/opt/testnfs)"
method return time=1552554389.002397 sender=:1.263 -> destination=:1.282 serial=593 reply_serial=2
string "1 exports updated"
dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport string:/etc/ganesha/test.conf string:"export(export_id=3)"
method return time=1552554430.929315 sender=:1.263 -> destination=:1.283 serial=636 reply_serial=2
string "1 exports updated"
https://github.com/nfs-ganesha/nfs-ganesha/wiki/DBusExports
转载于:https://www.cnblogs.com/longchang/p/10565764.html
最后
以上就是糟糕茉莉为你收集整理的nfs-ganesha使用的全部内容,希望文章能够帮你解决nfs-ganesha使用所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复