Affected Versions: All Versions
The Oracle ASM partition, when used on a RSA hardware Appliance, is formatted and managed by the Oracle ASM software. As such, it's not seen by typical OS 'space usage' commands, such as df -kh, or du -a, or ls -ltr.
The only way to 'see' the ASM partition itself, is thru a device command such as fdisk -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.
How can you 'see' how much ASM space is used?
To see how much space is available and used in the ASM partition for Oracle 10g, the environment variable ORACLE_SID must be defined to the ASM instance name. On an Aveksa appliance, this sid is +ASM. The default value for the Linux 'oracle' or 'admin' account logins, is the database sid name, AVDB.
|Tasks||Define the appropriate Oracle environment variables as noted below, depending on the version of Oracle being used, to be able to view hardware appliance use of Oracle's ASM partition using Oracle's asmcmd command.|
For ACM 3.6+, 4.X+ (Using Oracle 10g)
To see the space used, define ORACLE_SID to +ASM, using the Linux export command. Then, make use of the Oracle ASM command, asmcmd lsdg, to see actual ASM space used. These commands can be run as either the Linux 'admin' or 'oracle' user.
$ export ORACLE_SID=+ASM
State Type Sector Block Total_MB Free_MB Offline_disks Name
This output is telling us that there is 1.7 Tb of space available to the ASM partition, and approx 36gb of that is currently being used. (1713401mb - 1676996, mb = 36000mb, or 36gb)
for ACM 5.x, 6.x (using Oracle 11g)
To see the space used when ACM 5.x or IMG 6.x is in use, BOTH the ORACLE_SID and ORACLE_HOME environment variables must be defined. The ORACLE_SID environment variable needs to be set to +ASM, and the ORACLE_HOME environment variable must be set topoint to the ORACLE_GRID_HOME. This can be done using the Linux export command.
In Oracle 11G use the following commands to switch from the Oracle AVDB instance to the +ASM instance:
$ echo $ORACLE_SID
$ echo $ORACLE_GRID_HOME
$ export ORACLE_SID=+ASM
$ asmcmd lsdg
This output is telling us that there is approximately 300gb of space available to the ASM partition, and approx 29gb of that is currently being used.
Note that if the asm lsdg command returns:
[oracle@vm-support-04 ~]$ asmcmd
This could be an indication that there is very little or no space left on the local OS partition.. and is not indicative of space 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:
$ export ORACLE_SID=AVDB
The reason that both ORACLE_SID and ORACLE_HOME are 'reset', is to ensure that non-Grid commands function properly. Another way to do this would be to logoff, and then log back on, or by executing the ACM environment script /home/oracle/setDeployEnv.sh.
If these are NOT redefined/reset, then execution of sqlplus to access the database might fail with an error like this:
$ sqlplus avuser/<avuser-password>
SQL*Plus: Release 126.96.36.199.0 Production on Mon Dec 5 17:46:51 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.