bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39551: [PATCH v2] Cannot declare an NFS mount using the <file-system


From: Maxim Cournoyer
Subject: bug#39551: [PATCH v2] Cannot declare an NFS mount using the <file-system> record
Date: Thu, 13 Feb 2020 10:45:54 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Still more work needs to be done to have working NFS mounts though,

Maxim Cournoyer <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]