-
Notifications
You must be signed in to change notification settings - Fork 78
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
Software RAID install on previous used mdadm disks #107
Comments
If we already have user consent for destroying data, can't we just nuke the first and last 2MiB with dd followed by partprobe ? 🤣 everything in between doesn't matter anymore |
That's an option (but same idea: on each partition). So it won't simplify a lot the equation (need to loop on each partition). |
We have a similar approach, a script that nukes the md's and other bits. The script runs
on all drives and/or partitions |
Can you describe with more details exactly each step? (and in which order?) So we can maybe do that instead just the zero on the whole disk (and miss partitions). |
Yes, am working on refining that right now, it's not quite world ready yet. Works well via pxe on a rescue boot, but not quite there as an integrated step with the xs answerfile method. Basically it does
Some of these are probably redundant but work well. We use the script to zero drives for reinstall much faster than dban or a full dd zero can do. |
Ok so here's something I tested a bit and does work when supplied from an answer file as Still a bit crude but works well.
|
Pinging this info to @nraynaud who did the software RAID stuff, for potential inclusion directly in the installer 👍 |
@olivierlambert @nraynaud if you include it in the installer, beware that disk's name will not always match
Some rules are defined in Maybe I should not take information from /proc/partitions but from something like: |
Instead of erasing all available drives, maybe the installer should ask for the disk have to be erased. Or only erase disk that have been chosen for the XCP installation. |
Yes, this is already what we do (the select disk only are magic block zeroed). But we lack the fact of doing that on all partitions |
Good points. |
@oallart feel free to create a dedicated entry in the Wiki with a "how to", this could be useful for all XCP-ng users 👍 |
@olivierlambert yep I have already started and taken over some sections 😄 |
You can wipe all fs information with:
|
Hi all, I am working on the issue. The UI side of things is a bit complicated. I worked with the installer yesterday.
|
IMHO, when the user select its disks, it should destroy everything on it, without any other possibilities. XCP-ng is a kind of "Xen Appliance", not a "normal" Linux distro. Partitioning is done by XCP-ng, not the user. |
For those willing to test the pull request or even help developing the feature, here's a guide that explains how to build a modified ISO image with a modified installer: |
I'm not in a position to try this, but we upgraded from a XS-7.0 (RAID 1 on individual partitions) to XCP 7.5 (RAID 1 on individual disks) a few months ago, and I'm trying to figure out why my IO sucks. Anyways, the below is from dmesg, in case it helps as an additional example of stuff left over on a 7.5 conversion.
|
Let's describe the problem differently: we're installing an appliance, not a general-purpose OS... so we should not care at all about whatever RAID/LVM setup had been on the disks we're anyway going to overwrite. The problem is, when booting the ISO, some udev rules react to the presence of software-RAID signatures in some disks/partitions and assemble them... which is what we don't want. And in fact, that udev rules file from CentOS ( So we're left with a few actions to take:
|
A test image is now available here. Please let us know if it works for you! |
IIRC, we are already using
mdadm --zero-superblock /dev/sdX
to clean all the selected disks from previous mdadm superblocks.However, if mdadm was used on partitions level (eg
sda2
), our command won't clean it, and the install will fail.Ideally, we should loop on every partition and remove the superblock. Maybe there is a better way (super block detection?) to find and remove only where a superblock was stored before.
The text was updated successfully, but these errors were encountered: