The Oracle Automatic Storage Management (Oracle ASM) partition, when used on an RSA Identity Governance & Lifecycle Hardware Appliance, is formatted and managed by the Oracle ASM software. As such, it is not seen by typical operating system space usage commands, such as df -kh, du -a, or ls -ltr. The only way to see the ASM partition itself using an operating system command, is through a device command such asfdisk -l, run as the Linux root user. However, the fdisk command only shows you the size of the partition, not how much space is used within that partition.
This article explains how to use the Oracle ASM Command-Line Utility (ASMCMD) to determine how much space is available and how much space is in use on the ASM partition on Oracle versions 11g and 12g.
To see the ASM partition space used on an RSA Identity Governance & Lifecycle hardware appliance, both the ORACLE_SID and ORACLE_HOME environment variables must be re-defined to point to the +ASM instance instead of the AVDB instance.The ORACLE_SID environment variable needs to be set to +ASM, and the ORACLE_HOME environment variable must be set to point to the ORACLE_GRID_HOME. This can be done using the Linux export command.
Once the appropriate environment variables are defined, the Oracle ASM command asmcmd lsdg, can be used to see the actual ASM space used. This command can be run as either the Linux admin or oracle user.
NOTE: In the example below, only part of the information returned by this command is shown.
Set the environment variable (note there is a space between the . and the oraenv command):
$ . oraenv
ORACLE_SID = [AVDB] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
Run asmcmd to see the disk space:
$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 4194304 143204 133780 0 133780 0 N DG01/
This output says there is approximately 143 GB of space available on the ASM partition, and approximately 133 GB of that space is currently available for use.
Note that if the lsdg command returns:
[oracle@vm-support-04 ~]$ asmcmd
Connected to an idle instance.
ASMCMD-08102: no connection to ASM; command requires ASM to run
This could be an indication that there is very little or no space left on the local operating system partition, and is not indicative of space availability on ASM. When the local space is cleaned up, the lsdg command can return expected output.
After checking the ASM space, these environment variables should be redefined back to their defaults: ORACLE_HOME and ORACLE_SID.
The reason that both the ORACLE_SID and ORACLE_HOME environment variables need to be reset is to ensure that non-Grid commands function properly. Another way to do this would be to logoff, and login again, or by executing the RSA Identity Governance & Lifecycle script /home/oracle/setDeployEnv.sh.
If these environment variables are NOT redefined/reset, then execution of SQL*Plus to access the database might fail with an error like this:
$ sqlplus avuser/<avuser-password>
SQL*Plus: Release 220.127.116.11.0 Production on Tue Apr 28 11:46:51 2011
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0