[PATCH] Make preserve work for RAID in FAI 3.4.x
Julien BLACHE
jblache at debian.org
Fri Sep 17 21:14:16 CEST 2010
Michael Tautschnig <mt at debian.org> wrote:
Hi,
>> Though pt_complete is only for physical devices, so all things
>> considered I should have a second look at this. I'll do this on monday.
>
>
> Ouch, yes, you're absolutely right. I think the following code should do it:
>
> if ($vol->{preserve}) {
> $pre_req .= &FAI::phys_dev($d)[0] ?
> ",pt_complete_" . (&FAI::phys_dev($d))[1] :
> ",exist_$d";
> } elsif (&FAI::set_partition_type_on_phys_dev($d, "raid")) {
> $pre_req .= ",pt_complete_" . (&FAI::phys_dev($d))[1];
> } else {
> $pre_req .= ",exist_$d";
> }
Yes, that'll do :) Though I should note that preserving RAID on LVM or
LVM on RAID is not supported by setup-storage.
For that to work, setup-storage would need to start RAID arrays to
detect LVM on RAID and start LVM VGs to detect RAID on LVM. It currently
doesn't do this, so it's kind of a moot point. (and it'd need to stop
everything again before partitioning)
I have an idea for a new small feature in setup-storage, I'll post an
RFC next week about it. Nothing earth-shattering but something that can
come quite handy with RAID.
JB.
--
Julien BLACHE - Debian & GNU/Linux Developer - <jblache at debian.org>
Public key available on <http://www.jblache.org> - KeyID: F5D6 5169
GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169
More information about the linux-fai-devel
mailing list