EXADATA升级—从11.2.3.1.0到11.2.3.3.0–(4)释放Solaris空间和升级计算节点

释放Solaris空间

Exadata在出厂的时候,默认安装了两个OS系统,一个是Linux,一个是Solaris X86,然后互相做RAID 1,我们在升级计算节点的时候,如果不释放掉Solaris就会报下列错误:

ERROR: Solaris disks are not reclaimed. This needs to be done before the upgrade. See the Exadata Database Machine documentation to claim the Solaris disks

我们可以使用出厂自带的脚本来查看计算节点本地盘的一个情况,这里可以看到,总共物理盘有4块,RDID的级别是1,拥有dual boot。

[root@gxx2db01 oracle.SupportTools]# ./reclaimdisks.sh -check
[INFO] This is SUN FIRE X4170 M2 SERVER machine
[INFO] Number of LSI controllers: 1
[INFO] Physical disks found: 4 (252:0 252:1 252:2 252:3)
[INFO] Logical drives found: 3
[INFO] Dual boot installation: yes
[WARNING] Some lvm logical volume(s) resizes on other than /dev/sda device
[INFO] Linux logical drive: 0
[INFO] RAID Level for the Linux logical drive: 1
[INFO] Physical disks in the Linux logical drive: 2 (252:0 252:1)
[INFO] Dedicated Hot Spares for the Linux logical drive: 0
[INFO] Global Hot Spares: 0
[INFO] Valid dual boot configuration found for Linux: RAID1 from 2 disks

释放solaris操作系统很简单,运行reclaimdisks.sh脚本释放即可,当然在运行的时候我遇到了一个小问题,这个脚本只认系统默认的盘和卷组,而南宁电网自己配置了一个新的VG(就是用作备份的那个datavg),因为我们在前面做了备份的操作,我把这个VG删除,重新运行脚本执行成功,当然你也可以改脚本运行,不过我们做了尝试,还是会把你新建的VG配置信息给清理掉。所以这个动作还是很危险的,我们在做这个之前,一定要做好备份。在运行的过程中,我们可以去监控日志/var/log/cellos/reclaimdisks.bg.log,看它具体都做了些什么操作。

[root@gxx2db02 oracle.SupportTools]# ./reclaimdisks.sh -free -reclaim

Started from ./reclaimdisks.sh
[INFO] Free mode is set
[INFO] Reclaim mode is set
[INFO] This is SUN FIRE X4170 M2 SERVER machine
[INFO] Number of LSI controllers: 1
[INFO] Physical disks found: 4 (252:0 252:1 252:2 252:3)
[INFO] Logical drives found: 3
[INFO] Dual boot installation: yes
[INFO] Linux logical drive: 0
[INFO] RAID Level for the Linux logical drive: 1
[INFO] Physical disks in the Linux logical drive: 2 (252:0 252:1)
[INFO] Dedicated Hot Spares for the Linux logical drive: 0
[INFO] Global Hot Spares: 0
[INFO] Non-linux physical disks that will be reclaimed: 2 (252:2 252:3)
[INFO] Non-linux logical drives that will be reclaimed: 2 (1 2)
Remove logical drive 1

Adapter 0: Deleted Virtual Drive-1(target id-1)
Exit Code: 0x00
Remove logical drive 2

Adapter 0: Deleted Virtual Drive-2(target id-2)

Exit Code: 0x00
[INFO] Remove Solaris entries from /boot/grub/grub.conf
[INFO] Disk reclaiming started in the background with parent process id 17405.
[INFO] Check the log file /var/log/cellos/reclaimdisks.bg.log.
[INFO] This process may take about two hours.
[INFO] DO NOT REBOOT THE NODE.
[INFO] The node will be rebooted automatically upon completion.

升级计算节点

Exadata计算节点的升级很简单,先要在计算节点上关闭CRS和数据库,并把CRS设置成为disable状态,这样在安装过程中发生重启,也不会去启动集群和数据库。

[root@gxx2db01 tmp]dcli -g dbs_group -l root "/u01/app/11.2.0.3/grid/bin/crsctl stop crs -f"
[root@gxx2db01 tmp]dcli -g dbs_group -l root "ps -ef | grep d.bin"
[root@gxx2db01 tmp]dcli -g dbs_group -l root "/u01/app/11.2.0.3/grid/bin/crsctl disable crs"

在这里我们需要使用工具DB Node Update Utility,也就是补丁16486998所提供的脚本。详细内容可以参考文档dbnodeupdate.sh: Exadata Database Server Patching using the DB Node Update Utility (文档 ID 1553103.1)。这篇文档有该脚本很多的使用案例。我们使用的方式是ISO IMAGE的方式,还可以使用http的方式。升级之前最好先使用-v参数预检测一把。还有一个注意的地方,如果你的solaris系统没有被reclaim掉的话,执行该脚本就会报错。

整个升级过程如下所示:

[root@gxx2db02 u01]# ./dbnodeupdate.sh -u -l /u01/p17809253_112330_Linux-x86-64.zip
##########################################################################################################################
#                                                                                                                        
# Guidelines for using dbnodeupdate.sh (rel. 3.55):                                                                      #                                                                                                              
# - Prerequisites for usage:                                                                                             #
#         1. Refer to dbnodeupdate.sh options. See MOS 1553103.1                                                         
#         2. Use the latest release of dbnodeupdate.sh. See patch 16486998                                               
#         3. Run the prereq check with the '-v' option.                                                                  #                                                                                                                  #
#   I.e.:  ./dbnodeupdate.sh -u -l /u01/my-iso-repo.zip -v                                                               #
#          ./dbnodeupdate.sh -u -l http://my-yum-repo -v                                                                 #
#                                                                                                                        
# - Prerequisite dependency check failures can happen due to customization:                                              #
#     - The prereq check detects dependency issues that need to be addressed prior to running a successful update.       
#     - Customized rpm packages may fail the built-in dependency check and system updates cannot proceed until resolved. 
#                                                                                                                        
#   When upgrading from releases later than 11.2.2.4.2 to releases before 11.2.3.3.0:                                    #
#      - Conflicting packages should be removed before proceeding the update.                                            #                                                                                                                     
#   When upgrading to releases 11.2.3.3.0 or later:                                                                      #
#      - When the 'exact' package dependency check fails 'minimum' package dependency check will be tried.               #
#      - When the 'minimum' package dependency check also fails,                                                         #
#        the conflicting packages should be removed before proceeding.                                                   #                                                                                                                       
# - As part of the prereq checks and as part of the update, a number of rpms will be removed.                            #
#   This removal is required to preserve Exadata functioning. This should not be confused with obsolete packages.        
#      - See /var/log/cellos/packages_to_be_removed.txt for details on what packages will be removed.                                                                                                                                     
# - In case of any problem when filing an SR, upload the following:                                                      #
#      - /var/log/cellos/dbnodeupdate.log                                                                                #
#      - /var/log/cellos/dbnodeupdate..diag                                                                       #
#      - where  is the unique number of the failing run.                                                          #
#                                                                                                                        #
##########################################################################################################################
Continue ? [y/n]
y
  (*) 2014-09-06 21:53:28: Unzipping helpers (/u01/dbupdate-helpers.zip) to /opt/oracle.SupportTools/dbnodeupdate_helpers
  (*) 2014-09-06 21:53:28: Initializing logfile /var/log/cellos/dbnodeupdate.log
  (*) 2014-09-06 21:53:28: Collecting system configuration details. This may take a while...
  (*) 2014-09-06 21:53:41: Validating system details for known issues and best practices. This may take a while...
  (*) 2014-09-06 21:53:41: Checking free space in /u01/iso.stage.060914215326
  (*) 2014-09-06 21:53:41: Unzipping /u01/p17809253_112330_Linux-x86-64.zip to /u01/iso.stage.060914215326, this may take a while
  (*) 2014-09-06 21:54:00: Original /etc/yum.conf moved to /etc/yum.conf.060914215326, generating new yum.conf
  (*) 2014-09-06 21:54:00: Generating Exadata repository file /etc/yum.repos.d/Exadata-computenode.repo

  Warning: Network routing configuration requires change before updating database server. See MOS 1306154.1

Continue ? [y/n]
y

  (*) 2014-09-06 21:54:17: Validating the specified source location.
  (*) 2014-09-06 21:54:18: Cleaning up the yum cache.
  (*) 2014-09-06 21:54:18: Preparing update for releases 11.2.3.3.0 and later
  (*) 2014-09-06 21:54:28: Performing yum package dependency check for 'exact' dependencies. This may take a while...
  (*) 2014-09-06 21:54:32: 'Exact'package dependency check succeeded.
  (*) 2014-09-06 21:54:32: 'Minimum' package dependency check succeeded.

Active Image version   : 11.2.3.1.0.120304
Active Kernel version  : 2.6.18-274.18.1.0.1.el5
Active LVM Name        : /dev/mapper/VGExaDb-LVDbSys1
Inactive Image version : n/a
Inactive LVM Name      : /dev/mapper/VGExaDb-LVDbSys2
Current user id        : root
Action                 : upgrade
Upgrading to           : 11.2.3.3.0.131014.1 (to exadata-sun-computenode-exact)
Baseurl                : file:///var/www/html/yum/unknown/EXADATA/dbserver/060914215326/x86_64/ (iso)
Iso file               : /u01/iso.stage.060914215326/repoimage.iso
Create a backup        : Yes
Shutdown stack         : No (Currently stack is down)
Hotspare exists        : Yes, but will NOT be reclaimed as part of this update)
                       : Raid reconstruction to add the hotspare to be done later when required
RPM exclusion list     : Not in use (add rpms to /etc/exadata/yum/exclusion.lst and restart dbnodeupdate.sh)
RPM obsolete list      : /etc/exadata/yum/obsolete.lst (lists rpms to be removed by the update)
                       : RPM obsolete list is extracted from exadata-sun-computenode-11.2.3.3.0.131014.1-1.x86_64.rpm
Exact dependencies     : No conflicts
Minimum dependencies   : No conflicts
Logfile                : /var/log/cellos/dbnodeupdate.log (runid: 060914215326)
Diagfile               : /var/log/cellos/dbnodeupdate.060914215326.diag
Server model           : SUN FIRE X4170 M2 SERVER
dbnodeupdate.sh rel.   : 3.55 (always check MOS 1553103.1 for the latest release of dbnodeupdate)
Note                   : After upgrading and rebooting run './dbnodeupdate.sh -c' to finish post steps.

The following known issues will be checked for and automatically corrected by dbnodeupdate.sh:
  (*) - Issue 1.7 - Updating database servers with customized partitions may remove partitions already in use
  (*) - Issue - 11.2.3.3.0 and 12.1.1.1.0 require disabling SDP APM settings. See MOS 1623834.1
  (*) - Issue - Incorrect validation name for ExaWatcher in /etc/cron.daily/cellos stops ExaWatcher
  (*) - Issue - tls_checkpeer and tls_crlcheck mis-configured in /etc/ldap.conf

The following known issues will be checked for but require manual follow-up:
  (*) - Issue - Database Server upgrades may hit network routing issues after the upgrade
  (*) - Issue - Yum rolling update requires fix for 11768055 when Grid Infrastructure is below 11.2.0.2 BP12
  (*) - Updates from releases earlier than 11.2.3.3.0 may hang during reboot. See MOS 1620826.1 for more details

Continue ? [y/n]
y
  (*) 2014-09-06 21:54:57: Verifying GI and DB's are shutdown
  (*) 2014-09-06 21:54:59: Collecting console history for diag purposes
  (*) 2014-09-06 21:55:15: Unmount of /boot successful
  (*) 2014-09-06 21:55:15: Check for /dev/sda1 successful
  (*) 2014-09-06 21:55:15: Mount of /boot successful
  (*) 2014-09-06 21:55:15: Disabling stack from starting
  (*) 2014-09-06 21:55:15: Performing filesystem backup to /dev/mapper/VGExaDb-LVDbSys2. Avg. 30 minutes (maximum 120) depends per environment.....
  (*) 2014-09-06 21:59:26: Backup successful
  (*) 2014-09-06 21:59:26: OSWatcher stopped successful
  (*) 2014-09-06 21:59:27: Validating the specified source location.
  (*) 2014-09-06 21:59:28: Cleaning up the yum cache.
  (*) 2014-09-06 21:59:28: Preparing update for releases 11.2.3.3.0 and later
  (*) 2014-09-06 21:59:32: Performing yum update. Node is expected to reboot when finished.
  (*) 2014-09-06 22:01:56: Waiting for post rpm script to finish. Sleeping another 60 seconds (60 / 900)

Remote broadcast message (Sat Sep  6 22:02:02 2014):

Exadata post install steps started.
It may take up to 5 minutes.
  (*) 2014-09-06 22:02:56: Waiting for post rpm script to finish. Sleeping another 60 seconds (120 / 900)
Remote broadcast message (Sat Sep  6 22:03:15 2014):
Exadata post install steps completed with success

整个Update需要40-50分钟,系统会重启几次。在这中间可以观察到系统重启后,能ping通,但是ssh是不通的,然后要等待最后一次自动重启之后才能SSH连上。这期间最好不要着急。

分享到: 更多