>  -----Original Message-----
>  From: [email protected] 
>  [mailto:[email protected]] On Behalf Of 
>  [email protected]
>  Sent: Wednesday, December 17, 2008 11:18 AM
>  To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
>  Cc: Red Hat Enterprise Linux 5 (Tikanga) discussion 
>  mailing-list; [email protected]
>  Subject: RE: [rhelv5-list] Ignore SAN during install?
>  
>  *apologies, I've re-arranged this reply a bit to be more concise*
>  
>  > > > > %pre
>  > > > > cat <<EOF > /tmp/partitioning
>  > > > > ignoredisk
>  > > > >
>  --drives=sda,sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdk,sdl,sdm,
>  sdn,sdo,sdp
>  > > > > ,sdq,sdr,sds,sdt,sdu,sdv,sdw,sdx
>  > > > > key 49af89414d147589
>  > > > > EOF
>  > > > >
>  > > > > In your partitioning section, include the file that 
>  you create in
>  the
>  > > > > pre script by adding this line
>  > > > >
>  > > > > %include /tmp/partitioning
>  > > > >
>  > > > > And then correct for the drive-ordering that might 
>  mean that your
>  > > > > HBA-accessible drives come before your local 
>  storage. In this case,
>  I
>  > > > > wanted the local HP smartarray disk to come before 
>  all the HBA
>  disks.
>  > > > > Use the following line:
>  > > > >
>  > > > > bootloader --location mbr
>  --driveorder=cciss/c0d0,sda,sdb,sdc,sdd,sde,sdf,
>  > > > >
>  sdg,sdh,sdi,sdj,sdk,sdl,sdm,sdn,sdo,sdp,sdq,sdr,sds,sdt,sdu,s
>  dv,sdw,sdx
>  > > > >
>  > > > >
>  
>  > > >    %pre
>  > > >    echo "bootloader --location=mbr --driveorder=cciss/c0d0" >
>  > > > /tmp/bootloader
>  > > >
>  > > >    IGNOREDISK=/tmp/ignoredisk
>  > > >
>  > > >    ### Ignore qlogic disks for PHYSICAL systems
>  > > >    cat /tmp/scsidisks
>  > > >    echo "Pulling in contents of /tmp/scsidisks"
>  > > >    for i in $(cat /tmp/scsidisks | awk '{ print $1 }'); do
>  > > >        DISKS=$DISKS" "$i
>  > > >    done
>  > > >    echo $DISKS
>  > > >    echo "Pulling in all block device sd* files in /tmp"
>  > > >    for i in $(ls -l /tmp | grep sd | grep ^brw | awk '{ print
>  $NF }');
>  > > > do
>  > > >        DISKS=$DISKS" "$i
>  > > >    done
>  > > >    echo $DISKS
>  > > >    DISKS=$(echo $DISKS|sed 's/ s/,s/g')
>  > > >    if [ ! -z $DISKS ]; then
>  > > >        echo "ignoredisk --drives="$DISKS > $IGNOREDISK
>  > > >     else
>  > > >        echo ""> $IGNOREDISK
>  > > >    fi
>  > > >
>  > > >
>  > > > Then in the main section of the ks.cfg just:
>  > > >    %include /tmp/bootloader
>  > > >    %include /tmp/ignoredisk
>  
>  > > I'm a bit confused about why so much of this is being 
>  echoed around and
>  > > included in files during the %pre script when they are 
>  completely valid
>  > > kickstart options that you just have to place inside the 
>  kickstart
>  > > normally.  I mean specifically the bootloader and 
>  ignoredisk lines.
>  > >
>  > > Anyone?
>  
>  > I've had cases where the nostorage option doesn't work properly and
>  > still presents some storage devices to the OS if they don't match
>  > defined "drive sizes".  Using the ignoredisks directive 
>  was the only
>  > reliable way I had to completely ignore the SAN devices 
>  when we looked
>  > into it around a year ago.  The behavior and reliability 
>  of "nostorage"
>  > may have improved since then, but so far I haven't had a 
>  need to look at
>  > it again.
>  
>  I think the lack of coherency in my previous post might have been
>  confusing, or I am still confused.  I don't believe that 
>  addresses the
>  question.  In the above examples both the ignoredisk line 
>  (1st example) and
>  the bootloader line (2nd example) are %included into the 
>  kickstart via an
>  echo in the %pre script, but both of those lines when just 
>  defined as is,
>  can just be placed in the regular areas of the the kickstart 
>  instead of the
>  %pre script.
>  
>  So my question boils down to, "If the contents of that 
>  included file are a
>  standard kickstart option that is not dynamically generated 
>  with a script,
>  such as the ignoredisk line in the 2nd example, is there a 
>  reason to echo
>  the lines to a file and then include it instead of just 
>  adding the option
>  in the normal fashion?"
>  
>  -greg

Ahh.  In short, yes.  The contents of the files vary depending on
whether or not the server is a virtual machine or a physical machine.
We use the same ks.cfg on both so there is some logic that surrounds the
code that makes the determination of what to put in them.  So the
bootloader line may reference sda on the virtual machines, but
cciss/c0d0 on the physical system.  Likewise, the contents of
/tmp/scsidisks will vary depending on the number of LUNs that are
presented to the system (granted, this really only affects us when we
rebuild an existing system) and in fact, may be empty.

--Maarten

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to