Tried to expand my / with unallocated space. Did I mess up? (I had problems uploading an image, so I posted it in Google Photos)

I was trying to expand my home & / with unallocated space on my drive. This is what I did:

I ran btrfs device add /dev/sdb5 / ( nvme0n1p9 instead of sdb5 , in my case)

DF -h / shows:

[nprev@fedora ~]$ df -h /Filesystem Size Used Avail Use% Mounted on/dev/nvme0n1p8 92G 42G 50G 46% /

But now, I have two “BTRFS, / , home” partitions. Did I do it correctly? Is it always going to look like this whenever I resize or add/remove partitions?

Is there a way to consolidate the two drives to one so it doesn’t necessarily show as “two physical devices” every time I access Disks, Files, or gparted?

I’m slowly migrating from Windows into Linux, so I’m shrinking my Windows partition and expanding my Linux partition. I’ll probably be expanding Linux several more times. I wouldn’t want to see multiple physical devices as I continue this process.

I used this site for the solution: How add more space in a Btrfs Filesystem, How add a new partition, How add a new disk, Linux

The problem is the directions you followed aren’t telling you how to enlarge a btrfs partition, they are telling you how to add two partitions into a single btrfs volume. If you do it that way, you will always see to two partitions because you really have two partitions.

Is this the correct solution?

By any chance, is there a GUI, non-CLI, or linux package I could run to do all this? I was hoping gparted live boot would have resolved this…

I feel like you are making this harder than it needs to be.

If you have a volume on a single partition you want to resize, you can just open gparted and resize it.

I am not sure if it will handle the multi-partition volume you have now though.

1 Like

So initially, I tried using gparted, and it wouldn’t let me resize root. I had unallocated 43GiB and it wouldn’t expand root. So, I gave the unallocated a volume: /dev/nvme0n1p9 , and root was on /dev/nvme0n1p8 , but I couldn’t merge the two to expand root.

I’ve done this many times on Windows (and AOMEI Partition Assistant), but I’ve been having trouble doing this on Linux.

gparted probably won’t expand the root volume if it is the running root. Boot off a live ISO and run gparted from there.

1 Like

I’ve done live boot of Fedora and a live boot of gparted. Both have been the same situation…

Two things you normally have to do:

1.) Resize the partition (partition not mounted, use Fedora live system )
2.) Resize the filesystem to the new partition size (done online while partion is mounted)

1.) you can use gparted
2.) btrfs fs resize max /mountpoint

For 2.), see 6.3. Resizing a btrfs File System Red Hat Enterprise Linux 7 | Red Hat Customer Portal

Also, I find How to resize/extend a btrfs formatted root partition | Support | SUSE quite informative (there is also “your” example where space is added by adding a new drive/partition to the volume).

Hi, I can’t open your image, maybe you could try to upload it here again.

Bellow I’m just guessing your situation.

:thinking: I’m not sure, the dev number will not give us the actual position of our partition. It could be random (depending which partition we crated first).

| sda2 | sda3 | sda 4 | sda5  | free space   | sda 1 |
| fat  | ext  | btrfs | btrfs |              | ntfs  |

Above are my situation couple months ago, but now It’s already changed much.

Let say, we want to expand sda4. First, on live USB we need to move sda5 to the right to give free space near sda 4.

| sda2 | sda3 | sda 4 | free  | sda5  | free  | sda 1 |
| fat  | ext  | btrfs | space | btrfs | space | ntfs  |

After that, we just need expand sda4.

Btw, since with live USB there are no root passwd, if you open gparted (GUI) and give a popup, just enter with blank password.

Why? BTRFS doesn’t allocate space it isn’t using so there should always be some unallocated space available until you begin to actually run out of space. If you are using another filesystem on the physical drive that you want to reuse with your BTRFS filesystem, free up the space on it then resize your BTRFS volume in Gnome Disks. Since you are doing this in a progression, you can allocate free space to either the subvolume mounted at / or the one mounted at /home. In any case, the disks have to be unmounted when you resize them I believe.