-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Describe the solution you'd like:
It would be nice as part of the MachineRegistration endpoint to add a new feature that would allow you to wipe any additional disks attached. Something like spec.config.elemental.install.wipe-additional-disks that defaults to false, but when it's enabled with true would perform wipefs -a or something similar on any remaining disks. In other words any disk that isn't specified by config.elemental.install.device or picked by config.elemental.install.device-selector
Anything else you would like to add:
Alternatively the installer could wipe the disk prior to installation. Something like config.elemental.install.wipe-all-disks which would wipe everything and then install like normal after.
The driver for this request is that like with Persistent network interface names, the disks don't always retain the same device name. In testing, you might have 3 disks that might all match your device selector or /dev/sda and every time you install to sda the reboot causes you to install to a new physical disk. If you're doing a lot of testing on a box, eventually all your disks get slightly different installs of Elemental. Then when it reboots, it's a race condition to see if your most recent install is actually the one that boots or not. Wiping the old disks (as part of the install) would solve that problem. The only other workaround is to try to be really really fast and accurate with your wipefs commands while the installer is going, or have an additional boot into a different OS where you wipe the disks before testing again.
Either way, I think having an optional way to start from a clean slate with the installer would be nice for physical bare metal devices.
Environment:
- Cloud provider or hardware configuration: Bare metal servers (NVME/SSD/HDD)