Re: NFS mounts

2017-11-06 Thread Ludovic Courtès
Konrad Hinsen  skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>
>>> Of course, the real problem is that I cannot mount it at all because
>>> rpc.statd is missing.
>>
>> Ooh, got it.  Well we could (ab)use the ‘dependencies’ field of
>> ‘file-system’ to introduce a dependency on the rpc.statd daemon startup.
>
> Is there a service that starts rpc.statd? I can't find rpc.statd
> anywhere in the Guix source.

Not yet (there’s a couple of NFS-related services but not this one.)
Well, when it exists, we can add that dependency.  :-)

Ludo’.



Re: NFS mounts

2017-11-06 Thread Konrad Hinsen
l...@gnu.org (Ludovic Courtès) writes:

>> Of course, the real problem is that I cannot mount it at all because
>> rpc.statd is missing.
>
> Ooh, got it.  Well we could (ab)use the ‘dependencies’ field of
> ‘file-system’ to introduce a dependency on the rpc.statd daemon startup.

Is there a service that starts rpc.statd? I can't find rpc.statd
anywhere in the Guix source.

Konrad.



Re: NFS mounts

2017-11-05 Thread Ludovic Courtès
Hi,

Konrad Hinsen  skribis:

>> By default, file systems are automatically mounted at boot time.  To
>> avoid that, you must add:
>>
>>   (mount? #f)
>
> That works well indeed. But I actually want that NFS filesystem mounted
> at boot time, ideally (not strictly required though).
>
> Of course, the real problem is that I cannot mount it at all because
> rpc.statd is missing.

Ooh, got it.  Well we could (ab)use the ‘dependencies’ field of
‘file-system’ to introduce a dependency on the rpc.statd daemon startup.

Ludo’.



Re: NFS mounts

2017-11-05 Thread Konrad Hinsen
Hi Ludo,

> By default, file systems are automatically mounted at boot time.  To
> avoid that, you must add:
>
>   (mount? #f)

That works well indeed. But I actually want that NFS filesystem mounted
at boot time, ideally (not strictly required though).

Of course, the real problem is that I cannot mount it at all because
rpc.statd is missing.

Konrad.



Re: NFS mounts

2017-10-30 Thread Ludovic Courtès
Howdy Konrad,

Konrad Hinsen  skribis:

>> Could you test it in a VM, pass “console=ttyS0” as a kernel argument,
>> and “-serial stdio” so that we see all the messages on the console?
>
> It took a while, but here it is. My config.scm is attached as well.

[...]

>  (file-system
>  (device "192.168.56.1:/home/hinsen")
>  (check? #f)
>  (mount-point "/host/home/hinsen")
>  (create-mount-point? #t)
>  (type "nfs"))

By default, file systems are automatically mounted at boot time.  To
avoid that, you must add:

  (mount? #f)

> failed to start service 'file-systems'
> failed to start service 'file-system-/host/home/hinsen'

This is the crux of the problem: it tried and failed to mount this file
system, so everything else failed as well (because the ‘file-systems’
service is an essential requirement.)

This is not a great failure mode, but it’s expected here.

HTH!

Ludo’.



Re: NFS mounts

2017-10-27 Thread Konrad Hinsen
Hi Ludo,

> Could you test it in a VM, pass “console=ttyS0” as a kernel argument,
> and “-serial stdio” so that we see all the messages on the console?

It took a while, but here it is. My config.scm is attached as well.

Konrad.



config.scm
Description: Binary data


guixsd-console.log
Description: Binary data


Re: NFS mounts

2017-10-16 Thread Ludovic Courtès
Hello,

Konrad Hinsen  skribis:

>> Indeed, the initrd would need an extra package, like this:
>>
>> diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
> ...
>
>> Can you try if it works?
>
> It compiles, and I can boot the new configuration without any trouble.
>
> Next, I added an NFS filesystem:
>
>   (file-system
> (device "192.168.56.1:/home/hinsen")
> (mount-point "/host/home/hinsen")
> (create-mount-point? #t)
> (type "nfs"))
>
> For "device" I put the string that I would also give to "mount" as an
> argument. That's perhaps completely wrong. After rebooting, I get the
> error message
>
>   No file system check procedure for 192.168.56.1:/home/hinsen; skipping
>
> So I added
>
> (check? #f)
>
> to the file system specification. Another reboot, more error messages:
>
>   Service udev has been started.
>   failed to start service 'ncsd'
>   failed to start service 'guix-daemon'
>   ...
>
> plus many others. The only services that start are "udev" and
> "loopback".  I can't log in.

Could you test it in a VM, pass “console=ttyS0” as a kernel argument,
and “-serial stdio” so that we see all the messages on the console?

(You can do ‘guix system vm’ and then modify the command line that it
returns.)

> Configuration rollback is really nice BTW ;-)

Isn’t it?  :-)

Ludo’.



Re: NFS mounts

2017-10-13 Thread Konrad Hinsen
Hi Ludo,

> Indeed, the initrd would need an extra package, like this:
>
> diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
...

> Can you try if it works?

It compiles, and I can boot the new configuration without any trouble.

Next, I added an NFS filesystem:

  (file-system
(device "192.168.56.1:/home/hinsen")
(mount-point "/host/home/hinsen")
(create-mount-point? #t)
(type "nfs"))

For "device" I put the string that I would also give to "mount" as an
argument. That's perhaps completely wrong. After rebooting, I get the
error message

  No file system check procedure for 192.168.56.1:/home/hinsen; skipping

So I added

(check? #f)

to the file system specification. Another reboot, more error messages:

  Service udev has been started.
  failed to start service 'ncsd'
  failed to start service 'guix-daemon'
  ...

plus many others. The only services that start are "udev" and
"loopback".  I can't log in.

Configuration rollback is really nice BTW ;-)

Konrad



Re: NFS mounts

2017-10-10 Thread Konrad Hinsen
Hi Ludo,

> Indeed, the initrd would need an extra package, like this:
...

> Can you try if it works?

I will! However, I am almost sure that this is not sufficient.
For a first test, I installed nfs-utils for manually mounting
my NFS share. It fails because the daemon rpc.statd is not running.
I suspect this will require an additional service, as I don't see
any existing service that refers to rpc.statd.

Konrad.



Re: NFS mounts

2017-10-09 Thread Ludovic Courtès
Hi Konrad,

Konrad Hinsen  skribis:

> does anyone have an example of a system configuration that mounts an NFS
> share at boot time? It seems that this requires some extra services and
> also some additional packages (to have mount.nfs for example).

Indeed, the initrd would need an extra package, like this:

diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 969a89266..76ec3b8a6 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -32,6 +32,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages nfs)
   #:use-module (gnu packages guile)
   #:use-module ((gnu packages make-bootstrap)
 #:select (%guile-static-stripped))
@@ -231,6 +232,9 @@ FILE-SYSTEMS."
 ,@(if (find (file-system-type-predicate "btrfs") file-systems)
   (list btrfs-progs/static)
   '())
+,@(if (find (file-system-type-predicate "nfs") file-systems)
+  (list nfs-utils)
+  '())
 ,@(if volatile-root?
   (list unionfs-fuse/static)
   '(

Can you try if it works?

However, we should provide an ‘nfs-utils-static’ package because the
above leads to a very big initrd (the closure of ‘nfs-utils’ is
~200 MiB).

HTH,
Ludo’.


NFS mounts

2017-10-06 Thread Konrad Hinsen
Hi Guixers,

does anyone have an example of a system configuration that mounts an NFS
share at boot time? It seems that this requires some extra services and
also some additional packages (to have mount.nfs for example).

Konrad.