I have dual booted with Windows, I have allocated Windows for 180GB and For Ubuntu 46GB. Recently I wanted to increase Linux root partition hard drive space and I shrink from windows and unallocated space created.

enter image description here

Now I cannot shrink it to boot partition of Linux, Whenever I tried to click resize/move on /dev/nvme0n1p4 it simply says there is no unallocated space to add.

enter image description here

I tried Gparted live boot also, I get the same response. Now I want to merge all the unallocated to space to my Linux root partition(/dev/nvme0n1p4) how to do it?

And Why am I having 3 separate unallocated space? Can I not merge them to single?

root@tom-linux:/home/tom# resize2fs /dev/nvme0n1p4
resize2fs 1.43.4 (31-Jan-2017)
The filesystem is already 12207104 (4k) blocks long.  Nothing to do!
  • 2
    First, the reason it's not letting you extend your Linux partition is because there is no unallocated space immediately after your Linux partition. (You can only extend a partition if there is free space right after it, unless you're using LVM). Second, no, you cannot merge all the unallocated space together unless you're using LVM. May 7 '17 at 21:24
  • 2
    @Alban - Moving partitions is bad idea to begin with, and it's an extremely bad idea on an SSD, as moving partitions will use up tons of write cycles. Not to mention it may also cause the drive to overheat, given that the OP is using a tiny NVME drive. Finally, (and this is true even with a HDD), moving partitions is a very risky operation that may result in data loss. TL;DR: do not move partitions, especially on an SSD! May 7 '17 at 21:26
  • @AndroidDev So Should I install LVM now? May 7 '17 at 21:29
  • 2
    @Thamaraiselvam You can't simply just run a command to "install" LVM. If you want to use LVM, you will need to format the entire drive and reinstall everything from scratch. Not to mention, Windows doesn't even support being installed on LVM. So no, you probably don't want to use LVM... May 7 '17 at 21:31
  • 2
    @Thamaraiselvam You could delete your swap partition, and extend the root volume into the unallocated space, leaving just enough unallocated to recreate the swap partition at the end. May 7 '17 at 21:36

It appears that your goal is to provide more space on your / mounted partition. AndroidDev has done a fine job explaining why a number of options aren't a good fit for you in the numerous comments.

I can offer you a viable alternative solution however:

Any large directory in your / mounted partition can be copied to a new partition created in your unallocated space.

You can find an appropriate candidate by using Disk Usage Analyzer AKA Baobab. Compare the space used by the files there with the size of your unallocated space. If the unallocated space is larger, You can simply create a new partition in the unallocated space, move the content of the large directory there, freeing up space on your / parition and then mount the newly created partition at the source directory.

If anything about this answer is unclear or you need assistance in it's application, feel free to drop me a comment and I'll do my best to clarify/assist.

  • Thanks, @Elder Geek, I have already fixed it with Android Dev's help. Just created unallocated space near that drive then it worked. Also Live booted GParted so I could unmount primary partition and resized it May 9 '17 at 8:02
  • 1
    @Thamaraiselvam I'm glad you got it sorted! :-)
    – Elder Geek
    May 9 '17 at 13:08

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