Open main menu

CDOT Wiki β

Changes

OPS235 Lab 5 - CentOS7 - HD2

766 bytes removed, 09:46, 5 October 2016
no edit summary
<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;">pvcreate /dev/vdb1</span></code></b> (enter '''y''' to proceed - ignore warning)<br><b><code><span style="color:#3366CC;font-size:1.2em;">vgextend centos_centos2 /dev/vdb1</span></code></b></li>
<li>Re-issue the '''ssm list''' command to see if there is any change.</li>
</ol>
<br>
:'''NOTE:''' There is a problem extending the home logical volume because we logged in as a regular user (prior to logging in as root), thus the /home directory cannot be unmounted in order to extend the logical volume for centos_centos2/home. We can get around this problem by changing our '''run level to 1 (single-user mode)''' and unmount the '''/home''' partition.
<br>
<ol>
<li value="10">Issue the following command as root to change the run-level to 1 (single-user mode): <b><code><span style="color:#3366CC;font-size:1.2em;">init 1</span></code></b></li>
<li>Enter your root password</li>
<li>Issue the following command to unmount the /home partition: <b><code><span style="color:#3366CC;font-size:1.2em;">umount /home</span></code></b></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;">lvextend 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>
13,420
edits