2022-02-08|閱讀時間 ‧ 約 19 分鐘

upgrade AHF

ahf
ahf
個人網站: https://kxodia.com
1.下載最新AHF
2.上傳AHF並解壓縮(可能不用解壓縮)
[root@rac1 ahf]# ls -lrt
total 407416
-rw-r--r-- 1 root root 417185977 Feb  8 15:41 AHF-LINUX_v21.4.1.zip
[root@rac1 ahf]# unzip AHF-LINUX_v21.4.1.zip
Archive:  AHF-LINUX_v21.4.1.zip
  inflating: README.txt
  inflating: ahf_setup
 extracting: ahf_setup.dat
  inflating: oracle-tfa.pub
[root@rac1 ahf]# ls -lrt
total 819728
-r-xr-xr-x 1 root root 422188843 Jan 13 03:24 ahf_setup
-rw-r--r-- 1 root root       384 Jan 13 03:26 ahf_setup.dat
-rw-r--r-- 1 root root      1525 Jan 13 03:26 README.txt
-rw-r--r-- 1 root root       625 Jan 13 03:26 oracle-tfa.pub
-rw-r--r-- 1 root root 417185977 Feb  8 15:41 AHF-LINUX_v21.4.1.zip
3.確認目前版本
[root@rac1 ahf]# ahfctl version
AHF version: 21.2.3
4.確認目前ahf狀態
[root@rac1 bin]# ahfctl statusahf

.--------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+------+---------------+-------+------+------------+----------------------+------------------+
| rac1 | RUNNING       | 24753 | 5000 | 21.2.3.0.0 | 21230020210909165804 | COMPLETE         |
| rac2 | RUNNING       | 18577 | 5000 | 21.2.3.0.0 | 21230020210909165804 | COMPLETE         |
'------+---------------+-------+------+------------+----------------------+------------------'
------------------------------------------------------------
Master node = rac1
orachk daemon version = 212300
Install location = /opt/oracle.ahf/orachk
Started at = Tue Feb 08 15:54:27 CST 2022
Scheduler type = TFA Scheduler
Scheduler PID:  24753
------------------------------------------------------------
ID: orachk.autostart_client_oratier1
------------------------------------------------------------
AUTORUN_FLAGS  =  -usediscovery -profile oratier1 -syslog -dball -showpass -tag autostart_client_oratier1 -readenvconfig
COLLECTION_RETENTION  =  7
AUTORUN_SCHEDULE  =  3 2 * * 1,2,3,4,5,6
------------------------------------------------------------
------------------------------------------------------------
ID: orachk.autostart_client
------------------------------------------------------------
AUTORUN_FLAGS  =  -usediscovery -syslog -tag autostart_client -readenvconfig
COLLECTION_RETENTION  =  14
AUTORUN_SCHEDULE  =  3 3 * * 0
------------------------------------------------------------
Next auto run starts on Feb 09, 2022 02:03:00
ID:orachk.AUTOSTART_CLIENT_ORATIER1
5.註冊ahf軟體目錄
[root@rac1 ahf]# ahfctl setupgrade -swstage /source/ahf

AHF autoupgrade parameters successfully updated
Successfully synced AHF configuration
refreshConfig() completed successfully.
6.開始升級

[root@rac1 ahf]# ahfctl upgrade

AHF software signature has been validated successfully
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_214100_30035_2022_02_08-16_05_12.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 21.4.1 Build Date: 202201112133
AHF is already installed at /opt/oracle.ahf
Installed AHF Version: 21.2.3 Build Date: 202109091658
Upgrading /opt/oracle.ahf
Shutting down AHF Services
Stopped OSWatcher
Nothing to do !
Shutting down TFA
Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
Successfully shutdown TFA..

Starting AHF Services
Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
No new directories were added to TFA
Directory /u01/app/grid/crsdata/rac1/trace/chad was already added to TFA Directories.

INFO: Starting orachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/rac1/diag/orachk/compliance_start_080222_160753.log
AHF is successfully upgraded to latest version

.------------------------------------------------------------.
| Host | TFA Version | TFA Build ID         | Upgrade Status |
+------+-------------+----------------------+----------------+
| rac1 |  21.4.1.0.0 | 21410020220111213353 | UPGRADED       |
| rac2 |  21.2.3.0.0 | 21230020210909165804 | NOT UPGRADED   |
'------+-------------+----------------------+----------------'

Moving /tmp/ahf_install_214100_30035_2022_02_08-16_05_12.log to /u01/app/grid/oracle.ahf/data/rac1/diag/ahf/

Please upgrade AHF on the below mentioned nodes as well using ahfctl upgrade
rac2
7. 節點2 再執行一次(需要將軟體scp 至node 2 相同路徑)
[root@rac2 ~]# ahfctl upgrade

Software stage directory /source/ahf does not exists.
[root@rac2 ~]# mkdir -p /source/ahf
[root@rac2 ~]# ahfctl upgrade

/source/ahf/AHF-LINUX_v21.4.1.zip successfully extracted at /source/ahf
AHF software signature has been validated successfully
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_214100_8825_2022_02_08-16_48_23.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 21.4.1 Build Date: 202201112133
AHF is already installed at /opt/oracle.ahf
Installed AHF Version: 21.2.3 Build Date: 202109091658
Upgrading /opt/oracle.ahf
Shutting down AHF Services
TFA-00201 Diagnostic directory not found.
Shutting down TFA
Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
Successfully shutdown TFA..

Starting AHF Services
Starting TFA..
Waiting up to 100 seconds for TFA to be started..
. . . . .
Successfully started TFA Process..
. . . . .
TFA Started and listening for commands
INFO: Starting orachk scheduler in background. Details for the process can be found at /u01/app/grid/oracle.ahf/data/rac2/diag/orachk/compliance_start_080222_164929.log
AHF is successfully upgraded to latest version
.------------------------------------------------------------.
| Host | TFA Version | TFA Build ID         | Upgrade Status |
+------+-------------+----------------------+----------------+
| rac2 |  21.4.1.0.0 | 21410020220111213353 | UPGRADED       |
| rac1 |  21.4.1.0.0 | 21410020220111213353 | UPGRADED       |
'------+-------------+----------------------+----------------'

Moving /tmp/ahf_install_214100_8825_2022_02_08-16_48_23.log to /u01/app/grid/oracle.ahf/data/rac2/diag/ahf/
p.s. 發現軟體scp 過來不需要解壓所也可以,或許第二步不需要解壓縮
8.確認結果
[root@rac2 ~]# ahfctl statusahf
.--------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+------+---------------+-------+------+------------+----------------------+------------------+
| rac2 | RUNNING       | 11254 | 5000 | 21.4.1.0.0 | 21410020220111213353 | COMPLETE         |
| rac1 | RUNNING       |  2974 | 5000 | 21.4.1.0.0 | 21410020220111213353 | COMPLETE         |
'------+---------------+-------+------+------------+----------------------+------------------'
------------------------------------------------------------

Master node = rac1
orachk daemon version = 212300
Install location = /opt/oracle.ahf/orachk
Started at = Tue Feb 08 15:57:45 CST 2022
Scheduler type = TFA Scheduler
Scheduler PID:  11254
No scheduler for any ID

[root@rac2 ~]# ahfctl version
AHF version: 21.4.1

分享至
成為作者繼續創作的動力吧!
© 2024 vocus All rights reserved.