Disable Copy-on-Write for the swap subvolume per best practices

This commit is contained in:
David Heinemeier Hansson
2026-01-06 22:58:24 +01:00
parent 59a7153d02
commit 4a88ec876b

View File

@@ -23,6 +23,7 @@ SWAP_FILE="$SWAP_SUBVOLUME/swapfile"
if ! sudo btrfs subvolume show "$SWAP_SUBVOLUME" &>/dev/null; then
echo "Creating Btrfs subvolume"
sudo btrfs subvolume create "$SWAP_SUBVOLUME"
sudo chattr +C "$SWAP_SUBVOLUME"
fi
# Create swapfile