合 Oracle adump目录爆满的解决方法
问题及解决
Oracle 11.2.0.4环境,迁移到华为云,使用华为云的SMS工具迁移,
但是每次增量迁移都需要10小时左右,按理来说,增量没有这么大,
提工单,经过华为方查询,发现源端文件很多,导致比对时间太长,
我第一想到的就是adump文件或告警日志目录文件过多,
经过查询,告警目录文件不多,但是adump目录文件很多,小文件有30万个,大概1.2G左右
果断删除这些日志,然后进行SMS增量同步。
以下为操作过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | [root@lhrdbs ~]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/mapper/vg_lhrdbs-lv_root 82886656 469414 82417242 1% / tmpfs 8263266 3 8263263 1% /dev/shm /dev/sda1 128016 40 127976 1% /boot [oracle@lhrdbs orcl]$ ll total 22888 drwxr-x---. 2 oracle oinstall 23420928 Jan 13 09:00 adump drwxr-x---. 2 oracle oinstall 4096 Apr 6 2020 dpdump drwxr-x---. 2 oracle oinstall 4096 Apr 6 2020 pfile drwxr-x---. 2 oracle oinstall 4096 Apr 6 2020 scripts [oracle@lhrdbs orcl]$ [oracle@lhrdbs orcl]$ [oracle@lhrdbs orcl]$ ls -lR | grep "^-"| wc -l ^C [oracle@lhrdbs orcl]$ du -sh . 1.2G . [oracle@lhrdbs orcl]$ cd adump/ [oracle@lhrdbs adump]$ ll ^C [oracle@lhrdbs adump]$ ls -l total 1177976 -rw-r----- 1 oracle oinstall 798 Jan 6 2021 orcl_ora_10000_20210106074501859244143795.aud -rw-r----- 1 oracle oinstall 798 Feb 8 2021 orcl_ora_10000_20210208084502462747143795.aud -rw-r----- 1 oracle oinstall 799 Mar 5 2021 orcl_ora_10000_20210305014502553171143795.aud 。。。。。。。。。。 -rw-r----- 1 oracle oinstall 799 Sep 7 01:45 orcl_ora_10438_20210907014502508249143795.aud -rw-r----- 1 oracle oinstall 799 Nov 5 01:45 orcl_ora_10438_20211105014502519626143795.aud -rw-r----- 1 oracle oinstall 799 Nov 16 23:45 orcl_ora_10438_20211116234502875367143795.aud -rw-r----- 1 oracle oinstall 798 Dec 8 05:45 orcl_ora_10438_20211208054503072252143795.aud ^C-rw-r----- 1 oracle oinstall 799 Jan 8 02:45 orcl_ora_10438_20220108024501336869143795.aud [oracle@lhrdbs adump]$ ls -l | wc -l 294472 [oracle@lhrdbs adump]$ rm -rf orcl_ora_*.aud -bash: /bin/rm: Argument list too long [oracle@lhrdbs adump]$ rm -rf orcl_ora_10438_20211* [oracle@lhrdbs adump]$ rm -rf orcl_ora_10438_2021* [oracle@lhrdbs adump]$ rm -rf orcl_ora_10438_2020* [oracle@lhrdbs adump]$ ls -l | wc -l 294460 [oracle@lhrdbs adump]$ rm -rf orcl_ora_10* [oracle@lhrdbs adump]$ [oracle@lhrdbs adump]$ rm -rf orcl_ora_1* -bash: /bin/rm: Argument list too long [oracle@lhrdbs adump]$ rm -rf orcl_ora_12* [oracle@lhrdbs adump]$ find ./ -name "*" | xargs rm -rf '*' [oracle@lhrdbs adump]$ [oracle@lhrdbs adump]$ [oracle@lhrdbs adump]$ [oracle@lhrdbs adump]$ ll total 0 [oracle@lhrdbs adump]$ df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/mapper/vg_lhrdbs-lv_root 82886656 163354 82723302 1% / tmpfs 8263266 3 8263263 1% /dev/shm /dev/sda1 128016 40 127976 1% /boot [oracle@lhrdbs adump]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 13 09:15:39 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@lhrdbs adump]$ ll total 4 -rw-r----- 1 oracle oinstall 804 Jan 13 09:15 orcl_ora_21385_20220113091539101577143795.aud [oracle@lhrdbs adump]$ more orcl_ora_21385_20220113091539101577143795.aud Audit file /u01/app/oracle/admin/orcl/adump/orcl_ora_21385_20220113091539101577143795.aud Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1 System name: Linux Node name: lhrdbs Release: 2.6.32-431.el6.x86_64 Version: #1 SMP Sun Nov 10 22:19:54 EST 2013 Machine: x86_64 VM name: VMWare Version: 6 Instance name: orcl Redo thread mounted by this instance: 1 Oracle process number: 118 Unix process pid: 21385, image: oracle@lhrdbs (TNS V1-V3) Thu Jan 13 09:15:39 2022 +08:00 LENGTH : '160' ACTION :[7] 'CONNECT' DATABASE USER:[1] '/' PRIVILEGE :[6] 'SYSDBA' CLIENT USER:[6] 'oracle' CLIENT TERMINAL:[5] 'pts/0' STATUS:[1] '0' DBID:[10] '1564813603' [oracle@lhrdbs adump]$ ll total 4 -rw-r----- 1 oracle oinstall 804 Jan 13 09:15 orcl_ora_21385_20220113091539101577143795.aud |
Inode参考:https://www.dbaup.com/linux-inodejieshao.html?hilite=IUsed
报错“Argument list too long”的解决办法:https://www.dbaup.com/baocuoargument-list-too-longdejiejuebanfa.html