btrfs adventures on opensuse

I am currently using OpenSuse 13.2, and started using Picard for sorting my music, around 12000 files. Later I started doing some BASH script to further clean up the names of the mp3 files.

Anyhow, all of this to say, that I have been working the file system, copying, moving and erasing (hundreds) of files around.

At the end, the system started to be very slow, and at some point, gnome started to crash, funny enough, there is no /var/log/messages to check, 13.2 implements Systemd, so there is journalctl to check the error messages, but in the console (F12) many errors for different systemd components complaining that there was no space left on device, but doesn’t says which one, and doing a “df -h” shows still free space on the hard drives.

Puzzling.

At the end, the OpenSUSE forums gave me the solution on this thread.

If you keep reading, the problem is not the file system, it the meta data of the file system.

The default file system of OpenSuse13.2 is btrfs, which implements journalling and snapshot capabilities, and if not correctly tuned and configured, can generate this kind of scenarios.

The key commands to fix my issues were:

btrfs filesystem show

btrfs filesystem df (here you can see the meta data space full)

snapper -c root list (lists snapshots of root the file system)

snapper -c delete (this will clean the snapshots of the file system that are taking space, leaving the current one (0) and the last one)

btrfs balance start (in my case / for root, the closest explanation this is similar to a defrag>

Et Voila! space magically appears, and system is usable again.

Similar case, with explainations from “The Nerdy Room“.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s