THANKS Lrrr and leavengood. The code and the entries in /var/log/syslog leaded to the solution
/var/log> tail -n5 syslog
KERN: nfs4: Error not B_OK or empty stream!
KERN: nfs4: Decode Error!
KERN: Last message repeated 2 times.
KERN: nfs4: nfs4_mount()Error mounting filesystem: Invalid Argument
The arguments looked OK and as you use the exact same syntax I checked that on another NAS in the network. It works!
Shame on me! The mistake was that the NAS protocol on the old NAS was set to NFS2/NFS3 but NFS4 was disbaled. PEBKAC!
I think some of the blame lies with Haiku on this one. Thatās a misleading error message. Ideally it would say āProtocol not supportedā or āServer not respondingā or something.
Yes we should try to improve things like that. With that said NFS4 is a pretty advanced thing to use and is also fairly new in the code. Also Iām not sure if detailed errors can really be returned in something generic like fs_mount_volume which can handle any kind of file system.
This is one big downside of C style error handling. I think we have similar issues when using the pkgman utility where āGeneral system errorā is returned many times
Error handling has been discussed pretty recently on the haiku-development mailing list but I donāt know if we had a clear consensus. And changing it in a big way would probably require major API breakage.
I wasnāt trying to say that the function could return a string like that. There are probably other error codes that could have been chosen, like ECONNREFUSED, EPROTO, EPROTONOSUPPORT, etcā¦
Yeah that would be an improvement but my comment was more about āI wish we could do betterā than an excuse for the status quo. Probably printing out āplease check the syslog for more detailā would help too.
just to make it clear (Iāve struggled too with this command)ā¦
if your shared folder is /srv/nfs4/my_folder on your remote system, youāll need to call the mount command this way:
mount -t nfs4 -p "192.168.1.253:/my_folder" /boot/home/Desktop/mount_point
and not: mount -t nfs4 -p ā192.168.1.253:/srv/nfs4/my_folderā etc⦠like you could do for scp for example (without the full path on the server, only the subfolder)
I got the mount command working, but then only see an empty folder (but with the share icon, so it is recognised as a network share in Tracker). Seems to be a security misconfig but works without problems on Linux (gotta check the config there closely now):
KERN: nfs4: NFS Error: Operation not supported
KERN: nfs4: NFS Error: Operation not allowed