13,420
edits
Changes
no edit summary
#You <u>'''must'''</u> '''restart''' your centos2 VM to allow changes to take effect.
#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>
#Re-issue the '''ssm''' command. Do you see a new /dev/sda3 partition under Physical Volumes?
#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)
# 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>
# Create a new logical volume by issuing the following command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">lvcreate -L 1G -n archive centos_centos2</span></code></b> # Format your newly-created partition by issuing the command: <b><code><span style="color:#3366CC;font-size:1.5G 2em;">mkfs -n t ext4 /dev/centos_centos2/archive </span></code></b># Issue the '''ssm list''' command to view the new physical volume and logical volume information.# Reduce the file-size by issuing the command: <b><code><span style="color:#3366CC;font-size:1.2em;">lvreduce -L 0.5G centos_centos2/archive</span></code></b>#Issue the '''ssm list''' command to view the new physical volume and logical volume information.
{| width="40%" align="right" cellpadding="10"