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

EC2 instance root partition should fill all the available space #39589

Closed
mightybyte opened this issue Apr 27, 2018 · 3 comments
Closed

EC2 instance root partition should fill all the available space #39589

mightybyte opened this issue Apr 27, 2018 · 3 comments

Comments

@mightybyte
Copy link
Contributor

Issue description

When I create an EC2 instance with a large initial filesystem size, the actual partitions don't fill the space. It's also pretty cumbersome to resize the partition, so this ends up being a pretty painful problem since /nix rapidly fills up. This is similar to issue #22211, but I'm creating a separate issue because I think fixing it to work with whatever initial size you give it is a better overall fix.

Steps to reproduce

Create an instance (I used m5.2xlarge) with the 17.09 AMI with a larger amount of initial storage (say, 10 gigs or more).

@stale
Copy link

stale bot commented Jun 4, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2020
@jshcmpbll
Copy link
Member

Cross posting from #22211

For my teams configuration we are seeing the boot disk size automatically grow from the snapshot size of 3gb to our configured EBS size of 40gb

Here are some dmesg logs:

[    0.534760] GPT:Alternate GPT header not at the end of the disk.
[    1.810611] stage-1-init: [Fri Apr 28 20:53:29 UTC 2023] checking /dev/disk/by-label/nixos...
[    1.813888] stage-1-init: [Fri Apr 28 20:53:29 UTC 2023] [fsck.ext4 (1) -- /mnt-root/] fsck.ext4 -a /dev/disk/by-label/nixos
[    2.149314] stage-1-init: [Fri Apr 28 20:53:30 UTC 2023] resizing /dev/disk/by-label/nixos...
[   31.169463] stage-1-init: [Fri Apr 28 20:53:59 UTC 2023] Resizing the filesystem on /dev/disk/by-label/nixos to 10423291 (4k) blocks.
[   31.170949] stage-1-init: [Fri Apr 28 20:53:59 UTC 2023] The filesystem on /dev/disk/by-label/nixos is now 10423291 (4k) blocks long.
[   31.171956] stage-1-init: [Fri Apr 28 20:53:59 UTC 2023] mounting /dev/disk/by-label/nixos on /...

Looks like autoResize is configured by default in the amazon image module and working as expected:

I think this issue is good to be closed unless you're still having this issue

Thanks @sarcasticadmin for helping with this 🥳

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 28, 2023
@sarcasticadmin
Copy link
Member

Going to close this, thanks @jshcmpbll !

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

No branches or pull requests

3 participants