I have had problems with my 40GB root partition and want to transfer space from a second 400GB partition. I have BTRFS installed on top of LVM. For some reason, OpenSUSE decided this for me an installation time and I considered it made sense:
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 464.5G 0 disk `-sda1 8:1 0 464.5G 0 part |-system-swap 254:0 0 2G 0 lvm [SWAP] |-system-root 254:1 0 40G 0 lvm / `-system-opt 254:2 0 422.5G 0 lvm /optLVM sr0 11:0 1 1024M 0 rom # btrfs filesystem show Label: none uuid: 681e689d-1ac2-48ac-9fba-f6a6e234e9f5 Total devices 1 FS bytes used 28.40GiB devid 1 size 40.00GiB used 35.53GiB path /dev/mapper/system-root Label: none uuid: 90b22bed-5924-425d-ac30-03279f970fa0 Total devices 1 FS bytes used 159.43GiB devid 1 size 300.00GiB used 299.04GiB path /dev/mapper/system-opt
As you see, /dev/mapper/system-opt only has 300GB, so I have 100 GB free there as I did a btrfs resize to free 100 GB.
My problem is that I don't know how to add those 100GB into / directory (/dev/mapper/system-root). I have tried:
# btrfs device add /dev/mapper/system-opt / /dev/mapper/system-opt appears to contain an existing filesystem (btrfs). Use the -f option to force overwrite.
It seems OpenSUSE formats btrfs on top of dm-1 and dm-2 which probably map to LVM volumes.
# btrfs device usage / /dev/dm-1, ID: 1 Device size: 40.00GiB Data,single: 33.00GiB Metadata,single: 2.50GiB System,single: 32.00MiB Unallocated: 4.47GiB # btrfs device usage /optLVM /dev/dm-2, ID: 1 Device size: 422.50GiB Data,single: 297.01GiB Metadata,single: 8.00MiB Metadata,DUP: 2.00GiB System,single: 4.00MiB System,DUP: 16.00MiB Unallocated: 988.00MiB
Can I do?
btrfs device add /dev/dm-2 /
To make / (root btrfs "partition") get the Unallocated 100GB in the dm-2 partition?