Why Is My Btrfs Root Filesystem Full When the Visible Files Use Only 100 GB?

0
0
Asked By MellowCedar42 On

I have two SSDs: a 1 TB drive for the operating system and a 4 TB drive mounted at /home. This arrangement has worked for me before, but on this installation the file manager reports that the root filesystem is full. Filelight only shows roughly 100 GB of visible files, yet commands such as df -h report that the 1 TB Btrfs filesystem is using about 946 GB. The separate 4 TB /home filesystem is mounted correctly and has plenty of free space.

My fstab uses several Btrfs subvolumes on the system drive for /, /root, /srv, /var/cache, /var/tmp, and /var/log, while the second SSD is mounted as /home. Updates and other processes fail because the root filesystem appears to have no free space. What could be consuming the missing space, and how can I safely recover it?

3 Answers

Answered By AmberLynx56 On

The fstab entry for /home is not the problem. The Btrfs /home entry is commented out, but the following ext4 entry mounts the 4 TB partition at /home, which is confirmed by df and mount. Also, / means the root filesystem; /root is merely the root user's home directory. The /boot placement is unusual but does not explain the nearly full root partition.

Answered By BrightHarbor7 On

The filesystem output shows that /home is mounted from the 4 TB drive, so the second disk is not being counted as part of the root filesystem. The root Btrfs filesystem itself really is nearly full: df reports about 946 GiB used on the 1 TB partition. Since Btrfs subvolumes share the same underlying pool, checking only the visible files in the mounted subvolume can miss space consumed elsewhere, especially by snapshots. Check the Btrfs usage and snapshot list, for example with btrfs filesystem usage / and the snapshot-management tool used by your system.

QuietMaple19 -

The separate mounts for /root, /srv, and the various /var directories all use the same Btrfs device, so they do not provide separate pools of space. They can make ordinary disk-usage tools look misleading.

Answered By SilverKite83 On

The missing space was caused by a large collection of system snapshots on the Btrfs root filesystem. There were more than 60 snapshots dating back to the initial installation. They were not obvious in the normal file view, but they still occupied blocks in the shared Btrfs pool. Removing the old snapshots released the space and fixed the full-disk errors. Keep only snapshots you actually need, and delete them through the snapshot manager or the appropriate Btrfs snapshot commands rather than deleting hidden files manually.

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.