1.先确认下空间占用情况:
发现归档日志占用了35G。
[db2inst1@VM-0-4-centos ~]$ du -h –max-depth=2 /home | sort -hr
35G /home/db2inst1/archived_logs
35G /home/db2inst1
35G /home
731M /home/db2inst1/sqllib
100K /home/db2inst1/.local
20K /home/db2inst1/.ibm
20K /home/db2inst1/.config
12K /home/db2inst1/.cache
8.0K /home/db2inst1/.ssh
4.0K /home/ssh1
4.0K /home/db2fenc1
4.0K /home/centos
2..列出所有的备份
$ db2 list history backup all for SAMPLEDB
List History File for SAMPLEDB
Number of matching file entries = 1
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
B D 20250107093913001 N D S0003381.LOG S0003381.LOG
Contains 3 tablespace(s):
00001 SYSCATSPACE
00002 USERSPACE1
00003 SYSTOOLSPACE
Comment: DB2 BACKUP SAMPLEDB ONLINE
Start Time: 202501070939313
End Time: 20250107093937
Status: A
EID: 3418 Location: /data/backdb
3.可以清理上次的备份之前的归档日志
db2 connect to SAMPLEDB
db2 prune history 20250107093913 with force option and delete
4.执行之后,可用空间恢复了