Oracle · Unix

AIX 6.1 mountpoint Free space not claimed after dropping oracle datafiles. df and du results not match.

In Oracle DB, some tablespace and datafiles were dropped.

drop tablespace data01 including contents and datafiles;

Before the drop action, AIX mounpoint du and df command shows below, the total usage was matched.

oracle@posdb:/u02>du -sg */
243.41  HKMT2A/
134.48  HQMT1A/
25.63   HUBMT2A/
9.51    MYMT2A/
45.34   SGMT2A/
0.00    lost+found/

oracle@posdb:/u02>df -g .
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/u02lv       665.00    206.52   69%      125     1% /u02

However after the drop action, found the du showing correct result but df not refreshed.

oracle@posdb:/u02>du -sg */
41.32   HKMT2A/
134.48  HQMT1A/
25.63   HUBMT2A/
9.51    MYMT2A/
45.34   SGMT2A/
0.00    lost+found/

oracle@posdb:/u02>df -g .
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/u02lv       665.00    206.52   69%      125     1% /u02

Solution:

Find out the occupying process by fuser, then double check they are orphan oracle sessions.

oracle@posdb:/u02>fuser -dV /u02/HKMT2A/
/u02/HKMT2A/: 
inode=4109   size=8589942784   fd=9     7143506
inode=4109   size=8589942784   fd=10    14483518
inode=4108   size=8589942784   fd=16    28311590
inode=8217   size=9943654400   fd=9     34078830
oracle@posdb:/u02>ps -ef|grep 7143506
  oracle  7143506        1   0   Nov 05      -  0:07 oracleHKMT2A (LOCAL=NO) 
  oracle 29491424 27328532   0 06:24:49  pts/4  0:00 grep 7143506 
oracle@posdb:/u02>ps -ef|grep 14483518
  oracle 14483518        1   0   Nov 05      -  0:41 oracleHKMT2A (LOCAL=NO) 
  oracle 29491426 27328532   0 06:24:53  pts/4  0:00 grep 14483518 
oracle@posdb:/u02>ps -ef|grep 28311590
  oracle 20971678 27328532   0 06:24:57  pts/4  0:00 grep 28311590 
  oracle 28311590        1   0   Nov 05      -  0:00 oracleHKMT2A (LOCAL=NO) 
oracle@posdb:/u02>ps -ef|grep 34078830
  oracle 20971680 27328532   0 06:25:01  pts/4  0:00 grep 34078830 
  oracle 34078830        1   0 07:52:15      -  0:00 oracleHKMT2A (LOCAL=NO) 

Kill the processes in OS and check again, du results get refreshed.

oracle@posdb:/u02>df -g .
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/u02lv       665.00    206.52   69%      125     1% /u02

oracle@posdb:/u02>kill -9 7143506 14483518 28311590 34078830

oracle@posdb:/u02>fuser -dV /u02/HKMT2A/
/u02/HKMT2A/: 

oracle@posdb:/u02>df -g .
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/u02lv       665.00    408.61   39%       98     1% /u02

Done!