1

I want to merge unallocated space to an ext4 partition. But gparted seems to prevent this. I cannot extend the partition.

see screenshot: merge unallocated with sda5.

enter image description here

migrated from serverfault.com Nov 23 '18 at 20:52

This question came from our site for system and network administrators.

  • That ntfs partition, is probably just wasted space, left over from a previous Microsoft Windows install. – ctrl-alt-delor Nov 24 '18 at 0:05
  • Thank you for the acceptance! Favour returned, question upvoted! ;-) – Fabby Nov 24 '18 at 21:13
1

That's because you have unallocated space outside of the extended partition (sda3) which contains the partition you want to extend (sda5) so I would:

  1. Take a full system backup using CloneZilla Live¹
  2. Boot a live environment of gparted
  3. Move sda3 to the left (this will move both sda5 and sda6 as well)
  4. Extend sda3 with the now free space at the end
  5. Move sda6 to the end of sda3
  6. Extend sda5 still leaving 10% of the disk space unallocated between sda5 and sda6²

Note¹: Yes, take a backup! If you have a power failure in any of the following steps, your entire disk is toast!
Note²: That leaves you some wriggling room to extend your swap or your data (or both) in an emergency.
Note³: Yes, you can also extend sda3 to the left and then extend sda5 to the left but that will not give you the 10% spare (unallocated) space for emergency extension in the future and the entire process is going to take all night anyway.

  • Why reserve 10% OP did not ask for it. If they need swap in a hurry, they can add a file as swap. – ctrl-alt-delor Nov 24 '18 at 0:03
  • 1
    In the good old days of separate command line tools, I could extend sda3, move sda5, then extend sda5 without moving sda6. Can we not do that anymore? – ctrl-alt-delor Nov 24 '18 at 0:04
  • @ctrl-alt-delor yes, we can. (see Note³) I'm just stating an opinion what I would do... (edited to include gparted live) – Fabby Nov 24 '18 at 9:08
0

That image has a colored, not a greyed out checkmark for apply.

That means you need to apply the pending actions and reboot.

  • After the reboot, try to resize the partition.

Dont try to shrink the unallocated space.

  • Grow the partition you want bigger then apply.

And of course reboot again.

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.