oracle rac 打PSU補丁30805461兩個問題(Java版本及空間不足導致失敗)
-
1.1 環境檢查及包下載
說明:/u01空間不夠備份,由於測試環境可以冒險一試
$ORACLE_HOME/OPatch/opatch version 版本需要在 11.2.0.3.6及其以上,目前環境不滿足
OPatch Version: 11.2.0.3.6 or later
1.2 上傳補丁包p30805461到/u01/soft
1.3 更新 opatch到較高版本
下載p6880880最新版本,參照 How To Download And Install The Latest OPatch(6880880) Version (Doc ID 274526.1)
下載,選擇中間版本12.2.0.1.0
-
4 備份GRID、ORACLE、oraInventory目錄。(說明$GI_HOME(<GI_HOME>)代表grid使用者下的$ORACLE_HOME)
grid使用者停止資料庫
srvctl stop database -d htdb
srvctl status database -d htdb
Instance htdb1 is not running on node htdb1
Instance htdb2 is not running on node htdb2
srvctl stop database -d longs
停止crs
[root@htdb1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
su - grid
[grid@htdb1 ~]$ env |grep ORA
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2.0/grid
su - oracle
Password:
[oracle@htdb1 ~]$ env |grep ORA
ORACLE_SID=htdb1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
# su - root
export GI_HOME=/u01/app/11.2.0/grid
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1/
$GI_HOME/OPatch/opatch -version -jre /usr/java/jre1.8.0_261-amd64/
cd /u01/soft/
[root@htdb1 soft]# chown grid:oinstall p30805461_112040_Linux-x86-64.zip
[root@htdb1 soft]# chmod 776 *.zip
1.5 解壓opatch,PSU
unzip p6880880_122010_LINUX.zip
[root@htdb1 soft]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 18G 15G 2.5G 86% /
tmpfs 931M 72K 931M 1% /dev/shm
[root@htdb1 soft]# rm -f p6880880_122010_LINUX.zip
[root@htdb1 soft]# unzip p30805461_112040_Linux-x86-64.zip
還未解壓完成,空間已經滿了
準備給虛擬機器新建磁碟8G空間,掛載到/u01/soft下
rm -fR 30805461/
[root@htdb1 soft]# df -hh
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 18G 15G 2.6G 85% /
tmpfs 931M 72K 931M 1% /dev/shm
[root@htdb1 soft]# fdisk -l
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ef82e
Device Boot Start End Blocks Id System
/dev/sda1 1 262 2097152 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 262 2611 18873344 83 Linux
Disk /dev/sdb: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc: 20.2 GB, 20199768064 bytes
64 heads, 32 sectors/track, 19264 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/mpatha: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/mpathb: 20.2 GB, 20199768064 bytes
255 heads, 63 sectors/track, 2455 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
新加一塊盤之後 fdisk -l
fdisk /dev/sdb
輸入 n p 1 w
mkfs.ext4 /dev/sdb1之後
mkdir -p /u01/soft1
[root@htdb1 ~]# mount /dev/sdb1 /u01/soft1
[root@htdb1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 18G 15G 2.6G 85% /
tmpfs 931M 72K 931M 1% /dev/shm
/dev/sdb1 7.8G 18M 7.4G 1% /u01/soft1
[root@htdb1 ~]# cd /u01/soft
[root@htdb1 soft]# ls -lrt
total 1248140
-rw-r--r-- 1 root root 207399 Mar 13 21:41 pdksh-5.2.14-30.x86_64.rpm
drwxr-x--- 14 root root 4096 Apr 22 18:55 OPatch
-rwxrwxrw- 1 grid oinstall 1277877242 Aug 11 15:33 p30805461_112040_Linux-x86-64.zip
[root@htdb1 soft]# mv p30805461_112040_Linux-x86-64.zip /u01/soft1/
unzip p30805461_112040_Linux-x86-64.zip
chown -R grid:oinstall /u01/soft1/
1.6替換opatch(root):
mv $GI_HOME/OPatch $GI_HOME/OPatch.bak
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch.bak
cp -r /u01/soft/OPatch $GI_HOME
cp -r /u01/soft/OPatch $ORACLE_HOME
$GI_HOME/OPatch/opatch -version
/u01/app/11.2.0/grid/OPatch/opatch: line 839: [: too many arguments
/u01/app/11.2.0/grid/OPatch/opatch: line 839: [: too many arguments
Java (1.7) could not be located. OPatch cannot proceed!
OPatch returns with error code = 1
java版本過低
java -version
java version "1.7.0_99"
OpenJDK Runtime Environment (rhel-2.6.5.1.el6-x86_64 u99-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
安裝 rpm -ivh jre-8u261-linux-x64.rpm
檢查版本
java -versin
Unrecognized option: -versin
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[root@htdb1 redis-6.0.6]# java -version
java version "1.8.0_261"
$ORACLE_HOME/OPatch/opatch version –jre /usr/java/jre1.8.0_261-amd64
/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch: line 839: [: too many arguments
/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch: line 839: [: too many arguments
Java (1.7) could not be located. OPatch cannot proceed!
OPatch returns with error code = 1
http://blog.itpub.net/35489/viewspace-744473/
grid:
export GI_HOME=/u01/app/11.2.0/grid
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1/
$GI_HOME/OPatch/opatch -version -jre /usr/java/jre1.8.0_261-amd64/
報錯1:root無法執行 $GI_HOME/OPatch/opatch -version -jre /usr/java/jre1.8.0_261-amd64/
2 opatch版本和OUL不匹配,需要11.2.0.4的,目前是12的
去掉version前面-號可以
二 打補丁
啟動crs及資料庫例項
root:/u01/app/11.2.0/grid/bin/crsctl start crs
grid: srvctl start instance -d htdb -i htdb1
srvctl start instance -d longs -i longs1
2.1 建立ocm檔案並打補丁(root/grid/oracle):
export GI_HOME=/u01/app/11.2.0/grid
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
/u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp -no_banner -output /tmp/ocm.rsp
chmod 775 /tmp/ocm.rsp
由於沒有emocmrsp命令檔案,執行報錯如下(該步驟可以忽略跳過)
2.2 打補丁(root)
grid安裝目錄的屬主為ROOT使用者,給grid使用者寫的許可權,因為PATCH安裝時是分別用GRID和orale使用者執行的,
grid使用者需要在$ORACLE_HOME/目錄建立.patch_storage 目錄,可見後面報錯資訊.
cd /u01/app/grid/product/11.2.0
mkdir .patch_storage
chown -R grid:oinstall .patch_storage
chmod -R 776 .patch_storage
--chmod 775 -R /u01/app/11.2.0/grid
--檢查資料庫配置資訊:srvctl config database -d tycl -a
su - root
export PATH=$PATH
export GI_HOME=/u01/app/11.2.0/grid
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
### $GI_HOME/OPatch/opatch auto /u01/soft/patch/31305209 -ocmrf /tmp/ocm.rsp
$GI_HOME/OPatch/opatch auto /u01/soft1/30805461/
檢視日誌
其中vi 日誌 根據關鍵字error找到以上報錯
空間問題暫時無法解決,根目錄 / 及 rootvg是安裝系統時候分配的大小
三 總結:問題兩個 1 java版本問題 2 空間問題,看來這個補丁大約需要5G以上剩餘空間。
失敗是成功之母,找到問題根源就好,下次格外小心。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25846553/viewspace-2710863/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【PSU】怎麼給RAC打PSU補丁
- Oracle 11g RAC自動打GI PSU補丁Oracle
- Oracle RAC 19.3打19.5.1 RU補丁Oracle
- weblogic的版本及打補丁Web
- Oracle RAC更新補丁Oracle
- 12. Oracle版本、補丁及升級——12.2. 補丁及補丁集Oracle
- oracle 19c rac打補丁常見錯誤Oracle
- Oracle 19c RAC打補丁過程避坑指南Oracle
- ORACLE RAC的全自動 打補丁標準化文件Oracle
- 【PSU】Oracle打PSU及解除安裝PSU(單例項)Oracle單例
- [202021127]sql打補丁問題.txtSQL
- oracle打補丁回顧Oracle
- LightDB/Postgresql 記錄客戶端啟動版本問題導致啟動失敗問題SQL客戶端
- SQL Server Profiler(P)導致C盤空間不足SQLServer
- Aix 7一次補丁安裝失敗問題處理AI
- GI PSU打補丁之opatch auto 自動方式分別打GI_HOME和ORACLE_HOMEOracle
- Oracle 補丁那些事兒(PS、PSU、CPU、SPU、BP、DBBP…)Oracle
- ORACLE打補丁的方法和案例Oracle
- windows oracle 11201打補丁報錯WindowsOracle
- 補丁psu、spu、cpu的意思
- 【補丁】Oracle補丁的知識及術語Oracle
- ORACLE RAC 兩節點db_32k_cache_size設定不當導致表truncate失敗之ORA-00379Oracle
- 12. Oracle版本、補丁及升級——12.1. 版本體系Oracle
- 19c rac自動打補丁步驟
- ORACLE 19C RAC FOR RHEL7 打補丁報錯OPatchException: Unable to create patchObjectOracleExceptionObject
- Oracle RAC 第二節點打補丁報錯 oui-patch.xml (Permission denied)OracleUIXML
- [20210929]sql打補丁使用rule提示問題.txtSQL
- weblogic10.3.6軟體打補丁很慢問題Web
- 打Oracle PSU時碰到的一些問題處理Oracle
- Oracle RAC啟動失敗(DNS故障)OracleDNS
- oracle兩節點RAC,由於gipc導致某節點crs無法啟動問題分析Oracle
- Oracle Goldengate 12c打pus補丁OracleGo
- OJVM+GI PSU補丁升級JVM
- 記一次12c pdb打補丁失敗處理過程
- 12. Oracle版本、補丁及升級——12.3. 升級Oracle
- 【UP_ORACLE】如何給Oracle DG打補丁(二)備庫安裝補丁步驟Oracle
- 【UP_ORACLE】如何給Oracle DG打補丁(三)主庫安裝補丁步驟Oracle
- win10更新補丁總是失敗如何修復_win10更新補丁總是失敗怎麼辦Win10