23.01.2016 01:33, Christian Boltz пишет:
Hello,
I just had an interesting[tm] problem - updating to the latest tumbleweed failed at random places.
It turned out that my btrfs / partition was full. Not with df -h (which reported some GB free), but "btrfs fi show" showed 100% usage. (Sorry for not including the exact output - I didn't save it.)
I moved 15 GB of libvirt images to a different partition and deleted some old snapshots, but both didn't help.
After some searching (and temporaryly breaking my /, which I could luckily repair with snapper rollback), I found out [1] that I should run btrfs balance start / -dlimit=3 which freed quite some space. Another run freed even more space, so I decided to run it without the limit: btrfs balance start /
After that, I'm down to
# btrfs fi show Label: none uuid: 9f4a918d-fcd4-45d3-a1dc-7b887300eabc Total devices 1 FS bytes used 22.91GiB devid 1 size 50.00GiB used 25.31GiB path /dev/mapper/cboltz-root
Even if you re-add the 15 GB libvirt images in the calculation, this still means the rebalance freed about 10 GB = 20% of the partition size.
So the good news is that I could solve the problem. The bad news is that it happened at all.
Should there be a cronjob that does the rebalancing or other btrfs maintenance regularly?
There is btrfsmaintenance package that should be installed by default that provides cron script. Somewhat interesting implementation is, these cron scripts are not installed directly but there is service that does it. And *this* service is disabled by default :) systemctl enable btrfsmaintenance-refresh systemctl start btrfsmaintenance-refresh and check /etc/cron.{daily,weekly,monthly} It is configurable in /etc/sysconfig/btrfsmaintenance
Bonus question: snapper list shows that snapshot #1 ("first root filesystem") is still kept. Is this snapshot needed for something, or can I safely delete it?
You can't. This is *the* root filesystem that you are actually using. If you mount root of btrfs you will find that it is practically empty. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org