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!
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.
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.