Open main menu

CDOT Wiki β

Changes

OPS335 NFS Lab

129 bytes added, 17:01, 23 February 2016
no edit summary
#Issue the following command in order to add (or "build") the server's list of permitted exports: <br>'''exportfs -r'''
#Run and record the output of the following commands in your lab logbook:<br>'''exportfs'''<br>'''showmount -e'''
#You will have to adjust your firewall settings on your VM2 machine to allow NFS to work (Tip: run the '''netstat''' command in order to determine the <u>'''ports '''</u> needed and issue the appropriate ''iptables'' command or commands). Make certain to save your current iptables rules so they remain unchanged whey you reboot your NFS server and your client VM.
===Setting up &amp; Testing the NFS Client (VM3)===
#Add the following line to the bottom of the '''/etc/fstab''' file on your VM3 machine:<br>'''192.168.x.3:/home /home nfs4 defaults 0 0'''
{{Admon/important|Warning: Do not change any other lines in this file. |Do not change any lines in '''/etc/fstab''' file contained for your VM3 machine. Doing so can cause your VM3 machine not to boot properly.}}
<ol><li value="5">Run the following command to confirm that SELinux will not block the network share:<br>'''setsebool -P use_nfs_home_dirs 1'''</li><li>Issue the following command to mount any network shares without having to logout and login to your VM3:<br>'''mount -a'''<li>Create an empty file within the regular user's home directory on your VM3 machine. <li>Issue the ls-l command for VM2 regular user's <u>'''home'''</u> directory. Do you see a file that you created there?</li><li> Switch to your '''VM2''' machine and view the contents on your regular user's <u>'''home '''</u> directory. What you do you notice? what What does this mean in terms of using NFS? Record your observations in your lab logbook.</li><li>'''Restart your VM3 machine''' and login with your regular user id.</li><li>Make certain that you iptables rules are the same to allow NFS to work</li><li>Check that the VM3 regular user's <u>'''home '''</u> directory is mountedby issuing the following command:<br>'''mount | grep /home'''</li><li>If it is not, try running '''mount /home''' as root and observe any errors.</li><li>Create another file in the regular user's home directory on your '''VM3''' machine.</li><li>Switch to your '''VM2''' machine to see if you can view that file.</li><li>Finally, switch to your '''VM3''' machine and shutdown this machine. Finally, switch to your NFS server ('''VM2''' machine) and issue the '''ls -l''' command in the your VM3 regular user's home directory to check if you can still view and access that file that was created in your VM3 machine. If not, what is note the reason why you cannot view or access the file? Record your answer in your lab logbookcontents.</li></ol>
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
13,420
edits