You can also use "ganesha_mgr add_export <args>" instead of dbus-send. See documentation or "ganesha_mgr help" for further details.
Thank you Frank for your quick reply.
You are right. I was expecting dbus to modify the config file and bring up the export which was wrong assumptions from my end. When I added an EXPORT block in export.conf and used the dbus-send command later, I could add the export without any issue.
[root@localhost ~]# cat /etc/ganesha/export.conf
## Configure an export for some file tree
...
EXPORT {
## Export Id (mandatory, each EXPORT must have a unique Export_Id)
Export_Id = 3;
## Exported path (mandatory)
Path = /home/ganesha_1/;
## Pseudo Path (required for NFSv4 or if mount_path_pseudo = true)
Pseudo = /home/ganesha_1/;
Transports = "TCP";
## Exporting FSAL
FSAL {
Name = VFS;
}
}
[root@localhost ~]# sudo dbus-send --print-reply --system --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport string:/etc/ganesha/export.conf 'string:EXPORT(Export_Id=3)'
method return time=1591935638.984428 sender=:1.175 -> destination=:1.208 serial=36413 reply_serial=2
string "1 exports added"
[root@localhost ~]# showmount -e
Export list for localhost.localdomain:
/home/ganesha_nfs_v3 (everyone)
/home/ganesha_nfs_v4 (everyone)
/home/ganesha_1 (everyone)
[root@localhost ~]#
As you have suggested, I have tried SIGHUP as well and it is also working fine for me.
[root@localhost ~]# showmount -e
Export list for localhost.localdomain:
/home/ganesha_nfs_v3 (everyone)
/home/ganesha_nfs_v4 (everyone)
/home/ganesha_1 (everyone)
[root@localhost ~]# mkdir /home/ganesha_2
[root@localhost ~]# ps -ef | grep nfs | grep -v grep
root 26823 1 0 Jun11 ? 00:00:49 /root/build_dir_v3_stable/ganesha.nfsd -f /etc/ganesha/ganesha.conf
== Modify export.conf to add new export
[root@localhost ~]# cat /etc/ganesha/export.conf
## Configure an export for some file tree
...
EXPORT {
## Export Id (mandatory, each EXPORT must have a unique Export_Id)
Export_Id = 4;
## Exported path (mandatory)
Path = /home/ganesha_2/;
## Pseudo Path (required for NFSv4 or if mount_path_pseudo = true)
Pseudo = /home/ganesha_2/;
Transports = "TCP";
## Exporting FSAL
FSAL {
Name = VFS;
}
}
[root@localhost ~]# kill -SIGHUP 26823
[root@localhost ~]# ps -ef | grep nfs | grep -v grep
root 26823 1 0 Jun11 ? 00:00:49 /root/build_dir_v3_stable/ganesha.nfsd -f /etc/ganesha/ganesha.conf
[root@localhost ~]# showmount -e
Export list for localhost.localdomain:
/home/ganesha_nfs_v3 (everyone)
/home/ganesha_nfs_v4 (everyone)
/home/ganesha_1 (everyone)
/home/ganesha_2 (everyone)
[root@localhost ~]#
Once again, thanks a lot for your help.!!
_______________________________________________
Support mailing list -- support@lists.nfs-ganesha.org
To unsubscribe send an email to support-leave@lists.nfs-ganesha.org