From 5bb4c9aae2ec7a741886b58f7e7ea0d585d923a7 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Mon, 18 Dec 2023 04:19:17 +0100 Subject: [PATCH] work --- scripts/shrink_btrfs/shrink_btrfs.py | 4 ++-- scripts/tile_gen/extract_btrfs.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/shrink_btrfs/shrink_btrfs.py b/scripts/shrink_btrfs/shrink_btrfs.py index bda83ca..1c62791 100755 --- a/scripts/shrink_btrfs/shrink_btrfs.py +++ b/scripts/shrink_btrfs/shrink_btrfs.py @@ -8,8 +8,8 @@ from pathlib import Path import click -# btrfs cannot shrink smaller than about 268 MB -SMALLEST_SIZE = 270_000_000 +# btrfs cannot shrink smaller than about 256 MiB +SMALLEST_SIZE = 256 * 1024 * 1024 @click.command() diff --git a/scripts/tile_gen/extract_btrfs.sh b/scripts/tile_gen/extract_btrfs.sh index d115e0f..3be7e05 100644 --- a/scripts/tile_gen/extract_btrfs.sh +++ b/scripts/tile_gen/extract_btrfs.sh @@ -42,8 +42,8 @@ sudo chown ofm:ofm -R mnt_rw mnt_rw2 grep fixed extract_out.log > dedupl_fixed.log || true -# we need to extract, delete dedupl and rsync onto a new partition -# otherwise the partition image stays big +# Unfortunately, by deleting files from the btrfs partition, the size _grows_. +# So we need to rsync onto a new partition. rsync -avH mnt_rw/extract/ mnt_rw2/extract/ > rsync_out.log 2> rsync_err.log