From c6c70e5df12fd667e5be61f4879e4bbcc1730959 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 16 Jan 2019 13:29:10 -0500 Subject: [PATCH 1/3] 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; From d527bb0b86d367682afe4e502b86028dfc0161c6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 16 Jan 2019 14:37:50 -0500 Subject: [PATCH 2/3] Support SuSE style RSTe SuSE renames the RSTe volume in the middle. --- xCAT-server/share/xcat/install/scripts/getinstdisk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/getinstdisk b/xCAT-server/share/xcat/install/scripts/getinstdisk index 5d7acce3a..33daf5dc1 100644 --- a/xCAT-server/share/xcat/install/scripts/getinstdisk +++ b/xCAT-server/share/xcat/install/scripts/getinstdisk @@ -223,10 +223,15 @@ if [ -z "$install_disk" ]; then for file in $tmpfile*; do rm $file; done - if [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ]; then + if [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ] && grep suse /etc/os-release; then + install_disk="/dev/md/Volume0" + echo "[get_install_disk]The install_disk is $install_disk by RSTe detection." + elif [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ]; then install_disk="/dev/md/Volume0_0" + echo "[get_install_disk]The install_disk is $install_disk by RSTe detection." elif [ "$foundm2" == 0 -a -b /dev/md/Volume0 ]; then install_disk="/dev/md/Volume0" + echo "[get_install_disk]The install_disk is $install_disk by RSTe detection." fi fi rm -rf $tmpdir; From 2222e61612e051042d999eb3a5016e7824a862dd Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 16 Jan 2019 15:02:20 -0500 Subject: [PATCH 3/3] Adapt SLES to only modify SLES12 SLE15 uses Volume0_0, not Volume0 like SLES12 --- xCAT-server/share/xcat/install/scripts/getinstdisk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/getinstdisk b/xCAT-server/share/xcat/install/scripts/getinstdisk index 33daf5dc1..14c232748 100644 --- a/xCAT-server/share/xcat/install/scripts/getinstdisk +++ b/xCAT-server/share/xcat/install/scripts/getinstdisk @@ -223,7 +223,7 @@ if [ -z "$install_disk" ]; then for file in $tmpfile*; do rm $file; done - if [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ] && grep suse /etc/os-release; then + if [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ] && grep SLES /etc/os-release; then install_disk="/dev/md/Volume0" echo "[get_install_disk]The install_disk is $install_disk by RSTe detection." elif [ "$foundm2" == 0 -a -b /dev/md/Volume0_0 ]; then