Hello, I would like to ask if there is an option for MAAS to erase only the disk from which it boots, as I frequently perform server reinstallations and I need the other disks to keep their data intact. Ideally, I’m looking for a solution via CLI, as manual disk disabling is not an option for me.
So in MAAS there is no option where I could specify that I don’t want to erase disks? Is it not possible to just reinstall the OS? Does everything always have to be completely erased?
If that’s the case, is it at least possible to use MAAS CLI to detect which disks are non-boot disks and remove them from MAAS so they won’t be erased?
If that’s the case, is it at least possible to use MAAS CLI to detect which disks are non-boot disks and remove them from MAAS so they won’t be erased?
It depends on the storage configuration of the machine you are deploying. If you just want to know the boot disk, you can
And if I identify the boot disk, is there a way to remove all other disks from MAAS through CLI, so that MAAS doesn’t see them and I can reinstall without losing data?
We found that even if you save the data on the non-boot drives by removing them from MAAS, a subsequent Deploy will wipe the superblock on them anyway (it uses lsblk to identify disks on the system, not MAAS inventory data), invalidating the data.
So you’re telling me that nobody uses MAAS for OS reinstallation? It seems like an important feature for this system. Are there plans to add this capability at some point?
I’ve also been looking for a way around MAAS’ need to completely obliterate all and every disk on a device even if it is performing an install on only the boot drive. It’s particularly difficult to automate server build tasks (which is what we use MAAS for) if you need someone to physically remove a disk as part of the workflow.
We also settled on commissioning/release scripts as a workaround although we haven’t implemented it yet, but it’s a pretty big feature gap.
I found something, I’ve only done a few tests so far but it looks like it works. In the file preseed_storage.py I commented out these lines:
258 “wipe”: “superblock”,
342 “wipe”: “zero”,
357 “wipe”: “zero”,
394 “wipe”: “superblock”,
then I created a commissioning script that selects the boot disk and completely wipes it.
But I wanted to ask, when I have a debian package I can normally edit this file in /usr/lib/python3/dist-packages/maasserver, is there any possibility to modify a snap package?