Simulate I/O errors for ASM diskgroups

Put a SATA disk OFFLINE

# echo offline > /sys/block/sdj/device/state
--> After some time the DG isn't mounted on Instance 1 
[grid@grac41 ~]$  asmcmd lsdg FRA2 -g
Inst_ID  State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
      3  MOUNTED  EXTERN  N         512   4096  1048576     40952    31413                0           31413              0             N  FRA2/
      2  MOUNTED  EXTERN  N         512   4096  1048576     40952    31413                0           31413              0             N  FRA2/

Trying to mount the DG fails as we have EXTERNAL reduncany
SQL> alter diskgroup FRA2 mount;
alter diskgroup FRA2 mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "1" is missing from group number "2"

SQL> alter diskgroup FRA2 mount force;
alter diskgroup FRA2 mount force
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "1" is missing from group number "2"

Put SATA disk ONLINE again and mount DG
[root@grac41 ~]# echo running > /sys/block/sdj/device/state
[root@grac41 ~]# cat /sys/block/sdj/device/state
running

SQL>  alter diskgroup FRA2 mount;
Diskgroup altered.

[grid@grac41 ~]$  asmcmd lsdg FRA2 -g
Inst_ID  State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
      2  MOUNTED  EXTERN  N         512   4096  1048576     40952    31413                0           31413              0             N  FRA2/
      3  MOUNTED  EXTERN  N         512   4096  1048576     40952    31413                0           31413              0             N  FRA2/
      1  MOUNTED  EXTERN  N         512   4096  1048576     40952    31413                0           31413              0             N  FRA2/

One thought on “Simulate I/O errors for ASM diskgroups”

  1. # cd /u01/app/11.2.0/grid/rdbms/lib
    # cp -a ins_rdbms.mk ins_rdbms.mk.orig
    # vi +1099 ins_rdbms.mk
    Change line 1099 in ins_rdbms.mk, from this:

    $(SETASMGID): $(ALWAYS) $(SETASMGID_DEPS) $(CONFIG)

    to this:

    $(SETASMGID): $(ALWAYS) $(SETASMGID_DEPS) config.$(OBJ_EXT)

    2) Then tried to stop and start the ora.crsd to come out of INTERMEDIATE state.

    $cd $GRID_HOME/bin

    $crsctl modify resource “ora.asm” -attr “CHECK_TIMEOUT=132”

    $ crsctl stop res ora.asm -init -f
    CRS-2673: Attempting to stop ‘ora.crsd’ on ‘shanojrac1’
    CRS-2677: Stop of ‘ora.crsd’ on ‘shanojrac1’ succeeded
    $ crsctl start res ora.crsd -init -f
    CRS-2672: Attempting to start ‘ora.crsd’ on ‘shanojrac1’
    CRS-2676: Start of ‘ora.crsd’ on ‘shanojrac1’ succeeded
    $ crsctl stat res -t

Leave a Reply to Krisanu Bhattacharya Cancel reply

Your email address will not be published. Required fields are marked *