Changes

Jump to: navigation, search

OPS235 Lab 5

218 bytes added, 09:33, 5 October 2016
no edit summary
#At the fdisk prompt, issue the command <b><code><span style="color:#3366CC;font-size:1.2em;">p</span></code></b> to review the partition information.
#Enter the command <b><code><span style="color:#3366CC;font-size:1.2em;">w</span></code></b> to save partition table and exit (ignore WARNING message).
#{{Admon/important|You MUST reboot your centos2 VM|You MUST now reboot your centos2 VM before proceeding!}} <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;">fdisk -l /dev/vda</span></code></b></li>#<li>Re-issue the '''ssm''' 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;">pvcreate /dev/vda3</span></code></b> (or ''pvcreate /dev/sda3'' ) (enter '''y''' to proceed - ignore warning)</li># <li>Issue the following command to add your new-created and formatted partition called /dev/vda3 to your volume group:<br><b><code><span style="color:#3366CC;font-size:1.2em;">vgextend centos_centos2 /dev/vda3</span></code></b></li># <li>Create a new logical volume by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">lvcreate -L 2G -n archive centos_centos2</span></code></b></li># <li>Format your newly-created partition by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">mkfs -t ext4 /dev/centos_centos2/archive</span></code></b></li># <li>Issue the '''ssm list''' command to view the new physical volume and logical volume information.</li># <li>Reduce the file-size by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">lvreduce -r -L 0.5G centos_centos2/archive</span></code></b></li># <li>Issue the '''ssm list''' command to verify.</li># <li>Increate the file-size by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">lvextend -L 1G centos_centos2/archive</span></code></b></li># <li>Issue the '''ssm list''' command to verify.</li></ol>
13,420
edits

Navigation menu