Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You are a running Linux Server, and need to extend disk to some GB of size. In this example, a disk will be extended from 15 GB to 100 GB.

1. You need to resize disk into 100 GB from vCloud Director.

Image Added

 

2. Go to VM and check the current condition. You see the existing size is 15 GB.

Image Added

 

Let's create unallocated 85 GB to existing partition

 

3. Create partition using cfdisk

$ cfdisk

4. You see your Free space 85 GB. Enter on it. Choose New.

Image Added

 

5. Free Space now become /dev/sda3. Choose Write.

This will writing partition table.

Image Added

 

6.  Quit. and reboot if needed.

 

7.  Now check the new partition you have created.

$ fdisk-l /dev/sda

Image Added

 

8. Now let's pull it into your LVM configuration. First you'll create the physical volume.

$ pvcreate /dev/sda3

Image Added

 

9. Let's take a look at your physical volumes

$ pvdisplay

Image Added

 

10. Now, extend your volume group (ubuntu-vg) into your new physical volume (/dev/sda3)

Image Added

 

$ vgextend ubuntu-vg/dev/sda3

Image Added

$ lvdisplay

Image Added

 

11. Now, let's extend the logical volume to all free space available.

$ lvextend -l+100%FREE /dev/ubuntu-vg/root

Image Added

 

12. Extend filesystem.

$ resize2fs /dev/mapper/ubuntu--vg-root

Image Added

 

13. Now, after all successfull step, check after condition of your disk.

$ df -h

Image Added

You'll see size of disk increase from 15 GB to 97 GB.