Problem
Usable_file_MB value for an ASM disk group can be negative in asmcmd lsdg
output and in V$ASM_DISKGROUP
or V$ASM_DISKGROUP_STAT
views.
Example:
$ asmcmd lsdg data
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED HIGH N 512 512 4096 4194304 122880000 10088316 15360000 -1757228 0 N DATA/
Should we do anything about it?
Explanation
The Req_mir_free_MB and Usable_file_MB are somewhat misleading and can be ignored in FlashGrid cluster environments.
Their calculation is based on the assumption that one disk can fail and get dropped by ASM and there should be sufficient capacity available to do rebalance. This makes sense with physical disks. But cloud volumes (e.g. AWS EBS or Azure Premium SSDs) have built-in redundancy and are much less likely to completely "fail". Because of this, the drop timeout is purposefully configured very high to prevent ASM from dropping a disk that had intermittent failures.
However, it is better to have some free space available to avoid out-of-space errors. Thus, fully using the entire capacity may be not a good idea.
Instead of relying on Usable_file_MB, flashgrid-cluster output should be used to determine TotalMiB and FreeMiB space:
[grid@rac2 ~]$ flashgrid-cluster FlashGrid 21.2.1.57583 #4cdfa28528ddb3c1d9eeb32f3f5d0aa595420f99 License: Active, Expires 2021-07-12 Licensee: Company_test Support plan: Demo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FlashGrid running: OK Clocks check: OK Configuration check: OK Network check: OK Querying nodes: rac1, rac2, racq ... Cluster Name: myrac Cluster status: Good ------------------------------------------------------------ Node Status ASM_Node Storage_Node Quorum_Node Failgroup ------------------------------------------------------------ rac1 Good Yes Yes No RAC1 rac2 Good Yes Yes No RAC2 racq Good No No Yes RACQ ------------------------------------------------------------ -------------------------------------------------------------------------------------------------------- GroupName Status Mounted Type TotalMiB FreeMiB OfflineDisks LostDisks Resync ReadLocal Vote -------------------------------------------------------------------------------------------------------- DG_TEST Good AllNodes NORMAL 98304 97912 0 0 No Enabled None --------------------------------------------------------------------------------------------------------
In order to get total usable and free usable space available for storing database files, divide TotalMiB and FreeMiB by the redundancy factor: 2 for Normal or 3 for High redundancy disk group.
Based on the example above:
- Total usable space = TotalMiB / 2 = 98304 / 2 = 49152
- Free usable free space = FreeMiB / 2 = 97912 / 2 = 48956
Oracle Enterprise Manager usage notes
The following Oracle Enterprise Manager (OEM) metrics use Usable_file_MB and can trigger false alerts:
- Disk Group Usable (Free MB)
- Disk Group Usable (MB)
- Disk Group Used % of Safely Usable
The metrics are in the Disk Group Usage metric category and apply to Cluster ASM targets. To disable alerts, set the warning and criticals thresholds of the metrics to blank.
Instead, the Disk Group Usage/"Disk Group Used %" metric can be used for monitoring the percentage of used space of a disk group. By default, it sets warning and critical thresholds to 75% and 90% respectively. The thresholds can be adjusted as required.