Why is my NFS server not working?

I am running CoreOS stable on the server and Silverblue 38 on all of the clients. Each client has the directory created by fstab and they can put files in it, but they are all local files and nothing syncs with the server. I’ve also added a test file to the directory on the server and it does not show up on the clients. It is mounting though, the clients make the “drive mounted” sound they make when a USB drive is plugged in. I layered autofs on the clients to make this work, but it still doesn’t actually share the files.

I am new to NFS and fstab so please let me know if you see the issue.

# /etc/exports on the server
/var/storage-0 *(rw,sync)
# /etc/fstab on the client /var/storage-0    nfs      auto        0       0

One really needs to be certain the nfs volume is mounted.
What is the output of mount on the client?

Work with one to get it mounted properly then repeat on the others.

This also may be an issue with permissions. Most users do not have write permission in a system tree such as /var/, and may not have read permissions either for some directories.

Thanks for the quick reply. Here’s the mount output:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=4096k,nr_inodes=977222,mode=755,inode64)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,size=1581672k,nr_inodes=819200,mode=755,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime,seclabel)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-vconsole-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on /sysroot type btrfs (ro,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on / type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on /etc type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on /usr type btrfs (ro,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on /sysroot/ostree/deploy/fedora/var type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=258,subvol=/root)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,nosuid,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19797)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime,seclabel)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime,seclabel)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on /var type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=256,subvol=/var)
/dev/mapper/luks-683fbab8-f534-44e4-8b40-116b1694153c on /var/home type btrfs (rw,relatime,seclabel,compress=zstd:1,ssd,space_cache=v2,subvolid=257,subvol=/home)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,seclabel,nr_inodes=1048576,inode64)
/dev/nvme0n1p2 on /boot type ext4 (rw,relatime,seclabel)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-resolved.service type ramfs (ro,nosuid,nodev,noexec,relatime,seclabel,mode=700)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=790832k,nr_inodes=197708,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

I changed the client’s fstab to use a new static IP for the server and to mount it in my home directory. It is now showing up in the Files sidebar, but when I click it it said I do not have permission to mount it. I’ve looked into it and I don’t think it’s a problem with the nfs setting (there’s no space between the asterisk and parenthesis). /var/home/jeff/storage-0 nfs auto 0 0

Nothing in that ‘mount’ output shows the nfs volume mounted. You just said that it told you you do not have permission to mount it, so that problem must be fixed.

Maybe the users option in the fstab line may assist. Also the nfs server must grant permissions to the user for mounting so it may require some additional config as well to allow each or all clients to access the volume. Note that allowing multiple clients to access the same volume with read & write privileges may result in file corruption should more than one individual access the same file at the same time.

It has been some time since I used nfs mounting so I am a bit rusty on the specific details and steps required.

so, are you able to mount the directory manually on the client, like:

mount /mnt

? if not, any error logs on the server side?