Avamar DB2 備份失敗,並在 db2diag 記錄檔中出現錯誤「Unable to spawn Avdb2 for backup」,並出現 SQL2025N 錯誤

Summary: Avamar DB2 備份失敗或完成,但有例外情形。db2diag.log 會在備份開始後不久顯示廠商錯誤和 SQL2025N I/O 錯誤。 在啟用 avdb2 偵錯後,會顯示程式檔案鎖定錯誤。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

Avamar DB2 備份失敗或完成,但有例外情形。db2diag.log 會在備份開始後不久顯示廠商錯誤和 SQL2025N I/O 錯誤。

avdb2 記錄顯示下列內容:

2023-01-13 02:30:10 avdb2 Info : Process 965860 (/usr/local/avamar/bin/avdb2) finished (code 170: completed with errors, client log should be examined)
2023-01-13 02:30:10 avdb2 Warning : CTL workorder "DB2_DB_0220-DBNAMEXDS01_DB-1673547600007#1" non-zero exit status 'code 170: completed with errors, client log should be examined'
2023-01-13 02:30:10 avdb2 Error : Unable to spawn Avdb2 for backup/restore of [db2inst1/DBNAME db2inst1/DBNAME].
2023-01-13 02:30:10 avdb2 Info : Process 966206 (/usr/local/avamar/bin/avtar) for workorder DB2_DB_0220-DBNAMEXDS01_DB-1673547600007#201 started
2023-01-13 02:30:10 avdb2 Info : Setting ctl message version to 3 (from 1)
2023-01-13 02:30:10 avdb2 Info : Setting ctl max message size to 268435456
2023-01-13 02:30:13 avdb2 Info : Process 966206 (/usr/local/avamar/bin/avtar) finished (code 0: success)
2023-01-13 02:30:13 avdb2 Error : Unable to get the list of backup images from the child process.
2023-01-13 02:30:13 avdb2 Info : Starting graceful (staged) termination, Unable to get the list of backup images from the child process. (wrap-up stage)


啟用偵錯時,也會看到與此相關的程式檔案鎖定類似的錯誤:

2023/01/12-18:20:04.79408 [ctl_conn_recv-DB2_DB_0220-DBNAMEXDS01_DB-1673547600007#1] ctl_connection::lowdata:
recv:

 

備份啟動後,db2diag.log 發生錯誤:
2023-01-17-03.30.03.849521+480 I300934E909 LEVEL: Error
PID : 9696 TID : 140540540610304 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : DBNAME
APPHDL : 0-55065 APPID: *LOCAL.db2inst1.230116193009
AUTHID : DB2INST1 HOSTNAME: db2hostname
EDUID : 32933 EDUNAME: db2med.30870.0 (DBNAME) 0
FUNCTION: DB2 UDB, database utilities, sqluMapVend2MediaRCWithLog, probe:699
DATA #1 : String, 144 bytes
Vendor error: rc = 25 returned from function sqluvput.
Return_code structure from vendor library /usr/local/avamar/lib/libdb2_avamarloader.so:

DATA #2 : Hexdump, 48 bytes
0x00007FD47978F350 : 1701 0000 4176 7461 7220 496E 7075 742F ....Avtar Input/
0x00007FD47978F360 : 4F75 7470 7574 2065 7272 6F72 2E00 0000 Output error....
0x00007FD47978F370 : 0000 0000 0000 0000 0000 0000 0000 0000 ................

2023-01-17-03.30.04.850521+480 E301844E535 LEVEL: Error
PID : 9696 TID : 140540540610304 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : DBNAME
APPHDL : 0-55065 APPID: *LOCAL.db2inst1.230116193009
AUTHID : DB2INST1 HOSTNAME: db2hostname
EDUID : 32933 EDUNAME: db2med.30870.0 (DBNAME) 0
FUNCTION: DB2 UDB, database utilities, sqluMCWriteToDevice, probe:1304
MESSAGE : Media controller -- problem writing to vendor device. rc = -2025

2023-01-17-03.30.04.850898+480 E302380E571 LEVEL: Error
PID : 9696 TID : 140540540610304 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : DBNAME
APPHDL : 0-55065 APPID: *LOCAL.db2inst1.230116193009
AUTHID : DB2INST1 HOSTNAME: db2hostname
EDUID : 32933 EDUNAME: db2med.30870.0 (DBNAME) 0
FUNCTION: DB2 UDB, database utilities, sqluMCWriteToDevice, probe:1304
MESSAGE : SQL2025N An I/O error occurred. Error code: "". Media on which this
error occurred: "".

Cause

由於 Avamar /usr/local/avamar/var/clientlogs 目錄的使用者或許可權不正確,因此發生此錯誤。

導致此案例問題的 不正確許可權範例:
drwxr-xr-x 2 root root 20480 Jan 17 08:00 clientlogs

Resolution

對於用於備份工作的 db2 使用者和群組,目錄至少需要讀取+執行許可權。

以下是可用於解決問題的命令範例。必須調整此功能,以符合作業系統 Avamar 路徑和 db2 系統管理員組名。

命令必須以根使用者的身分執行。
chown root:db2iadm1 /usr/local/avamar/var/clientlogs

設定最小許可權的命令範例:
chmod 755 /usr/local/avamar/var/clientlogs


Affected Products

Avamar Client, Avamar Plug-in for IBM DB2, Avamar Server
Article Properties
Article Number: 000210810
Article Type: Solution
Last Modified: 02 Jun 2023
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.