When Oracle ASM provides redundancy, such as when you create a disk group with
HIGH redundancy, you must have sufficient capacity in each disk group to manage a re-creation of data that is lost after a failure of one or two failure groups. After one or more disks fail, the process of restoring redundancy for all data requires space from the surviving disks in the disk group. If not enough space remains, then some files might end up with reduced redundancy.
Reduced redundancy means that one or more extents in the file are not mirrored at the expected level. For example, a reduced redundancy file in a high redundancy disk group has at least one file extent with two or fewer total copies of the extent instead of three. For unprotected files, data extents could be completely missing. Other causes of reduced redundancy files are disks running out of space or an insufficient number of failure groups.
The following guidelines help ensure that you have sufficient space to restore full redundancy for all disk group data after the failure of one or more disks.
Normal redundancy disk group - It is best to have enough free space in your disk group to tolerate the loss of all disks in one failure group. The amount of free space should be equivalent to the size of the largest failure group.
High redundancy disk group - It is best to have enough free space to cope with the loss of all disks in two failure groups. The amount of free space should be equivalent to the sum of the sizes of the two largest failure groups.
When you lose multiple disks from multiple failure groups, then you could lose both the primary and the redundant copies of your data. In addition, if you do not have enough capacity to restore redundancy, then Oracle ASM can continue to operate. However, if another disk fails, then the system may not be able to tolerate additional failures.
V$ASM_DISKGROUP view contains the following columns that contain information to help you manage capacity:
The values in the
USABLE_FILE_MB columns of the
V$ASM_DISKGROUP view are
0 if the disk group type is
0 value in this case means no value is given, not a zero amount in the
REQUIRED_MIRROR_FREE_MBindicates the amount of space that must be available in a disk group to restore full redundancy after the worst failure that can be tolerated by the disk group without adding additional storage. This requirement ensures that there are sufficient failure groups to restore redundancy. Also, this worst failure refers to a permanent failure where the disks must be dropped, not the case where the disks go offline and then back online.
The amount of space displayed in this column takes the effects of mirroring into account. The value is computed as follows:
A normal redundancy disk group with more than two REGULAR failure groups
The value is the total raw space for all of the disks in the largest failure group. The largest failure group is the one with the largest total raw capacity. For example, if each disk is in its own failure group, then the value would be the size of the largest capacity disk.
A high redundancy disk group with more than three REGULAR failure groups
The value is the total raw space for all of the disks in the two largest failure groups.
USABLE_FILE_MBindicates the amount of free space, adjusted for mirroring, that is available for new files to restore redundancy after a disk failure.
USABLE_FILE_MBis computed by subtracting
REQUIRED_MIRROR_FREE_MBfrom the total free space in the disk group and then adjusting the value for mirroring. For example, in a normal redundancy disk group where by default the mirrored files use disk space equal to twice their size, if 4 GB of actual usable file space remains, then
USABLE_FILE_MBequals roughly 2 GB. You can then add a file that is up to 2 GB. For information about negative values of
USABLE_FILE_MB, refer to Negative Values of USABLE_FILE_MB.
TOTAL_MBis the total usable capacity of a disk group in megabytes. The calculations for data in this column take the disk header overhead into consideration. The disk header overhead depends on the number of Oracle ASM disks and Oracle ASM files. This value is typically about 1% of the total raw storage capacity. For example, if the total LUN capacity provisioned for Oracle ASM is 100 GB, then the value in the
TOTAL_MBcolumn would be about 99 GB.
FREE_MBis the unused capacity of the disk group in megabytes, without considering any data imbalance. There may be situations where the value in the
FREE_MBcolumn shows unused capacity but because one Oracle ASM disk is full, database writes fail because of the imbalance in the disk group. Ensure that you initiate a manual rebalance to force even data distribution which results in an accurate presentation of the values in the
With fine grain striping using 128 KB, the storage is preallocated to be eight times the AU size. The data file size may appear slightly larger on Oracle ASM than on a local file system because of the preallocation.
When you use Oracle ASM normal or high redundancy, the disk space utilization becomes more complex to measure because it depends on several variables.
The values in the
FREE_MBcolumns best describe space usage when you do not configure Oracle ASM mirroring, that is, when you use external redundancy.
The results from the following query show capacity metrics for a normal redundancy disk group that consists of six 1 GB (1024 MB) disks, each in its own failure group:
SQL> SELECT name, type, total_mb, free_mb, required_mirror_free_mb, usable_file_mb FROM V$ASM_DISKGROUP; NAME TYPE TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB ------------ ------ ---------- ---------- ----------------------- -------------- DATA NORMAL 6144 3768 1024 1372
REQUIRED_MIRROR_FREE_MB column shows that 1 GB of extra capacity must be available to restore full redundancy after one or more disks fail. The first three numeric columns in the query results are raw numbers. That is, they do not take redundancy into account. Only the last column is adjusted for normal redundancy. In the query output example for the
data disk group, the calculation is as follows:
Negative Values of USABLE_FILE_MB
Due to the relationship between
USABLE_FILE_MB can become negative. Although this is not necessarily a critical situation, it does mean that:
Depending on the value of
FREE_MB, you may not be able to create new files.
The next failure might result in files with reduced redundancy.
USABLE_FILE_MB becomes negative, it is strongly recommended that you add more space to the disk group as soon as possible.