0

I expanded my Ubuntu disk space using vmware setting menu, but still the same amount of disk is showing up in Ubuntu. Is there a way to link that added space to Ubuntu without the need for installing Ubuntu from scratch on the virtual machine?

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
1      1049kB  23.6GB  23.6GB  primary   ext4            boot
2      23.6GB  32.2GB  8587MB  extended
5      23.6GB  32.2GB  8587MB  logical   linux-swap(v1)

and gparted output: http://tinypic.com/r/ac7pjr/8

5
  • 1
    Probably it increased the virtual disk size, but not the partitions it contains. So you would have to enlarge the partition manually. Run gparted to do this. Do you need more explanations?
    – Byte Commander
    Feb 14, 2015 at 22:42
  • is gparted going to harm any of the stuff that I already have in Ubuntu? i.e. formatting them? Feb 14, 2015 at 22:43
  • Only if you tell it to do so or mess it up. If you do nothing but increasing the size of your partition, it should be safe. However, it is always recommended to do a backup before partitioning. But theoretically, the only operations that can be dangerous are moving the left border of partitions and shrinking partitions. Of course you can also delete and format partitions, but it will not happen by accident. (as always: you operate on your own risk. I am not responsible for any damages!)
    – Byte Commander
    Feb 14, 2015 at 22:46
  • so, I have 22GB on dev/sda1 which is flagged as boot. I have 8GB on extended on dev/sda2, 8GB on linux-swap on dev/sda5, and 20GB unallocated. Can I add the allocated space to my dev/sda1 by resizing, or it will mess up things and it is safer to create a separate partition for it? Feb 14, 2015 at 22:51
  • Could you post the output of sudo parted -l as an edit to your question (use code formatting)? It would give us more detail about your partitioning than you described in your comment. Thanks
    – Byte Commander
    Feb 14, 2015 at 22:56

1 Answer 1

0

Use gparted to change the partitioning of your system.

  • You will have to enlarge the extended partition (/dev/sda2) to fill out the whole disk.
  • Then move the swap partition sda5 to the end (right) of the extended partition.
  • After that, shrink the extended partition back to its original size by moving the left border, so it resides at the end of the drive and does not contain any unpartitioned space besides the swap partition.
  • Finally enlarge the main partition sda1 to cover all unpartitioned space.

You have to apply the changes in gparted by clicking the green tick. If it causes errors, try it again with applying the changes after each step.

3
  • On gparted: dev/sda2 doesn't have resize option enabled. Only dev/sda1 allow resizing. This is the snapshot of the gparted: tinypic.com/r/ac7pjr/8 Feb 14, 2015 at 23:11
  • for the rest, this is helpful: youtube.com/watch?v=cDgUwWkvuIY Feb 14, 2015 at 23:43
  • You have to unmount the extended partition sda2 (and the logical partition it contains sda5 = swap) first, because ext4 allows only enlarging in mounted state, no shrinking. Another (maybe better) possibility is to boot from a live CD/DVD or USB drive and have all partitions unmounted.
    – Byte Commander
    Feb 15, 2015 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .