|  | Exercise: NFS client configuration
Install the NFS related packages by using apt-get
 on  n01 VM:
 Run command rpcinfo pointing at the server
    If you see the same output as on the NFS server, it means the server
    allows you to access the rpcbind and the rpc services. 
    Check what directories are exported to you from the server:
    It should show 
    Now you are ready to mount its directory on n01. 
    Create a new mounting point and mount the exported directory onto it 
 via NFSv3:
    To make sure the directory has been mounted, run command
Run also
    The mounted directory shows up in the bottom of the file 
    systems list:
   To see who is the owner of the files
    in the directory, run command 
    Since there is no user with UID=666 and GID=666
 on the node,
    the mounted directory would belong to a non-existent user: 
    Create user edward with UID=GID=667:
Assign password to the user:
Now   try to change the ownership of the directory on the node:
It doesn't work:
 Change the UID and GID of edward to be consistent with those on the NFS server:
 Become user edward then step into directory /NFS/home:
and see if you can create files in
   this directory:
 Exit from user edward account:
   Unmount the directory, 
Mount the directory as NFSv4:
Run command below to verify that the directory has been mounted:
 Reboot n01 by executing command reboot and check if the NFS directory is no longer mounted after reboot:
 
 
   Modify file /etc/fstab by including a new entry with 
 /NFS/home:
   Then run 
   Check if it is mounted
 Unmounting busy directories.
 Open another terminal on your desktop and ssh to n01 as user
 edward. You can figure out the IP address of n01 by
 running command ifconfig in the 'root' console of n01.
For example, if n01 has IP address 192.168.122.64, the ssh command on the desktop  looks as follows:
 
Note, in your KVM environment the IP address of n01 may be different.
 
 In the 'root' console of n01 try to unmount the directory:
   If the directory can not get unmounted and you receive error message
  "device is busy", check what processes hold the directory by executing
  command lsof +D  on the file system.
   Specifically, in our case:
   Kill the process, for example with PID 1367, and try to unmount the directory again.
 Remove the NFS entry from /etc/fstab
 Try to avoid NFS mounting through /etc/fstab. Use either
manual mount or automount.
 
 
 
 
  |  |