Archive

Archive for the ‘ASM’ Category

ORA-15031: disk specification matches no disks

September 18, 2014 Leave a comment

Added a disk into a diskgroup, it showed errors as below

SQL> ALTER DISKGROUP VOTEDG ADD  QUORUM DISK ‘/nfsvoting/nfsvotedk’;
ALTER DISKGROUP VOTEDG ADD  QUORUM DISK ‘/nfsvoting/nfsvotedk’
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15031: disk specification ‘/nfsvoting/nfsvotedk’ matches no disks
ORA-15014: path ‘/nfsvoting/nfsvotedk’ is not in the discovery set

 

The problem was caused by the asm_diskstring was not set. I set the asm_diskstring. The problem get fixed.
SQL>  alter system set asm_diskstring=’/dev/asmdisk/*’,’/nfsvoting/*’;

System altered.

SQL> show parameter asm_dis

NAME                                 TYPE        VALUE
———————————— ———– ——————————
asm_diskgroups                       string      VOTEDG
asm_diskstring                       string      /dev/asmdisk/*, /nfsvoting/*
SQL> ALTER DISKGROUP VOTEDG ADD  QUORUM DISK ‘/nfsvoting/nfsvotedk’;

Diskgroup altered.

Advertisements
Categories: ASM

ORA-19504: failed to create file “+VOPDATA”

September 5, 2013 Leave a comment

Today, when I created a new database in silent mode, it failed and showed the messages below from ./dbca/voppro/voppro.log file

Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 15%
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece /opt/oracle/product/11.2/db_2/assistants/dbca/templates/Seed_Database.dfb
ORA-19504: failed to create file “+VOPDATA”
ORA-15045: ASM file name ‘+VOPDATA’ is not in reference form
ORA-17502: ksfdcre:5 Failed to create file +VOPDATA
ORA-15081: failed to submit an I/O operation to a disk
ORA-06512: at “SYS.X$DBMS_BACKUP_RESTORE”, line 5827
ORA-06512: at line 20

DBCA_PROGRESS : 21%
DBCA_PROGRESS : 30%
Creating and starting Oracle instance
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file ‘+VOPDATA/voppro/system01.dbf’
ORA-17503: ksfdopn:2 Failed to open file +VOPDATA/voppro/system01.dbf
ORA-15173: entry ‘voppro’ does not exist in directory ‘/’

ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file ‘+VOPDATA/voppro/system01.dbf’
ORA-17503: ksfdopn:2 Failed to open file +VOPDATA/voppro/system01.dbf
ORA-15173: entry ‘voppro’ does not exist in directory ‘/’

DBCA_PROGRESS : 100%

Cause

After checking, there was no permission on raw disks for oracle account to access  (For my case, the raw disks are /dev/rdsk/emcpower*)

Fix

1. Login all nodes as root

2. Change permission on all /dev/rdsk/emcpower* to 775

# cd /dev/rdsk

# chmod 775 emcpower*

 

 

 

 

Eanble sudo to access 11gR2 ASM instance in redhat

August 23, 2012 Leave a comment

1. Add the entry below into /etc/sudoers

oracle  ALL=(grid)      NOPASSWD: ALL

2. Testing the

[oracle@wcsvmuatdb01 ~]$ sudo -i -u grid asmcmd ( -i : simulate initial login to read shell configuration files: .profile, bash_profile etc)
ASMCMD> exit
[oracle@wcsvmuatdb01 ~]$ sudo -i -u grid asmcmd ls
ACFSDG1/
DATADG1/
OCRVOTEDG/

 

Categories: ASM, Redhat Administration

Can’t restore backup of database

June 9, 2012 Leave a comment

I need to restore a database to different asm diskgroup. Once I start to restore the database with the command follows.

run{
set newname for datafile 1 to ‘+DISKGROUP/cmsprod/datafile/system.261.670168721’;
set newname for datafile 2 to ‘+DISKGROUP/cmsprod/datafile/undotbs1.262.670168727’;
set newname for datafile 3 to ‘+DISKGROUP/cmsprod/datafile/sysaux.263.670168729’;
set newname for datafile 4 to ‘+DISKGROUP/cmsprod/datafile/undotbs2.265.670168733’;
set newname for datafile 5 to ‘+DISKGROUP/cmsprod/datafile/users.266.670168737’;
set newname for datafile 6 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.296.670173343’;
set newname for datafile 7 to ‘+DISKGROUP/cmsprod/datafile/tbs_production.297.670173385’;
set newname for datafile 8 to ‘+DISKGROUP/cmsprod/datafile/tbs_volantis_mcs.298.670173393’;
set newname for datafile 9 to ‘+DISKGROUP/cmsprod/datafile/volantis_tbs.316.670175271’;
set newname for datafile 10 to ‘+DISKGROUP/cmsprod/datafile/tbs_volantis_mcs_stg.317.670174997’;
set newname for datafile 11 to ‘+DISKGROUP/cmsprod/datafile/perfstat.335.671363091’;
set newname for datafile 12 to ‘+DISKGROUP/cmsprod/datafile/undotbs3.389.673005569’;
set newname for datafile 13 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.397.700411387’;
set newname for datafile 14 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.393.731520969’;
set newname for datafile 15 to ‘+DISKGROUP/cmsprod/datafile/manuted.368.731673341’;
set newname for datafile 16 to ‘+DISKGROUP/cmsprod/datafile/tbs_cms.401.736106307’;
restore database;
}

The message returned as below. It showed that it couldn’t connect to ASM Instance since the maximum number of processes exceeded. The default ASM instance default process is 40.

ORA-19870: error reading backup piece /u01/bkup/database/cmsprod/CMSPROD_data_bkup_5193
ORA-19504: failed to create file “+DISKGROUP”
ORA-17502: ksfdcre:4 Failed to create file +DISKGROUP
ORA-15055: unable to connect to ASM instance
ORA-00020: maximum number of processes () exceeded
ORA-15055: unable to connect to ASM instance
ORA-00020: maximum number of processes () exceeded
failover to previous backup

Fix Procedures

Then I increased process number in ASM instance and restarted. The problem is fixed

Examples to use oracleasm

April 1, 2011 Leave a comment

Example 1. Check oracleasm if it is load
[root@vmrac1 ~]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes

Example 2. When you have create new asmdisk on one of cluster node, you need to scan disks on other nodes
At Node 1
=========
[root@vmrac1 ~]# oracleasm createdisk DATA1 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@vmrac1 ~]#  oracleasm createdisk DATA2 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@vmrac1 ~]# oracleasm listdisks
DATA1
DATA2

At Node 2
=========
[root@vmrac2 ~]# oracleasm listdisks
(There are no ASM disks)

[root@vmrac2 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
Instantiating disk “DATA1”
Instantiating disk “DATA2”

Example 3. Determine if a disk belongs to Oracle ASMlib
[root@vmrac1 ~]# oracleasm querydisk /dev/sde1
Device “/dev/sde1” is marked an ASM disk with the label “DATA2” <– this belongs to ASMLIB
[root@vmrac1 ~]# oracleasm querydisk /dev/sdb1
Device “/dev/sdb1” is not marked as an ASM disk <– this does’nt belong to ASMLIB

Example 4. Check ASM Disk Group device path name

[root@wcsvmuatdb01 oracle]# oracleasm querydisk -p VOTEDISK1
Disk “VOTEDISK1″ is a valid ASM disk
/dev/sdc1: LABEL=”VOTEDISK1″ TYPE=”oracleasm”

 

Example 5. Rename ASM Disk

[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f VOTEDISK1 OCRVOTEDISK1
Instantiating disk “OCRVOTEDISK1”: done
Writing disk header: done
Removing old ASM disk “VOTEDISK1”: done
[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f VOTEDISK2 OCRVOTEDISK2
Instantiating disk “OCRVOTEDISK2”: done
Writing disk header: done
Removing old ASM disk “VOTEDISK2”: done
[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f VOTEDISK3 OCRVOTEDISK3
Instantiating disk “OCRVOTEDISK3”: done
Writing disk header: done
Removing old ASM disk “VOTEDISK3”: done
[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f DATADISK1 DBDATADISK1
Instantiating disk “DBDATADISK1”: done
Writing disk header: done
Removing old ASM disk “DATADISK1”: done
[root@wcsvmuatdb01 oracle]# oracleasm listdisks
DBDATADISK1
OCRVOTEDISK1
OCRVOTEDISK2
OCRVOTEDISK3

 

Example 5. Re-instantiating ASM Disks at another of RAC nodes after renaming disks

[root@wcsvmuatdb02 opt]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Cleaning disk “DATADISK1”
Cleaning disk “VOTEDISK1”
Cleaning disk “VOTEDISK2”
Cleaning disk “VOTEDISK3”
Scanning system for ASM disks…
Instantiating disk “DBDATADISK1”
Instantiating disk “OCRVOTEDISK1”
Instantiating disk “OCRVOTEDISK2”
Instantiating disk “OCRVOTEDISK3”

 

Categories: ASM

Can’t create oracleasm disks

April 1, 2011 Leave a comment

1. I want to create oracleasm disk as the following. It returns “Unable to label device”

[root@vmrac1 ~]# oracleasm createdisk DATA2 /dev/sde1
Writing disk header: failed
Unable to label device “/dev/sde1”

2. Check the partition type, it is Extend. Then I change it to primary

[root@vmrac1 ~]# fdisk /dev/sde

Device Boot      Start         End      Blocks   Id  System
/dev/sde1              10        1295    10329795    5  Extended <– Extended

Device Boot      Start         End      Blocks   Id  System
/dev/sde1               5        1295    10369957+  83  Linux <– Change to primary partition

3. Create the oracleasm disk again
[root@vmrac1 ~]#  oracleasm createdisk DATA2 /dev/sde1
Writing disk header: done
Instantiating disk: done

Therefore, the partitions must be set to primary partition, while extend partitions are not supported by oracleasm.

Categories: ASM