mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-08-26 08:36:42 +00:00
fix(getinstdisk): prefer direct attached disks over RAID volumes
The driver sort put the ahci and ata_piix controllers in the same choice group as the PMC MaxRAID and megaraid_sas RAID controllers. On a server with both, the sort could select a RAID data volume as the OS install disk. Move the RAID controllers to the second choice group. The direct attached controllers hold the likely boot volume, and a server with only RAID volumes still selects them from the second group. The SAS host adapters move to the third group and every other driver to a new fourth group, so the relative order of the remaining drivers does not change. The RHEL 10 installer includes its own copy of the script, so both carry the change. Recovered from the lenovobuild branch.
This commit is contained in:
@@ -201,22 +201,26 @@ if [ -z "$install_disk" ]; then
|
||||
|
||||
# Sort disks by DRIVER type
|
||||
case "$disk_driver" in
|
||||
"ata_piix"*|"PMC MaxRAID"|"ahci"|"megaraid_sas")
|
||||
"ata_piix"*|"ahci")
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""firstchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre firstchoicedisks"
|
||||
;;
|
||||
"mptsas"|"mpt2sas"|"mpt3sas")
|
||||
"PMC MaxRAID"|"megaraid_sas")
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""secondchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre secondchoicedisks"
|
||||
;;
|
||||
*)
|
||||
"mptsas"|"mpt2sas"|"mpt3sas")
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""thirdchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre thirdchoicedisks"
|
||||
;;
|
||||
*)
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""fourthchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre fourthchoicedisks"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for seq in first second third; do
|
||||
for seq in first second third fourth; do
|
||||
if [ -s $tmpfile$file_pre${seq}choicedisks ]; then
|
||||
install_file="$tmpfile$file_pre${seq}choicedisks"
|
||||
break
|
||||
|
||||
@@ -201,22 +201,26 @@ if [ -z "$install_disk" ]; then
|
||||
|
||||
# Sort disks by DRIVER type
|
||||
case "$disk_driver" in
|
||||
"ata_piix"*|"PMC MaxRAID"|"ahci"|"megaraid_sas")
|
||||
"ata_piix"*|"ahci")
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""firstchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre firstchoicedisks"
|
||||
;;
|
||||
"mptsas"|"mpt2sas"|"mpt3sas")
|
||||
"PMC MaxRAID"|"megaraid_sas")
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""secondchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre secondchoicedisks"
|
||||
;;
|
||||
*)
|
||||
"mptsas"|"mpt2sas"|"mpt3sas")
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""thirdchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre thirdchoicedisks"
|
||||
;;
|
||||
*)
|
||||
echo "$disk $disk_data" >> "$tmpfile""$file_pre""fourthchoicedisks"
|
||||
echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre fourthchoicedisks"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for seq in first second third; do
|
||||
for seq in first second third fourth; do
|
||||
if [ -s $tmpfile$file_pre${seq}choicedisks ]; then
|
||||
install_file="$tmpfile$file_pre${seq}choicedisks"
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user