oracle_grid_sa_troubleshooting_asm_disks

Reading Header

Reading ASM disk can be a problem when you don't know which disk is ASM and which is not. At the same time, using Oracle ASM lib can prove counterproductive. There are the following tools to read disks in general, not only ASM partitions:

  • KFOD
  • KFED
  • OD
  • BLKID

The KFOD utility is used to simulate oracle asm disk discovery and can be used given the ASM is running and the disks are present.

[oracle@********~]$ kfod status=TRUE asm_diskstring='/dev/oradev' disk=ALL
--------------------------------------------------------------------------------
 Disk          Size Header    Path                                     User     Group   
================================================================================
   1:      10236 Mb MEMBER    /dev/oradev/ora-data1                    oracle   dba     
   2:      30718 Mb MEMBER    /dev/oradev/ora-data10                   oracle   dba     
   3:      10236 Mb MEMBER    /dev/oradev/ora-data2                    oracle   dba     
   4:      10236 Mb MEMBER    /dev/oradev/ora-data3                    oracle   dba     
   5:      10236 Mb MEMBER    /dev/oradev/ora-data4                    oracle   dba     
   6:      10236 Mb MEMBER    /dev/oradev/ora-data5                    oracle   dba     
   7:      10236 Mb MEMBER    /dev/oradev/ora-data6                    oracle   dba     
   8:      20473 Mb MEMBER    /dev/oradev/ora-data7                    oracle   dba     
   9:      51199 Mb MEMBER    /dev/oradev/ora-data8                    oracle   dba     
  10:      30718 Mb MEMBER    /dev/oradev/ora-data9                    oracle   dba     
  11:      10236 Mb MEMBER    /dev/oradev/ora-fra1                     oracle   dba     
  12:      10236 Mb MEMBER    /dev/oradev/ora-fra2                     oracle   dba     
  13:      10236 Mb MEMBER    /dev/oradev/ora-fra3                     oracle   dba     
  14:      10236 Mb MEMBER    /dev/oradev/ora-fra4                     oracle   dba     
  15:      10236 Mb MEMBER    /dev/oradev/ora-fra5                     oracle   dba     
  16:       5114 Mb MEMBER    /dev/oradev/ora-fra6                     oracle   dba     
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME                                                          
================================================================================
      +ASM /u01/app/oracle/product/11.3.0/grid                                  
[oracle@oraback ~]$ 

KFED can be used also the read asm disks.

[oracle@******* ~]$ kfed read /dev/oradev/ora-data1 | egrep 'name|size|type'
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD <- ASM Header
kfdhdb.dskname:               DATA_0000 ; 0x028: length=9 <- Disk name 
kfdhdb.grpname:                    DATA ; 0x048: length=4 <- Group name
kfdhdb.fgname:                DATA_0000 ; 0x068: length=9 <- Fail group name
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200 <-Sector size
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000 <- Block size
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000 <- Allocation Unit (AU) Size
kfdhdb.dsksize:                   10236 ; 0x0c4: 0x000027fc
[oracle@oraback ~]$ 

Blkid shows the labels attached to each disk as stored in the OS. This command doesn't examine the headers but rather, it takes the information from the SYSTEM.

[root@oraprod ~]# blkid | grep asm | sort -rn
/dev/sds: LABEL="" TYPE="oracleasm" 
/dev/sdr1: LABEL="" TYPE="oracleasm" 
/dev/sdq1: LABEL="" TYPE="oracleasm" 
/dev/sdo1: LABEL="" TYPE="oracleasm" 
/dev/sdn1: LABEL="" TYPE="oracleasm" 
/dev/sdm1: LABEL="" TYPE="oracleasm" 
/dev/sdl1: LABEL="" TYPE="oracleasm" 
/dev/sdk1: LABEL="" TYPE="oracleasm" 
/dev/sdj1: LABEL="" TYPE="oracleasm" 
/dev/sdi1: LABEL="" TYPE="oracleasm" 
/dev/sdh1: LABEL="" TYPE="oracleasm" 
/dev/sdg1: LABEL="" TYPE="oracleasm" 
/dev/sdf1: LABEL="" TYPE="oracleasm" 
/dev/sde1: LABEL="" TYPE="oracleasm" 
/dev/sdd1: LABEL="" TYPE="oracleasm" 


OD was one of the few commands which worked for me, since it provides me with what exactly is stored in the header:


[root@julienandonov andonovj]# od /dev/sda5 | head
0000000 000000 000000 000000 000000 000000 000000 000000 000000
*
0002000 000000 000001 000000 000004 031463 000000 040106 000003
0002020 177640 000000 000000 000000 000002 000000 000002 000000
0002040 100000 000000 100000 000000 020000 000000 143540 055127
0002060 143540 055127 000036 177777 167523 000001 000001 000000
0002100 014200 055002 000000 000000 000000 000000 000001 000000
0002120 000000 000000 000013 000000 000400 000000 000074 000000
0002140 001306 000000 000173 000000 044677 165701 112610 073103
0002160 141631 177105 152426 027777 000000 000000 000000 000000

You can also format the output as follow:

[root@julienandonov andonovj]# od -c /dev/sda5 | head
0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0002000  \0  \0 001  \0  \0  \0 004  \0   3   3  \0  \0   F   @ 003  \0
0002020 240 377  \0  \0  \0  \0  \0  \0 002  \0  \0  \0 002  \0  \0  \0
0002040  \0 200  \0  \0  \0 200  \0  \0  \0      \0  \0   ` 307   W   Z
0002060   ` 307   W   Z 036  \0 377 377   S 357 001  \0 001  \0  \0  \0
0002100 200 030 002   Z  \0  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0
0002120  \0  \0  \0  \0  \v  \0  \0  \0  \0 001  \0  \0   <  \0  \0  \0
0002140 306 002  \0  \0   {  \0  \0  \0 277   I 301 353 210 225   C   v
0002160 231 303   E 376 026 325 377   /  \0  \0  \0  \0  \0  \0  \0  \0
[root@julienandonov andonovj]# 

  • oracle_grid_sa_troubleshooting_asm_disks.txt
  • Last modified: 2019/10/18 20:04
  • by 127.0.0.1