• ASM Diskgroups not mounting ORA15040


    ASM Diskgroups not mounting ORA-15040

    1
    2
    3
    4
    ERROR: diskgroup ASM_DATA was not mounted
    ORA-15032: not all alterations performed
    ORA-15017: diskgroup "ASM_DATA" cannot be mounted
    ORA-15040: diskgroup is incomplete

    to investigate the issue

    check the parameter asm_diskstring , if this is set incorrectly the asm diskgroups will not mount and if you parameter files is in ASM you wont have access to it .. so what do you do

    check what the asm_diskstring was set to in the alert log

    Diskstring chnaged to ORCL:*

    Check the last time the diskgroups successfully mounted in the alert log

    Disk groups successfully mounted

    A good way to check that the diskstring will correctly identify the disks is to run kfod

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    /u01/app/grid/product/12.2.0/grid/bin/kfod status=TRUE asm_diskstring='ORCL:*' disks=ALL
     
    --------------------------------------------------------------------------------
    ORACLE_SID ORACLE_HOME
    ================================================================================
          +ASM /u01/app/grid/product/12.2.0/grid
     
    This output shows that the diskstring is incorrect as it cannot find any disks
    So from the alert log aboove you can see that the last time the disks mounted successfully  the disk path was path:/dev/oracleasm/disks/ASM_DATA_02
     
    so running kfod again
    /u01/app/grid/product/12.2.0/grid/bin/kfod status=TRUE asm_diskstring='/dev/oracleasm/disks/*' disks=ALL
     
    --------------------------------------------------------------------------------
     Disk          Size Header    Path                                     User     Group
    ================================================================================
       1:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_DATA_01         grid     oinstall
       2:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_DATA_02         grid     oinstall
       3:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_DATA_03         grid     oinstall
       4:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_DATA_04         grid     oinstall
       5:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_DATA_05         grid     oinstall
       6:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_FRA_01          grid     oinstall
       7:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_FRA_02          grid     oinstall
       8:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_FRA_03          grid     oinstall
       9:     102400 MB MEMBER    /dev/oracleasm/disks/ASM_FRA_04          grid     oinstall
    --------------------------------------------------------------------------------
    ORACLE_SID ORACLE_HOME
    ================================================================================
          +ASM /u01/app/grid/product/12.2.0/grid
     
    this display the correct disks so we need to change the diskstring to /dev/oracleasm/disks/*

     

    set the asm_diskstring to /dev/oracleasm/disks/*’

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    [grid@a333444 (UXB:+ASM) ~ ] $ sqlplus  / as sysasm
     
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 16 23:13:34 2020
     
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
     
     
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
     
    SQL> show parameter spfile
     
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    spfile                               string
    SQL> ALTER SYSTEM SET asm_diskstring='/dev/oracleasm/disks/*' ;
     
    System altered.

    Need to mount the diskgroups

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 16 23:13:34 2020
     
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
     
     
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
     
    SQL>alter diskgroup ASM_DATA mount ;
     
    Diskgroup altered.
     
    SQL>  alter diskgroup ASM_FRA mount ;
     
    Diskgroup altered.

    Now we need to permanently set the diskstring in the spfile , since the spfile is in ASM and the diskgroup are mounted we need to make the change to the spfile in ASM

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    ASMCMD> spget --asm
    +ASM_DATA/ASMspfile.ora
    ASMCMD> cd +ASM_DATA
    ASMCMD> ls -lr
    WARNING:option 'r' is deprecated for 'ls'
    please use 'reverse'
     
    Type              Redund  Striped  Time             Sys  Name
                                                        Y    WWP/
    ASMPARAMETERFILE  UNPROT  COARSE   JAN 16 23:00:00  N    ASMspfile.ora => +ASM_DATA/ASM/ASMPARAMETERFILE/REGISTRY.253.1029885647
                                                        Y    ASM/
    [grid@a555666 (UXB:+ASM) ~ ] $ sqlplus / as sysdba
     
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 16 23:17:52 2020
     
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
     
     
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
     
    SQL> create pfile='/tmp/ASMpfile.ora' from spfile='+ASM_DATA/ASM/ASMPARAMETERFILE/REGISTRY.253.1029885647';
     
    File created.
     
    [grid@a555666 (UXB:+ASM) ~ ] $ vi /tmp/ASMpfile.ora
    +ASM.__oracle_base='/u01/app/grid'#ORACLE_BASE set from in memory value
    +ASM.asm_diskgroups='ASM_FRA'#Manual Mount
    *.asm_diskstring='/dev/oracleasm/disks/*'
    *.asm_power_limit=1
    *.instance_type='asm'
    *.large_pool_size=12M
    *.remote_login_passwordfile='EXCLUSIVE'
    ~
    ~
    ~
    ~
    ~
    ~
    "/tmp/ASMpfile.ora" 7L, 261C written
     
    Add the *.asm_diskstring='/dev/oracleasm/disks/*'  to the pfile
     
     
    [grid@a555666 (UXB:+ASM) ~ ] $ sqlplus / as sysasm
     
    SQL*Plus: Release 12.2.0.1.0 Production on Thu Jan 16 23:19:49 2020
     
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
     
     
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
     
    SQL> create spfile='+ASM_DATA/ASMspfile.ora' from pfile='/tmp/ASMpfile.ora';
     
    File created.
     
    SQL> exit
     
    [grid@a555666 (UXB:+ASM) ~ ] $ asmcmd
    ASMCMD> spget --asm
    +ASM_DATA/ASMspfile.ora
    ASMCMD> cd +ASM_DATA
    ASMCMD> ls
    ASM/
    ASMspfile.ora
    WWP/
    ASMCMD> ls -lt
    Type              Redund  Striped  Time             Sys  Name
                                                        Y    WWP/
                                                        Y    ASM/
    ASMPARAMETERFILE  UNPROT  COARSE   JAN 16 23:00:00  N    ASMspfile.ora => +ASM_DATA/ASM/ASMPARAMETERFILE/REGISTRY.253.1029885647
    ASMCMD> exit

    Stop and restart HAS

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    [grid@a555666 (UXB:+ASM) ~ ] $ crsctl stop has
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'a04978'
    CRS-2673: Attempting to stop 'ora.ASM_FRA.dg' on 'a04978'
    CRS-2673: Attempting to stop 'ora.ASM_DATA.dg' on 'a04978'
    CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'a04978'
    CRS-2677: Stop of 'ora.ASM_FRA.dg' on 'a04978' succeeded
    CRS-2677: Stop of 'ora.ASM_DATA.dg' on 'a04978' succeeded
    CRS-2673: Attempting to stop 'ora.evmd' on 'a04978'
    CRS-2673: Attempting to stop 'ora.asm' on 'a04978'
    CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'a04978' succeeded
    CRS-2677: Stop of 'ora.evmd' on 'a04978' succeeded
    CRS-2677: Stop of 'ora.asm' on 'a04978' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'a04978'
    CRS-2677: Stop of 'ora.cssd' on 'a04978' succeeded
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'a04978' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
     
    Start HAS
     
    [grid@a555666 (UXB:+ASM) ~ ] $ crsctl start has
    CRS-4123: Oracle High Availability Services has been started.
     
     
    Check resources
     
    [grid@a555666 (UXB:+ASM) ~ ] $ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.ASM_DATA.dg
                   ONLINE  ONLINE       a04978                   STABLE
    ora.ASM_FRA.dg
                   ONLINE  ONLINE       a04978                   STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       a04978                   STABLE
    ora.asm
                   ONLINE  ONLINE       a04978                   Started,STABLE
    ora.ons
                   OFFLINE OFFLINE      a04978                   STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.cssd
          1        ONLINE  ONLINE       a04978                   STABLE
    ora.diskmon
          1        OFFLINE OFFLINE                               STABLE
    ora.evmd
          1        ONLINE  ONLINE       a04978                   STABLE
    ora.wwp.db
          1        OFFLINE OFFLINE                               Instance Shutdown,ST
                                                                 ABLE
    ora.wwp.wwp_pri.svc
          1        OFFLINE OFFLINE                               STABLE

    Now restart the database and check disks are visible

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    sqlplus / as sysdba
     
    SQL*Plus: Release 11.2.0.4.0 Production on Fri Jan 17 16:38:57 2020
     
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
     
     
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Automatic Storage Management option
     
    SYS@WWP> @asm_disks.sql
     
    Diskgroup  Disk                                     Fail Group
    ---------- ---------------------------------------- ------------------------------------------------------------------------------------------
    Size (MB)
    ---------
    ASM_DATA   /dev/oracleasm/disks/ASM_DATA_01         ASM_DATA_01
      102,400
     
    ASM_DATA   /dev/oracleasm/disks/ASM_DATA_02         ASM_DATA_02
      102,400
     
    ASM_DATA   /dev/oracleasm/disks/ASM_DATA_03         ASM_DATA_03
      102,400
     
    ASM_DATA   /dev/oracleasm/disks/ASM_DATA_04         ASM_DATA_04
      102,400
     
    ASM_DATA   /dev/oracleasm/disks/ASM_DATA_05         ASM_DATA_0004
      102,400
     
    ASM_FRA    /dev/oracleasm/disks/ASM_FRA_01          ASM_FRA_01
      102,400
     
    ASM_FRA    /dev/oracleasm/disks/ASM_FRA_02          ASM_FRA_02
      102,400
     
    ASM_FRA    /dev/oracleasm/disks/ASM_FRA_03          ASM_FRA_03
      102,400
     
    ASM_FRA    /dev/oracleasm/disks/ASM_FRA_04          ASM_FRA_04
      102,400
     
     
    9 rows selected.
  • 相关阅读:
    Android使用SQLite数据库(2)
    Android使用SQLite数据库(1)
    使用Eclipse为Android定义style
    SharedPreferences写入和读出数据
    AlertDialog.Builder弹出对话框
    Android退出时关闭所有Activity的方法
    获取PC或移动设备的所有IP地址
    Android文件的分割和组装
    到底什么是跨域?附解决方案!
    超详细 Nginx 极简教程
  • 原文地址:https://www.cnblogs.com/yaoyangding/p/15968010.html
Copyright © 2020-2023  润新知