Newsletters Archive - 2010

If you would like to know more about the iDevelopment.info Newsletter, please email me.


  Differences in df and du on Oracle Cluster File System (OCFS2) and Orphan Files — (18-August-2010)

Recently, it was noticed that the "df" and "du" commands were displaying 
different results from several nodes on two OCFS2 file systems. The cluster 
file systems were being used as shared storage for an Oracle RAC 10g 
configuration (Clusterware shared files and the Flash Recovery Area).

Researching this problem yielded a bug with the OCFS2 kernel driver (1.4.2-1) 
that was apparently leaving deleted files in the orphan directory (the 
//orphan_dir name space in OCFS2) after being deleted from the disk.

When an object (file and/or directory) is deleted from an OCFS2 cluster file 
system, the file system unlinks the object entry from the existing directory 
and links it as an entry against that cluster node's orphan directory (the 
//orphan_dir name space in OCFS2). When the object is eventually no longer used 
across the cluster, the file system frees it's inode including all disk space 
associated with it.

It was determined that orphan files on the OCFS2 cluster file system were 
responsible for the significant difference between the df and du commands. 
OCFS2 was leaving some deleted files in the orphan directory (the 
//orphan_dir name space in OCFS2) after being deleted.

The following article highlights the steps involved in troubleshooting disk 
space usage on an OCFS2 cluster file system and how to resolve the discrepancy 
between the df and du commands.

Differences in df and du on Oracle Cluster File System (OCFS2) and Orphan Files

----------------------------
Jeffrey M. Hunter, OCP
Sr. Database Administrator
jhunter@idevelopment.info
http://www.idevelopment.info
----------------------------