Open main menu

CDOT Wiki β

Changes

OPS235 Lab 5 - CentOS7

677 bytes removed, 08:23, 18 June 2015
no edit summary
<li>At the fdisk prompt, issue the command '''p''' to review the partition information, then type '''w''' to save partition table and exit (ignore WARNING message).</li>
<li>You <u>'''must'''</u> restart your centos2 VM to allow changes to take effect</li>
<li>Open a terminal as root, and format your newly-created partition by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">mkfs -t ext4 /dev/sda3</span></code></b></li>
</ol>
{| width="40%" align="right" cellpadding="10"
|}
<ol>
<livalue="20">Restart the system-config-lvm utility. Do you see a new /dev/sda3 partition under Physical Volumes?</li>
<li>To add the newly created partition, you need to add it into LVM to be used. Exit the system-config-lvm utility and issue the following command to add the partition into LVM:<br><b><code><span style="color:#3366CC;font-size:1.2em;">pvcreate /dev/sda3</span></code></b></li>
<li>Restart system-config-lvm. You should notice a section at the bottom indicating Unallocated Physical Volumes. Click on that section and click on the button to add that unallocated Physical Volume to our current Volume Group. The screen should then show the partition /dev/sda3 contained in our default Volume Group.</li>
<li>Click on Logical View (i.e. above home, root, swap), and then click on '''Create New Logical Volume''' button and fill out the details for this new logical volume including: size: '''1GB''', LV Properties: '''linear''', file system: '''ext4''' file system name: '''archive''', select '''mount''' and mount it at: '''/archive'''. Have the system create the directory /archive if it does not exist.</li>
<li>Confirm that this new Logical Volume now exists by changing to the directory /archive. Did you need to restart your centos2 VM to confirm that the '''/archive''' directory is now on your '''centos2''' VM?</li>
</ol> <li>Let's see what happens when we copy data over Use system-config-lvm to '''lv_archive''', and then '''reduce the size of lv_archive'''resize (i. Complete the following steps below: <ol type="a"> <li>Issue the following command: <b><code><span style="color:#3366CC;font-size:1e.2em;">cp -R /etc/* /archive </span></code></b> </li> <li>Shrink edit) the size of '''lv_archivearchive''' logical volume to '''1 .5 GB'''. What happens?</li> <li>If you could not shrink the size of '''lv_archive''', what do you think is the cause for the problem?</li> </ol>    <li>On the left-hand side, click on the '''Logical Volume''' containing the '''home''' file-system.</li> <li>Click on '''Edit Properties'''.</li> <li>Change the size to '''4 GB''' and click '''Ok'''verify your results.</li> <li>Verify that the '''home''' file-system has increased in size.</li> </li>
</ol>
13,420
edits