1

I fail to add the unallocated space to "/dev/nvme0n1p6 btrs/,/home" i can't move or resize either of /dev/nvme0n1p5 or /dev/nvme0n1p6 enter image description here

Mat Nouvel
  • 41
  • 5

1 Answers1

3

There are different ways you could resize your partition or filesystem.

Resizing a partition using gparted

This seems what you are trying to achieve by sharing the gparted screenshot. In parted man page it says that resizing is about:

Change the end position of  partition

Which means you need to have room after a partition to extend it. Which is not your case here. Hence the impossibility to resize.

What you will have to do is to delete your partitions 5 and 6 (if you have no data on them and you know what you're doing) and recreate new bigger partitions using and starting from the currently unallocated space.

Alternative: resizing the btrfs filesystem

I assume you're on Linux and have btrfs-progs (btrfs utilities) installed. There is a way where you can just extend your btrfs filesystem which is mounted as your /home apparently, and extend it of the size of the unallocated space.

For this is do the following:

  • create a partition from the unallocated space let's call it /dev/nvme0n1p4, you don't have to format it to anything yet.
  • continue with /home already mounted (in case it wasn't)
  • then extend the btrfs filesystem of your home as follows:
  btrfs device add /dev/nvme0n1p4 /home
  • then you can just check with df -hT that your /home mounted partition would have doubled in size.

You can also check the organization of the btrfs filesystem for your /home by calling: btrfs filesystem usage /home

Good dreams!

  • I'm using a VirtualBox machine. My `/home` directory was mounted and couldn't be resized, expanding the filesystem through the VirtualBox interface and then following the steps above helped a lot! Thanks! – LtMuffin Mar 21 '23 at 11:57