Skip to main content

Add or Create A New ASM Disk On Oracle

 Adding or creating a new ASM (Automatic Storage Management) disk involves several steps. ASM is a feature of Oracle Database that manages database files and provides striping and mirroring for better performance and redundancy. Here's a general outline of the process to add or create a new ASM disk:

1. Identify the Disk

First, identify the disk or disks that you want to add or use for ASM. These disks can be physical disks or partitions on your storage devices.

2. Prepare the Disk

Before using a disk for ASM, make sure it is not currently being used by any other file system or application. If there is any existing data on the disk, back it up and remove it.

3. Discover the Disk

Use the oracleasm command to discover the new disk(s) and make them available to ASM. The exact command may vary based on your Linux distribution and ASM version. Oracleasm command should be run by root user only.
For example, on Red Hat-based Linux systems:

[root@prod ~]# oracleasm scandisks


****Make sure oracleasm packages are installed on linux machine****

4. Initialize the Disk for ASM

Use the oracleasm command to initialize the disk for ASM use. This step creates an ASM label on the disk
For example, on Red Hat-based Linux systems:

[root@prod ~]# oracleasm createdisk DISK_NAME /dev/sdX1

Replace DISK_NAME with a unique name for the ASM disk, and /dev/sdX1 with the path to the disk you want to use.

5. Create Disk Group

Next, you need to create an ASM disk group. A disk group is a collection of ASM disks used for storing database files. Use the CREATE DISKGROUP SQL command in the Oracle Database SQL*Plus or SQL Developer interface.
For example:

SQL> CREATE DISKGROUP my_diskgroup EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/DISK_NAME';

Replace my_diskgroup with the desired name for your disk group and DISK_NAME with the ASM disk name you created earlier.

6. Mount the Disk Group

After creating the disk group, mount it in ASM to make it available for use by your Oracle database.
For example:

SQL> ALTER DISKGROUP my_diskgroup MOUNT;

7. Check ASM Disk Status

Verify that the new disk is available and the disk group is mounted using the v$asm_disk and v$asm_diskgroup views.
For example:

SQL> SELECT name, total_mb, free_mb FROM v$asm_diskgroup; SELECT path, disk_number FROM v$asm_disk;

That's it! The new ASM disk is now ready for use in your Oracle database. Repeat the steps for each additional disk you want to add to the ASM disk group.

Keep in mind that this process may vary depending on your specific setup, ASM version, and operating system. Always refer to the official Oracle documentation for your specific Oracle Database and ASM versions for the most accurate and up-to-date instructions.

Comments

Popular posts from this blog

Upgrade Oracle Database 12c to 19c by DBUA Method

  Introduction Upgrade Oracle Database is a crucial step to ensure you're benefiting from the latest features, performance enhancements, and security updates. In this guide, we'll walk you through the process of upgrading your Oracle Database 12c to the latest version, 19c . Follow these steps to ensure a smooth and successful upgrade Environment Hostname : prod.infoinflux.com Database Name : PROD DB VERSION : 12.2.0.1.0 ORACLE_BASE : /u01/app/oracle DB Home Path : /u01/app/oracle/product/12.2.0.1/db_1 Datafile Location : /u01/app/oracle/oradata/PROD Target DB VERSION : 19.0.0.0 Target DB Path : /u01/app/oracle/product/19c/db_1 Upgrade Method : Database Upgrade Assistant Steps For upgrade using Database Upgrade Assistant (DBUA): Take Latest Database backup Make Directory for 19c Home Download and Unzip Software to 19c Home Directory Install 19c Binary or Software Create Pre and Post Upgrade Scripts Run Pre-Upgrade Script Pre-Upgra...

ORA-12012: error on auto execute of job SYS.ORA$AT_OS_OPT_SY_**

  Introduction ORA-12012 error is related to Oracle Database and is part of the Oracle Job Scheduler (DBMS_SCHEDULER) . It usually occurs when an automatic task or job execution encounters an issue. The error message you're seeing, " ORA$AT_OS_OPT_SY_<number> ," is specific to the job causing the problem. During the 12c database creation process, you can see ORA-12012 error in the alert log file when the “ SYS.ORA$AT_OS_OPT_SY_ ” auto job runs. To fix the error, it is necessary to drop the job and recreate it. Errors will be as follows. Errors in file /u01/app/oracle/diag/rdbms/prod/PROD/trace/PROD_j000_14524.trc: ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_767" ORA-20001: Statistics Advisor: Invalid task name for the current user ORA-06512: at "SYS.DBMS_STATS", line 47207 ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882 ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059 ORA-065...

Install Oracle Database 12.2(12c) on Linux

  Introduction Installing Oracle Database 12.2 on Linux system might seem daunting at first, but with the right guidance, it can be a smooth process. In this guide, we'll take you through the step-by-step procedure to install Oracle Database on a Linux environment. By the end of this tutorial, you'll have a functional Oracle Database instance up and running. Steps for Installation: 1. Prerequisites Automatic Setup 2. Prerequisites Manual Setup 3. Install Oracle Database Binary (Software only) 4. Create Database by DBCA 1. Prerequisites Automatic Setup To perform all your prerequisite setup automatically, issue the following command or you can proceed with manual setup explained in 2nd point. [ root @ prod ] # yum install oracle - database - server - 12cR2 - preinstall - y 2. Prerequisites Manual Setup a) Download and Unzip the oracle 12.2 Setup Download or copy the oracle setup file to any location as per your requirement. In...