Changes

Jump to: navigation, search

OPS235 Lab 5 - CentOS7

443 bytes added, 12:15, 27 November 2019
no edit summary
{{Admon/caution|THIS IS AN OLD VERSION OF THE LAB|'''This is an archived version. Do not use this in your OPS235 course.'''}}
[[Category:OPS235]]
The purpose of this lab is to discuss demonstrate how a Linux system administrator can monitor hard disk space availability, and to manage file system size via the Logical Volume Manager (LVM) application. This lab will also demonstrate how to manually mount (i.e. connect) and unmount (disconnect) partitions to file system directories, and demonstrate how to have partitions including adjusting the size of their automatically mounted to directories upon Linux systems if space is requiredsystem startup.
<u>Main Objectives</u>
*[http://www.cyberciti.biz/faq/howto-format-create-linux-filesystem/ mkfs]
*[http://man7.org/linux/man-pages/man5/fstab.5.html /etc/fstab]
*[http://v1code.corenominaltutsplus.orgcom/howtotutorials/scheduling-setuptasks-awith-crontabcron-file/ jobs--net-8800 Using crontab]
|}
</ol>
</li>
<li>Click on '''Logical View''' (i.e. above home, root, swap) and then click '''Create New Logical Volume''' button. What happens? Why do you think this happened?<br><br>We will now create another partition ('''/dev/vda3''') using the '''fdisk''' utility, format this newly-created partition so we can create another logical volume called '''archive'''.<br><br> </li>
<li>Quit the '''system-config-lvm''' application.</li>
<li>In the terminal as root, issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">ls /dev/vd*</span></code></b><br><br>'''NOTE:''' If nothing displays, issue the command: '''ls /dev/sd*''' and use that device pathname '''/dev/sda''' instead.<br><br>
'''Answer Part 1 observations / questions in your lab log book.'''
 
===Part 2: Managing LVM Via Command Line & Adding Virtual Hard Drives===
<br><br>
<ol>
<li value="5">Quickly view the tutorial about the <b>[http://v1code.corenominaltutsplus.orgcom/howtotutorials/scheduling-setuptasks-awith-crontabcron-file/ jobs--net-8800 Using crontab]</b> file to understand the purpose of this
file and how to basically set up a schedule to run a shell script.</li>
<li>Issue the following command to setup a crontab entry for root:<br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">crontab -e</span></code></b></li><li>Enter the following line in order to run at 6:00 on the first day of every month:<br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">0 6 1 * * /root/monitor-disk-space.bash #Runs first day of each month (6:00 am)</span></code></b></li><li>'''Save''' the crontab entry.</li><li>Confirm that the entry was properly saved by issuing the following command:<br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">crontab -l</span></code></b></li></ol>

Navigation menu