Skip to content

Commit 0c1e489

Browse files
committed
chore: reserve a fixed amount of blocks for the data volume
1 parent 1211077 commit 0c1e489

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

common-nix.vars.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
postgres-version = "15.6.1.135"
1+
postgres-version = "15.6.1.136-rc1"

ebssurrogate/scripts/surrogate-bootstrap-nix.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ function format_and_mount_rootfs {
110110
fi
111111

112112
mkfs.ext4 /dev/xvdh
113+
114+
# Explicitly reserving 100MiB worth of blocks for the data volume
115+
RESERVED_DATA_VOLUME_BLOCK_COUNT=$((100 * 1024 * 1024 / 4096))
116+
tune2fs -r $RESERVED_DATA_VOLUME_BLOCK_COUNT /dev/xvdh
117+
113118
mkdir -p /mnt/data
114119
mount -o defaults,discard /dev/xvdh /mnt/data
115120
}

0 commit comments

Comments
 (0)