I recently installed Ubuntu 19.04 and allocated 50 GB of the SSD to Ubuntu using LVM; the remaining 190 GB is not allocated to a partition. Now I use programs consuming a lot of RAM, such as Android Studio and other developer tools which take up space. Can I store and run those programs, by placing them in the free space, or if there is a method to extend the Ubuntu partition size without going through the whole installation process?

  • 3
    Do you remember if you used LVM for your 50gb partition when you installed 19.04? – Jeff H. Apr 20 at 11:16
  • 2
    If you're not sure, open a terminal and run 'blkid' and/or 'sudo lsblk -f /dev/sda' replacing sda with your device name. – Jeff H. Apr 20 at 11:22
  • Yes I used lvm when I installed – user6917305 Apr 20 at 11:59
  • 2
    Are you confusing RAM and disk space? It sounds like you already have the software installed, so what is your issue? If you are running out of RAM, then moving things around on disk won't help very much. – Kusalananda Apr 20 at 13:42

I'll start by saying that you should have good backups before doing any manipulation of your partitions and filesystems.

Since you used LVM during the install, you can grow the size of your current 50GB Logical Volume (LV).

Start by making a new partition of the size that you want to grow by, in the free space. You can use fdisk or gdisk from the terminal for this.

Next you'll use the pvcreate command on the new partition to create a new physical volume (PV).

Then use vgextend to add the new PV to your existing Volume Group (VG). Use vgdisplay to see existing VGs.

Now there are more physical extents available within your VG that can be allocated to LVs. Use lvextend to do this.

Finally, the "container" of your filesystem is now larger but you need to grow your existing filesystem to fill the now larger LV. If you used ext4, use resize2fs and if you used xfs you'll instead use xfs_growfs


You have a few options, but you seem to be asking about two things (heavy RAM usage, and file storage). I will address both.

Not enough RAM

If you don't have enough RAM, then adding a swap partition can help (you can also use a swap file, but partition is (I think) more efficient. Use gparted program, to add a swap partition.

More space for files

You can extend the current partition, or add a new partition. There are advantages to each strategy.

  • With more partitions there is more opportunity to wast space (In the future these may be free space on the wrong partition), however there are ways to deal with this.
  • Having a separate root and home partition, makes it easier to manage, when you upgrade the Operating System. You don't have to change the home partition.
  • Adding a partition to the free space can be done easily (with gparted program).
  • Resizing / extending a partition requires you to take it off-line, so for the root partition you will have to shutdown and use a live OS (boot from USB or CD, the gparted program, in the gparted distro is a good for this job).
  • If you add a new partition, you way want to move all of the /home into it, and then mount it over /home.
  • 1
    It may not be necessary to take his device offline in order to grow the partition, if he used LVM. – Jeff H. Apr 20 at 11:24
  • I understand the available ways stated here but I wish to know how to extend my ubuntu drive or store programs into the free space drive. Is there a way to do it? – user6917305 Apr 20 at 11:54
  • gparted live distro boot from USB, if you choose to resize. or gparted program, to add a new partition. If you tell us which root you are planning to do, then I may add more detail. – ctrl-alt-delor Apr 20 at 15:25

I found out that Ubuntu offers an option to resize the partition size on disks. I could hence do it and upgrade my partition size to 150 gb

  • Can you tell us a little more, what program. (in case someone else finds this in a search). – ctrl-alt-delor Apr 20 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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