0

I'm running ubuntu 14.04 on virtualbox and recently allocated extra storage to the OS.

/dev/sda now shows a total storage of 80 Gb. however, 72 gb lies in unallocated partition.

I'm unable to modify/resize this unallocated partition enter image description here

the vdi is currently stored in a windows drive that has 160 GB of free space.

this is the output of fdisk -l

enter image description here

I'm not sure how to approach this problem. i went through some of the old articles with the same problem but nothing seems to work.

Jayaram
  • 123
  • To use unallocated space you have to create a partition, and format it. See e.g. http://askubuntu.com/questions/248189/why-does-virtualbox-virtual-disk-not-grow-automatically – Takkat Mar 23 '16 at 12:08
  • initially ... i thought the problem was due to me having a snapshot on my vdi file which prevented me from having extra space. .. one of the links suggested that i clone the vdi without a snapshot .. which is what i did .. i then proceeded to move the clone to a new drive since the original drive did not have 80gb of free space. But i'm still getting the above error – Jayaram Mar 23 '16 at 12:13
  • @Takkat - i actually resized the vdi file using --resize in windows. the problem now is the guest OS doesnt seem to recognise the additional storage space given to it(or so i think). – Jayaram Mar 23 '16 at 12:17
  • @Kunkka: it does recognize it, see your gparted shot. To use it it needs a formatted partition in addition. – Takkat Mar 23 '16 at 12:20
  • I created a partition ... it seems to work now .thank you :). however , it is not the root partition ... is there some way i can move the space to the root? – Jayaram Mar 23 '16 at 12:28

1 Answers1

0

Your 72Gb of space, which you have now formatted, is in an extended partition. Extended partitions are nice, as you are not limited to 4 primary partitions anymore. However, from your setup, and what you are trying to acheive, it doesn't look like you need bother with extended partitions. So, here is what I would do.

  1. Unmount your swap space.

    swapoff -a

Alternatively, right click the swap space in gparted and select swapoff.

  1. In Gparted, delete your new 72Gb partition.

  2. In Gparted, delete your swap partition.

  3. In gparted, delete your extended parition.

Deleting the partitions is done by right clicking the partition, and selecting delete.

  1. In Gparted, select your main primary partition, and resize it. Make sure to leave enough free space at the end for a swap partition.

  2. In Gparted, create a second primary partition at the end.

  3. In Gparted, format your second primary partition as swap.

  4. In Gparted, apply the changes and exit.

  5. Probably a good idea to reboot.

hatterman
  • 2,280
  • 2
  • 22
  • 33