Open main menu

CDOT Wiki β

Changes

OPS235 Lab 5

219 bytes added, 15:09, 13 March 2017
Adding vgrename warning
<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>
</ol>{{Admon/important|Check your VG name|Run <b>vgs</b> to determine your VG name. If it is just <b>centos</b>, you will need to rename it to <b>centos_centos2</b> using the <b>vgrename</b> command.}}<ol><livalue="17">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>