* bug#39551: Cannot declare an NFS mount using the <file-system> record
@ 2020-02-10 19:41 Maxim Cournoyer
2020-02-12 8:54 ` Maxim Cournoyer
0 siblings, 1 reply; 8+ messages in thread
From: Maxim Cournoyer @ 2020-02-10 19:41 UTC (permalink / raw)
To: 39551
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#39551: Cannot declare an NFS mount using the <file-system> record
2020-02-10 19:41 bug#39551: Cannot declare an NFS mount using the <file-system> record Maxim Cournoyer
@ 2020-02-12 8:54 ` Maxim Cournoyer
2020-02-12 18:30 ` Giovanni Biscuolo
2020-02-12 19:13 ` bug#39551: [PATCH v2] " Maxim Cournoyer
0 siblings, 2 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2020-02-12 8:54 UTC (permalink / raw)
To: 39551
[-- Attachment #1: Type: text/plain, Size: 741 bytes --]
Hello,
Maxim Cournoyer <maxim.cournoyer@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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-scripts-system-Disable-checks-for-NFS-shares.patch --]
[-- Type: text/x-patch, Size: 1093 bytes --]
From 6aad93c3a2ccef9936cadeeab92edece7afac0dd Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 10 Feb 2020 15:06:50 -0500
Subject: [PATCH] scripts: system: Disable checks for NFS shares.
Fixes issue #39551 (https://bugs.nu.org/39551).
* guix/scripts/system.scm (check-file-system-availability): Ignore file
systems of the NFS type.
---
guix/scripts/system.scm | 2 ++
1 file changed, 2 insertions(+)
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))
--
2.25.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#39551: Cannot declare an NFS mount using the <file-system> record
2020-02-12 8:54 ` Maxim Cournoyer
@ 2020-02-12 18:30 ` Giovanni Biscuolo
2020-02-12 19:12 ` Maxim Cournoyer
2020-02-18 17:28 ` Maxim Cournoyer
2020-02-12 19:13 ` bug#39551: [PATCH v2] " Maxim Cournoyer
1 sibling, 2 replies; 8+ messages in thread
From: Giovanni Biscuolo @ 2020-02-12 18:30 UTC (permalink / raw)
To: Maxim Cournoyer, 39551
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
Hello,
Maxim Cournoyer <maxim.cournoyer@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#39551: Cannot declare an NFS mount using the <file-system> record
2020-02-12 18:30 ` Giovanni Biscuolo
@ 2020-02-12 19:12 ` Maxim Cournoyer
2020-02-18 17:28 ` Maxim Cournoyer
1 sibling, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2020-02-12 19:12 UTC (permalink / raw)
To: Giovanni Biscuolo; +Cc: 39551
Hello Giovanni,
Giovanni Biscuolo <g@xelera.eu> writes:
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer@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" :-).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#39551: Cannot declare an NFS mount using the <file-system> record
2020-02-12 18:30 ` Giovanni Biscuolo
2020-02-12 19:12 ` Maxim Cournoyer
@ 2020-02-18 17:28 ` Maxim Cournoyer
1 sibling, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2020-02-18 17:28 UTC (permalink / raw)
To: Giovanni Biscuolo; +Cc: 39551-done
Giovanni Biscuolo <g@xelera.eu> writes:
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#39551: [PATCH v2] Cannot declare an NFS mount using the <file-system> record
2020-02-12 8:54 ` Maxim Cournoyer
2020-02-12 18:30 ` Giovanni Biscuolo
@ 2020-02-12 19:13 ` Maxim Cournoyer
2020-02-13 15:45 ` Maxim Cournoyer
2020-02-13 21:37 ` Ludovic Courtès
1 sibling, 2 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2020-02-12 19:13 UTC (permalink / raw)
To: 39551
[-- Attachment #1: Type: text/plain, Size: 96 bytes --]
Attached is v2 of the patch, fixing the comment in the code as reported
by Tobias.
Thank you!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-scripts-system-Do-not-validate-network-file-systems.patch --]
[-- Type: text/x-patch, Size: 1091 bytes --]
From 666ce396f2a53bec4d88ee90c1612166421f3ed8 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@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).
* guix/scripts/system.scm (check-file-system-availability): Ignore file
systems of the NFS type.
---
guix/scripts/system.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index b0386a1392..ac2475c551 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))
+ ;; Don't try to validate network file systems.
+ (not (string-prefix? "nfs" (file-system-type fs)))
(not (memq 'bind-mount (file-system-flags fs)))))
file-systems))
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#39551: [PATCH v2] Cannot declare an NFS mount using the <file-system> record
2020-02-12 19:13 ` bug#39551: [PATCH v2] " Maxim Cournoyer
@ 2020-02-13 15:45 ` Maxim Cournoyer
2020-02-13 21:37 ` Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2020-02-13 15:45 UTC (permalink / raw)
To: 39551
Still more work needs to be done to have working NFS mounts though,
Maxim Cournoyer <maxim.cournoyer@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#39551: [PATCH v2] Cannot declare an NFS mount using the <file-system> record
2020-02-12 19:13 ` bug#39551: [PATCH v2] " Maxim Cournoyer
2020-02-13 15:45 ` Maxim Cournoyer
@ 2020-02-13 21:37 ` Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2020-02-13 21:37 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 39551
Howdy!
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>From 666ce396f2a53bec4d88ee90c1612166421f3ed8 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer@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’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-02-18 17:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 19:41 bug#39551: Cannot declare an NFS mount using the <file-system> record Maxim Cournoyer
2020-02-12 8:54 ` Maxim Cournoyer
2020-02-12 18:30 ` Giovanni Biscuolo
2020-02-12 19:12 ` Maxim Cournoyer
2020-02-18 17:28 ` Maxim Cournoyer
2020-02-12 19:13 ` bug#39551: [PATCH v2] " Maxim Cournoyer
2020-02-13 15:45 ` Maxim Cournoyer
2020-02-13 21:37 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).