Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 528 Bytes

nfs.md

File metadata and controls

23 lines (20 loc) · 528 Bytes

NFS server

  • Setup script:
bash <( curl -L https://github.com/rern/tips_bash/raw/master/nfsshare.sh )
pacman -Sy nfs-utils # debian: nfs-kernel-server

share=/PATH/DIR
mkdir $share
chmod -R 777 $share # 777 = rwx
ip=$( ifconfig | grep -m1 inet.*broadcast | awk '{print $2}' )
echo "$share ${ip%.*}.0/24(rw,sync,no_subtree_check)" >> /etc/exports

systemctl restart nfs-server # debian: nfs-kernel-server

NFS client

mountpoint=/mnt/DIR
mkdir $mountpoint
mount SERVER_IP:$share $mountpoint