On Tue, Apr 2, 2019 at 2:07 AM BERTRAND Joël <joel.bertr...@systella.fr> wrote:
>
>         Hello,
>
>         I'm trying to configure swap over NFS (on a diskless workstation).
>
>         I have created a swapfile on nfsserver:/srv/schwarz/ (swapfile.0) and
> added in client /etc/fstab :
>
> nfsserver:/srv/schwarz/swapfile.0 none swap sw,nfsmntpt=/swap
>
>         nfs server seems to run as expected as client can mount
> nfsserver:/srv/schwarz in /
>
>         But when I try to mount swap, sysctl returns an error :
>
> schwarz# swapctl -A
> mount_nfs: can't access /srv/schwarz/swapfile.0: Permission denied
> swapctl: 192.168.10.128:/srv/schwarz/swapfile.0: mount failed

I looked at an old Dreamcast nfs root from a long time ago and found
the fstab file, and it says this:

nfsserver_ip:/usr/local/dc / nfs rw,auto 0 0
nfsserver_ip:/usr/local/swap none swap sw,nfsmntpt=/swap 0 0

/usr/local/dc is the / filesystem, so swap is actually one directory
up from the root. I haven't seen the nfsserver side but I assume
/usr/local is exported.

I hope that helps.

Andy

Reply via email to