Open main menu

CDOT Wiki β

Changes

OPS235 Lab 5 - CentOS7

1,772 bytes added, 08:33, 18 June 2015
no edit summary
</ol>
</li>
<li>Click on '''Logical View''' (i.e. above home, root, swap) and then click '''Create New Logical Volume''' button. What happens? Why do you this happened?</libr> <libr>LetWe will now create another partition ('''s Create a new partition for /dev/sda by sda3''') using a graphical the '''fdisk''' utility , format this newly-created partition so we can create another logical volume called: gparted (stands for G Partition Editor)'''archive'''.<br><br> </li> <li>While Quit the '''system-config-lvm utility is running, open another terminal and login as root''' application.</li> <li>Issue In the terminal as root, issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">yum install gpartedfdisk /dev/sda</span></code></b> </li> <li>Verify that 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, and type +2G at ending block (create 2GB for partition). </li> <li>At the fdisk prompt, issue the command '''rootp''' logical volume is now to review the partition information, then type '''6GBw'''to save partition table and exit (ignore WARNING message).</li> <li>NowYou <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> <li>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: '''lv_archivearchive''', 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 existsby 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 to '''lv_archive''', and then '''reduce the size of lv_archive'''. Complete the following steps below:
13,420
edits