this post was submitted on 17 Apr 2024
18 points (90.9% liked)

Linux

48328 readers
599 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi all, I don't know if this is the right place to post this...let me know :)

I'm trying to create a NFS share, this is my /etc/exports:

/mnt/pool/var_VM_docker/ 172.31.0.0/24(rw,sync,no_subtree_check)

When I try to connect with:

sudo mount -t nfs -o nfsvers=3 -vvvv 172.31.0.1:/mnt/pool/var_VM_docker /mnt/test

I get:

mount.nfs: timeout set for Mon Apr 15 19:07:11 2024
mount.nfs: trying text-based options 'nfsvers=3,addr=172.31.0.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 172.31.0.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 172.31.0.1 prog 100005 vers 3 prot UDP port 41067
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 172.31.0.1:/mnt/pool/var_VM_docker

I don't have iptables enabled, nor SELinux. I've tried exporting it on 127.0.0.1 and connecting it to 127.0.0.1, but the problem persist. What am I doing wrong?

you are viewing a single comment's thread
view the rest of the comments
[–] lemmyreader@lemmy.ml 5 points 7 months ago (1 children)

Did you have NFS working before ? For NFS version 3 and below you will need to have rpcbind running, and years ago that changed the default to listening on 127.0.0.1 on some Linux distributions. Here's a quick search result for NFS4 : https://www.suse.com/support/kb/doc/?id=000019530 And from the best Linux wiki of late : https://wiki.archlinux.org/title/NFS

[–] peregus@lemmy.world 2 points 7 months ago

No, I've never used NFS. I've solved with this export:

/mnt/pool/vm_docker/ 172.31.0.0/24(rw,fsid=1,sync,no_root_squash,no_subtree_check)

And this mount:

sudo mount -t nfs -o vers=3 172.31.0.1:/mnt/pool/vm_docker /mnt/nfs/

Made it permanent with this /etc/fstab:

172.31.0.1:/mnt/pool/vm_docker /mnt/nfs nfs vers=3,rw 0 0