-
Notifications
You must be signed in to change notification settings - Fork 97
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
🐛 resizefs on boot doesn't work #1448
Comments
Under alpine-opensuse-leap
Installed on a 40Gb disk then expanded it to 80Gb Running it manually
Not tested on others. |
opensuse same behaviour, it seems to think that the disk has 0 size :S |
The linked file |
This is the output:
I guess it has to run before the partitions are mounted (?) |
When I run with
This doesn't seem to be triggered on boot though. I can't find any indication that this stage was run automatically during boot. |
ok adding
I got it reproduced now :) I'll start debugging. |
The different behavior between
kairos-agent fails because it sees the partition being used, immucore fails because it thinks there isn't enough space left. I'm digging more. |
This is what immucore sees:
exactly here: https://github.com/kairos-io/elemental-cli/blob/20e40e0256fada8a42ec543a317c8675e7cb082f/pkg/partitioner/disk.go#L343 I'm in dracut emergency shell (
|
I wonder if it's related to the bug we fixed here: kairos-io/kairos-agent@5017d51 (e.g. tried to expand before partitions were created). We never fixed that in the immucore layout plugin, only in the kairos-agent. 🤔 |
The size of the one partition seen by immucore
matches the size of persistent partition (
The starting sector doesn't match though. |
This is the
this is what I get when I run the same
and this is when I run
I think immucore is somehow passing the partition device path, not the disk one. I'll try to verify |
Yes, that's the issue: https://github.com/kairos-io/immucore/blob/0811f0f054b086708727a441988d3e93905838a1/internal/utils/layout_plugin.go#L26-L32 While kairos-agent is passing the disk: https://github.com/kairos-io/kairos-agent/blob/acff689bea1c42695240b0e7438873d846920eb1/pkg/cloudinit/layout_plugin.go#L59 And then there is the yip implementation (not used anywhere): https://github.com/mudler/yip/blob/7b3e0174fa3ff75da052cc7e90d03f9d9ca9fe58/pkg/plugins/layout.go#L55 I think we should adapt the yip implementation if needed and use it both in immucore and kairos-agent. @Itxaka what do you think? |
That would be awesome, so we can drop that plugin for both places and just use the upstream implementation. Especially now that we are tracking the latest yip version as before we could not bump it due to yip changing it's execution model and breaking our stuff, but that is now solved, we should be able to use the upstream yip as is Very nice find! |
I created a quick fix in case we want to include the fix in some release: https://github.com/kairos-io/immucore/compare/1448-resizefs I tested manually and it works. I will work on the refactoring in the meantime. |
Preparation PR: mudler/yip#96 |
I created this PR to run tests using the yip implementation and run tests with it: #1497 |
will have a test if my rpi doesnt burst into flames.... |
blergh, cant even get it too boot, my usb is broken. @mauromorales will you be able to test this with me? |
Does not seem to work with an SD. The stage runs but errors:
|
for RPi it only works when passing
|
I've reopened but if you guys prefer another ticket for RPi just let me know |
this is ok for me Alos I added a pr for osbuilder to make sure we create real gpt images: kairos-io/osbuilder#66 |
After the Patch linke was merged, and bumped on kairos to use that newer version, I cna confirm that partition was extended:
|
Unfortunately for rpi systems there is no choice if we support rpi3. rpi3 supports only MBR disks We are looking for a solution, including:
|
To summarize this otherwise huge issue: Currently, resizing works an all non-arm platforms. Although pi4 could work, we don't differentiate in the code between rpi 3 and 4 and we just don't resize (because the plugin doesn't support MBR which is what rpi3 supports only). Let's close this issue in favor of: |
Fixes: kairos-io/kairos#1762 and: kairos-io/kairos#1448 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Automatically expand persistent partition on RPI 4 Fixes: kairos-io/kairos#1762 and: kairos-io/kairos#1448 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> * Bump overlay file version to release the package Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> --------- Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Kairos version:
2.0.2
CPU architecture, OS, and Version:
amd64
Describe the bug
After increasing the disk size, COS_PERSISTENT stayed with the same size
To Reproduce
Expected behavior
Due to https://github.com/kairos-io/kairos/blob/3d32a21ea42357fc65787330dab93718002430cf/overlay/files/system/oem/11_persistency.yaml#LL92C6-L92C75, I'd have expected to grow it on the next boot automatically (as it used to work with ARM)
Logs
Additional context
Workaround:
Create a dummy config file:
Run it in recovery mode:
The text was updated successfully, but these errors were encountered: