-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Fix root volume resizing on EC2 KVM instances (M5, C5, etc) #39164
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
Conversation
The previous code for this accidentally picked up a "p" when computing the partition number. This logic should be more robust
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
We should probably also backport this to 18.03 and regenerate the AMIs, @edolstra, right?
cc @greglearns @polynomial @hakujin who have also expressed interest in the related tickets |
Great news. Thanks! |
@copumpkin @edolstra how can I help get this fix into new AMIs? New to nix but happy to contribute if someone will point me in the correct direction. |
We've discovered one remaining bug that makes the new instance types fail if you use large root EBS volumes with NixOS. Hoping to get a fix to that in today, then whenever @edolstra has time to make the AMIs, I think we'll be set. |
May we have an estimate for when the new AMIs will be published? I tried to build them myself (on NixOS 18.03) with create-amis.sh, but it crashes with
|
I think all the relevant fixes should be in the 18.03 branch and the AMIs should be ready for @edolstra to publish |
New AMIs are up! |
Thanks 👍 |
Thank you @edolstra |
I found the solution here TLDR: if your partition name is nvme0n1p1, then your growpart command should be like this |
@cristiam86 sorry, the solution to what? is this not working for you? |
I mean that I wasn't able to understand the solution given by @ngortheone. So I looked a little bit further and found that StackOverflow post were the problem was explained in a more simple way. |
Oh, if you have a simpler one that still works a PR would be very nice! |
Oh no, sorry. My problem wasn't linked with this project, the problem was resizing the partition manually but looking for solutions I stumble across this repo and it helped me to reach the final solution. |
Fixes:
#33417
#33092
Root volume resizing was broken on new KVM instances because of the way partition name was computed
"''${rootDevice#$parentDevice}"
results inp1
instead of1
when root device is nvme diskresulting in small root partition
Suggested solution borrowed from here:
https://git.launchpad.net/cloud-initramfs-tools/tree/growroot/scripts/local-bottom/growroot
(lines 38 - 49)
Performed testing on m4 and m5 instances and confirmed that fix works