GNU bug report logs - #39551
Cannot declare an NFS mount using the <file-system> record

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 10 Feb 2020 19:43:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39551 in the body.
You can then email your comments to 39551 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Mon, 10 Feb 2020 19:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 10 Feb 2020 19:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: Cannot declare an NFS mount using the <file-system> record
Date: Mon, 10 Feb 2020 14:41:50 -0500
When I try adding an NFS mount point to my Guix System, like:


--8<---------------cut here---------------start------------->8---
[...]
(file-system
  (device "192.168.1.10:/mnt/scratch/")
  (mount-point "/mnt/scratch/")
  (type "nfs")
  (options "rw,async,soft,noexec"))
[...]
--8<---------------cut here---------------end--------------->8---

Reconfiguring fails with the message:

error: device '192.168.1.10' not found: No such file or directory
hint: If '192.168.1.10' is a file system label, write
`(file-system-label "192.168.1.10")' in your `device' field.

So it doesn't appear to be possible to declare an NFS mount currently,
despite commit 0c85db79f7a8abc3bcdbf8931d959fe94306a5a1 that'd suggest
it should be possible.

Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Wed, 12 Feb 2020 08:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 39551 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 39551 <at> debbugs.gnu.org
Subject: Re: bug#39551: Cannot declare an NFS mount using the <file-system>
 record
Date: Wed, 12 Feb 2020 03:54:21 -0500
[Message part 1 (text/plain, inline)]
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> When I try adding an NFS mount point to my Guix System, like:
>
> [...]
> (file-system
>   (device "192.168.1.10:/mnt/scratch/")
>   (mount-point "/mnt/scratch/")
>   (type "nfs")
>   (options "rw,async,soft,noexec"))
> [...]
>
> Reconfiguring fails with the message:
>
> error: device '192.168.1.10' not found: No such file or directory
> hint: If '192.168.1.10' is a file system label, write
> `(file-system-label "192.168.1.10")' in your `device' field.
>
> So it doesn't appear to be possible to declare an NFS mount currently,
> despite commit 0c85db79f7a8abc3bcdbf8931d959fe94306a5a1 that'd suggest
> it should be possible.
>
> Maxim

The attached patch fixes this issue

[0001-scripts-system-Disable-checks-for-NFS-shares.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Wed, 12 Feb 2020 18:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 39551 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 39551 <at> debbugs.gnu.org
Subject: Re: bug#39551: Cannot declare an NFS mount using the <file-system>
 record
Date: Wed, 12 Feb 2020 19:30:50 +0100
[Message part 1 (text/plain, inline)]
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> The attached patch fixes this issue

[...]

> diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
> index b0386a1392..26a1599a93 100644
> --- a/guix/scripts/system.scm
> +++ b/guix/scripts/system.scm
> @@ -566,6 +566,8 @@ any, are available.  Raise an error if they're not."
>                (and (file-system-mount? fs)
>                     (not (member (file-system-type fs)
>                                  %pseudo-file-system-types))
> +                   ;; Fixes issue #39551 (see: https://bugs.gnu.org/39551).
> +                   (not (string-prefix? "nfs" (file-system-type fs)))
>                     (not (memq 'bind-mount (file-system-flags fs)))))
>              file-systems))

Please is it possible to also add nfs4 to this fix?

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Wed, 12 Feb 2020 19:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 39551 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Giovanni Biscuolo <g <at> xelera.eu>
Cc: 39551 <at> debbugs.gnu.org
Subject: Re: bug#39551: Cannot declare an NFS mount using the <file-system>
 record
Date: Wed, 12 Feb 2020 14:12:32 -0500
Hello Giovanni,

Giovanni Biscuolo <g <at> xelera.eu> writes:

> Hello,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> The attached patch fixes this issue
>
> [...]
>
>> diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
>> index b0386a1392..26a1599a93 100644
>> --- a/guix/scripts/system.scm
>> +++ b/guix/scripts/system.scm
>> @@ -566,6 +566,8 @@ any, are available.  Raise an error if they're not."
>>                (and (file-system-mount? fs)
>>                     (not (member (file-system-type fs)
>>                                  %pseudo-file-system-types))
>> +                   ;; Fixes issue #39551 (see: https://bugs.gnu.org/39551).
>> +                   (not (string-prefix? "nfs" (file-system-type fs)))
>>                     (not (memq 'bind-mount (file-system-flags fs)))))
>>              file-systems))
>
> Please is it possible to also add nfs4 to this fix?
>
> Thanks! Gio'

It should work already, given that I'm checking for a string *prefix* of
"nfs" :-).




Information forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Wed, 12 Feb 2020 19:14:01 GMT) Full text and rfc822 format available.

Message #17 received at 39551 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 39551 <at> debbugs.gnu.org
Subject: bug#39551: [PATCH v2] Cannot declare an NFS mount using the
 <file-system> record
Date: Wed, 12 Feb 2020 14:13:42 -0500
[Message part 1 (text/plain, inline)]
Attached is v2 of the patch, fixing the comment in the code as reported
by Tobias.

Thank you!

[0001-scripts-system-Do-not-validate-network-file-systems.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Thu, 13 Feb 2020 15:47:02 GMT) Full text and rfc822 format available.

Message #20 received at 39551 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 39551 <at> debbugs.gnu.org
Subject: Re: bug#39551: [PATCH v2] Cannot declare an NFS mount using the
 <file-system> record
Date: Thu, 13 Feb 2020 10:45:54 -0500
Still more work needs to be done to have working NFS mounts though,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Attached is v2 of the patch, fixing the comment in the code as reported
> by Tobias.
>
> Thank you!

Naively inputting what you'd use in /etc/fstab into your <file-system>
record is not going to work because (gnu build file-systems)'s
mount-file-systems uses the *system call* mount rather than the user
command (mount(2) vs mount(8)), which don't accept the same arguments.

E.g.:

--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,import (gnu system file-systems)
scheme@(guix-user)> ,import (gnu build file-systems)
scheme@(guix-user)> (define fs (file-system
           (device "192.168.51.34:/mnt/scratch/yocto-sstate")
           (mount-point "/mnt/scratch/yocto-sstate")
           (type "nfs")
           (options "rw,async,soft,noexec")))

scheme@(guix-user)> (mount-file-system fs)
No file system check procedure for 192.168.51.34:/mnt/scratch/yocto-sstate; skipping
guix/build/syscalls.scm:486:8: In procedure mount: mount "192.168.51.34:/mnt/scratch/yocto-sstate" on "/root//mnt/scratch/yocto-sstate": Invalid argument
--8<---------------cut here---------------end--------------->8---

Although:

--8<---------------cut here---------------start------------->8---
cat /etc/fstab
# This file was generated from your Guix configuration.  Any changes
# will be lost upon reboot or reconfiguration.

LABEL=btrfs-pool        /       btrfs   subvol=rootfs,compress=lzo
LABEL=btrfs-pool        /home   btrfs   subvol=home,compress=lzo
192.168.51.34:/mnt/scratch/yocto-sstate /mnt/scratch/yocto-sstate       nfs     rw,async,soft,noexec
--8<---------------cut here---------------end--------------->8---

# mount /mnt/scratch/yocto-sstate
# echo $?
0




Information forwarded to bug-guix <at> gnu.org:
bug#39551; Package guix. (Thu, 13 Feb 2020 21:38:01 GMT) Full text and rfc822 format available.

Message #23 received at 39551 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 39551 <at> debbugs.gnu.org
Subject: Re: bug#39551: [PATCH v2] Cannot declare an NFS mount using the
 <file-system> record
Date: Thu, 13 Feb 2020 22:37:18 +0100
Howdy!

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

>>From 666ce396f2a53bec4d88ee90c1612166421f3ed8 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> Date: Mon, 10 Feb 2020 15:06:50 -0500
> Subject: [PATCH] scripts: system: Do not validate network file systems.
>
> Fixes issue #39551 (https://bugs.gnu.org/39551).

Nitpick: for consistency, you can make it:

  Fixes <https://bugs.gnu.org/39551>.

That’ll make grepping easier.

> * guix/scripts/system.scm (check-file-system-availability): Ignore file
> systems of the NFS type.

LGTM.  Thanks for finding the root cause and coming up with a fix!

Ludo’.




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 18 Feb 2020 17:29:02 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Tue, 18 Feb 2020 17:29:02 GMT) Full text and rfc822 format available.

Message #28 received at 39551-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Giovanni Biscuolo <g <at> xelera.eu>
Cc: 39551-done <at> debbugs.gnu.org
Subject: Re: bug#39551: Cannot declare an NFS mount using the <file-system>
 record
Date: Tue, 18 Feb 2020 12:28:33 -0500
Giovanni Biscuolo <g <at> xelera.eu> writes:

> Hello,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> The attached patch fixes this issue
>
> [...]
>
>> diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
>> index b0386a1392..26a1599a93 100644
>> --- a/guix/scripts/system.scm
>> +++ b/guix/scripts/system.scm
>> @@ -566,6 +566,8 @@ any, are available.  Raise an error if they're not."
>>                (and (file-system-mount? fs)
>>                     (not (member (file-system-type fs)
>>                                  %pseudo-file-system-types))
>> +                   ;; Fixes issue #39551 (see: https://bugs.gnu.org/39551).
>> +                   (not (string-prefix? "nfs" (file-system-type fs)))
>>                     (not (memq 'bind-mount (file-system-flags fs)))))
>>              file-systems))
>
> Please is it possible to also add nfs4 to this fix?
>
> Thanks! Gio'

Done with commit adbdf188c28c503a9c875b793bc88548d3cd702f.  Please not
that booting with NFS still seems to be problematic, at least in my
experience.  I had to use set mount? to #f and check? to #f as well in
the <file-system> record.  I'll try to address these issues separately.

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Mar 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 39 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.