Fixing a Crashed Btrfs Subvolume After Unexpected Reboot

When a Btrfs Subvolume Crashes After an Unexpected Reboot

A sudden power loss or kernel panic can leave a Btrfs filesystem looking fine on the surface while hiding corruption inside a subvolume. The root of the issue is that Btrfs’ copy‑on‑write guarantees only hold if the metadata journal gets flushed. If the machine dies before that flush, the subvolume can become inconsistent and btrfs check will start complaining. The silver lining is that Btrfs ships with a handful of tools that, when used the right way, can recover most of the data. Below is a practical walk‑through that covers:

[Read More]

Turn /tmp into a tmpfs so you never run out of space during a log surge

Why /tmp on a tmpfs is a lifesaver for log‑heavy workloads

If a service starts spamming logs, a full /tmp can bring the whole system to a halt. On low‑RAM servers or in containers where /tmp lives on a regular disk partition, the problem is even worse. Mounting /tmp as a tmpfs keeps it in memory, guarantees instant cleanup, and stops disk‑space exhaustion. Below is a practical, step‑by‑step guide that covers the trade‑offs and security notes you’ll need to keep in mind.

[Read More]