Oracle … as usual

Oracle by Laurent Leturgez

Dump ASM disk header … method #2

In a previous post, I explained how to dump ASM Disk header and how to analyze it. This method, which used kfed binary, is a little bit complex because of fields with a complex name extracted from the internal structure.

Another way to proceed and to see main information about asm disks is to use an undocumented binary located in $ORACLE_HOME/bin named amdu.

If amdu is not available in your $ORACLE_HOME/bin directory, you can build it with the next make command:

[oracle@oel ~]$ make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk iamdu

To dump your ASM diskheader, you just have to execute this command with the -diskstring option and specify the location of your ASM disk devices (default uses ASM lib directory):

[oracle@oel ~]$ amdu -diskstring='/dev/oracleasm/disks/*'
amdu_2012_03_21_11_14_36/

Now, change directory to the output generated and have a look to the report.txt file:

[oracle@oel ~]$ cd amdu_2012_03_21_11_14_36/
[oracle@oel amdu_2012_03_21_11_14_36]$ cat report.txt
-*-amdu-*-
******************************* AMDU Settings ********************************
ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/dbhome_1
System name: Linux
Node name: oel
Release: 2.6.18-274.18.1.0.1.el5
Version: #1 SMP Thu Feb 9 19:07:16 EST 2012
Machine: x86_64
amdu run: 21-MAR-12 11:14:36
Endianess: 1
--------------------------------- Operations ---------------------------------
------------------------------- Disk Selection -------------------------------
 -diskstring '/dev/oracleasm/disks/*'
------------------------------ Reading Control -------------------------------
------------------------------- Output Control -------------------------------
********************************* DISCOVERY **********************************
----------------------------- DISK REPORT N0001 ------------------------------
 Disk Path: /dev/oracleasm/disks/ASM1
 Unique Disk ID:
 Disk Label:
 Physical Sector Size: 512 bytes
 Disk Size: 1019 megabytes
 Group Name: DATA
 Disk Name: DATA_0000
 Failure Group Name: DATA_0000
 Disk Number: 0
 Header Status: 3
 Disk Creation Time: 2011/05/27 10:57:54.822000
 Last Mount Time: 2012/03/21 08:54:10.221000
 Compatibility Version: 0x0b200000(11020000)
 Disk Sector Size: 512 bytes
 Disk size in AUs: 1019 AUs
 Group Redundancy: 1
 Metadata Block Size: 4096 bytes
 AU Size: 1048576 bytes
 Stride: 113792 AUs
 Group Creation Time: 2011/05/27 10:57:54.456000
 File 1 Block 1 location: AU 2
 OCR Present: NO
----------------------------- DISK REPORT N0002 ------------------------------
 Disk Path: /dev/oracleasm/disks/ASM2
 Unique Disk ID:
 Disk Label:
 Physical Sector Size: 512 bytes
 Disk Size: 1019 megabytes
 Group Name: DATA
 Disk Name: DATA_0001
 Failure Group Name: DATA_0001
 Disk Number: 1
 Header Status: 3
 Disk Creation Time: 2011/05/27 10:57:54.822000
 Last Mount Time: 2012/03/21 08:54:10.221000
 Compatibility Version: 0x0b200000(11020000)
 Disk Sector Size: 512 bytes
 Disk size in AUs: 1019 AUs
 Group Redundancy: 1
 Metadata Block Size: 4096 bytes
 AU Size: 1048576 bytes
 Stride: 113792 AUs
 Group Creation Time: 2011/05/27 10:57:54.456000
 File 1 Block 1 location: AU 0
 OCR Present: NO
******************************* END OF REPORT ********************************

As mentioned, now you know if your disk is part of a disk group, the DG Allocation Unit size, disk size, last mounted time etc.

Of course, this tool can be used regarless of the asm instance status.

 

 

Advertisements

One response to “Dump ASM disk header … method #2

  1. venky April 13, 2012 at 12:58 AM

    Thanks for the info .. It is very helpful

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: