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: Force check the filesystem before resizing #26912

Merged
merged 1 commit into from
Jul 16, 2017

Conversation

knedlsepp
Copy link
Member

@knedlsepp knedlsepp commented Jun 27, 2017

Motivation for this change

This should fix filesystems not being resized on boot (#26910)
I simply added the filesystem check as suggested by the error log of resize2fs.
On the next boot everything was resized automatically.
I'm however not sure what other implications this change might have.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

The message buffer of the kernel lists
> Please run 'e2fsck -f /dev/disk/by-label/nixos' first.
as the output of the command `resize2fs "$device"`.
This fixes NixOS#26910.
@@ -301,6 +301,7 @@ mountFS() {
*x-nixos.autoresize*)
if [ "$fsType" = ext2 -o "$fsType" = ext3 -o "$fsType" = ext4 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can better be written with a case statement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not part of this PR, so suggesting improvements to it is kind of off-topic for this PR.

Copy link
Contributor

@0xABAB 0xABAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the thing I mentioned, otherwise it seems fine.

@grahamc grahamc merged commit 8df6d35 into NixOS:master Jul 16, 2017
@knedlsepp knedlsepp deleted the fix-autoResize branch July 16, 2017 22:34
knedlsepp added a commit to knedlsepp/knedlsepp.at that referenced this pull request Jul 22, 2017
This was needed before the PR
NixOS/nixpkgs#26912
was merged to get back a working server with an expanded EBS.
@domenkozar
Copy link
Member

domenkozar commented Aug 16, 2017

I'm going to backport this to 17.03 - 31a956f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants