Very good then. Thanks for the follow up note.
-Brian
Thus spake A Righi ([EMAIL PROTECTED]):
>Brian,
>
>absolutely! you're right, I meant that the important thing is to
>preserve the correct bind of DISK* variables with /dev/* files specified
>in autoinstallscript.conf and your patch resolves. I just looked at the
>code too quickly without verifying it, so simply ignore my previous
>comment! ;-)
>
>Cheers,
>-Andrea
>
>Brian Elliott Finley wrote:
>> Thus spake A Righi ([EMAIL PROTECTED]):
>>> finley wrote:
>>>> + # Create a lookup hash. Contents are like:
>>>> + # /dev/sda => DISK0
>>>> + #
>>>> + my %DISK_by_disk;
>>>> + my $i = 0;
>>>> + foreach my $disk (sort @all_disks) {
>>>> + $DISK_by_disk{$disk} = "DISK$i";
>>>> + $i++;
>>>> + }
>>>
>>> Brian,
>>>
>>> I think we should not sort the disk names. If for whatever reason a user
>>> decides to manually edit the autoinstallscript.conf and define the disk
>>> sections not in alphabetic order, the partitioning schemas will be
>>> exchanged... for example:
>>>
>>> <disk dev="/dev/sdd" label_type="msdos" unit_of_measurement="MB">
>>> ...
>>> </disk>
>>> <disk dev="/dev/sdc" label_type="msdos" unit_of_measurement="MB">
>>> ...
>>> </disk>
>>
>> I don't think that preserving the ordering of disks as defined in this
>> section of the autoinstallscript.conf file is implied, and to my
>> knowledge, any preservation of order that has happened is accidental.
>>
>> Furthermore, as far as partitioning is concerned, I don't believe that
>> order matters.
>>
>> But, we do need to be sure that what is considered DISK0 early in our
>> code, continues to be considered DISK0 later in the code. This is the
>> problem that I ran into -- during partitioning, DISK0 was one thing, and
>> since the DISK -> /dev/* mapping was re-determined later, and done a bit
>> differently, it ended up being something different later.
>>
>> I don't consider my solution to be comprehensive, but it made the code
>> work properly in my current situation, and hopefully for others too.
>> However, here's what I think we need for a long term solution:
>>
>> * A function that maps disks to DISKs consistently each time it's
>> called, and we call it each time we map to DISKs.
>> * We should keep in mind that ultimately, when installing to a
>> client, the autoinstall script will order disks based on what it
>> finds on the client and on the disk ordering specified.
>> (DISKORDER var I think).
>>
>>> will be translated in:
>>>
>>> DISK0=/dev/sdc
>>> ... # partitioning schema of /dev/sdd
>>> DISK1=/dev/sdd
>>> ... # partitioning schema of /dev/sdc
>>
>> I agree that we don't want what you describe above, but I believe the
>> function I describe should address this issue.
>>
>> Thoughts?
>>
>> Cheers, -Brian
>>
>>
>>> Cheers,
>>> -Andrea
>>>
>>
>
--
Brian Elliott Finley
Mobile: 630.631.6621
_______________________________________________
Sisuite-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel