Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/lib/make-ext4-fs: Fix: `resize2fs -M' can leave insufficient slack #125121

Merged
merged 1 commit into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions nixos/lib/make-ext4-fs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ pkgs.stdenv.mkDerivation {
return 1
fi

echo "Resizing to minimum allowed size"
resize2fs -M $img

# And a final fsck, because of the previous truncating.
fsck.ext4 -n -f $img
# We may want to shrink the file system and resize the image to
# get rid of the unnecessary slack here--but see
# https://github.com/NixOS/nixpkgs/issues/125121 for caveats.

if [ ${builtins.toString compressImage} ]; then
echo "Compressing image"
Expand Down