Monday, February 21, 2011

Solaris Live upgrade Commands and steps

lustauts  - To know the Boot Environment status

lucreate - To Create new Boot Environment

luactivate - To activate a Boot Environment


ludelete    - To delete a  Boot Environment


 
The Below Steps shows ho to create new boot eenvironment,upgrade the Solaris to new release,Patch the Solaris kernel and update the netbackup client . This task is performed the server which is having two zones in it. Please avoid the steps for zones , if you don't have zone in your server .


1. Check mirrors:


# metastat

2. Reboot the server an verify all is ok.

3. Halt the zones

zoneadm -z osstelsun121b halt

zoneadm -z osstelsun121a halt

4. Create new devices for solaris zones

BE OK                     BACKUP

Sol10_1009           Sol10_0606

d101                   d201 /zones

d102                  d202 osstelsun121a

d103                  d203 osstelsun121b


metainit d201 -p d100 1g

metainit d202 -p d100 3g

metainit d203 -p d100 3g

newfs /dev/md/rdsk/d201

newfs /dev/md/rdsk/d202

newfs /dev/md/rdsk/d203

mkdir /zones_bu

mount /dev/md/dsk/d201 /zones_bu

cd /zones

find . -mount  cpio -pmduv /zones_bu

mkdir /zones_bu/osstelsun121a /zones_bu/osstelsun121b

mount /dev/md/dsk/d202 /zones_bu/osstelsun121a

cd /zones/osstelsun121a

find . -mount cpio -pmduv /zones_bu/osstelsun121a

mount /dev/md/dsk/d203 /zones_bu/osstelsun121b

cd /zones/osstelsun121b

find . -mount cpio -pmduv /zones_bu/osstelsun121b

5. Check the fs permissions /zones_bu/XXX with 700.

6.Unmount all backup metadevice

umount /zones_bu/osstelsun121a

umount /zones_bu/osstelsun121b

umount /zones_bu


6. Dettach d20

# metadettach d0 d20

7. Mount d20 on /mnt and modify vfstab (change d0 as d20,d101 as 201,d102 as d202, d103 as d203) .

Modify /mnt/etc/system and change the autoboot as false if you want and change the new boot device as d20.
eeprom auto-boot?=false

edit /mnt/etc/system, modify to this for booting from d20

rootdev:/pseudo/md@0:0,20,blk

8. Boot from d20 and verify all work fine (also zones)

8.1 . Configure nic on vlan5 and mount nfs

#ifconfig ipge3 192.132.7.220 netmask 255.255.255.0 up


# mount -F nfs 192.32.8.11:/export/install /mnt

8.2 Install or reinstall liveupgrade packages from /mnt


# pkgrm SUNWlucfg

# pkgrm SUNWluu

# pkgrm SUNWlur

# pkadd SUNWlucfg

# pkadd SUNWluu

# pkadd SUNWlur


9. Install the patch cluster

# init s

# ./installcluster --s10cluster

# reboot

Note: Make a backup of sendmail.cf, bp.conf.

10. Create the BEs. (Current BE is d20-Sol10_0106. We are creating new BE on first metadevice of root aond other FS)

lucreate -c Sol10_0606 -n Sol10_1009 -m /:/dev/md/dsk/d0:preserve,ufs -m /zones:/dev/md/dsk/d101:preserve,ufs -m /zones/osstelsun121a:/dev/md/dsk/d102:preserve,ufs -m /zones/osstelsun121b:/dev/md/dsk/d103:preserve,ufs

Note: Stop nimbus to avoid monitoring the new fs due to this step mount all new fs as /.altxxxx.

11. Verify status of BEs.

# lustatus

# lufslist Sol10_1009

# lufslist Sol10_0606

12. Boot with new BE Sol10_1009 and check all work ok.

# luactivate Sol10_1009

# lustatus

# init 6

13. Boot backup BE Sol10_0606 and check all work ok.

# luactivate Sol10_0606

# lustatus

# init 6


14. Configure nic on vlan5

ifconfig ipge3 192.132.7.220 netmask 255.255.255.0 up




15. Monunt NFS server media:

# ifconfig ipge3 192.132.7.220 netmask 255.255.255.0 up

# mount -F nfs 192.32.8.11:/export/install /mnt

16. Start the liveupgrade process.

# luupgrade -u -n Sol10_1009 -s /mnt/media/Solaris_10_1009

17. Activate the upgraded BE.

# luactivate Sol10_1009

# lustatus

# init 6

18. Check release and patch kernel.

# showrev

# more /etc/release

19. Install the patch cluster.

# init s

# ./installcluster --s10cluster

# reboot


20. Check release and patch kernel.

# showrev

# more /etc/release

21. Install oracle patches:

# ls -ltr

total 29664

-rw-r--r-- 1 roperator sysadmin 1784548 Jan 7 20:20 119963-21.zip

-rw-r--r-- 1 roperator sysadmin 332942 Jan 7 20:20 120753-08.zip

-rw-r--r-- 1 roperator sysadmin 11357181 Jan 7 20:20 124861-19.zip

-rw-r--r-- 1 roperator sysadmin 1665130 Jan 7 20:20 137321-01.zip

osstelsun121:[/patches/oracle]

22. Install the liveupgrade patches and bundle if you want.Maybe this can help in the future if we need to do another upgrade.

total 15820

-rw-r--r-- 1 roperator sysadmin 6767812 Jan 7 20:19 119246-38.zip

-rw-r--r-- 1 roperator sysadmin 65044 Jan 7 20:19 121428-13.zip

-rw-r--r-- 1 roperator sysadmin 802446 Jan 7 20:19 121430-53.zip

-rw-r--r-- 1 roperator sysadmin 107546 Jan 7 20:19 138623-02.zip

-rw-r--r-- 1 roperator sysadmin 79108 Jan 7 20:19 140914-02.zip

-rw-r--r-- 1 roperator sysadmin 223232 Jan 7 20:34 123121-02.tar

osstelsun121:[/patches/liveupgrade]

23. Modifiy file descriptors to 65536 on /etc/system

* File Descriptors

set rlim_fd_cur=65536

set rlim_fd_max=65536


24. Install Netbackup 6.5 client.

# more version

NetBackup-Solaris9 6.0MP4

osstelsun121:[/usr/openv/netbackup/bin]



# mv /usr/openv /usr/openv.ori

# mkdir openv

# cd /patches/veritas

# tar -xvf NB_65_CLIENTS3_20070723.tar

# cd NB_65_CLIENTS3_20070723

# ./install

# more /usr/openv/netbackup/bin/version

25. Install the 6.5.4 update

# tar -xvf NB_6.5.4_Patches_Solaris.tar

# ./NB_update.install Seleccionar: NB_ORA_6.5.4

NB_CLT_6.5.4 *

NB_DMP_6.5.4

NB_ENC_6.5.4

NB_INX_6.5.4

NB_JAV_6.5.4 *

NB_LOT_6.5.4

NB_NOM_6.5.4

NB_ORA_6.5.4 *

NB_SAP_6.5.4

# more /usr/openv/netbackup/bin/version

26. Install the Netbackup fix for 6.5.4.

# unzip NB_6.5.4_ET1862252_1_347226.zip

# chmod 755 eebinstaller.1862252.1.solaris10

# ./eebinstaller.1862252.1.solaris10


Note. After this step DBA need to run the script with oracle account. Notify him.

27. Copy the backup of bp.conf and exclude_list in the new paths

# cp /usr/openv.ori/netbackup/bp.conf /usr/openv/netbackup/bp.conf

# cp /usr/openv.ori/netbackup/exclude_list /usr/openv/netbackup/exclude_list


28. Create a script on init.d and rc2.d for Netbackup client parameters:

init.d:

-rwxr-xr-x 1 root root 292 Feb 4 18:07 set_netbackup_parm

rc2.d:

lrwxrwxrwx 1 root root 30 Feb 4 18:07 S99set-netbackup-parm -> /etc/init.d/set_netbackup_parm



# cat S99set-netbackup-parm

#!/bin/sh



/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000

/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500

/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000

/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500

/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65535



29. Configure Sendmail.



30. Reboot the server and verify all is ok.

31.Delete old BE after two days and attach d20 to d0 ( ludelete Sol10_0606)

32. Remove backup partition created for zones (d201,d202 & d203)

osstelsun121:[/etc/mail

# lustatus

Boot Environment Is Active Active Can Copy

Name Complete Now On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

Sol10_0606 yes no no yes -

Sol10_1009 yes yes yes no -

osstelsun121:[/etc/mail]

# cd

osstelsun121:[/root]

# lustatus

Boot Environment Is Active Active Can Copy

Name Complete Now On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

Sol10_0606 yes no no yes -

Sol10_1009 yes yes yes no -

osstelsun121:[/root]

# cat /etc/release

Solaris 10 10/09 s10s_u8wos_08a SPARC

Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.

Use is subject to license terms.

Assembled 16 September 2009

osstelsun121:[/root]

# showrev

Hostname: osstelsun121

Hostid: 847e45e8

Release: 5.10

Kernel architecture: sun4v

Application architecture: sparc

Hardware provider: Sun_Microsystems

Domain:

Kernel version: SunOS 5.10 Generic_142909-17

osstelsun121:[/root]

#



osstelsun121:[/root]

# lustatus

Boot Environment Is Active Active Can Copy

Name Complete Now On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

Sol10_0606 yes no no yes -

Sol10_1009 yes yes yes no -

osstelsun121:[/root]

# ludelete Sol10_0606

Determining the devices to be marked free.

Updating boot environment configuration database.

Updating boot environment description database on all BEs.

Updating all boot environment configuration databases.

Boot environment deleted.

osstelsun121:[/root]

# lustatus

Boot Environment Is Active Active Can Copy

Name Complete Now On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

Sol10_1009 yes yes yes no -

osstelsun121:[/root]

#

osstelsun121:[/root]

# lufslist Sol10_1009

boot environment name: Sol10_1009

This boot environment is currently active.

This boot environment will be active on next system boot.



Filesystem fstype device size Mounted on Mount Options

----------------------- -------- ------------ ------------------- --------------

/dev/md/dsk/d1 swap 34360688640 - -

/dev/md/dsk/d0 ufs 18021777408 / logging

/dev/md/dsk/d50 ufs 12171018240 /var/audit logging

/dev/md/dsk/d101 ufs 1073741824 /zones logging

/dev/md/dsk/d102 ufs 3221225472 /zones/osstelsun121a logging

/dev/md/dsk/d103 ufs 3221225472 /zones/osstelsun121b logging

osstelsun121:[/root]

#

Issues and work around

==================================

1.) Try this command if you are unable to create new BE

lucreate -C /dev/dsk/c1t1d0s0 -c Sol10_0106 -n Sol10_1009 -m /:/dev/md/dsk/d0:preserve,ufs


2.)Follow below steps if the server failed to boot after live upgrade and showing below error while rebooting after live upgrade

This was the issue

init 6
Creating boot_archive for /.alt.Sol10_1009

mkdir: Failed to make directory "/.alt.Sol10_1009/var/tmp/create_ramdisk.20062.tmp"; Read-only file system

Could not create temporary directory //.alt.Sol10_1009/var/tmp/create_ramdisk.20062.tmp

bootadm: Command '/.alt.Sol10_1009//boot/solaris/bin/create_ramdisk -R /.alt.Sol10_1009' failed to create boot archive

cannot unmount '/var/audit': Device busy

cannot unmount '/usr/sap/MTT': Device busy

cannot unmount '/usr/sap/EPT': Device busy

cannot unmount '/sapmnt/MTT': Device busy

cannot unmount '/sapmnt/EPT': Device busy

svc.startd: The system is down.

syncing file systems... done

rebooting...


work around done .

# mount /dev/md/dsk/d0 /mnt

osstelsun121:[/root]



# bootadm update-archive -v -R /mnt

stale /mnt//kernel/strmod/sparcv9/nattymod

cannot find: /mnt/etc/cluster/nodeid: No such file or directory

cannot find: /mnt/etc/mach: No such file or directory

Creating boot_archive for /mnt

updating /mnt/platform/sun4v/boot_archive

15+0 records in

15+0 records out


============================================

No comments: