Log into your cloud instance as root using SSH.
Verify upgraded size
You can verify the size of the drive had been upgraded by running fdisk.
Notice: If you see this output, you are using a pre-LVM Codero Cloud instance.
Notice: If you see this output, you are using a LVM Codero Cloud instance.
Verify current diskÂ
Check the current size of the disk by running the df (disk free) command.
Resize the disk (pre-LVM Codero Cloud instances)
Resize the disk using the resize2fs command.
Resize the disk (LVM Codero Cloud instance)
1. RunÂ fdisk /dev/xvda.
2. Create a new partition (n). Make it primary (p). The start and end should be the defaults provided by fdisk.
2. Write the changes (w).
4. Reboot the VM so the kernel picks up the partition changes.
5. RunÂ pvcreate /dev/xvda3Â to make /dev/xvda3 a LVM partition.
6. Determine your vgname by running vgdisplay. It should be one of debian, ubuntu, redhat, fedora, oracle.
7. Run vgextend vgname /dev/xvda3Â to add /dev/xvda3 to the vgname volume group. Remember to substitue the correct name discoverd in step 6 for vgname.
8. Run lvresize -r -l +100%FREE vgname/rootÂ to resize the / partition. Remember to substitute the correct name discovered in step 6 for vgname.
9. Run df -H. You should now see the increased size on the / partition.Â