-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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 EBS AMI has a default root filesystem size that's uncomfortably small #22211
Comments
This would undo #15148 which I don't think is a good idea. You can increase the root size by setting |
I'm not saying the snapshot should get bigger, just that the default disk mappings in the AMI are larger. There are two quantities here:
I'm saying to change #2, which doesn't prevent you from shrinking it if you want. |
Also, not everyone uses NixOps 😄 |
Well, that was the issue: apparently you cannot decrease the size in the default mapping, only increase it (#15148 (comment)). I may have been wrong though. |
Looks like you're right 😡. I've submitted a bug and I'll let you know what AWS says about whether it's intentional or not. Very annoying! |
@copumpkin Cool, thanks! Would be great if they fix this. |
No response yet but will keep you posted :)
…On Mon, Jan 30, 2017 at 12:00 Eelco Dolstra ***@***.***> wrote:
@copumpkin <https://github.com/copumpkin> Cool, thanks! Would be great if
they fix this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22211 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAKP3u252SaqSDP6w-aTC9FmT0Dnm61ks5rXcLbgaJpZM4LwIQj>
.
|
I'm currently experimenting with NixOS on AWS and just ran into this issue. I'm not using nixops and would like to increase the root partition. This seems to be possible by modifying the EBS Volume via the AWS console. However I have not yet figured out what I need in my |
I think this is now fixed on the AWS side, so I'm reopening it |
This issue bit me - now how do I resize my existing EBS volume?
How? We appear to be talking about this NixOS option but I'm not sure how to set it, since NixOps is the one generating the |
I'm all for sensible defaults, but I don't think there is such a thing for disk size. IMO NixOps ought to refuse to create a volume if you don't give it a size. |
@chris-martin AWS actually supports live resizing of EBS volumes but I don't know if NixOps exposes that. If you just go into the console and highlight your EBS volume, you'll see an option to change its size though. Then you'll want Agree on more general point though. It was a bit of a hack and the justification for it has gone away, so I think we should: 1) provide a sensible default size 2) do what you're saying about asking folks to be explicit. |
Hmmm, after the EBS resize finished, I tried this and it doesn't seem to have any effect.
|
I think you must resize the partition first, then use resize2fs after that. "parted" has a "resizepart" command that can be used. Perhaps |
There's a stack overflow answer that suggests using
|
Sounds like our |
NixOS appears to have inserted an ad hoc workaround in a module that uses cloud-utils, without actually bothering to fix the package :( nixpkgs/nixos/modules/virtualisation/grow-partition.nix Lines 28 to 31 in b902a88
|
ugh 😦 |
@Mic92 what was your reasoning for that? It looks like you changed both the module and the package and set |
Related issue: #15736 |
With
|
@copumpkin @Mic92 fixups are only necessary in the initrd where busybox versions of @chris-martin Thanks to #30018, you should be able to install |
I think the problem is that #30018 never made it into 17.09. |
Not sure if it applies to your case, but I solved resizing the root partition using a nixos-rebuild and reboot with the following configuration.nix: knedlsepp/knedlsepp.at@7348c06 |
Here is what
does anyone know how to resize it so I can use more than just 3.2 GB? |
Thank you for your contributions.
|
One issue I've faced is that after adding some packages on a NixOS instance, I run short of space, so I resize the EBS volume and try to install I've just destroyed the instance in that case, but maybe the NixOS AMI could include |
that would make sense. |
I marked this as stale due to inactivity. → More info |
Not sure if this is still relevant. I successfully increased disk size on NixOS 21.05 with the following commands:
|
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:
Looks like
I think this issue is good to be closed unless anyone has conflicting results Thanks @sarcasticadmin for helping with this 🥳 |
I'd say that this issue has been resolved. |
In general, people can customize their filesystem sizes when spinning up an AMI, but if someone isn't paying close attention and blindly spins one up with the defaults, they'll end up with a root filesystem that's only 3GB, and will fill up immediately. Might put off newcomers, and is a trivial fix.
I think the fix would boil down to changing https://github.com/NixOS/nixpkgs/blob/master/nixos/maintainers/scripts/ec2/create-amis.sh#L185 to a fixed size. It needs to be at least the snapshot size, but can be significantly larger. I'd probably start at 10GB or 20 just to give the Nix store some room to breathe.
cc @edolstra @rbvermaa
The text was updated successfully, but these errors were encountered: