i found this question first which is similar: How to mount an NFS share with rootless Podman?
long story short i am having trouble with rootless podman nfs volume. i am creating the volume with myuser
podman volume create --opt type=nfs4 --opt o=rw --opt device=my.server.ip.address:/data/nfs_data podman-nfs
but when trying to spawn a container using the volume i get a "mount.nfs: operation not permitted"
podman run -d -v podman-nfs:/tmp/data --name myapp myappimage:latest
i know that the nfs mount works because i managed to make it work manually. i used the user directive in fstab to allow myuser to mount it manually. i even managed to mount it manually in the path generated by podman (/home/myuser/.local/share/containers/storage/volumes/podman-nfs/_data)
the fstab entry looks like :
my.server.ip.address:/data/nfs_data /home/myuser/.local/share/containers/storage/volumes/podman-nfs/_data nfs rw,sync,user,noauto,_netdev 0 0
i could revert to a regular nfs mount on the filesystem and have podman use it like a file but i like the idea of having nfs managed by podman so it can gracefully close it if the container stops.
ADDITIONAL INFO : if i try using the --log-level=debug flag in podman run i get 'mount /bin/mount [...] failed with exit status 32'
as a side note i find it very weird that you can create volumes as a rootless podman user but cannot mount them. it feels like i'm missing something obvious. i found this howto which does it as root https://www.server-world.info/en/note?os=Rocky_Linux_8&p=podman&f=6
thank you for your time.