Why Is My Btrfs Root Filesystem Full When My Filesystem Usage Looks Low?

0
1
Asked By MellowPine47 On

I have two SSDs: a 1 TB drive for the operating system and a 4 TB drive mounted at /home. This layout has worked for me before, but on this installation the file manager reports that the root drive is completely full. Filelight only shows roughly 100 GB of ordinary files, yet system tools report about 946 GB used on the root filesystem. The separate 4 TB /home drive is mounted correctly and has plenty of free space.

My system uses Btrfs subvolumes for /, /root, /srv, /var/cache, /var/tmp, and /var/log, with /home on an ext4 partition on the second SSD. The output from df shows the Btrfs partition at 100% usage on all of those mount points, while /home is only about 32% full. The Btrfs filesystem reports approximately 888.6 GiB used.

I eventually discovered that the space was being consumed by more than 60 old system snapshots left over from the initial installation. After removing the unnecessary snapshots, the free space returned. What is the best way to identify and clean up this kind of hidden Btrfs usage in the future?

3 Answers

Answered By QuietHarbor8 On

The df output confirms that the 4 TB /home drive is not being counted as part of the root filesystem. It is mounted separately and has its own free space. The Btrfs partition backing / is genuinely full, even if normal file browsers do not show where the space went.

With Btrfs, snapshots can retain old copies of files and consume space that ordinary directory scanners miss. Check the system's snapshot manager and list snapshots with the appropriate Btrfs or snapshot-tool commands. Removing obsolete snapshots should reclaim the space, but keep current and known-good restore points.

MellowPine47 -

That turned out to be the cause. I had more than 60 old system snapshots dating back to the installation. After deleting the unnecessary ones, the root filesystem had free space again.

Answered By CleverMaple62 On

The repeated entries for /, /root, /srv, and the /var subdirectories are all subvolumes on the same Btrfs partition, so df correctly reports the same underlying filesystem as full at each mount point. That does not mean the /home disk is being added to the root disk.

Useful checks include `df -h`, `btrfs filesystem usage /`, and `btrfs filesystem du -s /path` from a suitable mount point. Also inspect snapshots, because snapshot references can keep large amounts of data alive after the visible files have been deleted.

Answered By SilverTide29 On

The fstab entry for /home is active and points to the separate ext4 UUID, so the home-directory mount is working. The commented Btrfs /home entry is the old subvolume mount and should remain disabled if /home belongs on the second drive.

Also, `/` is the root filesystem; `/root` is merely the superuser's home directory. Having /boot on another partition is normal and is unrelated to the full root filesystem.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.