NOTE: In the example below, only part of the information returned by this command is shown.
$ . oraenv
ORACLE_SID = [AVDB] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
$ 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.
[oracle@vm-support-04 ~]$ asmcmd
Connected to an idle instance.
ASMCMD> lsdg
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.
$ export ORACLE_SID=AVDB
$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
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 12.1.0.2.0 Production on Tue Apr 28 11:46:51 2011
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
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