mirror of
https://github.com/KDE/kde-linux.git
synced 2026-04-19 05:59:06 -04:00
fully balance before shrink
when looking at a heatmap of the partition it's still not quite ideal, when I manually shrink it I get a better block layout, so let's try to balance the blocks before shrinking. if nothing else it should mean less relocation during shrinking
This commit is contained in:
@@ -57,6 +57,9 @@ btrfs filesystem usage .
|
||||
duperemove -dr . > /dev/null
|
||||
btrfs subvolume sync .
|
||||
btrfs filesystem sync .
|
||||
btrfs balance start --full-balance --enqueue .
|
||||
btrfs subvolume sync .
|
||||
btrfs filesystem sync .
|
||||
## And to finish things off we shrink the filesystem to the minimum size.
|
||||
$OUTPUT_DIR/btrfs-shrink.py
|
||||
## Sync changes to disk.
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
# portion but leave a bit of a buffer behind. Then we keep resizing until the
|
||||
# resize starts failing.
|
||||
|
||||
# TODO we can produce an even more squeezed image by deriving a complete partition
|
||||
# from the initial partition. https://btrfs.readthedocs.io/en/latest/Seeding-device.html
|
||||
# It essentially transfers the data from the seed device with nary a fragmentation.
|
||||
# Requires juggling loop devices though, and the gains are in the sub 500MiB range.
|
||||
|
||||
import json
|
||||
import os
|
||||
import math
|
||||
|
||||
Reference in New Issue
Block a user