See btrfs subvolume df (used & free space)

While installing Fedora 33, I chose btrfs, with 32gb for / and the rest for /home

I see these are used as 'subvolumes':

# cat /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Mon Oct 19 13:43:25 2020
#
UUID=f1483466-114c-4ef4-b268-85095d4c4aa8 /                       btrfs   subvol=root,x-systemd.device-timeout=0 0 0
UUID=ef7bc629-cb70-458a-9463-2666c2c233a7 /boot                   ext4    defaults        1 2
UUID=F206-0546          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
UUID=f1483466-114c-4ef4-b268-85095d4c4aa8 /home                   btrfs   subvol=home,x-systemd.device-timeout=0 0 0

I'd like to see how much space is used & free for each partition, but df shows only the total:

Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0       924G   27G  895G   3% /
tmpfs           3.9G   12K  3.9G   1% /tmp
/dev/dm-0       924G   27G  895G   3% /home

Tried these:

# btrfs device usage /
/dev/mapper/luks-662fb4fb-75b3-4888-a617-0c039f575d3a, ID: 1
   Device size:           923.00GiB
   Device slack:              0.00B
   Data,single:            27.01GiB
   Metadata,DUP:            2.00GiB
   System,DUP:             16.00MiB
   Unallocated:           893.98GiB

# btrfs subvolume list /
ID 256 gen 7177 top level 5 path home
ID 258 gen 7176 top level 5 path root
ID 265 gen 30 top level 258 path var/lib/machines

# btrfs filesystem df /root
Data, single: total=27.01GiB, used=26.17GiB
System, DUP: total=8.00MiB, used=16.00KiB
Metadata, DUP: total=1.00GiB, used=386.67MiB
GlobalReserve, single: total=45.22MiB, used=0.00B

# btrfs filesystem df /home
Data, single: total=27.01GiB, used=26.17GiB
System, DUP: total=8.00MiB, used=16.00KiB
Metadata, DUP: total=1.00GiB, used=386.67MiB
GlobalReserve, single: total=45.22MiB, used=0.00B

How can I see / total size of 32gb and how much is used, and same for /home?


It looks like there is a single partition, split into multiple subvolumes. Subvolumes share the underlying filesystem so the filesystem size and usage for both is indeed the same.

I don't use Fedora but if the installer honored the 32GB restriction on /, it is likely through a qgroup that limits the maximum usage of a given subvolume.

Try btrfs qgroup show / and btrfs qgroup show /home.