What are btrfs tools?

url

btrfs you said I should use btrfs tools to see free space on disk etc @gnwiii . What are these tools?

  • GUI: Btrfs Assistant
  • command-line: sudo btrfs filesystem usage /

Command-line examples (on a system where Windows 10 was recently removed and the space given to Fedora):

% df -lh
df -lh /
Filesystem                                              Size  Used Avail Use% Mounted on
/dev/disk/by-uuid/<UUID>  465G   62G  403G  14% /
% sudo btrfs file usage /
Overall:
    Device size:		 464.27GiB
    Device allocated:		  67.02GiB
    Device unallocated:		 397.25GiB
    Device missing:		     0.00B
    Device slack:		     0.00B
    Used:			  61.20GiB
    Free (estimated):		 402.12GiB	(min: 203.50GiB)
    Free (statfs, df):		 402.12GiB
    Data ratio:			      1.00
    Metadata ratio:		      2.00
    Global reserve:		 134.81MiB	(used: 0.00B)
    Multiple profiles:		        no

Data,single: Size:63.01GiB, Used:58.14GiB (92.27%)
   /dev/disk/by-uuid/<UUID>	  63.01GiB

Metadata,DUP: Size:2.00GiB, Used:1.53GiB (76.50%)
   /dev/disk/by-uuid/<UUID>	   4.00GiB

System,DUP: Size:8.00MiB, Used:16.00KiB (0.20%)
   /dev/disk/by-uuid/<UUID>	  16.00MiB

Unallocated:
   /dev/disk/by-uuid/<UUID>	 397.25GiB

I’d prefer to have df give and error when used on a btrfs filesystem that suggests using btrfs file usage.

1 Like