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 管理员组名称。
命令必须以 root 用户身份运行。
设置最小权限的命令示例:
下面是可用于解决问题的示例命令。必须对此进行调整,以匹配操作系统 Avamar 路径和 db2 管理员组名称。
命令必须以 root 用户身份运行。
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 ServerArticle 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.