Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created new instance with Centos 6.4 with 20 GB Disk Space but when i logging to the VPS and Execute df -h the space shown as the following

Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1             984M  706M  229M  76% /
none                 1012M     0 1012M   0% /dev/shm

and the output of fdisk -l

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: 0x000a5c87

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1              17       16401     1048640   83  Linux

i need the vda1 taking all the space of vda how i can do this ?

share|improve this question

1 Answer 1

You need to resize partition, then grow filesystem:

  1. Take backup
  2. fdisk /dev/vda -> d -> 1 -> n -> p -> 1 -> 17 -> [enter]

  3. -> p

    ensure that partition is marked with asterisk (*) to be bootable, if not:

    a -> 1

    when done -> w

  4. resize2fs /dev/vda1

    (online process, wait!)

  5. reboot

Note: You are missing swap partition, you can use +xxxxM instead if [enter] to leave some space for swap partition.

share|improve this answer
    
I need this automatically when i create the instance , the default image for openstack is fedora 19 not have this problem this problem with any images like centos , windows and other , when i trying to install centos from ISO file there are not any disk appears –  Tarek Esmail Sep 7 '13 at 12:10
    
this is how it is. You need to configure parameters during installation or you need other image. –  GioMac Sep 7 '13 at 12:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.