NFS
Jump to navigation
Jump to search
Client Access
MacOS NFS
mkdir -p ~/nas/shared sudo mount nas:/nas/shared ~/nas/shared
- https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-18-04
- https://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/
Ubuntu/Debian
sudo apt install nfs-common sudo apt install cifs-utils # for cifs support mkdir ~/nas/shared sudo mount nas:/nas/shared ~/nas/shared
permanent using /etc/fstab
sudo mkdir -p /nas/shared chmod 0777 /nas/shared nas:/nas/shared /nas/shared nfs
Install
sudo apt-get update sudo apt-get install nfs-kernel-server
sudo mkdir -p /nas/shared sudo chown nobody:nogroup /nas/shared sudo chmod 777 /nas/shared
sudo nano /etc/exports /nas/shared 10.x.x.0/24(rw,sync,no_subtree_check,insecure) # /nas/shared clientIP(rw,sync,no_subtree_check,insecure)
enable lockd https://debian-handbook.info/browse/squeeze/sect.nfs-file-server.html
/etc/default/nfs-common file
NEED_LOCKD=yes
export
sudo exportfs -a
firewall
sudo ufw allow ssh sudo ufw enable sudo ufw allow from 10.x.x.0/24 to any port nfs
LXD permission issues with NFS
See https://github.com/lxc/lxd/issues/3989 or https://github.com/lxc/lxd/issues/2703
lxc config set privileged_container_name security.privileged true lxc config set nas raw.apparmor "mount fstype=rpc_pipefs, mount fstype=nfsd," lxc restart privileged_container_name
lxc launch ubuntu:18.04 nfs -c security.privileged=true -c raw.apparmor="mount fstype=rpc_pipefs, mount fstype=nfsd,"
Windows https://superuser.com/questions/372490/error-mounting-arch-linux-nfs-share-on-windows-7-ultimate
USE CMD mount \10.1.1.1\nfs\a z: mount -o anon \\192.168.1.99\data\authorized Z: