Project

General

Profile

Support #645

NFS Sharing on Arch

Added by Daniel Curtis over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Network Attached Storage
Target version:
Start date:
08/26/2015
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

This is a guide on mounting a remote NFS share on Arch linux.

Prepare the environment

  • Make sure the system is up to date:
    sudo pacman -Syu
    

Setup NFS Server

  • Install nfs-utils package:
    pacman -S nfs-utils
    
  • Edit the exports file:
    vi /etc/exports
    
    • Setup a read-only public share to the 192.168.1.0 network:
      /srv/nfs/public 192.168.1.0/24(ro,all_squash,insecure,no_subtree_check)
      
  • Start and enable the nfs-server at boot:
    systemctl enable nfs-server
    systemctl start nfs-server
    

Mount the NFS Share

  • Install nfs-utils package:
    pacman -S nfs-utils
    
  • Start and enable rpcbind.service,nfs-client.target and remote-fs.target services at boot:
    systemctl enable rpcbind.service
    systemctl enable nfs-client.target
    systemctl enable remote-fs.target
    
    systemctl start rpcbind.service
    systemctl start nfs-client.target
    systemctl start remote-fs.target
    

Manual Mounting

  • Mount NFS share:
    mount -t nfs nas.example.com:/srv/nfs/public /media/public
    

/etc/fstab

  • Using fstab is useful for a server which is always on, and the NFS shares are available whenever the client boots up. Edit /etc/fstab file:
    vi /etc/fstab
    
    • And add an appropriate line reflecting the setup. Again, the server's NFS export root is omitted.
      nas.example.com:/srv/nfs/public   /media/public   nfs   rsize=32768,wsize=32768,timeo=900,retrans=5,_netdev    0 0
      

Resources

#1

Updated by Daniel Curtis over 8 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
#2

Updated by Daniel Curtis over 8 years ago

  • Status changed from In Progress to Resolved
#3

Updated by Daniel Curtis over 8 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100
#4

Updated by Daniel Curtis about 6 years ago

  • Subject changed from Mount An NFS Share on Arch to NFS Sharing on Arch
  • Description updated (diff)

Also available in: Atom PDF