Recovering From a Full btrfs Disk

By chimo on (updated on )

Jotting down the steps I took (found) to recover from a full (or “metadata full”) btrfs disk.

My btrfs disk for Incus storage is /dev/sdc, mounted at /var/lib/incus/storage-pools/pool1. My Operating System’s disk with available storage is /dev/sda.

# Create a 5GB disk-image on another drive
dd if=/dev/zero of=/mnt/tmpBtrfs.img bs=1G count=5

# Set it up as loop device
losetup -v -f /mnt/tmpBtrfs.img

# Add it to btrfs
btrfs device add /dev/loop1 /var/lib/incus/storage-pools/pool1

# Re-balance
btrfs bal start /var/lib/incus/storage-pools/pool1

# Free disk space.
# In my case, I got rid of some extra container snapshots I had laying around.

# Teardown temporary space
btrfs device delete /dev/loop1 /var/lib/incus/storage-pools/pool1
losetup -d /mnt/tmpBtrfs.img
rm /mnt/tmpBtrfs.img

Recent articles from blogs I follow

The Scunthorpe Problem

I was talking with a friend recently about an email of theirs running afoul (🐔) of another aggressive filter system, because they dared to to talk with someone called Dickson. I know right, they’re the absolute worst. For those unfamiliar, this is the The…

via Rubenerd November 21, 2024

In which Neil is surprised by the lack of an HDMI cable

Some modern technology decisions baffle me. Today, I was sitting in a meeting room. In the room was my friend, with her laptop. Her laptop has an HDMI port. Also in the room was a screen, onto which my friend wished to display her laptop’s desktop. The screen …

via Neil's blog November 19, 2024

Helm: JSON schema generation

Helm charts support the inclusion of a values.schema.json file to validate values.yaml. Documentation: https://helm.sh/docs/topics/charts/#schema-files A JSON schema is akin to defining the structure of and type-annotating a JSON file. It helps to “shift lef…

via not just serendipity November 14, 2024