[Openstack] Difference between df and fdisk when using root disk.

Robert Collins robertc at robertcollins.net
Wed Dec 12 23:17:59 UTC 2012


On Thu, Dec 13, 2012 at 12:14 PM, 이창만 <cm224.lee at samsung.com> wrote:
> Hi, list.
>
> I observed very strange things. Disk usage and partition size is different.
> I made a instance using cirros.img and it has 2GB RAM, 1VCPU, 20GB Disk.
> But I could just use 9.2M in 20GB.
> Could anyone explain this? How can I use whole 20GB Root disk?
>
>
> $ mount
> /dev/vda1 on / type ext3
>
> $ fdisk -l /dev/vda1
> Disk /dev/vda1: 21.5 GB,
>
>
> $ fdisk -l /dev/vda1
> Disk /dev/vda1: 21.5 GB,
>
>    Device Boot   Start      End       Blocks  Id   System
> /dev/vda1   *    16065  41929649   20956792+  83   Linux
>
>
> $ df -h
> Filesystem        Size      Used    Available   Use%   Mounted on
> /dev/vda1        23.2M     12.9M         9.2M    58%   /

You need to ext2resize /; in Ubuntu images cloud-init does this automatically.

-Rob
-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Cloud Services




More information about the Openstack mailing list