Monday, September 19, 2011

Detecting Disk Space Issues (df -h)


Users are reporting that they can’t connect to a database. You log on to the database server, attempt to
connect to SQL*Plus, and receive this error:
ORA-09817: Write to audit file failed.
Linux Error: 28: No space left on device
Additional information: 12


You want to quickly determine if a mount point is full and where the largest files are within this
mount point.

$ df –h 



use the df command to identify disk space issues. This example uses the -h to format the output so that space is reported in megabytes or gigabytes



When you have a database that is hung because there is little or no free disk space, you should quickly
find files that can be safely removed without compromising database availability. On Linux/Unix
servers, the df, find, and du commands are particularly useful


once a full mount point is identified, then use the find command to locate the largest files contained in a
directory structure. This example navigates to the ORACLE_HOME directory and then connects the find, ls,
sort, and head commands to identify the largest files beneath that directory:


$ find . -ls | sort -nrk7 | head -10 



This example combines the du, sort, and head commands to show the ten largest directories beneath the current working directory:


$ du -S . | sort -nr | head -10 




No comments:

Post a Comment