ORA-15032, ORA-15040, ORA-15042 Error on Oracle ASM

ERROR:Try to mount the disk group on ASM

SQL> alter diskgroup RECOc1 mount;

alter diskgroup RECOc1 mount

*

ERROR at line 1:

ORA-15032: not all alterations performed

ORA-15040: diskgroup is incomplete

ORA-15042: ASM disk “2” is missing from group number “2”

Check  Alert Log:

Wed Feb 15 15:32:15 2017
NOTE: Disk RECOC1_0000 in mode 0x7f marked for de-assignment
NOTE: Disk RECOC1_0001 in mode 0x7f marked for de-assignment
ERROR: diskgroup RECOC1 was not mounted
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk “2” is missing from group number “2”

 

SOLUTION:

All transactions must be done by root user.

1-Scan and find RECOC1 disks with scripts;

/etc/init.d/oracleasm querydisk -d `/etc/init.d/oracleasm listdisks -d` | \

cut -f2,10,11 -d” ” | \

perl -pe ‘s/”(.*)”.*\[(.*), *(.*)\]/$1 $2 $3/g;’ | \

while read v_asmdisk v_minor v_major

do

v_device=`ls -la /dev | grep ” $v_minor, *$v_major ” | awk ‘{print $10}’`

echo “ASM disk $v_asmdisk based on /dev/$v_device [$v_minor, $v_major]”

done

2-Remove RECOC* found disks

/etc/init.d/oracleasm deletedisk RECOC1

/etc/init.d/oracleasm deletedisk RECOC2

/etc/init.d/oracleasm deletedisk RECOC3

3-Add re-create RECOC* disks

oracleasm createdisk RECOC1 /dev/sdd1;

oracleasm createdisk RECOC2 /dev/sdh1;

oracleasm createdisk RECOC3 /dev/sdj1;

ora-15032

if flashback on, you have to off it on your oracle database and use the grid user for below processes.

  1. On GUI–>open asmca—>Disk Group Name:RECOC1  select 3  disks to add diskgroup
  2. check your alert log again.

SUCCESS: diskgroup RECOC1 was mounted
Wed Feb 15 15:46:30 2017
SUCCESS: CREATE DISKGROUP RECOC1 EXTERNAL REDUNDANCY DISK ‘/dev/oracleasm/disks/RECOC1’ SIZE 102398M ,
‘/dev/oracleasm/disks/RECOC2’ SIZE 1048570M ,
‘/dev/oracleasm/disks/RECOC3’ SIZE 511993M ATTRIBUTE ‘compatible.asm’=’12.1.0.0.0′,’au_size’=’1M’ /* ASMCA */
Wed Feb 15 15:46:30 2017

 

Oracle ASM commands on Linux

 

grid

  1. Automatic Storage Management (ASM) commands
    1. Start asm daemon and create ASM disk
      1. /usr/sbin/oracleasm init
      2. fdisk /dev/sdb
        1. n –>create new disk
        2. p —>primary partition
        3. w —>save conf.
      3. oracleasm createdisk DATA /dev/sdb1
      4. oracleasm listdisks
    2.  Change  grid user:
      1.  [root@exa01dbadm01 ~]# su – grid
        [grid@exa01dbadm01 ~]$ asmcmd
        ASMCMD> ls -l
        State Type Rebal Name
        MOUNTED NORMAL N DATAC1/
        MOUNTED NORMAL N DBFS_DG/
        MOUNTED NORMAL N RECOC1/
        ASMCMD> lsdg
        State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
        MOUNTED NORMAL N 512 4096 4194304 14315520 10306736 1192960 4556888 0 N DATA1/
        MOUNTED NORMAL N 512 4096 4194304 207648 197960 34608 81676 0 Y DBFS/
        MOUNTED NORMAL N 512 4096 4194304 2665536 1009240 222128 393556 0 N RECO/
        ASMCMD> pwd
        +ASMCMD> cd RECO
        ASMCMD> pwd
        +RECOC
        ASMCMD>
    3. ASMCMD Key Commands
      COMMAND DESCRIPTION
      cd Change directory
      cp Copy file
      du Disk space used by a directory and its subdirectories
      exit Exit the utility
      find Locate the path for all occurrences of the specified filename
      help Displays command assistance
      ls List the contents of a directory
      lsct List info about ASM clients
      lsdg List all disk groups and their attributes
      lsdsk List all physical disks visible to ASM
      md_backup Create a backup of the mounted diskgroups
      md_restore Restore the diskgroups from a backup
      mkalias Create an alias for a system generated filename
      mkdir Create directory
      pwd Print working directory (i.e. list current directory location)
      remap Repair a range of blocks on a disk
      rm Remove (i.e. delete) the specified files or directories
      rmalias Remove (i.e. delete) the specified alias