Changes

Jump to: navigation, search

OPS245 Lab 5

50 bytes added, 15:25, 7 February 2021
m
Part 2: Adding Additional Virtual Hard Drives: - Moving away from using root for everything.
# Remain in your '''centos2''' VM for this section.
# Run the following commands and make note of the output of the commands:<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo ls /dev/vd*</span></code></b>,<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo ssm list</span></code></b>, and <b><code><span style="color:#3366CC;font-size:1.2em;">sudo df -h</span></code></b>
<ol>
<li value="3">Record the size of the volume group and the amount of free space</li>
<li>At the bottom left-hand corner, click '''Add Hardware''' and add a new storage device of '''2GBs''', make sure the '''Bus type''' is selected <u>'''using the same type as your first drive that's already there'''</u>. If your first drive is SATA, IDE, or VirtIO, select that.</li>
<li>Click the '''VM''' menu again, and return to the '''console''' view to access your centos2 VM display.</li>
<li>Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo ls /dev/vd*</span></code></b>, what has changed?</li>
<li>Use '''fdisk''' (''refer to how to use in Part 1'') to create a new single '''primary''' partition for '''/dev/vdb''' that fills the ''entire'' disk, save partition table (accepting default prompts would work and '''type w to write your changes'''!), restart your '''centos2''' VM.
<li> Format your new ''vdb1'' partition with file type: '''ext4'''</li>
<li>Now we'll make the new device a '''physical volume''', add it to the '''volume group''' by issuing the following commands:<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo pvcreate /dev/vdb1</span></code></b> (enter '''y''' to proceed - ignore warning)<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo vgextend centos_centos2 /dev/vdb1</span></code></b><br><br>'''NOTE:''' If you experience an error message, issue the '''sudo ssm list''' command, and check the '''volume group name''' under the '''"pool"''' section.<br>If the volume group name is different than '''centos_centos2''', then use that volume group name for all remaining commands that use "centos_centos2"<br><br></li> <li>Re-issue the '''sudo ssm list''' command to see if there is any change.</li> <li>Issue the following command to extend the logical volume for the home file-system: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo lvextend -r centos_centos2/home --size +2G</span></code></b></li>
<li>Record the size of the volume group and the amount of free space. What has changed and what caused those changes?</li>
<li>Issue the '''sudo ssm list''' command. Note that your home file-system is now 2GB bigger, and you have not even rebooted your machine since you used fdisk to create a partition!</li>
<li>'''Reboot''' your centos2 VM</li>
<li>Record the LVM Management commands in your lab log-book.</li>
932
edits

Navigation menu