ASM

Administering ASM Diskgroups

erman

About Mirroring and Failure Groups
Mirroring protects data integrity by storing copies of data on multiple disks. When you create a disk group, you specify an Oracle ASM disk group type based on one of the following three redundancy levels:

Normal for 2-way mirroring

High for 3-way mirroring

External to not use Oracle ASM mirroring, such as when you configure hardware RAID for redundancy

How to query existing ASM disk groups and attributes
SELECT INSTNAME,
G.NAME,
sum(reads) reads,
sum(bytes_read),
sum(writes),
sum(bytes_written)
FROM v$asm_diskgroup g, v$asm_disk_iostat d
WHERE G.GROUP_NUMBER = D.GROUP_NUMBER
group by d.instname,g.name;

Viewing disk group attributes with V$ASM_ATTRIBUTE
SELECT dg.name AS diskgroup, SUBSTR(a.name,1,18) AS name,
SUBSTR(a.value,1,24) AS value, read_only FROM V$ASM_DISKGROUP dg,
V$ASM_ATTRIBUTE a WHERE dg.name = ‘DATAMARS’
AND dg.group_number = a.group_number;

Viewing the compatibility of a disk group with V$ASM_DISKGROUP
SELECT name AS diskgroup, compatibility AS asm_compat,
database_compatibility AS db_compat FROM V$ASM_DISKGROUP;

Viewing disks in disk groups with V$ASM_DISK
SELECT SUBSTR(d.name,1,16) AS asmdisk, d.mount_status, d.state,
dg.name AS diskgroup FROM V$ASM_DISKGROUP dg, V$ASM_DISK d
WHERE dg.group_number = d.group_number;

Advertisements
Standard
ASM

RESIZING DATAFILE IN ASM

  • Re-sizing  datafiles in ASM is very simple.

+ASM oracle@akyaka:/home/oracle>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 26 14:53:56 2018

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 Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> select name from v$datafile;

NAME
——————————————————————————–

+DBA/sritam01/datafile/system.260.932399649
+DBA/sritam01/datafile/sysaux.261.932399653
+DBA/sritam01/datafile/undotbs1.262.932399655
+DBA/sritam01/datafile/users.264.932399665
+DBA/sritam01/datafile/cw_data.266.933506593
+DBA/sritam01/datafile/cw_index.267.933506607
+DBA/sritam01/datafile/tools.268.933506617
+DBA/sritam01/datafile/xcom_data.269.933506639
+DBA/sritam01/datafile/xcom_indx.270.933506647
+DBA/sritam01/datafile/xcom_lobs.271.933506659
+DBA/sritam01/datafile/cw_data.272.933506675

NAME
——————————————————————————–
+DBA/sritam01/datafile/cw_data.273.933506679
+DBA/sritam01/datafile/dbmain_data.274.950891839
+DBA/sritam01/datafile/cw_data.275.966863495
+DBA/sritam01/datafile/cw_data.276.966863579
+DBA/sritam01/datafile/cw_data.277.966863661

16 rows selected.

the following example shows how to extend a datafile to the table_space_name tablespace in the +DBA ASM group.

1. Identify the datafiles for the tablespace you want to increase.

SQL> select file_name,bytes/1024/1024 mb from dba_data_files where tablespace_name = ‘SYSTEM‘ order by file_name;

FILE_NAME
——————————————————————————–
MB
———-
+CWBAU/sritam01/datafile/system.260.932399649
30000

Extened the Datafile

SQL> alter database datafile ‘+DBA/sritam01/datafile/system.260.932399649’ RESIZE 30001M;

Database altered.

SQL> select file_name,bytes/1024/1024 mb from dba_data_files where tablespace_name = ‘SYSTEM’ order by file_name;

FILE_NAME
——————————————————————————–
MB
———-
+DBA/sritam01/datafile/system.260.932399649
30001

 

SQL>

Standard
ASM

INS-30510 reported while installing GridInfrastructure for Cluster or Single DB

Hello,

For storing Voting disks in ASM,we require minimum of three disks or three failgroups for Normal Redundancy diskgroup.

The number of voting files you can store in a particular Oracle ASM disk group depends upon the redundancy of the disk group.

ASM puts each voting disk in its own failure group within the disk group.

solutions: change Oracle asm disk group redudancy.

A normal redundancy disk group must contain at least two failure groups but if you are storing your voting disks on Oracle ASM, then a normal redundancy disk group must contain at least three failure groups.

Ekran Resmi 2018-04-14 17.33.34

BR. erman.

Standard
ASM, Troubleshooting

Oracle Grid installation: roothas.pl fails with “Oracle Restart stack is not act

root.sh fails during execution for an Oracle Grid Infrastructure 11.2 installation with following messages .
“Oracle Grid installation: roothas.pl fails with “Oracle Restart stack is not act”

Solution 1:

Clead up the ASM Disks

Once you attempt an installation, your ASM disks are marked as being used, so they can no longer be used as candidate disks. To revert them to candidate disk do the following.

Overwrite the header for the relevant partitions using the “dd” command.

# dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100

Remove and create the ASM disk for each partition.

# /etc/init.d/oracleasm deletedisk DATA /dev/sdb1
# /etc/init.d/oracleasm createdisk DATA /dev/sdb1

I started reinstalling and I got this error.

[root@sigmafulltdb ~]# /oracle/product/11.2.0.4/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /oracle/product/11.2.0.4/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of “dbhome” have not changed. No need to overwrite.
The contents of “oraenv” have not changed. No need to overwrite.
The contents of “coraenv” have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
/grid/11.2.0/grid/bin/crsctl query crs activeversion … failed rc=-1 with message:
Failure in execution (rc=-1, 0, No such file or directory) for command /grid/11.2.0/grid/bin/crsctl query crs activeversion

Improper Oracle Grid Infrastructure configuration found on this host
Deconfigure the existing cluster configuration before starting
to configure a new Grid Infrastructure
run ‘/oracle/product/11.2.0.4/grid/crs/install/roothas.pl -deconfig’
to configure existing failed configuration and then rerun root.sh
/oracle/product/11.2.0.4/grid/perl/bin/perl -I/oracle/product/11.2.0.4/grid/perl/lib -I/oracle/product/11.2.0.4/grid/crs/install /oracle/product/11.2.0.4/grid/crs/install/roothas.pl execution failed

Solution 2: deinstall GRID:

[oracle@sigmafulltdb ~]$ cd /oracle/product/11.2.0.4/grid/deinstall/
[oracle@sigmafulltdb deinstall]$ ls
bootstrap.pl deinstall deinstall.pl deinstall.xml jlib readme.txt response sshUserSetup.sh
[oracle@sigmafulltdb deinstall]$ ./deinstall
Checking for required files and bootstrapping …
Please wait …
Location of logs /tmp/deinstall2018-04-04_04-18-23PM/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############

######################### CHECK OPERATION START #########################
## [START] Install check configuration ##

Checking for existence of the Oracle home location /oracle/product/11.2.0.4/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /oracle
Checking for existence of central inventory location /oracle/oraInventory
Checking for existence of the Oracle Grid Infrastructure home
Checking for sufficient temp space availability on node(s) : ‘sigmafulltdb’

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2018-04-04_04-18-23PM/logs//crsdc.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2018-04-04_04-18-23PM/logs/netdc_check2018-04-04_04-18-29-PM.log

Specify all Oracle Restart enabled listeners that are to be de-configured [LISTENER]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2018-04-04_04-18-23PM/logs/asmcadc_check2018-04-04_04-18-31-PM.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
Specify the ASM Diagnostic Destination [ ]: OCRVOTE
Specify the diskstring []:
Specify the diskgroups that are managed by this ASM instance []:

######################### CHECK OPERATION END #########################

####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is:
The cluster node(s) on which the Oracle home deinstallation will be performed are:null
Oracle Home selected for deinstall is: /oracle/product/11.2.0.4/grid
Inventory Location where the Oracle home registered is: /oracle/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle home
Do you want to continue (y – yes, n – no)? [n]: y
A log of this session will be written to: ‘/tmp/deinstall2018-04-04_04-18-23PM/logs/deinstall_deconfig2018-04-04_04-18-27-PM.out’
Any error messages from this session will be written to: ‘/tmp/deinstall2018-04-04_04-18-23PM/logs/deinstall_deconfig2018-04-04_04-18-27-PM.err’

######################## CLEAN OPERATION START ########################
ASM de-configuration trace file location: /tmp/deinstall2018-04-04_04-18-23PM/logs/asmcadc_clean2018-04-04_04-18-48-PM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2018-04-04_04-18-23PM/logs/netdc_clean2018-04-04_04-18-51-PM.log

De-configuring Oracle Restart enabled listener(s): LISTENER

De-configuring listener: LISTENER
Stopping listener: LISTENER
Warning: Failed to stop listener. Listener may not be running.
Deleting listener: LISTENER
Listener deleted successfully.
Listener de-configured successfully.

De-configuring Naming Methods configuration file…
Naming Methods configuration file de-configured successfully.

De-configuring backup files…
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END

—————————————->

Run the following command as the root user or the administrator on node “sigmafulltdb”.

/tmp/deinstall2018-04-04_04-18-23PM/perl/bin/perl -I/tmp/deinstall2018-04-04_04-18-23PM/perl/lib -I/tmp/deinstall2018-04-04_04-18-23PM/crs/install /tmp/deinstall2018-04-04_04-18-23PM/crs/install/roothas.pl -force -deconfig -paramfile “/tmp/deinstall2018-04-04_04-18-23PM/response/deinstall_Ora11g_gridinfrahome1.rsp”

Press Enter after you finish running the above commands

<—————————————-

 

Run ‘rm -rf /etc/oraInst.loc‘ as root on node(s) ‘sigmafulltdb’ at the end of the session.

Run ‘rm -rf /opt/ORCLfmap‘ as root on node(s) ‘sigmafulltdb’ at the end of the session.
Run ‘rm -rf /etc/oratab’ as root on node(s) ‘sigmafulltdb’ at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################

….

run as root user deinstall root.sh scripts.

Solution 3:

Forcefully cleanup old conguration information and run root.sh

[root@sigmafulltdb ~]$ /oracle/product/11.2.0.4/grid/root.sh

problem is solved. Have a good day.referances : https://oracle-base.com/articles/rac/clean-up-a-failed-grid-infrastructure-installation

Standard
ASM

ADDING DATAFILE TO TABLESPACE IN ASM

Datafile scripts :

CREATE TABLESPACE USERS DATAFILE
‘+DATA’ SIZE 33511680K AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED,
‘+DATA’ SIZE 32724M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 33554416K AUTOEXTEND ON NEXT 512M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 30040M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 1010M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED,
‘+DATA’ SIZE 910M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED
LOGGING
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;

Add datafile to tablespace  ASM diskgroup  DATAGROUP.

Scripts sysntax:

ALTER TABLESPACE Table_Space_Name ADD DATAFILE ‘ASM_DISK_GROUP’ SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED

Example :

SQL> ALTER TABLESPACE USERS  ADD DATAFILE
‘+DATA’ SIZE 33511680K AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED;

Standard