Open main menu

CDOT Wiki β

Changes

OPS245 Lab 5

746 bytes added, 9 March
no edit summary
{{Admon/caution|DO NOT USE THIS VERSION OF THE COURSE. This page will no longer be updated.|'''Debian version here:''' https://seneca-ictoer.github.io/OPS245
<br>'''CentOS version here:''' https://seneca-ictoer.github.io/OPS245-C7<br>'''Andrew's version here:''' http://wiki.littlesvr.ca/wiki/OPS245_Lab_5}}
=LAB PREPARATION=
{| width="40%" align="right" cellpadding="10"
#Perform this section in your '''c7host''' machine
#Change to your '''bin''' directory.
#Download the following shell script by issuing the following command: <br><b><code><span style="cursor:default;color:#3366CC;font-size:1.2em;">wget https://ictraw.senecacollegegithubusercontent.cacom/~ops245OPS245/labs/main/monitor-disk-space.py</span></code></b>
#Try to understand what this script does (refer to man pages for the '''awk''' command), and then run the script with elevated permissions.
#Give execute permissions and run this shell script. This script is supposed to notify the root user by email if there are any potential partition size issues.
=INVESTIGATION 2: MANAGING HARD DISK SPACE USING LVM=
 
{{Admon/caution|DO NOT USE THIS VERSION OF THE COURSE. This page will no longer be updated.|'''Debian version here:''' https://seneca-ictoer.github.io/OPS245
<br>'''CentOS version here:''' https://seneca-ictoer.github.io/OPS245-C7}}
An application called '''LVM''' is a very useful tool for Linux system administrators to easily manage file systems, in some cases, even when the computer system is running!
<ol><li value="13">You <u>'''must'''</u> '''restart''' your centos2 VM to allow changes to take effect.</li>
<li>Verify that you created this partition by issuing the following command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo fdisk -l /dev/vda</span></code></b></li>
<li>Re-issue the '''ssmlist''' command. Do you see a new /dev/vda3 partition under Physical Volumes?</li>
<li>To add the newly created partition, you need to add it into LVM to be used. Issue the following command to add the partition into LVM: <br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo pvcreate /dev/vda3</span></code></b> (or ''pvcreate /dev/sda3'' ) (enter '''y''' to proceed - ignore warning)</li>
</ol>
# Switch to your '''c7host''' machine.
# Open a shell terminal, change to your user's '''bin''' directory.
# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget https://wwwraw.dropboxgithubusercontent.com/sOPS245/labs/main/maykcm83hhopwyh/lab5-check.bash?dl</span></code></b><!--<br />For Andrew's sections use this script instead:<b><code><span style="color:#3366CC;font-size:1.2em;">wget http://littlesvr.ca/ops245/lab5-check-andrew.bash</span></code></b>-->
# Give the '''lab5-check.bash''' file execute permissions (for the file owner).
# Run the shell script (with elevated permissions) and if there are any warnings, make fixes and re-run shell script until you receive "congratulations" message.