﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>OracleBlog.cn -天堂向左 DBA向右</title>
	<atom:link href="http://www.oracleblog.cn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oracleblog.cn</link>
	<description>一个dba的平凡生活</description>
	<pubDate>Wed, 03 Mar 2010 04:17:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>解决Legato问题，相信LTT吧！</title>
		<link>http://www.oracleblog.cn/working-case/deal-with-legato-trust-ltt/</link>
		<comments>http://www.oracleblog.cn/working-case/deal-with-legato-trust-ltt/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 04:16:07 +0000</pubDate>
		<dc:creator>小荷</dc:creator>
		
		<category><![CDATA[..experience]]></category>

		<category><![CDATA[Working case]]></category>

		<guid isPermaLink="false">http://www.oracleblog.cn/?p=892</guid>
		<description><![CDATA[最近遇到某省的legato备份问题，这个问题在春节后一来就遇到了。在legato界面，我们看到的报错是：
……02/24/10 12:01:00 nsrd: savegroup info: starting&#160; db_arch (with 1 client(s))02/24/10 12:01:15 nsrd: Jukebox 'm... ]]></description>
			<content:encoded><![CDATA[<p>最近遇到某省的legato备份问题，这个问题在春节后一来就遇到了。在legato界面，我们看到的报错是：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">……<br />02/24/10 12:01:00 nsrd: savegroup info: starting&nbsp; db_arch (with 1 client(s))<br />02/24/10 12:01:15 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:01:15 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:01:53 nsrd: Jukebox 'msl6000' failed: No such file or directory<br />02/24/10 12:01:53 nsrd: Jukebox 'msl6000' failed: No such file or directory<br />02/24/10 12:01:54 nsrd: media info: suggest mounting QWB507L2 on ah-db01 for writing&nbsp; to pool 'miscdb'<br />02/24/10 12:01:54 nsrd: media waiting event: Waiting for 1 writable volumes to backup pool 'miscdb' tape(s) on ah-db01<br />02/24/10 12:01:56 nsrd: Jukebox 'msl6000' failed: No such file or directory<br />02/24/10 12:01:56 nsrd: Jukebox 'msl6000' failed: No such file or directory<br />02/24/10 12:02:05 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:05 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:14 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:14 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:21 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:21 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:40 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:40 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:44 nsrd: shutting down remote daemons<br />02/24/10 12:02:45 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:45 nsrd: Jukebox 'msl6000' failed: Input/output error<br />02/24/10 12:02:45 nsrd: media info: Suggest manually labeling a new writable volume for pool 'dbreport'<br />02/24/10 12:02:45 nsrd: media event cleared: Waiting for 1 writable volumes to backup pool 'miscdb' tape(s) on ah-db01<br />02/24/10 12:02:45 nsrd: media waiting event: Waiting for 1 writable volumes to backup pool 'miscdb' tape(s) on ah_bak01<br />02/24/10 12:02:53 savegrp: group db_arch aborted.<br />……</span></div></div>
<p>基本看到的情况是在备份的时候，开始做verify label的时候，报错No such file or directory和Input/output error，这个很有可能是在legato的界面中还能看到配置的driver，但是在调用这个driver的时候找不到实际的物理设备了。</p>
<p>于是在备份服务器上点开“硬件”-“设备管理器”，发现里面的磁带驱动器和介质变换器确实没有了！</p>
<p>请在机房的同事帮忙查看带库是否有问题，同事说带库已经down掉了。</p>
<p>重启带库，发现在备份服务器里面还是看不到driver，但是在client端，也就是数据库服务器上通过inquire还是能看到的。重启server，能看到driver了。再次尝试备份，备份到一半，一个driver消失了，备份卡住，再过一会儿，另一个driver也消失了，介质变换器也消失。</p>
<p>请机房的同事查看带库的情况，带库还是down了，是电源模块有问题，导致带库不稳定。等待设备厂家来更换电源模块。</p>
<p>更换完成电源模块后，启动带库，在备份主机只能看到一个driver，重启备份主机也是只能看到一个。厂家关闭备份主机后重新插拔了光纤卡，再次启动备份主机后，识别到了2个driver。但是测试备份时，只能一个driver备份，另一个driver会卡住。</p>
<p>尝试用清洗带清洗2个带子，但是发现报错：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">Error: Server refused connection.<br />02/24/10 15:49:14 nsrmmd #3: Cannot set \\.\Tape0 block size: 信号灯超时时间已到。<br />02/24/10 15:49:14 nsrd: media critical: TapeAlert flag &quot;Expired cleaning media&quot; has been posted for \\.\Tape0<br />02/24/10 15:49:14 nsrd: media warning: \\.\Tape0 reading: read open error: drive status is Drive reports no error - but state is unknown<br />Blat v2.4 w/GSS encryption (build : Jan 15 2005 08:32:11)</span></div></div>
<p>这个是清洗带过期的报错。于是更换清洗带。</p>
<p>更换之前尝试重新用jbconfig配置jukebook。</p>
<p>再次备份，发现2个driver都不能备份了！此时报错：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">02/24/10 17:15:41 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />02/24/10 17:15:51 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />02/24/10 17:15:52 nsrd: media warning: \\.\Tape0 reading: read open error: drive status is There is not a tape in the drive<br />02/24/10 17:15:52 nsrd: \\.\Tape0 1:Label without mount operation in progress</span></div></div>
<p>drive status is There is not a tape in the drive——难道是机械臂的问题？没有将磁带load到driver，请在机房的同事看了，确定是已经load进了driver。为什么会识别不到？</p>
<p>这个报错，在网上查资料是（见此<a href="http://www.tek-tips.com/viewthread.cfm?qid=1094563&#038;page=2">链接</a>）</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">I found the problem.<br />Customer has redundant fibre connections to drives and when they changed FC cables, they missed something, so NW worked with wrong devices scidev@4.0.0 instead scidev@2.0.0. Correct cabling solved the problem!!</span></div></div>
<p>请机房的同事检查光纤线的连接情况，结果确认从带库到光纤交换机的连接都正常。</p>
<p>问题出在哪里？我们再来回顾一下当前的情况：<br />
<code><strong><br />
（1）、备份服务器和备份client均能识别driver。在备份服务器端看到driver正常，驱动也正常安装。没有出现driver消失或者driver无法识别的硬件问题。通过inquire或者ioscan -fnCtape都能看到driver的情况。<br />
（2）、备份无法正常进行，做inventory清点没有问题，但是做label标签，甚至做一个mount磁带，都会报错drive status is There is not a tape in the drive。但是检查光纤连接正常。</strong></code></p>
<p>电源模块已经换过，硬件也能识别到。所以不太好确定硬件是否有问题。如果确定不了硬件问题，也就不好让设备厂家进行更换，因为之前设备厂家说在更换完电源模块之后，已经进行了一次硬件检查，说没有问题的。那我们如何检查硬件是否真的正常呢？这个时候，就要请出hp带库检测的专业工具，也就是本文的重点：LTT出场了。</p>
<p>HP LTT的全称是<a href="http://h20427.www2.hp.com/program/storage/cn/zh/products/storageworks/ltt/index.asp">HP StorageWorks Library and Tape Tools</a>，是HP用来检查HP带库的一个非常有用的工具。ltt可以安装在备份服务器端，模拟磁带的读写情况，来检查driver或者media是否正常。各个os的版本都有，可以在这里<a href="http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?pnameOID=406731&#038;locale=en_US&#038;taskId=135&#038;prodSeriesId=406729&#038;prodTypeId=12169">免费下载</a>。</p>
<p>我们在备份server安装好LTT之后，就开始测试了。注意此时的测试是脱离legato的，我们要在备份主机上证明带库的硬件是否存在问题。只有证明了硬件没有问题，才能配置调试后续的legato。</p>
<p>我们启动LTT之后，点击其中一个driver，让读取这话driver的信息，我们发现在测试过程中，经常遇到超时的情况：<br />
<a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp1ad.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp1ad.jpg" alt="" title="LTT检测driver超时" width="500" height="344" class="aligncenter size-full wp-image-896" /></a></p>
<p>当我们点击Test，开始测试Driver Assessment test的时候，发现报错没有磁带在driver中：<br />
<div id="attachment_898" class="wp-caption aligncenter" style="width: 509px"><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp1ce.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp1ce.jpg" alt="LTT Driver测试读取不到磁带" title="LTT Driver测试读取不到磁带" width="499" height="317" class="size-full wp-image-898" /></a><p class="wp-caption-text">LTT Driver测试读取不到磁带</p></div></p>
<p>而在这之前，我们已经手工的load了一卷磁带到Driver中：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">ah-db01#[/sbin/init.d]mc -p /dev/rac/c14t0d0 -r DS<br />DT_slot_1 FULL QWB425<br />DT_slot_2 EMPTY <br />ST_slot_1 FULL QWB417<br />ST_slot_2 FULL QWB418<br />ST_slot_3 FULL QWB419<br />ST_slot_4 FULL QWB420<br />ST_slot_5 FULL QWB421<br />ST_slot_6 FULL QWB422<br />ST_slot_7 FULL QWB423<br />ST_slot_8 FULL QWB424<br />ST_slot_9 EMPTY <br />ST_slot_10 FULL QWB434<br />ST_slot_11 FULL QWB435<br />ST_slot_12 FULL QWB497<br />ST_slot_13 FULL QWB496<br />ST_slot_14 FULL QWB499<br />ST_slot_15 FULL QWB506<br />ST_slot_16 FULL QWB498<br />ST_slot_17 FULL QWB508<br />ST_slot_18 FULL QWB500<br />ST_slot_19 FULL QWB510<br />ST_slot_20 FULL QWB511<br />ST_slot_21 EMPTY <br />ST_slot_22 FULL QWB502<br />ST_slot_23 FULL QWB501<br />ST_slot_24 FULL QWB509<br />ST_slot_25 EMPTY <br />ST_slot_26 EMPTY <br />ST_slot_27 FULL QWB507<br />ST_slot_28 EMPTY <br />ST_slot_29 FULL QWB433<br />ah-db01#[/sbin/init.d]</span></div></div>
<p>既然已经load进了带子，但是LTT做测试的时候还是认为没有带子，无法读写测试。那就应该可以确定是driver的问题了。</p>
<p>把该情况和设备厂家说明后，要求厂家换driver。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">换前：<br />scsidev@14.0.1:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; F59W|Tape, /dev/rmt/c14t0d1BESTnb<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; S/N: HUL5A04564<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ATNN:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; HUL5A04564<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WWNN:50060B00002BBEFE<br />scsidev@14.0.2:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; F59W|Tape, /dev/rmt/c14t0d2BESTnb<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; S/N: HUL5A07372<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ATNN:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; HUL5A07372<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WWNN:50060B00002BC9F6<br />换后：<br />scsidev@14.0.1:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; F59W|Tape, /dev/rmt/c14t0d1BESTnb<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; S/N: HUL5A04564<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ATNN:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; HUL5A04564<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WWNN:50060B00002BBEFE<br />scsidev@14.0.2:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; F6AW|Tape, /dev/rmt/c14t0d2BESTnb<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; S/N: HUL8A06538<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ATNN:HP&nbsp; &nbsp; &nbsp; Ultrium 2-SCSI&nbsp; HUL8A06538<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WWNN:50060B000028C845</span></div></div>
<p>更换后，在备份主机上更新新的driver的驱动，使得备份主机能识别新的driver。</p>
<p>我们注意新的driver的SN是HUL8A06538。在LTT界面，选择这个driver，开始准备测试：<br />
<div id="attachment_899" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp206.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp206.jpg" alt="更换driver后" title="更换driver后" width="500" height="321" class="size-full wp-image-899" /></a><p class="wp-caption-text">更换driver后</p></div><br />
在这里，不得不提一下，更换driver后，读取这个driver的信息很快，在identity这个driver信息的时候，不到2分钟就出来了。</p>
<p>我们手工load上一个带子做读写测试：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">ah-db01#[/sbin/init.d]mc -p /dev/rac/c14t0d0 -r DS<br />DT_slot_1 FULL QWB425<br />DT_slot_2 EMPTY <br />ST_slot_1 FULL QWB417<br />ST_slot_2 FULL QWB418<br />ST_slot_3 FULL QWB419<br />ST_slot_4 FULL QWB420<br />ST_slot_5 EMPTY <br />ST_slot_6 FULL QWB422<br />ST_slot_7 FULL QWB423<br />ST_slot_8 FULL QWB424<br />ST_slot_9 FULL QWB421<br />ST_slot_10 FULL QWB434<br />ST_slot_11 FULL QWB435<br />ST_slot_12 FULL QWB497<br />ST_slot_13 FULL QWB496<br />ST_slot_14 FULL QWB499<br />ST_slot_15 FULL QWB506<br />ST_slot_16 FULL QWB498<br />ST_slot_17 FULL QWB508<br />ST_slot_18 FULL QWB500<br />ST_slot_19 FULL QWB510<br />ST_slot_20 FULL QWB511<br />ST_slot_21 EMPTY <br />ST_slot_22 FULL QWB502<br />ST_slot_23 FULL QWB501<br />ST_slot_24 FULL QWB509<br />ST_slot_25 EMPTY <br />ST_slot_26 EMPTY <br />ST_slot_27 FULL QWB507<br />ST_slot_28 EMPTY <br />ST_slot_29 FULL QWB433</span></div></div>
<p>我们开始做测试，这次测试很顺利：</p>
<p><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp20b.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp20b.jpg" alt="" title="开始测试1" width="500" height="333" class="aligncenter size-full wp-image-900" /></a></p>
<p><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp20c.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp20c.jpg" alt="" title="开始测试2" width="499" height="328" class="aligncenter size-full wp-image-901" /></a></p>
<p><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp21d.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp21d.jpg" alt="" title="开始测试3" width="500" height="325" class="aligncenter size-full wp-image-902" /></a></p>
<p>测试另一个driver，也同样没有问题：</p>
<p><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp222.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp222.jpg" alt="" title="tmp222" width="500" height="324" class="aligncenter size-full wp-image-905" /></a></p>
<p><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp234.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp234.jpg" alt="" title="tmp234" width="500" height="326" class="aligncenter size-full wp-image-906" /></a></p>
<p>于是，就基本判断目前硬件没问题。开始配置legato。</p>
<p>但是legato备份的时候还是报错了：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">03/01/10 20:20:27 nsrd: \\.\Tape0 1:Verify label operation in progress<br />03/01/10 20:20:37 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />03/01/10 20:20:48 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />03/01/10 20:20:48 nsrd: media warning: \\.\Tape0 reading: read open error: drive status is There is not a tape in the drive<br />03/01/10 20:20:50 nsrd: nsrjb notice: nsrjb -j msl6000 -Y -O31 -L -g -bmiscdb -f \\.\Tape0 -S 1-1 <br />03/01/10 20:20:50 nsrd: \\.\Tape0 1:Verify label operation in progress<br />03/01/10 20:21:00 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />03/01/10 20:21:10 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />03/01/10 20:21:11 nsrd: media warning: \\.\Tape0 reading: read open error: drive status is There is not a tape in the drive<br />03/01/10 20:21:11 nsrd: \\.\Tape0 1:Label without mount operation in progress<br />03/01/10 20:21:21 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />03/01/10 20:21:23 nsrd: \\.\Tape0 1:Eject operation in progress<br />03/01/10 20:21:33 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty<br />03/01/10 20:21:44 nsrmmd #3: Diagnostic: Tape device \\.\Tape0 is empty</span></div></div>
<p>之前查到drive status is There is not a tape in the drive是光纤的连接的问题，但是光纤连接都没问题，LTT测试也通过了，难道是里面的driver连接接反了？</p>
<p>尝试再次重新配置jbconfig，在配置时，先配//./Tape1，再配//./Tape0。当然，这边Tape0和Tape1对应的driver的SN还是要对应备份client 端的SN的。只是在配置的时候，先写了//./Tape1。</p>
<p>配置完成后测试备份，真的证实了我的猜想，里面的driver接反了。当反配jbconfig的时候，备份成功了：</p>
<p><a href="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp27c.jpg"><img src="http://www.oracleblog.cn/wp-content/uploads/2010/03/tmp27c.jpg" alt="" title="tmp27c" width="500" height="384" class="aligncenter size-full wp-image-907" /></a></p>
<p>至此，又一个棘手的legato备份问题解决！</p>
<p>在处理legato问题的时候，如果无法确定是否硬件问题，那么相信LTT吧！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oracleblog.cn/working-case/deal-with-legato-trust-ltt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>操作系统内核参数限制导致ora-4030</title>
		<link>http://www.oracleblog.cn/working-case/limit-of-os-cause-ora-4030/</link>
		<comments>http://www.oracleblog.cn/working-case/limit-of-os-cause-ora-4030/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 04:13:34 +0000</pubDate>
		<dc:creator>小荷</dc:creator>
		
		<category><![CDATA[..experience]]></category>

		<category><![CDATA[Working case]]></category>

		<guid isPermaLink="false">http://www.oracleblog.cn/?p=885</guid>
		<description><![CDATA[最近同事遇到一个问题，某个报表程序报错ora-4030的错误：
错误信息：[Error] **** Dbupdate.sqlUpdateSubs Function:begin ? := trt_subs_1_i_update_target (?, ?, ?, ?, ?); end;, Execute GD:1li run finished with error, errcode:-4030,e... ]]></description>
			<content:encoded><![CDATA[<p>最近同事遇到一个问题，某个报表程序报错ora-4030的错误：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">错误信息：[Error] **** Dbupdate.sqlUpdateSubs Function:begin ? := trt_subs_1_i_update_target (?, ?, ?, ?, ?); end;, Execute GD:1li run finished with error, errcode:-4030,errmsg:ORA-04030: out of process memory when trying to allocate 16408 bytes (koh-kghu call ,pmucalm coll),errlog:GD_1li TableA_S.(SCS or ADS) Update TableP_S, circle= 2.</span></div></div>
<p>通过trace，发现是以下语句的问题：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Gray;">declare</span></li>
<li><span style="color: Gray;">&nbsp; type subs_mobile_no_arr is table of trt_subs_GD_1li_wap_S.subs_mobile_no%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type icp_id_arr is table of trt_subs_GD_1li_wap_S.icp_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type icp_code_arr is table of trt_subs_GD_1li_wap_S.icp_code%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type channel_id_arr is table of trt_subs_GD_1li_wap_S.channel_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type serv_id_arr is table of trt_subs_GD_1li_wap_S.serv_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type brand_id_arr is table of trt_subs_GD_1li_wap_S.brand_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type fee_mobile_no_arr is table of trt_subs_GD_1li_wap_S.fee_mobile_no%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type action_id_arr is table of trt_subs_GD_1li_wap_S.action_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type crt_his_date_arr is table of trt_subs_GD_1li_wap_S.crt_his_date%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type city_id_arr is table of trt_subs_GD_1li_wap_S.city_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type attr_arr is table of trt_subs_GD_1li_wap_S.attr%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; type srh_channel_id_arr is table of trt_subs_GD_1li_wap_S.srh_channel_id%type index by pls_integer;</span></li>
<li><span style="color: Gray;">&nbsp; arr_subs_mobile_no subs_mobile_no_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_icp_id&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; icp_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_icp_code&nbsp; &nbsp; &nbsp;&nbsp; icp_code_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_channel_id&nbsp; &nbsp;&nbsp; channel_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_serv_id&nbsp; &nbsp; &nbsp; &nbsp; serv_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_brand_id&nbsp; &nbsp; &nbsp;&nbsp; brand_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_fee_mobile_no&nbsp; fee_mobile_no_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_action_id&nbsp; &nbsp; &nbsp; action_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_crt_his_date&nbsp;&nbsp; crt_his_date_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_city_id&nbsp; &nbsp; &nbsp; &nbsp; city_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_attr&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; attr_arr;</span></li>
<li><span style="color: Gray;">&nbsp; arr_srh_channel_id srh_channel_id_arr;</span></li>
<li><span style="color: Gray;">begin</span></li>
<li><span style="color: Gray;">&nbsp; select subs_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; icp_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; icp_code,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; channel_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; serv_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; brand_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; fee_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; decode(action_id, 'SCS', 'C', 'ADS', 'D') action_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; crt_his_date,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; city_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; attr,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; srh_channel_id bulk collect</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; into arr_subs_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_icp_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_icp_code,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_channel_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_serv_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_brand_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_fee_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_action_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_crt_his_date,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_city_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_attr,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_srh_channel_id</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; from trt_subs_GD_1li_wap_S</span></li>
<li><span style="color: Gray;">&nbsp;&nbsp; where action_id = 'SCS'</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; or action_id = 'ADS';</span></li>
<li><span style="color: Gray;">&nbsp; if arr_subs_mobile_no.last &gt; 0 then</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; arr_srh_channel_id srh_channel_id_arr;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; begin</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; select subs_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; icp_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; icp_code,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; channel_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; serv_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; brand_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; fee_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; decode(action_id, 'SCS', 'C', 'ADS', 'D') action_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; crt_his_date,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; city_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; attr,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; srh_channel_id bulk collect</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; into arr_subs_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_icp_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_icp_code,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_channel_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_serv_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_brand_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_fee_mobile_no,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_action_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_crt_his_date,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_city_id,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_attr,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; arr_srh_channel_id</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; from trt_subs_GD_1li_wap_S</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp;&nbsp; where action_id = 'SCS'</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; or action_id = 'ADS';</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; if arr_subs_mobile_no.last &gt; 0 then</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; forall i in arr_subs_mobile_no.first .. arr_subs_mobile_no.last</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update f_wap_subs_GD_p_s c</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; set c.city_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = arr_city_id(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.icp_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = arr_icp_id(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.icp_code&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = arr_icp_code(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.subs_cancel_channel_id = arr_channel_id(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.brand_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = arr_brand_id(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.subs_status_id&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = arr_action_id(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.fee_mobile_no&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = arr_fee_mobile_no(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.usubs_date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = arr_crt_his_date(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.usubs_day&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = to_char(arr_crt_his_date(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'YYYYMMDD'),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.idx_day&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = to_char(arr_crt_his_date(i),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'YYYYMMDD'),</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.is_subs_valid&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.flow_time&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = sysdate,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; c.srh_channel_id&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; = arr_srh_channel_id(i)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; where subs_mobile_no = arr_subs_mobile_no(i)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; and serv_id = arr_serv_id(i)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; and is_subs_valid = 1;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; end if;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; end;</span></li></ol></div>
<p>这个sql在执行的时候，pga的内存被迅速的消耗，通过v$sesstat看到这个session每次使用pga快到2G时，就报错了。而且每次都是这样。所以一开始，我们怀疑是不是pga不够，增加pga大小为3G继续观察程序的运行情况，结果发现还是一样的报错。</p>
<p>在metalink上发现类似的有个bug：Bug 4994859: ORA-04030 WHILE EXECUTING A PROCEDURE CONTAINING BULK COLLECT。于是打算分2步走：<br />
1、向开发建议修改程序，不使用BULK COLLECT（上面sql的85行处）<br />
2、由于bug是在Sun Solaris SPARC (64-bit)上的9207版本，我们的是HP UX的9208版本，可能不是这个bug。所以向oracle开SR进行确认。</p>
<p>oracle回复：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Gray;">Basically, an ORA-4030 indicates a limit has been reached with respect to process private memory allocation. An ORA-4030 error is an error in the PGA; Memory limitation related to an Oracle rdbms server process is reached.</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">Typical causes:</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">* OS Memory limit reached such as physical memory and/or swap/virtual paging</span></li>
<li><span style="color: Gray;">* OS limits reached such as kernel or user shell limits that limit overall, user level or process level memory usage</span></li>
<li><span style="color: Gray;">* OS limit on PGA memory size due to SGA attach address </span><span style="color: Olive;">&lt;</span><span style="color: Gray;">&lt;</span><span style="color: Green;">Note</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">262540</span><span style="color: Gray;">.</span><span style="color: #00008b;">1</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">&gt; Relocate SGABEG on 64-bit Oracle</span></li>
<li><span style="color: Gray;">* Oracle internal limit example Bug 3130972</span></li>
<li><span style="color: Gray;">* Application design causing limits to be reached</span></li>
<li><span style="color: Gray;">* Bug – space leaks, heap leaks</span></li></ol></div>
<p>于是用RDA收集主机信息，发现有一个参数设置：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">Comments<br />--------<br />Ulimit<br />=====<br />time(seconds) unlimited<br />file(blocks) unlimited<br />data(kbytes) 2097152 </span><span style="color: Olive;">&lt;</span><span style="color: Green;">----</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">stack</span><span style="color: Gray;">(</span><span style="color: #00008b;">kbytes</span><span style="color: Gray;">) </span><span style="color: #00008b;">131072</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">memory</span><span style="color: Gray;">(</span><span style="color: #00008b;">kbytes</span><span style="color: Gray;">) </span><span style="color: #00008b;">unlimited</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">coredump</span><span style="color: Gray;">(</span><span style="color: #00008b;">blocks</span><span style="color: Gray;">) </span><span style="color: #00008b;">4194303</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">nofiles</span><span style="color: Gray;">(</span><span style="color: #00008b;">descriptors</span><span style="color: Gray;">) </span><span style="color: #00008b;">4096</span></div></div>
<p>从这里我们看到ulimit -d参数被限制了，大小为2G，我们通过修改2个内核参数从而达到修改这个参数的目的：<br />
1、将maxdsiz从2147483648 (2G) 调整到4187593114(4G)<br />
2、将maxdsiz_64bit从2147483648 (2G)调整6442450944 (6G).<br />
ulimit -d自动的变成：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">data(kbytes) 4063168</span></div></div>
<p>再次运行原来的应用程序，发现不再报错。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oracleblog.cn/working-case/limit-of-os-cause-ora-4030/feed/</wfw:commentRss>
		</item>
		<item>
		<title>新版本的opatch使用lsinventory报错</title>
		<link>http://www.oracleblog.cn/working-case/new-opatch-lsinventory-error/</link>
		<comments>http://www.oracleblog.cn/working-case/new-opatch-lsinventory-error/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 09:13:17 +0000</pubDate>
		<dc:creator>小荷</dc:creator>
		
		<category><![CDATA[..experience]]></category>

		<category><![CDATA[Working case]]></category>

		<guid isPermaLink="false">http://www.oracleblog.cn/?p=882</guid>
		<description><![CDATA[今天在给一个省打一个9208侦听内存泄漏的patch，打的时候，没有报错，但是在opatch lsinventory的时候，却报错了：
oracle@tj_dc01:/oracle/app/oracle/product/9.2.0 &#62; opatch lsinventory&#160;Oracle Interim Patch Install... ]]></description>
			<content:encoded><![CDATA[<p>今天在给一个省打一个9208侦听内存泄漏的patch，打的时候，没有报错，但是在opatch lsinventory的时候，却报错了：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">oracle@tj_dc01:/oracle/app/oracle/product/9.2.0 &gt; opatch lsinventory<br />&nbsp;<br />Oracle Interim Patch Installer version 1.0.0.0.63<br />Copyright (c) 2009 Oracle Corporation. All Rights Reserved..<br />&nbsp;<br />Oracle recommends you to use the latest OPatch version<br />and read the OPatch documentation available in the OPatch/docs<br />directory for usage. For information about the latest OPatch and<br />other support-related issues, refer to document ID 293369.1<br />available on My Oracle Support (https://myoraclesupport.oracle.com)<br />&nbsp;<br />Oracle Home&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: /oracle/app/oracle/product/9.2.0<br />Oracle Home Inventory : /oracle/app/oracle/oraInventory<br />Central Inventory&nbsp; &nbsp; &nbsp;: /oracle/app/oracle/oraInventory<br />&nbsp;&nbsp; from&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: /var/opt/oracle/oraInst.loc<br />OUI location&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : /oracle/app/oracle/oui<br />OUI shared library&nbsp; &nbsp; : /oracle/app/oracle/oui/bin/hpunix/liboraInstaller.so<br />Java location&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: /oracle/app/oracle/jre/1.3.1/bin/java<br />Log file location&nbsp; &nbsp; &nbsp;: /oracle/app/oracle/product/9.2.0/.patch_storage/</span><span style="color: Olive;">&lt;</span><span style="color: Green;">patch</span><span style="color: Gray;"> </span><span style="color: #00008b;">ID</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">/*.log<br />&nbsp;<br />Creating log file &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/LsInventory__01-25-2010_16-25-28.log&quot;<br />&nbsp;<br />Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: javax/xml/transform/Source<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at opatch.LsInventory.getOneOffList(LsInventory.java:675)<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at opatch.LsInventory.main(LsInventory.java:247)<br />Result: <br />&nbsp;<br />&nbsp;<br />There is no Interim Patch<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />OPatch succeeded.</span></div></div>
<p>    这个opatch是从metalink上下载的最新的opatch，而且也是对应了HP IA的os平台，opatch的版本应该不会错。如果错了，opatch apply的时候就应该报了，怎么还会到lsinventory的时候才报错。</p>
<p>    上metalink上查了这个问题(<a href="https://support.oracle.com/CSP/ui/flash.html#tab=KBHome%28page=KBHome&#038;id=%28%29%29,%28page=KBNavigator&#038;id=%28bmDocTitle=OPatch%20Lsinventory%20Reports%20%60Exception%20in%20thread%20%22main%22%20java.lang.NoClassDefFoundError:%20javax/xml/transform/Source%60%20When%20Executed%20Against%209.2.0.x&#038;from=BOOKMARK&#038;bmDocID=417275.1&#038;viewingMode=1143&#038;bmDocType=PROBLEM&#038;bmDocDsrc=DOCUMENT%29%29">ID 417275.1</a>)，原来最新版本的opatch（p6880880_101000_HPUX-IA64.zip）要求需要在OUI 10.1.0.x和JRE 1.4.2，而这2个是需要在9205或者9206升级的时候才会安装，在基线版本9202，以及9203，9204的版本中只有OUI 2.2.0.x和JRE 1.3.1，9207和9208这2个版本是不含OUI和JRE的升级的。所以当我从HP IA的基线版本9202升级到9208，再使用opatch打完补丁，用opatch lsinventory检查的时候，就会因为OUI的问题出现上述的报错。</p>
<p>    oracle上给的解决办法是：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">1.下载patch 3540563----很可惜，这个patch没有HP IA的平台。<br />2.降级9208，重新升级到9205，再升级到9208。因为在升级到9205的时候，就升级了OUI和JRE，所以不会报错了----扯淡啊！我怎么可能为了这点小事去downgrate。</span></div></div>
<p>这里我提供2个方法来进行验证是否正确安装了patch：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">1.在patch目录，用opatch query -verify：</span></div></div>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">oracle@tj_dc01:/opt/ora_inst/ora_patch9208/5576565 &gt; opatch query -verify<br />&nbsp;<br />Oracle Interim Patch Installer version 1.0.0.0.63<br />Copyright (c) 2009 Oracle Corporation. All Rights Reserved..<br />&nbsp;<br />Oracle recommends you to use the latest OPatch version<br />and read the OPatch documentation available in the OPatch/docs<br />directory for usage. For information about the latest OPatch and<br />other support-related issues, refer to document ID 293369.1<br />available on My Oracle Support (https://myoraclesupport.oracle.com)<br />&nbsp;<br />Query ...<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Please enter the patch location: <br />/opt/ora_inst/ora_patch9208/5576565<br />&nbsp;<br />&nbsp;<br />---------- Query starts ------------------<br />&nbsp;<br />Patch ID: 5576565<br />&nbsp;<br />The contents of the file: /var/opt/oracle/oraInst.loc<br />&nbsp;<br />#Oracle Installer Location File Location<br />&nbsp;<br />#Fri Jan 22 10:16:22 GMT+08:00 2010<br />&nbsp;<br />inventory_loc=/oracle/app/oracle/oraInventory<br />&nbsp;<br />inst_group=dba<br />&nbsp;<br />Parsing /oracle/app/oracle/oraInventory/ContentsXML/comps.xml<br />&nbsp;<br />Found &quot;oracle.swd.oui&quot; version &quot;2.2.0.14.0&quot;<br />&nbsp; on &quot;/oracle/app/oracle/oui&quot;<br />&nbsp;<br />&nbsp;<br />Verifying patch...<br />&nbsp; Verifying that patch ID is in Oracle Home inventory.<br />&nbsp;<br />&nbsp; Verifying archive files.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib32/libnl9.a/nlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib32/libnl9.a/nlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib32/libnl9.a/snlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib32/libnl9.a/snlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib/libnl9.a/nlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib/libnl9.a/nlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib/libnl9.a/snlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib/libnl9.a/snlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib32/libnl9.a/nlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib32/libnl9.a/nlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib32/libnl9.a/snlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib32/libnl9.a/snlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib/libnl9.a/nlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib/libnl9.a/nlpc.o&quot;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />Comparing &quot;/opt/ora_inst/ora_patch9208/5576565/files/lib/libnl9.a/snlpc.o&quot; and &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/verify/lib/libnl9.a/snlpc.o&quot;<br />&nbsp;<br />OPATCH_VERIFY_OK: Patch has been applied.<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />---------- Query ends -------------------<br />&nbsp;<br />&nbsp;<br />Do you want to check out another patch?<br />Please respond Y|N &gt; <br />N<br />Query stops.<br />&nbsp;<br />&nbsp;<br />OPatch succeeded.<br />oracle@tj_dc01:/opt/ora_inst/ora_patch9208/5576565 &gt;</span></div></div>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">2.用一个老版本的opatch检查也是可以的。</span></div></div>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">oracle@tj_dc01:/opt/ora_inst/ora_patch9208/OPatch &gt; opatch lsinventory<br />&nbsp;<br />Oracle Interim Patch Installer version 1.0.0.0.53<br />Copyright (c) 2005 Oracle Corporation. All Rights Reserved..<br />&nbsp;<br />We recommend you refer to the OPatch documentation under<br />OPatch/docs for usage reference. We also recommend using<br />the latest OPatch version. For the latest OPatch version<br />and other support related issues, please refer to document<br />293369.1 which is viewable from metalink.oracle.com<br />&nbsp;<br />Oracle Home = /oracle/app/oracle/product/9.2.0<br />Location of Oracle Universal Installer components = /oracle/app/oracle/oui<br />Location of OraInstaller.jar&nbsp; = &quot;/oracle/app/oracle/oui/lib&quot;<br />Oracle Universal Installer shared library = /oracle/app/oracle/oui/bin/hpunix/liboraInstaller.so<br />Location of Oracle Inventory Pointer = /var/opt/oracle/oraInst.loc<br />Location of Oracle Inventory = /oracle/app/oracle/oraInventory<br />Path to Java = /oracle/app/oracle/jre/1.3.1/bin/java<br />Log file = /oracle/app/oracle/product/9.2.0/.patch_storage/</span><span style="color: Olive;">&lt;</span><span style="color: Green;">patch</span><span style="color: Gray;"> </span><span style="color: #00008b;">ID</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">/*.log<br />&nbsp;<br />Creating log file &quot;/oracle/app/oracle/product/9.2.0/.patch_storage/LsInventory__01-25-2010_16-25-14.log&quot;<br />&nbsp;<br />Result: <br />&nbsp;<br />&nbsp;<br />&nbsp; Installed Patch List:<br />&nbsp; =====================<br />&nbsp; 1) Patch 5576565 applied on Sun Jan 24 10:34:11 GMT+08:00 2010<br />&nbsp;&nbsp; &nbsp; &nbsp;[ Base Bug(s): 5576565&nbsp; ]<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />OPatch succeeded.<br />oracle@tj_dc01:/opt/ora_inst/ora_patch9208/OPatch &gt;</span></div></div>
<p>附件为这个老版本的opatch：<a href='http://www.oracleblog.cn/wp-content/uploads/2010/01/p2617419_10102_generic_opatch.zip'>点击下载：p2617419_10102_generic_opatch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oracleblog.cn/working-case/new-opatch-lsinventory-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>在hp pa 11.23上安装9206patch</title>
		<link>http://www.oracleblog.cn/working-case/install-9206-on-hp-pa-1123/</link>
		<comments>http://www.oracleblog.cn/working-case/install-9206-on-hp-pa-1123/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 10:09:43 +0000</pubDate>
		<dc:creator>小荷</dc:creator>
		
		<category><![CDATA[..experience]]></category>

		<category><![CDATA[Working case]]></category>

		<guid isPermaLink="false">http://www.oracleblog.cn/?p=877</guid>
		<description><![CDATA[    hp pa算是一个比较老版本的hpux操作系统，目前hp已经不出hp pa的版本，只出hp ia的版本。目前ia的os版本为11.23和11.31，在之前的hp pa的主要os版本是11.00和11.11。
    这次在某省安装的机器比较奇... ]]></description>
			<content:encoded><![CDATA[<p>    hp pa算是一个比较老版本的hpux操作系统，目前hp已经不出hp pa的版本，只出hp ia的版本。目前ia的os版本为11.23和11.31，在之前的hp pa的主要os版本是11.00和11.11。<br />
    这次在某省安装的机器比较奇怪，是hp pa的机器，却是安装11.23的操作系统版本。在正常安装完成9201的基线版本后在升级9206的patch，遇到报错了：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">$ cd D*1<br />$ ls<br />install, patchnote.htm, response, runInstaller, stage<br />$ export DISPLAY=192.168.0.4:0.0<br />$ ./runInstaller<br />Starting Oracle Universal Installer...<br />&nbsp;<br />Checking installer requirements...<br />&nbsp;<br />Checking operating system version: must be B.11.00 or B.11.11.&nbsp; &nbsp; Actual B.11.23<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Failed </span><span style="color: Olive;">&lt;</span><span style="color: Gray;">&lt;&lt;&lt;<br />&nbsp;<br /></span><span style="color: #00008b;">Exiting</span><span style="color: Gray;"> </span><span style="color: #00008b;">Oracle</span><span style="color: Gray;"> </span><span style="color: #00008b;">Universal</span><span style="color: Gray;"> </span><span style="color: #00008b;">Installer</span><span style="color: Gray;">, </span><span style="color: #00008b;">log</span><span style="color: Gray;"> </span><span style="color: #00008b;">for</span><span style="color: Gray;"> </span><span style="color: #00008b;">this</span><span style="color: Gray;"> </span><span style="color: #00008b;">session</span><span style="color: Gray;"> </span><span style="color: #00008b;">can</span><span style="color: Gray;"> </span><span style="color: #00008b;">be</span><span style="color: Gray;"> </span><span style="color: #00008b;">found</span><span style="color: Gray;"> </span><span style="color: #00008b;">at</span><span style="color: Gray;"> /</span><span style="color: Green;">opt</span><span style="color: Gray;">/</span><span style="color: Green;">acle</span><span style="color: Gray;">/</span><span style="color: Green;">oraInventory</span><span style="color: Gray;">/</span><span style="color: Green;">logs</span><span style="color: Gray;">/</span><span style="color: Green;">installActions2010-01-10_03-38-08PM</span><span style="color: Gray;">.</span><span style="color: #00008b;">log</span><span style="color: Gray;"><br />$</span></div></div>
<p>根据log去做进一步的检查了：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">$ vi installActions2010-01-10_03-38-08PM.log<br />&quot;installActions2010-01-10_03-38-08PM.log&quot; 9 lines, 385 characters <br />Using paramFile: /usr/ora_inst/orapatch_9206/Disk1/install/oraparam.ini<br />&nbsp;<br />&nbsp;<br />Checking installer requirements...<br />&nbsp;<br />Checking operating system version: must be B.11.00 or B.11.11.&nbsp; &nbsp; Actual B.11.23<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Failed </span><span style="color: Olive;">&lt;</span><span style="color: Gray;">&lt;&lt;&lt;<br />&nbsp;<br /></span><span style="color: #00008b;">Exiting</span><span style="color: Gray;"> </span><span style="color: #00008b;">Oracle</span><span style="color: Gray;"> </span><span style="color: #00008b;">Universal</span><span style="color: Gray;"> </span><span style="color: #00008b;">Installer</span><span style="color: Gray;">, </span><span style="color: #00008b;">log</span><span style="color: Gray;"> </span><span style="color: #00008b;">for</span><span style="color: Gray;"> </span><span style="color: #00008b;">this</span><span style="color: Gray;"> </span><span style="color: #00008b;">session</span><span style="color: Gray;"> </span><span style="color: #00008b;">can</span><span style="color: Gray;"> </span><span style="color: #00008b;">be</span><span style="color: Gray;"> </span><span style="color: #00008b;">found</span><span style="color: Gray;"> </span><span style="color: #00008b;">at</span><span style="color: Gray;"> /</span><span style="color: Green;">opt</span><span style="color: Gray;">/</span><span style="color: Green;">oracle</span><span style="color: Gray;">/</span><span style="color: Green;">oraInventory</span><span style="color: Gray;">/</span><span style="color: Green;">logs</span><span style="color: Gray;">/</span><span style="color: Green;">installActions2010-01-10_03-3</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">8-08PM</span><span style="color: Gray;">.</span><span style="color: #00008b;">log</span><span style="color: Gray;"><br />~</span></div></div>
<p>在这里我们看到在做系统环境的检查时，调用了/usr/ora_inst/orapatch_9206/Disk1/install/oraparam.ini这个参数文件，因此我们去看这个参数文件：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">$ cat /usr/ora_inst/orapatch_9206/Disk1/install/oraparam.ini<br />[Oracle]<br />DISTRIBUTION=TRUE<br />SOURCE=../stage/products.xml<br />LICENSE_LOCATION=<br />JRE_LOCATION=../stage/Components/oracle.swd.jre/1.4.2.0.0/1/DataFiles<br />JRE_MEMORY_OPTIONS=&quot; -mx96m&quot;<br />DEFAULT_HOME_LOCATION=<br />DEFAULT_HOME_NAME=OUIHome<br />NO_BROWSE=/net<br />NLS_ENABLED=TRUE<br />BOOTSTRAP=TRUE<br />OUI_VERSION=10.1.0.3.0<br />AUTOOUI=ALWAYS<br />#SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always<br />#SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel<br />#SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition<br />SHOW_HOSTNAME=NEVER_SHOW<br />#THIN_JDBC_FILENAME is optional and defaults to classes12.jar<br />#The value specified for this should be packaged with OUI, and should <br />#be relative to </span><span style="color: Olive;">&lt;</span><span style="color: Green;">OUI</span><span style="color: Gray;"> </span><span style="color: #00008b;">expanded</span><span style="color: Gray;"> </span><span style="color: #00008b;">stagedir</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">/jlib/<br />THIN_JDBC_FILENAME=classes12.jar<br />#JRE_OSDPARAM is to set OS dependent param for JRE ( mainly for native VM in 1.3.1)<br />#JRE_OSDPARAM is optional and should be set to -native for the JRE's<br />#that support native VM ( mainly for Unix platforms ), in JRE 1.3.1<br />#For JRE 1.4.1 this should be set to empty or the type of VM that is <br />#supported client/server. The default value is -native in UNIX platforms<br />#that supports native VM<br />#Unix supporting native - JRE_OSDPARAM=&quot;-native&quot; <br />#Unix NOT supporting native and 1.4.1 - JRE_OSDPARAM=&quot;&quot; <br />JRE_OSDPARAM=&quot;&quot;<br />#CLUSTERWARE={&quot;oracle.crs&quot;,&quot;10.1.0.2.0&quot;}<br />#RUN_OUICA specifies the batch script name that needs to be run<br />#The script is ouica.bat for win32, and ouica.sh for solaris. <br />#If the value is not specified, then the OUICA script is not run<br />RUN_OUICA=ouica.sh<br />&nbsp;<br />[Certified Versions]<br />#You can customise error message shown for failure through CERTIFIED_VERSION_FAILURE_MESSAGE<br />Solaris=5.6,5.7,5.8,5.9<br />Linux=redhat-2.1AS<br />HPUX=B.11.00,B.11.11<br />Decunix=V5.1A,V5.1<br />AIX=5.1.0.0<br />&nbsp;<br />&nbsp;<br />[Solaris-5.6-required]<br />#Minimum temp space required by OUI, Increase it if your product installation so requires<br />#Temp space is required for bootstrap and during installation<br />#The TEMP_SPACE should be the first pre-req to be checked<br />TEMP_SPACE=250<br />SWAP_SPACE=500<br />#Use TEMP_SPACE_FAILURE_MESSAGE for custom error message for Swap space check failure<br />#PACKAGES required by JRE and Product, /usr/bin/pkginfo gets list of packages on system <br />PACKAGES=<br />#Use PACKAGES_FAILURE_MESSAGE for custom error message for PACKAGES check failure<br />&nbsp;<br />&nbsp;<br />#Use CPU_FAILURE_MESSAGE to display custom error message for CPU check failure<br />#MIN_DISPLAY_COLORS required by OUI, use /usr/openwin/bin/xdpyinfo to get the colors<br />MIN_DISPLAY_COLORS=256<br />#Use MIN_DISPLAY_COLORS_FAILURE_MESSAGE for custom error message for DISPLAY colors check failure<br />&nbsp;<br />[Solaris-5.6-optional]<br />#PATCHES required by JRE and Product, /usr/bin/showrev -p gets list of patches on system<br />PATCHES=<br />#Use PATCHES_FAILURE_MESSAGE for custom error message for PATCHES check failure<br />&nbsp;<br />[Solaris-5.7-required]<br />#Minimum temp space required by OUI, Increase it if your product installation so requires<br />#Temp space is required for bootstrap and during installation<br />#The TEMP_SPACE should be the first pre-req to be checked<br />TEMP_SPACE=250<br />SWAP_SPACE=500<br />#PACKAGES required by JRE and Product, /usr/bin/pkginfo gets list of packages on system <br />PACKAGES=<br />&nbsp;<br />&nbsp;<br />#MIN_DISPLAY_COLORS required by OUI, use /usr/openwin/bin/xdpyinfo to get the colors<br />MIN_DISPLAY_COLORS=256<br />&nbsp;<br />[Solaris-5.7-optional]<br />#PATCHES required by JRE and Product, /usr/bin/showrev gets list of patches on system<br />PATCHES=<br />&nbsp;<br />[Solaris-5.8-required]<br />#Minimum temp space required by OUI, Increase it if your product installation so requires<br />#Temp space is required for bootstrap and during installation<br />#The TEMP_SPACE should be the first pre-req to be checked<br />TEMP_SPACE=250<br />SWAP_SPACE=500<br />#PACKAGES required by JRE and Product, /usr/bin/pkginfo gets list of packages on system <br />PACKAGES=<br />&nbsp;<br />&nbsp;<br />#MIN_DISPLAY_COLORS required by OUI, use /usr/openwin/bin/xdpyinfo to get the colors<br />MIN_DISPLAY_COLORS=256<br />&nbsp;<br />[Solaris-5.8-optional]<br />#PATCHES required by JRE and Product, /usr/bin/showrev gets list of patches on system<br />PATCHES=108652-66,108921-16,108940-53,108773-18,111310-01,109147-24,111308-03,111111-03,112396-02,110386-03,111023-02,108987-13,108528-21,108989-02,108993-18<br />&nbsp;<br />[Solaris-5.9-required]<br />#Minimum temp space required by OUI, Increase it if your product installation so requires<br />#Temp space is required for bootstrap and during installation<br />#The TEMP_SPACE should be the first pre-req to be checked<br />TEMP_SPACE=250<br />SWAP_SPACE=500<br />#PACKAGES required by JRE and Product, /usr/bin/pkginfo gets list of packages on system <br />PACKAGES=<br />&nbsp;<br />&nbsp;<br />#MIN_DISPLAY_COLORS required by OUI, use /usr/openwin/bin/xdpyinfo to get the colors<br />MIN_DISPLAY_COLORS=256<br />&nbsp;<br />[Solaris-5.9-optional]<br />#PATCHES required by JRE and Product, /usr/bin/showrev gets list of patches on system<br />PATCHES=<br />&nbsp;<br />#[HPUX-B.11.11-required]<br />#PATCHES required by JRE and Product, /usr/sbin/swlist -l patch gets list of patches on system<br />#PATCHES=<br />#PACKAGES required by JRE and Product, /usr/sbin/swlist -l product gets list of packages on system <br />#PACKAGES=<br />#Patch bundles required for Oracle. <br />#/usr/sbin/swlist -l bundle gives list of bundles. <br />#Each item should follow the format &quot;bundle:version&quot; <br />#ex.,GOLDBASE11i:B.11.11.0106.9,GOLDAPPS11i:B.11.11.0106.9<br />#BUNDLE=<br />#Minimum swap space required by OUI, Increase it if your product installation so requires<br />#SWAP_SPACE=150<br />#BUNDLE_FAILURE_MESSAGE=Some patch bundles were not found on the system. Please verify if the system is at a higher bundle level.<br />&nbsp;<br />[Linux-redhat-2.1AS-required]<br />#Minimum kernel version supported on this flavour of Linux<br />KERNEL=2.4.9<br />#Minimum glibc version supported on this flavour of Linux<br />GLIBC=glibc-2.2.4-25<br />#PACKAGES required by JRE and Product, &quot;rpm -qa&quot; gets list of packages on system <br />PACKAGES=<br />#Minimum swap space required by OUI, Increase it if your product installation so requires<br />SWAP_SPACE=150<br />&nbsp;<br />&nbsp;<br />[Decunix-V5.1A-required]<br />#PATCHES required by JRE and Product, /usr/sbin/dupatch -track -type kit <br />#gets list of patches on system<br />PATCHES=<br />#PACKAGES required by JRE and Product, /usr/sbin/setld -i gets <br />#list of packages on system <br />PACKAGES=<br />#Minimum swap space required by OUI, Increase it if your product installation so requires<br />SWAP_SPACE=150<br />&nbsp;<br />[Decunix-V5.1-required]<br />#PATCHES required by JRE and Product, /usr/sbin/dupatch -track -type kit <br />#gets list of patches on system<br />PATCHES=<br />#PACKAGES required by JRE and Product, /usr/sbin/setld -i gets <br />#list of packages on system <br />PACKAGES=<br />#Minimum swap space required by OUI, Increase it if your product installation so requires<br />SWAP_SPACE=150<br />&nbsp;<br />[AIX-5.1.0.0-required]<br />#PATCHES required by JRE and Product, /usr/sbin/instfix -a -ivk <br />#gets list of patches on system<br />PATCHES=<br />#PACKAGES required by JRE and Product, /usr/bin/lslpp -l <br />#gets list of packages on system <br />PACKAGES=<br />#Minimum swap space required by OUI, Increase it if your product installation so requires<br />SWAP_SPACE=150<br />&nbsp;<br />$</span></div></div>
<p>在这里我们看到hp pa9206的patch要求</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">HPUX=B.11.00,B.11.11</span></div></div>
<p>我们目前hp pa 11.23没在这个里面，因此我当时尝试了在这个文件中把11.23也添加进去：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">……<br />[Certified Versions]<br />#You can customise error message shown for failure through CERTIFIED_VERSION_FAILURE_MESSAGE<br />Solaris=5.6,5.7,5.8,5.9<br />Linux=redhat-2.1AS<br />HPUX=B.11.00,B.11.11,B.11.23<br />Decunix=V5.1A,V5.1<br />AIX=5.1.0.0<br />……</span></div></div>
<p>再次执行runInstaller，搞定。</p>
<p>    当时身处某省由于通信管制没法上网，回来之后，查了metalink，确定是个unpublished Bug:4054600.详见文档<a href="https://support.oracle.com/CSP/ui/flash.html#tab=Dashboard%28page=Dashboard&#038;id=g4kmbvfq%28%29%29,%28page=KBNavigator&#038;id=g4kmdkpy%28searchMode=1145&#038;viewingMode=1141&#038;searchControl=1146&#038;userQuery=294682.1&#038;%29%29">ID 294682.1</a>，处理方法，也和我的一样。<br />
    我猜想是oracle出hp pa9206的patch的时候，hp pa还没出11.23的os版本，而等hp pa出11.23的os版本的时候，oracle已经出9208的patch了，因此在9208的oraparam.ini文件中，我们看到了B.11.23这个配置，而在9206这个patch，没配置。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oracleblog.cn/working-case/install-9206-on-hp-pa-1123/feed/</wfw:commentRss>
		</item>
		<item>
		<title>修改vmware rac的IP网段</title>
		<link>http://www.oracleblog.cn/study-note/change-rac-ip-on-vmware/</link>
		<comments>http://www.oracleblog.cn/study-note/change-rac-ip-on-vmware/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 08:25:57 +0000</pubDate>
		<dc:creator>小荷</dc:creator>
		
		<category><![CDATA[Study note]]></category>

		<guid isPermaLink="false">http://www.oracleblog.cn/?p=875</guid>
		<description><![CDATA[    之前在vmware上搭了一个rac，在配置rac的时候，由于当时的电脑是接在路由器上的，因此将public和vip配置在了需要连接路由器的IP上，用的是bridge的连接方式。但是也造成了一个不便，就是在... ]]></description>
			<content:encoded><![CDATA[<p>    之前在vmware上搭了一个rac，在配置rac的时候，由于当时的电脑是接在路由器上的，因此将public和vip配置在了需要连接路由器的IP上，用的是bridge的连接方式。但是也造成了一个不便，就是在没有连接路由的情况下，public和vip无法连接，因此我希望用host only而不是bridge的连接方式，将rac的vip改为vmware的虚拟网卡的IP。</p>
<p>    改造之前：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">192.168.190.131&nbsp; &nbsp; rac1<br />192.168.1.31&nbsp; &nbsp; rac1-vip<br />10.10.10.31&nbsp; &nbsp; rac1-priv<br />192.168.190.132&nbsp; &nbsp; rac2<br />192.168.1.32&nbsp; &nbsp; rac2-vip<br />10.10.10.32&nbsp; &nbsp; rac2-priv<br />192.168.190.133&nbsp; &nbsp; rac3<br />192.168.1.33&nbsp; &nbsp; rac3-vip<br />10.10.10.33&nbsp; &nbsp; rac3-priv<br />&nbsp;<br />其中rac1的2块网卡，rac2和rac3的类似：<br />eth0 192.168.1.131 用bridge连接<br />eth1 10.10.10.31&nbsp; &nbsp;用host only连接</span></div></div>
<p>另外，vmware的虚拟网卡，在这次改造中不做变化：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">VMware Network Adapter VMnet1：192.168.190.1<br />VMware Network Adapter VMnet8：192.168.174.1<br />&nbsp;<br />路由器的网关地址：192.168.1.200</span></div></div>
<p>改造后：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">192.168.190.131&nbsp; &nbsp; rac1<br />192.168.190.31&nbsp; &nbsp; rac1-vip<br />10.10.10.31&nbsp; &nbsp; rac1-priv<br />192.168.190.132&nbsp; &nbsp; rac2<br />192.168.190.32&nbsp; &nbsp; rac2-vip<br />10.10.10.32&nbsp; &nbsp; rac2-priv<br />192.168.190.133&nbsp; &nbsp; rac3<br />192.168.190.33&nbsp; &nbsp; rac3-vip<br />10.10.10.33&nbsp; &nbsp; rac3-priv<br />&nbsp;<br />其中rac1的2块网卡，rac2和rac3的类似：<br />eth0 192.168.190.131 用host only连接<br />eth1 10.10.10.31&nbsp; &nbsp;用host only连接</span></div></div>
<p>修改步骤：<br />
1.停数据库和crs：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">只在一个节点上运行：<br />crs_stop -all<br />检查：<br />rac1-&gt; crs_stat -t<br />Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Target&nbsp; &nbsp; State&nbsp; &nbsp; &nbsp;Host&nbsp; &nbsp; &nbsp; &nbsp; <br />------------------------------------------------------------<br />ora.devdb.db&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....b1.inst application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....b2.inst application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....b3.inst application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....SM1.asm application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....C1.lsnr application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac1.gsd&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac1.ons&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac1.vip&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....SM2.asm application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....C2.lsnr application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac2.gsd&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac2.ons&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac2.vip&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....SM3.asm application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora....C3.lsnr application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac3.gsd&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac3.ons&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />ora.rac3.vip&nbsp; &nbsp;application&nbsp; &nbsp; OFFLINE&nbsp; &nbsp;OFFLINE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />rac1-&gt; <br />&nbsp;<br />在所有节点上执行：<br />[root@rac1 bin]# /etc/init.d/init.crs stop<br />Shutting down Oracle Cluster Ready Services (CRS):<br />Stopping resources.<br />Successfully stopped CRS resources <br />Stopping CSSD.<br />Shutting down CSS daemon.<br />Shutdown request successfully issued.<br />Shutdown has begun. The daemons should exit soon.<br />[root@rac1 bin]#</span></div></div>
<p>2.修改hosts的文件：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">[root@rac1 bin]# cat /etc/hosts<br /># Do not remove the following line, or various programs<br /># that require network functionality will fail.<br />127.0.0.1&nbsp; &nbsp; &nbsp; &nbsp;localhost<br />192.168.190.131 rac1.mycorpdomain.com&nbsp; &nbsp;rac1<br />192.168.190.31&nbsp; rac1-vip.mycorpdomain.com&nbsp; &nbsp; &nbsp; &nbsp;rac1-vip<br />10.10.10.31&nbsp; &nbsp; &nbsp;rac1-priv.mycorpdomain.com&nbsp; &nbsp; &nbsp; rac1-priv<br />192.168.190.132 rac2.mycorpdomain.com&nbsp; &nbsp;rac2<br />192.168.190.32&nbsp; rac2-vip.mycorpdomain.com&nbsp; &nbsp; &nbsp; &nbsp;rac2-vip<br />10.10.10.32&nbsp; &nbsp; &nbsp;rac2-priv.mycorpdomain.com&nbsp; &nbsp; &nbsp; rac2-priv<br />192.168.190.133 rac3.mycorpdomain.com&nbsp; &nbsp;rac3<br />192.168.190.33&nbsp; rac3-vip.mycorpdomain.com&nbsp; &nbsp; &nbsp; &nbsp;rac3-vip<br />10.10.10.33&nbsp; &nbsp; &nbsp;rac3-priv.mycorpdomain.com&nbsp; &nbsp; &nbsp; rac3-priv<br />&nbsp;<br />## ntp server<br />192.168.190.1&nbsp; &nbsp;HEJIANMIN<br />[root@rac1 bin]#</span></div></div>
<p>3.修改主机的IP。</p>
<p>4.由于采用了ocfs2，将crs和votingdisk放在ocfs2上，修改主机IP之后，重启主机之前，也需要修改ocfs2的配置：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">原来：<br />[root@rac1 bin]# cat /etc/ocfs2/cluster.conf<br />node:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_port = 7777<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_address = 192.168.1.131<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;number = 0<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = rac1<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cluster = ocfs2<br />&nbsp;<br />node:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_port = 7777<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_address = 192.168.1.132<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;number = 1<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = rac2<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cluster = ocfs2<br />&nbsp;<br />node:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_port = 7777<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_address = 192.168.1.133<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;number = 2<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = rac3<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cluster = ocfs2<br />&nbsp;<br />cluster:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;node_count =3 <br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = ocfs2<br />[root@rac1 bin]#<br />&nbsp;<br />现改成：<br />[root@rac1 bin]# cat /etc/ocfs2/cluster.conf<br />node:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_port = 7777<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_address = 192.168.190.131<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;number = 0<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = rac1<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cluster = ocfs2<br />&nbsp;<br />node:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_port = 7777<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_address = 192.168.190.132<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;number = 1<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = rac2<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cluster = ocfs2<br />&nbsp;<br />node:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_port = 7777<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ip_address = 192.168.190.133<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;number = 2<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = rac3<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;cluster = ocfs2<br />&nbsp;<br />cluster:<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;node_count =3 <br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;name = ocfs2<br />[root@rac1 bin]#</span></div></div>
<p>注意如果不改ocfs配置，会在启动crs的时候报错，共享存储只会在第一个启动的机器上挂载。</p>
<p>5.重启主机，注意将网卡模式改为host only。</p>
<p>6.在3个节点上启动crs服务：/etc/init.d/init.crs start，重启后记得再次crs_stop。</p>
<p>7.用oifconfig来修改网卡被oracle使用的方式：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">#检查：<br />[root@rac1 bin]# ./oifcfg getif<br />eth0&nbsp; 192.168.1.0&nbsp; global&nbsp; public<br />eth1&nbsp; 10.10.10.0&nbsp; global&nbsp; cluster_interconnect<br />[root@rac1 bin]# <br />[root@rac1 bin]# <br />#修改：<br />[root@rac1 bin]# ./oifcfg delif -global eth0/192.168.1.0<br />[root@rac1 bin]# ./oifcfg setif -global eth0/192.168.190.0:public<br />[root@rac1 bin]# <br />[root@rac1 bin]# <br />#再次检查：<br />[root@rac1 bin]# ./oifcfg getif<br />eth0&nbsp; 192.168.190.0&nbsp; global&nbsp; public<br />eth1&nbsp; 10.10.10.0&nbsp; global&nbsp; cluster_interconnect<br />[root@rac1 bin]#</span></div></div>
<p>8.修改vip，注意这里是vip，不是public ip：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">[root@rac1 bin]# ./srvctl modify nodeapps -n rac1 -A 192.168.190.31/255.255.255.0/eth0<br />[root@rac1 bin]# ./srvctl modify nodeapps -n rac2 -A 192.168.190.32/255.255.255.0/eth0<br />[root@rac1 bin]# ./srvctl modify nodeapps -n rac3 -A 192.168.190.33/255.255.255.0/eth0<br />[root@rac1 bin]#</span></div></div>
<p>9.修改侦听中的vip为新地址。</p>
<p>10.crs_start 启动rac。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oracleblog.cn/study-note/change-rac-ip-on-vmware/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
