ASM metadata block types
The following are the ASM metadata block types:
- KFBTYP_DISKHEAD - ASM disk header block. This will be the very first block in every ASM disk. A copy of this block will be in the second last PST block (22.214.171.124 and later). The copy of this block will also be in the very first block in AU11, for disk groups with COMPATIBLE.ASM=12.1 or higher.
- KFBTYP_FREESPC - Free Space Table block.
- KFBTYP_ALLOCTBL - Allocation Table block.
- KFBTYP_PST_META - Partnership and Status Table (PST) block. The PST blocks 0 and 1 will be of this type.
- KFBTYP_PST_DTA - Partnership and Status Table (PST) block. The PST blocks with actual PST data.
- KFBTYP_PST_NONE - Partnership and Status Table (PST) block. The PST block with no PST data. Remember that AU1 on every disk is reserved for the PST, but only some disks will have the PST data.
- KFBTYP_HBEAT - The heartbeat block. This block is in the Partnership and Status Table (PST).
- KFBTYP_FILEDIR - File Directory block.
- KFBTYP_INDIRECT - File Directory block, containing a pointer to another file directory block.
- KFBTYP_LISTHEAD - Disk Directory block. The very first block in the ASM disk directory. The field kfdhdb.f1b1locn in the ASM disk header will point the the allocation unit whose block 0 will be of this type.
- KFBTYP_DISKDIR - Disk Directory block. The rest of the blocks in the ASM disk directory.
- KFBTYP_ACDC - Active Change Directory (ACD) block. The very first block of the ACD will be of this type.
- KFBTYP_CHNGDIR - Active Change Directory (ACD) block. The blocks with the ACD data.
- KFBTYP_COD_BGO - Continuing Operations Directory (COD) block for background operations data.
- KFBTYP_COD_RBO - Continuing Operations Directory (COD) block for rollback operations data.
- KFBTYP_COD_DATA - Continuing Operations Directory (COD) block with the actual rollback operations data.
- KFBTYP_TMPLTDIR - Template Directory block.
- KFBTYP_ALIASDIR - Alias Directory block.
- KFBTYP_SR - Staleness Registry block.
- KFBTYP_STALEDIR - Staleness Directory block.
- KFBTYP_VOLUMEDIR - ADVM Volume Directory block.
- KFBTYP_ATTRDIR - Attributes Directory block.
- KFBTYP_USERDIR - User Directory block.
- KFBTYP_GROUPDIR - User Group Directory block.
- KFBTYP_USEDSPC - Disk Used Space Directory block.
- KFBTYP_ASMSPFALS - ASM spfile alias block.
- KFBTYP_PASWDDIR - ASM Password Directory block.
- KFBTYP_INVALID - Not an ASM metadata block.
ASM metadata block
The default ASM metadata block size is 4096 bytes. The block size will be specified in the ASM disk header field kfdhdb.blksize. Note that the ASM metadata block size has nothing to do with the database block size.
The first 32 bytes of an ASM metadata block contains the block header (not to be confused with the ASM disk header). The block header has the following information:
- kfbh.endian - Platform endianness.
- kfbh.hard - H.A.R.D. (Hardware Assisted Resilient Data) signature.
- kfbh.type - Block type.
- kfbh.datfmt - Block data format.
- kfbh.block.blk - Location (block number).
- kfbh.block.obj - Data type held in this block.
- kfbh.check - Block checksum.
- kfbh.fcn.base - Block change control number (base).
- kfbh.fcn.wrap - Block change control number (wrap).
The rest of the contents of an ASM metadata block will be type specific. In other words, an ASM disk header block will have the disk header specific data - disk number, disk name, disk group name, etc. A file directory block will have the extent location data for a file, etc.
An ASM instance manages ASM metadata blocks. It creates them, updates them, calculates and updates the checksum on writes, reads and verifies the checksums on reads, exchanges the blocks with other instances, etc. ASM metadata structures consist of one of more ASM metadata blocks. A tool like kfed can be used to read and modify ASM metadata blocks.