Openstack Instance does not use the entire hard disk

asked 2015-07-08 09:09:53 -0500

Mike nour gravatar image

updated 2015-07-08 09:21:43 -0500

I created new vm instance using "Ubuntu Server 10.04 LTS (Lucid Lynx) - 32 bits" image and m1.small falvour which has 20 GB Disk (OpenStack Icehouse). When i logging to the vm and run df -h , I found that the VM does not use the entire assigned HD. The command results are shown as the following:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1             1.4G  595M  721M  46% /
none                 1005M  144K 1005M   1% /dev
none                 1007M     0 1007M   0% /dev/shm
none                 1007M   36K 1007M   1% /var/run
none                 1007M     0 1007M   0% /var/lock
none                 1007M     0 1007M   0% /lib/init/rw

The "fdisk -l" shows the DH size is 20 GB:

Disk /dev/vda: 21.5 GB, 21474836480 bytes
4 heads, 32 sectors/track, 327680 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cb9da

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *          17       32768     2096128   83  Linux

I need the vm to take the full space assigned to it. Any idea how could I fix it? I want the solution to be applied on each vm I create, so I do not want to manually update the VM after instantiation. I also must use 10.04 image ( can not upgrdate to 14.04)

edit retag flag offensive close merge delete