-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve fs-resize, fix delay and simplify #2993
Conversation
fi | ||
|
||
StartProgress spinner "Resizing partition... " "parted -s -m $DISK resizepart 2 100% &>/dev/null" | ||
StartProgress spinner "Checking /storage... " "e2fsck -f -p $PART &>/dev/null" |
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.
Might as well make this one Checking file system... "
to be consistent?
Cosmetic nit: Would it be possible to vertically align the spinner outputs (add extra spaces after ...
where necessary)?
Thanks for this, certainly is simplified, but will need thorough testing! :)
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 better now :)
I've tested on generic only. To look for anomalies better use the fs-resize debug version. |
After #3035 this now requires a rebase. |
fs-resize running at early boot time may need minutes to complete because the kernel RNG is not initialized.
When parted and sgdisk call uuid_generate(), util-linux libuuid implementation use a blocking getrandom() syscall. It waits until the kernel crng has collected enough entropy. Having a SSD, no network, no user input and no HW RNG this can take a long time. The behavior explains the delay seen in #2957.
This is fixed in util-linux 2.32:
Using parted's 3.2 'resizepart' command removes the partition recreation hack.