Skip to content

Commit

Permalink
Use -T default
Browse files Browse the repository at this point in the history
  • Loading branch information
edmorley committed Mar 19, 2024
1 parent b234918 commit 204eefb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/bin/capture-docker-stack
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ make-filesystem-image "${IMG}" "${DOCKER_IMAGE_SIZE_IN_MB}" |& indent

display "Mounting image ${IMG_MNT}"
mount-filesystem-image "${IMG}" "${IMG_MNT}" |& indent
df --human-readable "${IMG_MNT}" |& indent

display "Copying stack to image"
export-docker-image "${DOCKER_IMAGE}" "${IMG_MNT}" |& indent
Expand Down
4 changes: 3 additions & 1 deletion tools/bin/make-filesystem-image
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ DOCKER_IMAGE_SIZE_IN_MB="$2"
# as to ensure a few MB additional free space headroom.
IMG_SIZE_IN_MB=$((DOCKER_IMAGE_SIZE_IN_MB * 107 / 100))

echo "Using file size of ${IMG_SIZE_IN_MB} MB based on Docker image size of ${DOCKER_IMAGE_SIZE_IN_MB} MB"

mkdir -p "$(dirname "$IMG")"

# Create an empty file of the specified size.
Expand All @@ -25,7 +27,7 @@ fallocate --length "${IMG_SIZE_IN_MB}MiB" "${IMG}"
# The `-m` argument reduces reserved-blocks-percentage from its default of 5% to 1%.
# TODO: Switch to calling `mkfs.ext3` or `mke2fs -t ext3` since the `mkfs` alias is deprecated:
# https://manpages.ubuntu.com/manpages/jammy/en/man8/mkfs.8.html
mkfs -t ext3 -m 1 "$IMG"
mkfs -t ext3 -T default -m 1 -v "$IMG"

# Adjust the filesystem parameters for improved performance on runtime instances.
# The `-c` and `-i` arguments disable automatic filesystem checks, which are otherwise run based
Expand Down

0 comments on commit 204eefb

Please sign in to comment.