# upgrade sparc sun4u from S9u5 to S10u6 UFS and finally to S10u6 ZFS # (S9 has no ZFS support - so can't go directly to ZFS) # for more information see: # http://iws.cs.uni-magdeburg.de/~elkner/luc/ufs2zfs.html # http://iws.cs.uni-magdeburg.de/~elkner/luc/lutrouble.html#debug # split hw mirror - only for LSI1020, LSI1030, SAS1064, or SAS1068 HBA # otherwise dataloss + raidctl -d c1t0d0 + touch /reconfigure + init 6 + tcsh setenv CD /net/hathor/pool1/install/sparc/Solaris_10_u6-ga1 setenv JUMPDIR /net/hathor/pool1/install/jumpstart mount /local/misc set path = ( /usr/bin /usr/sbin /local/misc/sbin ) pkgrm SUNWluu SUNWlur SUNWlucfg pkgadd -d $CD/Solaris_10/Product SUNWluu SUNWlur SUNWlucfg pca -a -d pca -i pkgchk -v SUNWscpr checkpatches.sh -p 115689-01 112951-13 113713-23 113280-07 114482-04 114329-02 \ 114636-04 114006-02 113023-01 113859-03 137477-01 121430-31 gsed -i -e '/^\/var\/mail/ s,^,#,' /etc/lu/synclist # not really required since S9 has no zones gpatch -p0 -d / -b -z .orig < /local/misc/etc/lu-5.10.patch # check swap size on c1t0d0 printf 'p\np\n' | format c1t0d0 | grep swap # assign same swap size to c1t1d0s1 and ALL remaining space to c1t1d0s0 format c1t1d0 # workaround for: # Assertion failed: LU_SML_TAG__ISVALID(a_rspTag), file lu_rru.c, line 381 # Abort (core dumped) setenv LC_CTYPE C lucreate -c s9u5 -n s6u10ufs \ -m /:/dev/dsk/c1t1d0s0:ufs -m '-:/dev/dsk/c1t1d0s1:swap' $JUMPDIR/mkProfile.sh -u $CD/Solaris_10 echo 'cluster SUNWC4u1 delete' >> /tmp/profile.orig echo 'cluster SUNWCcvc delete' >> /tmp/profile.orig cp /tmp/profile.orig /var/tmp/profile rm -f /var/tmp/upgrade.err /var/tmp/upgrade.out # workaround for: # /usr/sbin/luupgrade[254]: 9263 Killed # ERROR: The upgrade simulation failed; pfinstall returned these diagnostics: # ld.so.1: pfinstall: fatal: libspmizones.so.1: open failed: No such file or directory unsetenv LD_LIBRARY_PATH_32 unsetenv LD_LIBRARY_PATH_64 # workaround for: # ERROR: Field 2 - Invalid geographic region for Solaris CD image (C_Europe) gsed -i -e '/geo C_Europe/ d' /var/tmp/profile luupgrade -u -n s6u10ufs \ -l /var/tmp/upgrade.err -o /var/tmp/upgrade.out \ -s $CD -j /var/tmp/profile -D lumount s6u10ufs /mnt # resolve any issues cd /mnt/var/sadm/system/data/ less upgrade_failed_pkgadds gpatch -p0 -d /mnt -b -z .orig < /local/misc/etc/lu-5.10.patch cleanup4humans.sh /mnt cd /mnt/var/tmp less preserved.txt renamed.txt restored.txt removeSafe.sh \ symlinkchange.txt typechange.txt misc.txt cd / luumount s6u10ufs luactivate s6u10ufs # on Error: # setenv boot-device /pci@1f,700000/scsi@2/disk@0,0:a # connect on another terminal to ALOM console (console -f) init 6 ssh $host svcs -xv svcadm disable cde-login svcadm disable print/rfc1179 # gsed is required on our env pkgadd -d /net/isis.iws/export/lnf/sparc LNFsed # move any remaining stuff from c1t0d0 to another disk (e.g. c1t1d0 or c1t3d0) # and ludelete s9u5 # and assign all space on c1t0d0 to its s0 format c1t0d0 zpool create -f -o failmode=continue rpool c1t0d0s0 zfs set mountpoint=/rpool rpool zfs create -V 4g rpool/swap zfs create -V 4g rpool/dump # can't go directly to s10u6, since BE needs to be created having a separate # /var (add /var entry to /etc/lu/ICF.1 is not sufficient - lu* gets confused) zfs create -o mountpoint=legacy rpool/ROOT zfs create -o canmount=noauto rpool/ROOT/zfs1008BE zpool set bootfs=rpool/ROOT/zfs1008BE rpool zfs set mountpoint=/ rpool/ROOT/zfs1008BE lucreate -n zfs1008BE -p rpool lumount zfs1008BE /mnt luumount zfs1008BE # original BE has 'geo N_America' aka en_CA,fr_CA,es_MX,en_US but we want # 'geo C_Europe' as well. However this breaks luupgrade - adding all the # locales using locale keywords doesn't work either :((( # WAITING FOR A BUG FIX # TBD $JUMPDIR/mkProfile.sh -u $CD/Solaris_10 echo 'cluster SUNWC4u1 delete' >> /tmp/profile.orig echo 'cluster SUNWCcvc delete' >> /tmp/profile.orig cp /tmp/profile.orig /var/tmp/profile rm -f /var/tmp/upgrade.err /var/tmp/upgrade.out gsed -i -e '/geo C_Europe/ d' /var/tmp/profile luupgrade -u -n zfs1008BE \ -l /var/tmp/upgrade.err -o /var/tmp/upgrade.out \ -s $CD -j /var/tmp/profile zfs mount rpool/ROOT/s10u6 zfs create rpool/ROOT/s10u6/mnt cd /mnt/var find . -depth -print | cpio -puvmdP@ /mnt/mnt/ cd /mnt rm -rf /mnt/var zfs rename rpool/ROOT/s10u6/mnt rpool/ROOT/s10u6/var mkdir /mnt/mnt rm -rf lost+found var/lost+found usr/lost+found opt/lost+found cd / zfs umount rpool/ROOT/s10u6 zfs set mountpoint=/ rpool/ROOT/s10u6 zfs set canmount=noauto rpool/ROOT/s10u6/var echo 's10u6:/var:rpool/ROOT/s10u6/var:zfs:0' >>/etc/lu/ICF.1 rmdir /.alt.lucopy.* mkdir -p /rpool/platform/`uname -m`/ cp -p /platform/`uname -m`/bootlst /rpool/platform/`uname -m`/bootlst