Changes

Jump to: navigation, search

OPS235 Lab 5 - CentOS7 - SSD

47 bytes removed, 17:30, 13 June 2016
no edit summary
[[Image:mount.png|thumb|700px|right|Using the '''mount''' command with no arguments displays file-systems that are already mounted. The Linux system administrator can use the '''mount''' and '''umount''' commands to connect and disconnect different partitions from the file-system to perform maintenance.]]
# Perform this part in your '''centos2''' VM.
# As you may recall in Part 1 of Investigation 1, we created another logical volume called '''archive''' using Issue the graphical application '''systemfollowing command to create a mount-config-lvm'''. This logical volume should be mounted point (connecteddirectory to connect /dev/dva3 partition to) to our existing file:<br><b><code><span style="color:#3366CC;font-system (2GB)size:1.2em;">mkdir /archive</span></code></b># Issue the following commandto mount the partition: <br><b><code><span style="color:#3366CC;font-size:1.2em;">mount-t ext4 /dev/vda3 /archive</span></code></b># What is Use the ls command to view the purposed contents of issuing this command without arguments? Can you see the '''/archive''' mount point?# Confirm that the directory named '''/archive''' is mounted.What do you see?# You can use Issue the '''umountmount''' command to unmount a file-system (eg. for maintenance purposeswithout arguments). Note the the name of the command is umount, <u>not</u> unmountto confirm it has been mounted.# Make certain you are not located in the Unmount /archive directory, and issue arhive by issuing the following command to unmount the /archive directorycommmand:<br><b><code><span style="color:#3366CC;font-size:1.2em;">umount /archive</span></code></b># Issue the '''mount''' command (without arguments) to confirm it has been unmountedmounted.# We will now edit the /etc/fstab file in order to have the /dev/vda3 partition automatically mounted to the /archive directory upon system boot-up <ol><li value="8">View the contents of the file-system table '''/etc/fstab ''' by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">cat /etc/fstab</span></code></b></li># <li>Note the line that automatically mounts a file-system (''/dev/sda3'', type ''ext4'') to '''/archive'''. This was automatically performed for you via the '''system-config-lvm''' utility.</li># <li>View and record the fields for the '''/archive''' mount in your lab logbook, and then issue the following command to reconnect or mount '''/archive''':<br><b><code><span style="color:#3366CC;font-size:1.2em;">mount &nbsp; -t ext4 &nbsp; /dev/centos_centos2/archive &nbsp; /archive</span></code></b><br><br>'''NOTE:''' If you are having problem mounting, use the /dev pathname listing in your /etc/fstab file.<br><br></li># <li>Confirm that this file-system has been properly mounted. Note: You could have also issued the command: '''mount -a''' to <u>automatically</u> mount the file-systems contained in the '''/etc/fstab''' file.<br><br>Tip: If you had to do manually configure /etc/fstab (eg. only in text-based mode - centos3), you could have issued the command (as root):<br> <b><code><span style="color:#3366CC;font-size:1.2em;">echo "/dev/centos_centos2/archive /archive ext4 defaults 1 2" >> /etc/fstab</span></code></b><br>(although we don't need to do this, since it was already done).<br><br></li></ol># '''A curious question''': If root needs to unmount the '''/home''' directory for maintenance but we had to first login in graphically as a regular user, then su to "root", isn't our regular user still logged in so we can't un-mount the /home directory?!? How can we as a Linux System Administrator get around the problem (hint: you already learned it somewhere in lab3!!! Wow, using what we already taught can pay-off in the future ... lol!).
'''Answer the INVESTIGATION 2 observations / questions in your lab log book.'''
13,420
edits

Navigation menu