Changes

Jump to: navigation, search

OPS235 Lab 5 - CentOS7

44 bytes added, 10:34, 12 November 2015
no edit summary
<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>
<li>Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">fdisk /dev/vda</span></code></b> <br>(or ''fdisk /dev/sda '' if the previous command didn't work)</li>
<li>At the fdisk prompt issue the command: '''p'''. What does this do?</li>
<li>Now issue the commands '''n''' (new partition), '''p''' (primary partition), '''3''' (i.e. next available partition number). When prompted for initial block, '''press enter to accept the default beginning block size''', and '''type: +2G''' at ending block (create 2GB for partition) and '''press enter'''. </li>
<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/vda3</span></code></b><br> (or '''mkfs -t ext4 /etc/sda3''')</li>
</ol>
{| width="40%" align="right" cellpadding="10"
<ol>
<li value="21">'''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/vda3</span></code></b> (or ''pvcreate /dev/sda3'' ) (enter '''y''' to proceed - ignore warning)</li>
<li>'''Restart system-config-lvm'''. You should notice a section at the bottom indicating <u>Unallocated</u> Physical Volumes. Click on the <u>unallocated</u> partition /dev/vda3 and then click '''Add to Existing Volume Group''' (click on other button in next screen to continue). The screen should now show the partition ''/dev/vda3'' contained in our default Volume Group (refer to diagram on right-side for reference).</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 (Refer to diagram on right for reference).</li>
13,420
edits

Navigation menu