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


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Sisuite-devel mailing list
Sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to