Tuesday 13 December 2011

### Network File System (NFS) ###



 1. Transparent access to remote file systems
 2. Installed by default
 3. Uses RPC for communications



Tasks:
 1. Export a directory on the server using: /etc/exports
  a. /path_to_directory IP_ADDR(rw)
  b. /nfs1    192.168.75.10(rw)
  c. mkdir /nfs1
  d. start NFS server - 'service nfs start'
  e. Confirm export(s) - 'exportfs -v'

Note: NFS matches remote user's UID to local /etc/passwd to determine ACLs

 2. Export /nfs2
  a. Create entry in /etc/exports
  b. Update current exports using: exportfs -a

 3. Mount both exports on a remote system
  a. mount -t nfs 192.168.75.199:/nfs1 /nfs1
  b. mount -t nfs 192.168.75.199:/nfs2 /nfs2

 4. Allow local 'root' user the ability to write to /nfs1 export
  a. /etc/exports: (rw,no_root_squash)

 5. Setup mount points so that they're available upon reboot
  a. /etc/fstab
  b. Unmount and confirm that NFS mount points will be available when the client system changes runlevels (reboots, starts, etc.) - 'mount -a'


showmount -a 192.168.75.199 - shows mounts on this system (connected NFS clients)

 6. Attempt to mount /nfs1 & /nfs2 from an unauthorized system
  a. Fails because client's IP does not match server's /etc/exports
  b. Update server's /etc/exports to allow additional hosts/subnet/etc.
  c. exportfs -a - to update the export table

No comments:

Post a Comment