give btrfs enough space to dedupe and balance

This commit is contained in:
Harald Sitter
2024-11-05 21:10:21 +01:00
parent 5adeefbeec
commit ecb14adf55

View File

@@ -107,7 +107,7 @@ if $OUTPUT_IS_BTRFS_SUBVOLUME; then
btrfs send --compressed-data -f "$OUTPUT.btrfs" "$OUTPUT.export"
btrfs subvolume delete "$OUTPUT.export"
SIZE=$(stat --format %s "$OUTPUT.btrfs") # the actual size of all data
SIZE=$((SIZE+268435456)) # 256M slack
SIZE=$((SIZE+2147483648)) # 2G slack -- this needs to be sufficient for our deduplication and balancing run. We'll shrink this way down later.
else
SIZE=$((SIZE+4294967296)) # 4G slack (our guess is less precise without btrfs)
fi