flatcar-install: Add "-s" flag to install to smallest disk#7
flatcar-install: Add "-s" flag to install to smallest disk#7pothos merged 1 commit intoinstall-to-smallest-diskfrom
Conversation
There was a problem hiding this comment.
Overall looks fine for me.
Maybe we want to make this even simpler or smaller, and mention that is experimental? It "feels" better if an experimental feature that might be removed in the future is more contained, IMHO, and has a little as possible exposure to the end user
04f3a89 to
51114fd
Compare
Not sure what is easier in the current workflow, I'll let @dongsupark decide :) |
51114fd to
4181b3f
Compare
|
I've not read the code yet.
Yes, I agree. |
4181b3f to
6a4b96d
Compare
When provisioning a machine, it makes sense to install Flatcar to the smallest disk. The disk is chosen by looking at unmounted block devices with a size greater than 10GB. Which block devices this search should be restricted to can be configured with the "-I" flag with a list of major device numbers to search for, or the "-e" flag with a list of major device numbers to exclude when searching.
6a4b96d to
229910d
Compare
|
I've added a check to ignore mounted disks because this would lead to either data loss or a broken installation if the current filesystems write to the same disk (and |
|
I've changed the merge target to be |
dongsupark
left a comment
There was a problem hiding this comment.
Looks good in general. 👍
The minimum size 10G looks a little tight, as Flatcar can run in theory with smaller filesystem size as well.
Though in that specific use case, it's true that 99% of the cases would have >= 10G of rootfs.
Feel free to merge to the install-to-smallest-disk branch.
dracut: check both OEM IDs for flatcar and coreos
When provisioning a machine, it makes sense to install
Flatcar to the smallest disk.
The disk is chosen by looking at unmounted block devices with a size
greater than 10GB. Which block devices this search should
be restricted to can be configured with the "-I" flag with
a list of major device numbers to search for, or the "-e" flag
with a list of major device numbers to exclude when searching.