changeset 11682:6b625d44458f

6900535 With the fix of CR 6890498, /etc/vfstab is not updated for luns which are not under svm
author Raghuram Prahlada <Raghuram.Prahlada@Sun.COM>
date Thu, 18 Feb 2010 10:17:20 +0530
parents fe992d6ccc26
children d7b84426fba6
files usr/src/cmd/stmsboot/mpxio-upgrade usr/src/cmd/stmsboot/stmsboot.sh
diffstat 2 files changed, 23 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/stmsboot/mpxio-upgrade	Wed Feb 17 22:59:58 2010 -0500
+++ b/usr/src/cmd/stmsboot/mpxio-upgrade	Thu Feb 18 10:17:20 2010 +0530
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -162,7 +162,17 @@
 	exec < $vfstab; readvfstab "/usr"
 	ret_val=0
 	if [ -n "$mountp" ]; then
-		new_special=`$STMSBOOTUTIL -m $special`
+		case "$special" in
+		/dev/md/*)
+			new_special=$special
+			;;
+		/dev/vx/*)
+			new_special=$special
+			;;
+		*)
+			new_special=`$STMSBOOTUTIL -m $special`
+			;;
+		esac
 		
 		if [ "$fstype" = "cachefs" ]; then
 			# Mount read-only without the cache.
@@ -351,7 +361,13 @@
 			cecho ""
 			cecho "stmsboot: vfstab has been updated"
 			
-			update_dumpconf 
+			if update_dumpconf; then
+				# update svm configuration to reflect new names
+				if [ -s /kernel/drv/md.conf ] && \
+				    [ -x $METADEVADM ]; then
+					$METADEVADM -r >/dev/msglog 2>&1
+				fi
+			fi
 			
 			MACH=`$UNAME -p`
 			if [ "$MACH" = "i386" ]; then
--- a/usr/src/cmd/stmsboot/stmsboot.sh	Wed Feb 17 22:59:58 2010 -0500
+++ b/usr/src/cmd/stmsboot/stmsboot.sh	Thu Feb 18 10:17:20 2010 +0530
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 #
@@ -74,8 +74,6 @@
 new_bootpath=""
 CLIENT_TYPE_PHCI=""
 CLIENT_TYPE_VHCI="/scsi_vhci"
-new_rootdev=""
-svm_md_device=""
 
 #
 # Copy all entries (including comments) from source driver.conf
@@ -263,11 +261,9 @@
 			$EEPROM bootpath="$new_bootpath"
 		fi
 
-		if [ "$svm_md_device" != "NOT_MAPPED" ]; then
-			# Enable the mpxio-upgrade service for the reboot
-			$SVCADM disable -t $STMSINSTANCE
-			$SVCCFG -s $STMSINSTANCE "setprop general/enabled=true"
-		fi
+		# Enable the mpxio-upgrade service for the reboot
+		$SVCADM disable -t $STMSINSTANCE
+		$SVCCFG -s $STMSINSTANCE "setprop general/enabled=true"
 	else
 		need_bootscript=0
 	fi
@@ -630,10 +626,6 @@
 			    $AWK '{print $1}' | $SED -e"s,rdsk,dsk,g" \
 			    >$BOOTDEVICES
 		fi
-		new_rootdev=`$DF /|$AWK -F":" '{print $1}' | \
-			$AWK -F"(" '{print $2}'| \
-			$SED -e"s,dsk,rdsk," -e"s,[ ]*),,"`
-		svm_md_device=`$STMSBOOTUTIL -m $new_rootdev`
 		update_sysfiles
 	else
 		echo "STMS is already ${cmd}d. No changes or reboots needed"