nfs mount in file-system works only if "nfs4" type is used for "mount" syscall

  • Open
  • quality assurance status badge
Details
2 participants
  • fsdfsdfsd3
  • Maxim Cournoyer
Owner
unassigned
Submitted by
fsdfsdfsd3
Severity
normal
Merged with
F
F
fsdfsdfsd3 wrote on 11 Apr 2021 10:33
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
Pgu6TXk6QaPqp_auy-Dl-BoHVRLiG4_00wVM_mPwSTaqUwEWRQ3-ur68EFQci8CaI8FZEw_X5h4clktJLvIDpMt81388osAVNL9idTUJk-Y=@protonmail.com
Hello,

I ran into an issue with trying to mount an nfs file-system in an operating-system config.. I managed to trace it back to being an issue with the mount syscall.

The following did not work:
(mount "192.168.1.10:/nas-server" "/mnt/nas-client" "nfs" 0 "addr=192.168.
1.10")
and would result in an error "No route to host"

I changed the type from "nfs" to "nfs4" however and this did work (For context; at the command line, both mount.nfs and mount.nfs4 also work fine., mount.nfs also works fine without nfs-utils installed).

This might be fixable by adding another check-procedure option for "nfs4" in addition to nfs, but I am sending it your way in case there is something else going on.

Thank you!
Attachment: file
F
F
fsdfsdfsd3 wrote on 14 Apr 2021 08:56
bug#47706: Acknowledgement (nfs mount in file-system works only if "nfs4" type is used for "mount" syscall)
(name . 47706@debbugs.gnu.org)(address . 47706@debbugs.gnu.org)
96F_Fhjta4ncSy_Q4W4RJ8uf9KdXT0aW-9tjbzFonXM8IncbpdISgkoMfuN9k3FJgHqig4ke8fxWm33LoDWLrhcT19xuxri4of9f4TXhu8w=@protonmail.com
Hello,

I ended up testing my config file with nfs4 and that part did work fine. I had earlier errors unrelated to this that threw me off thinking that would not work.

To clarify then, the issue here only seems to be with the mount function in the (guix build syscalls) module. This results in a "No route to host" error even though mount.nfs works fine on the command line.

However perhaps I am assuming that mount.nfs does not make use of nfs4 behind the scenes, even without nfs-utils installed, when it does.

Thank you!
Attachment: file
M
M
Maxim Cournoyer wrote on 8 Aug 2021 05:19
Re: bug#47706: nfs mount in file-system works only if "nfs4" type is used for "mount" syscall
(name . fsdfsdfsd3)(address . fsdfsdfsd3@protonmail.com)(address . 47706@debbugs.gnu.org)
87zgts39ot.fsf@gmail.com
Hello,

fsdfsdfsd3 <fsdfsdfsd3@protonmail.com> writes:

Toggle quote (15 lines)
> Hello,
>
> I ran into an issue with trying to mount an nfs file-system in an operating-system config.. I managed to trace it back to being an issue with the mount syscall.
>
> The following did not work:
> (mount "192.168.1.10:/nas-server" "/mnt/nas-client" "nfs" 0 "addr=192.168.
> 1.10")
> and would result in an error "No route to host"
>
> I changed the type from "nfs" to "nfs4" however and this did work (For context; at the command line, both mount.nfs and mount.nfs4 also work fine., mount.nfs also works fine without nfs-utils installed).
>
> This might be fixable by adding another check-procedure option for "nfs4" in addition to nfs, but I am sending it your way in case there is something else going on.
>
> Thank you!

Does this really work? I seem to recall that the bigger problem would
be that file system services do *not* and cannot currently depend on
networking (while NFS obviously does).

Here's the attached output of

$ guix system shepherd-graph gnu/system/examples/bare-bones.tmpl \
| dot -Tsvg -oout.svg
Attachment: out.svg
We can see that the networking service dependency chain has:

networking --> user-processes --> user-homes --> file-systems

Which to me suggests that it wouldn't be enough to fix the problem you
reported above (or perhaps it is? and NFS would simply fail during the
boot but keep trying until networking becomes available without too much
of an issue?)

Thanks,

Maxim
M
M
Maxim Cournoyer wrote on 8 Aug 2021 05:50
control message for bug #39770
(address . control@debbugs.gnu.org)
87y29c389b.fsf@gmail.com
merge 39770 47706
quit
?