On Thu, 2003-04-03 at 13:31, james.oden@xxxxxxxxxxx wrote: > What version of RedHat are you using. RH 9.0 has a couple of problems in > this area: (psst -- it's Red Hat Linux 9, not 9.0 :-) Side effects of new functionality -- pre-existing RAID and LVM volumes were previously only seen on an upgrade. Now we see them on an install as well. Which means if you don't do any sort of clearpart and previously had RAID, we try to reuse them. > 1) it does not installing over the top of pre-existing raid devices > and trying to setup raid very well (think python > exception). It works perfectly fine if you use the new (undocumented unfortunately, due to the lateness of getting it in) syntax for using preexisting RAID and LVM in kickstart. I've attached a basic description below. > 2) It does not handle installing over the top of prexisting raid > devices, and > not using raid (think of it using the wroing devices when it > mounts things; > seems to prefer raid devices to non-raid devices). This is... hard to work around. I'm open to suggestions on ideas that people might have to handle this. My current best thought is to add something like 'clearpart --raiddevs' which would then basically have the effect of ignoring existing RAID devices. > The answer to one is to tell mdadm to clear the raid superblock, and use > tune2fs to clear the filesystem label. The answer to the second problem is > all of the above, but to also clear the non used drives partition table. Yep, those are the workarounds for now. You should be able to do these in %pre also, FWIW. > There was a long question about this on the anaconda list recently but it > got no response. Hrmm, must have missed it. Things have been a bit crazy around here at which point I go into "skim mail" mode and have a higher probability of missing things :( Cheers, Jeremy
To clear the existing raid device, doing dd if=/dev/zero of=/dev/thepart bs=1M count=1 for each partition in the RAID device should be sufficient to make the RAID device "non-existent" from a quick glance at the raid code. To use preexisting RAID/LVM, the syntax is as follows: raid / --device md0 --useexisting Use existing raid device md0, format it raid /home --device md0 --noformat Use existing raid device, but don't format it volgroup myvg --noformat volgroup myvg --useexisting Use existing volume group. Doesn't run vgcreate logvol /foo --vgname=myvg --name=root --noformat Reuse existing logical volume myvg/root and don't format logvol / --vgname=myvg --name=root --useexisting Reuse existing logical volume myvg/root and format it