Changes

Jump to: navigation, search

OPS335 NFS Lab

585 bytes added, 17:48, 4 March 2016
no edit summary
'''Perform the following tasks:'''
#make certain that your '''VM3''' machine can connect to the network and that your '''VM1''' machine is running as the DNS server (Tip: you can use the "host cbc.ca" command to see if DNS queries are being answered. #Since the nfs package was installed when you cloned the machine, Make certain that you are not required to install the logged into your '''nfsVM3''' or machine.#Install the '''nfs-utils''' packageon your '''VM3''' machine.
#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 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 mounted by 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, issue the '''ls-l ''' command in your VM3 regular user's home directory to note the contents.</li></ol>
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
#Switch to your '''VM3''' machine.
#Unmount the /home directory from VM2 by running '''umount /home'''
#Comment or remove the line that you added in the '''/etc/fstab''' file in the previous investigation.
#Restart your '''VM3''' machine.
#Install the '''autofs''' package by issuing the following command:<br>'''yum install autofs'''
#Rename the existing file '''/etc/auto.master ''' file by issuing the following command:<br>'''mv /etc/auto.master /etc/auto.master.orig'''<br>Keep this file as a back-up in case you need to restore the file in the future.#Use the vi text editor to create the file a new (empty) '''/etc/auto.master''' file and add the following line to the empty file:<br>'''/home /etc/auto.home --timeout=60'''
#Save your editing changes.
#Use the vi text editor to create a file called '''/etc/auto.home'''#Add and add add the following line in this file:<br>'''* &nbsp; -fstype=nfs4,rw,nosuid,soft &nbsp; 192.168.x.3:/home/&'''
#Save your editing changes.
#Use the '''systemctl ''' command to start the '''autofs servoce''' service, and another systemctl command in order to ensure that the autofs service will automatically start at boot.#Log out of and back into '''vm3''' using your learn <u>regular</u> user account (i.e. not root. You should be in your regular user accountfor both VM2 and VM3 machines).
#Open a terminal and enter the following command:<br>'''mount | grep home'''
#How does it differ from the previous mount? Record your findings in your lab logbook.
#Create On your '''VM3''' machine, create another empty file with the name:<br>'''touch another_empty_file_from_vm03yet_another_empty_file_from_vm3'''#Run and record the output of the following command(on both your VM2 and VM3 machines):<br>'''df -hT'''#Switch to the nfs server (ie. VM2 machine'''vm2'''), run and record the output of '''ls -l''' in your home directory (You should see the files you created on vm03).#You may encounter errors with SELinux during the lab (though it has not been a problem recentlyvm3). It is required that you leave it running.#Use the following commands to determine what booleans need to be flipped:<br>'''audit2allow < /var/log/audit/audit.log'''<br>'''audit2why < /var/log/audit/audit.log'''#Now that you have VM3 automatically mounting home directories from your VM2machine, repeat the steps in this investigation in order to configure your '''VM1 ''' machine to do the same.
'''Record steps, commands, and your observations in INVESTIGATION 2 in your OPS335 lab log-book'''
 
==COMPLETING THE LAB==
'''Arrange proof that ...evidence (command output) for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:'''
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Show mount information regarding vm3 and vm1 shares with NFS server (vm2)
::<span style="color:green;font-size:1.5em;">&#x2713;</span> All files shown in network server (vm2)
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Display contents of '''/etc/exports''', '''/etc/auto.master''' and '''/etc/auto.home''' files
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Lab logbook completed
==EXPLORATION QUESTIONS==
#What is the role of the /etc/mtab file on the nfs server?
#What port does nfs-server use?
#What is the purpose of the testparm command?
#What does SMB stand for? CIFS?
13,420
edits

Navigation menu