Difference between revisions of "Configuring basic NFSv3 server"

From Notes_Wiki
m
m
Line 1: Line 1:
<yambe:breadcrumb>NFS server configuration|NFS server</yambe:breadcrumb>
=Configuring basic NFSv3 server=
=Configuring basic NFSv3 server=


Line 25: Line 26:




Back to [[NFS server configuration]]
<yambe:breadcrumb>NFS server configuration|NFS server</yambe:breadcrumb>

Revision as of 11:48, 2 December 2012

<yambe:breadcrumb>NFS server configuration|NFS server</yambe:breadcrumb>

Configuring basic NFSv3 server

To configure NFSv3 server for providing access to backups taken in /private/snapshots folder over NFS use:

  • Enable on startup and also run following services on both server and client
    • rpcidmapd
    • rpcgssd
    • rpcbind
    • nfslock
    • nfs
  • Edit /etc/exports and export /private/snapshots to machine from where backup is being taken. It might as well be 127.0.0.1 for local backups. Sample lines to write are
    /private/snapshots/ 127.0.0.1(ro,no_root_squash)
    This ensures that backup of given server is exported only to same server where user-id, gid match and not to other machines. 'ro' ensures that users cannot modify backup and just copy them. File '/etc/exports can be sensitive to spaces. Leave exactly one space after folder name and no space between IP address and opening '('. Also options between braces ('()') are not seperated by spaces, just use commas. We can use '*' or IP/netmask instead of single IP address. One can refer to 'man exports' page for complete details.
  • Disable SELinux
  • Restart nfs service or use 'exportfs -v' command to export newly added folders to '/etc/exports' file
  • Verify using 'showmount -e <nfs_server_ip>' from client to ensure that server mount points are visible
  • One may have to disable firewall between server and client for things to work. 'rpcinfo -p' commands gives information about various ports being used by rpc. Output of this command should include many services like portmapper, rquotad, nfs, nfs_acl, nlockmgr, mountd and status.
  • If 'rpcinfo -p' does not shows many services and shows only portmapper, then after following all other steps such as starting or restarting various rpc services, use 'service nfs restart' at last, followed by 'rpcinfo -p' to check again.
  • Mount exported backup on client using
    mount -v -t nfs -o ro,vers=3 127.0.0.1:/private/snapshots/ /snapshots/
    Use of vers=3 is very important


<yambe:breadcrumb>NFS server configuration|NFS server</yambe:breadcrumb>