stay ASM In disk group , The most basic unit of space allocation is allocation unit, abbreviation AU, Every ASM All disks will be cut into one after initialization AU.
When a disk group is created , Can be set by AU_SIZE The attribute value , To specify the AU Size （ stay 11.1 After the version ）,AU The size of can be 1,2,4,8,16,32,64MB, If you don't specify AU Size , The default value is 1MB（Exadata for 4MB）.
AU size Is the attribute of the disk group （ Not a disk attribute , No ASM Properties of instances ）, So every one ASM Each disk group can have its own AU size value .
One or more AU Form a extent, One or more ASM extent Formed a ASM The file of , So a ASM The file is logically composed of extent Composed of .
We need to distinguish between physics extent And the virtual extent, A virtual extent Or say extent set, In an externally redundant disk group , It's made up of a physical extent form , stay normal Redundant disk groups , By at least 2 Physics extent form , In a high Redundant disk groups , By at least 3 Physics extent form .
stay ASM 11.1 Before the release ,extent The size of is fixed , stay ASM 11.1 After the version , There is a variable extent, variable extent The emergence of is to better support big data files , Reduce to ASM And database instances SGA requirement 、 Improve the performance of creating and opening files , The initialization of the extent The size is equal to the size of the disk group AU_SIZE The set value , With the allocation of a file extent More and more ,extent Of size According to 4 or 16 Times AU_SIZE increase . This feature creates a new file or resize It works automatically when , Of course ASM Attribute value of disk group COMPATIBLE.ASM and COMPATIBLE.RDBMS To be set to be greater than or equal to 11.1.
A file of extent The law of size change follows the following way ：
Before a file 20000 individual extent set,extent Of size Equal to... Of the disk group AU_SIZE Set value of .
Next 20000 individual extent set,extent Of size Equal to... Of the disk group AU_SIZE*4.
If the total of a file extent set A few more than 40000 individual , So all the back extent Of size Equal to... Of the disk group AU_SIZE*16.
This variable extent The feature has an annoying BUG 8898852, For more information, please refer to MOS 965751.1.
translator's note ： I doubt it extent Can play an effect , Because most users add data files , Generally, the size of the data file is specified , If AU_SIZE Set to 1M, Then only greater than 20G The data file will have some extent The size is 4MB, And as far as I'm concerned DBA Come on , Probably most of them DBA Will set the size of the data file to 20G about . And even though Oracle There is bigfile Table space , But not many people use it .
ASM The data mirroring function of is used to protect the integrity of data , It does this by storing one more copy of data on different disks . When one ASM When a new disk group is created ,ASM Administrators can specify how disk groups are mirrored ：
· External – No mirror protection
· Normal – 2 copy
· High – 3 copy
ASM The granularity of the image is extent Not disk or block,ASM The mirror image in is composed of each ASM Of documents extent Mirror to achieve . stay ASM in , We can specify the redundancy level of each file . for example , In a normal Files in redundant disk groups , Every one of it extent May be mirrored once （ Default behavior ）, Another file , On the same disk group , May be mirrored twice , That is, three copies （ Assume that there are at least 3 individual failgroup), in fact ,ASM The metadata file is in normal The redundant disk group is the three copies of , You also need at least... In the disk group 3 individual failgroup.
translator's note ： stay normal Redundant disk groups , There will be files mirrored twice , That is, three copies , There is no doubt about this , These documents are ASM The metadata file of , In subsequent articles , We will see this phenomenon many times .
One ASM Disk groups can be logically divided into one by one failgroup,failgroup You need to create the specified on the disk group , If we create a disk group , Don't specify failgroup , that ASM Each disk will be automatically used as a failgroup, This may be in Exadata It will be different ,Exadata Next, all disks from the same storage node will be automatically placed in one failgroup , Even if you don't specify failgroup.
normal Redundant disk groups require at least 2 individual failgroup,high Redundant disk groups require at least 3 individual failgroup,external Disk groups in redundant mode do not require failgroup.
When one extent When assigned to a file with double copies ,ASM It will assign a primary copy and One mirror copy,primary copy Stored on a disk , and mirror copy Will be stored in a different failgroup On disk .
Direction ASM When adding disks to a disk group ,failgroup You can manually specify ,ASM Will intelligently add the disk to the correct failgroup in .