From c6c70e5df12fd667e5be61f4879e4bbcc1730959 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 16 Jan 2019 13:29:10 -0500 Subject: [PATCH] Auto-sense RSTe configuration and use it RSTe can induce a software raid. If detected use that software raid. --- xCAT-server/share/xcat/install/scripts/getinstdisk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/share/xcat/install/scripts/getinstdisk b/xCAT-server/share/xcat/install/scripts/getinstdisk index a7e630237..5d7acce3a 100644 --- a/xCAT-server/share/xcat/install/scripts/getinstdisk +++ b/xCAT-server/share/xcat/install/scripts/getinstdisk @@ -138,6 +138,7 @@ if [ -z "$install_disk" ]; then has_path=0 file_pre="" disk_data="" + foundm2=0 # Check disks which had installed OS, or check all disks in /proc/partitions for disk in $disks; do @@ -159,6 +160,7 @@ if [ -z "$install_disk" ]; then if [ "$disk_model" == "thinksystem m.2" ]; then echo "$disk $disk_data" > "$tmpfile""$file_pre""firstchoicedisks" echo "[get_install_disk] Add disk: $disk $disk_data into $file_pre firstchoicedisks" + foundm2=1 break # M.2 raid modules are the OS install targets elif [ "$disk_driver" == "ahci" ]; then echo "$disk $disk_data" >> "$tmpfile""$file_pre""firstchoicedisks" @@ -221,6 +223,11 @@ if [ -z "$install_disk" ]; then for file in $tmpfile*; do rm $file; done + if [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ]; then + install_disk="/dev/md/Volume0_0" + elif [ "$foundm2" == 0 -a -b /dev/md/Volume0 ]; then + install_disk="/dev/md/Volume0" + fi fi rm -rf $tmpdir;