Adding Disks to ASM diskgroup Manually

Oracle: $ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 21 17:14:46 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production

With the Partitioning and Automatic Storage Management options

SQL> select GROUP_NUMBER, NAME,TOTAL_MB, FREE_MB, USABLE_FILE_MB from V$ASM_DISKGROUP;

GROUP_NUMBER     NAME                         TOTAL_MB    FREE_MB       USABLE_FILE_MB

———————–         —————-                ———-           ———-         ————–

1                DATA                                           221181     128900         128900

2                ORAARCH                                     73727      73675          73675

3                 REDO                                               8191       1902           1902

SQL>  select disk_number, mode_status, name, path from v$asm_disk where group_number = 3 order by disk_number, name ;

DISK_NUMBER  MODE_ST     NAME                           PATH

——————   ————      ———————       —————

0              ONLINE         REDO01                         ORCL:REDO01

From above we see REDO diskgroup has only I disk(REDO01)

Now to check the available disks on server to add them to  ASM diskgroup

SQL> select path, header_status, mode_status from v$asm_disk;

PATH            HEADER_STATU     MODE_ST

————— —————-      ———-

ORCL:DATA01     MEMBER       ONLINE

ORCL:DATA02     MEMBER       ONLINE

ORCL:DATA03     MEMBER       ONLINE

ORCL:ORAARCH01  MEMBER       ONLINE

ORCL:REDO01     MEMBER       ONLINE

ORCL:REDO08     PROVISIONED  ONLINE

ORCL:REDO07     PROVISIONED  ONLINE

ORCL:REDO06     PROVISIONED  ONLINE

ORCL:REDO05     PROVISIONED  ONLINE

ORCL:REDO04     PROVISIONED  ONLINE

ORCL:REDO03     PROVISIONED  ONLINE

ORCL:REDO02     PROVISIONED  ONLINE

12 rows selected.

SQL> ALTER DISKGROUP REDO ADD DISK ‘ORCL:REDO02’;

ALTER DISKGROUP REDO ADD DISK ‘ORCL:REDO02’

*

ERROR at line 1:

ORA-15000: command disallowed by current instance type

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

With the Partitioning and Automatic Storage Management options

oracle $:/opt/oracle

oracle:$  export ORACLE_SID=+ASM1

oracle :$ export ORACLE_HOME=

oracle :$ export PATH=

oracle:+ASM-> sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 21 17:41:11 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

With the Automatic Storage Management option

SQL>  ALTER DISKGROUP REDO ADD DISK ‘ORCL:REDO02’;

ALTER DISKGROUP REDO ADD DISK ‘ORCL:REDO02’

*

ERROR at line 1:

ORA-15032: not all alterations performed

ORA-15260: permission denied on ASM disk group

NOTE: According to Doc ID 889810.1 logging in with SYSDBA privilege, that is not allowed for ASM operations

SQL> conn / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 21 17:42:38 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production

With the Automatic Storage Management option

SQL> set linesize 280

SQL> col path format a15

SQL> select disk_number, mode_status, name, path from v$asm_disk where group_number = 3 order by disk_number, name ;

DISK_NUMBER   MODE_ST    NAME                           PATH

—————-    ————- ———————- —————

0        ONLINE      REDO01                         ORCL:REDO01

Now add 1 disk to REDO Disk group:

SQL> ALTER DISKGROUP REDO ADD DISK ‘ORCL:REDO02’;

Diskgroup altered.

SQL> select disk_number, mode_status, name, path from v$asm_disk where group_number = 3 order by disk_number, name ;

DISK_NUMBER    MODE_ST       NAME                           PATH

—————-     —————-    ———————— —————

0       ONLINE        REDO01                         ORCL:REDO01

1       ONLINE       REDO02                         ORCL:REDO02

SQL> select path, group_number group_#, disk_number disk_#, mount_status, header_status, state, total_mb, free_mb  from v$asm_disk order by group_number;

PATH               GROUP_#     DISK_# MOUNT_S HEADER_STATU STATE      TOTAL_MB    FREE_MB

————— ———- ———- ——- ———— ——– ———- ———-

ORCL:REDO03              0          1 CLOSED  PROVISIONED  NORMAL            0          0

ORCL:REDO04              0          2 CLOSED  PROVISIONED  NORMAL            0          0

ORCL:REDO05              0          3 CLOSED  PROVISIONED  NORMAL            0          0

ORCL:REDO06              0          4 CLOSED  PROVISIONED  NORMAL            0          0

ORCL:REDO07              0          5 CLOSED  PROVISIONED  NORMAL            0          0

ORCL:REDO08              0          6 CLOSED  PROVISIONED  NORMAL            0          0

ORCL:DATA01              1          0 CACHED  MEMBER       NORMAL        73727      42968

ORCL:DATA02              1          1 CACHED  MEMBER       NORMAL        73727      42965

ORCL:DATA03              1          2 CACHED  MEMBER       NORMAL        73727      42967

ORCL:ORAARCH01           2          0 CACHED  MEMBER       NORMAL        73727      73675

ORCL:REDO01              3          0 CACHED  MEMBER       NORMAL         8191       2408

ORCL:REDO02              3          1 CACHED  MEMBER       NORMAL         8191       7683

12 rows selected.

From the above output ORCL:REDO02 now became MEMBER from PROVISIONED status

Now check the ASM rebalancing

SQL> select group_number, operation, state, power, actual, sofar, est_work, est_rate, est_minutes from v$asm_operation;

GROUP_NUMBER    OPERA    STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE    EST_MINUTES

———————           ———   ———-   ———-     ———-           ———-          ———-        ———–          ————

3                REBAL             RUN           1                1             1712           3148                   1104           1

SQL> /

GROUP_NUMBER    OPERA    STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE    EST_MINUTES

————————        ———      ———-    ———-     ———-        ———-      ———-         ———–          ————

3              REBAL             RUN           1               1                     3142       3148                   1145           0

SQL> select GROUP_NUMBER, NAME,TOTAL_MB, FREE_MB, USABLE_FILE_MB from V$ASM_DISKGROUP;

GROUP_NUMBER      NAME                 TOTAL_MB    FREE_MB      USABLE_FILE_MB

———————-        —————–      ————-     ———–          ————–

1           DATA                                221181     128900         128900

2           ORAARCH                          73727      73675          73675

3           REDO                                16382      10091          10091

After adding all the remaining disks…..

SQL> select GROUP_NUMBER, NAME,TOTAL_MB, FREE_MB, USABLE_FILE_MB from V$ASM_DISKGROUP;

GROUP_NUMBER          NAME            TOTAL_MB     FREE_MB          USABLE_FILE_MB

———————-        —————-       —————     ———-             ————–

1                  DATA                               221181     128900         128900

2                  ORAARCH                          73727      73675          73675

3                   REDO                                 65516      59213          59213

From 11gr2 we can also add/delete/alter disks/volumes using ASMCA(ASM configuration assistant)

see [Doc ID 885780.1]

Advertisements

Migrate From Database File system to ASM

TO MIGRATE the database files from disk to ASM disk is as follows:


  1. Configure flash recovery area.
    2. Migrate datafiles to ASM.
    3. Control file to ASM.
    4. Create Temporary tablespace.
    5. Migrate Redo logfiles
    6. Migrate spfile to ASM.

    Step 1:   Configure flash recovery area.

SQL> connect sys/sys@prod1 as sysdba
Connected.

SQL> alter database disable block change tracking;
Database altered.

SQL> alter system set db_recovery_file_dest_size=500m;

System altered.

SQL> alter system set db_recovery_file_dest=’+RECOVERYDEST’;

System altered

Step 2 and 3: Migrate data files and control file to ASM.

Use RMAN to migrate the data files to ASM disk groups.
All data files will be migrated to the newly created disk group, DATA

SQL> alter system set db_create_file_dest=’+DATA’;
          System altered.

SQL> alter system set control_files=’+DATA/ctf1.dbf’ scope=spfile;
System altered.

SQL> shut immediate

[oracle@rac1 bin]$ ./rman target /

RMAN> startup nomount

Oracle instance started

RMAN> restore controlfile from ‘/u01/new/oracle/oradata/mydb/control01.ctl’;

Starting restore at 08-DEC-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/ctf1.dbf
Finished restore at 08-DEC-09
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1

RMAN> backup as copy database format ‘+DATA’;
Starting backup at 08-DEC-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/new/oracle/oradata/mydb/system01.dbf
output file name=+DATA/mydb/datafile/system.257.705063763 tag=TAG20091208T110241 RECID=1 STAMP=705064274
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:08:39
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/new/oracle/oradata/mydb/sysaux01.dbf
output file name=+DATA/mydb/datafile/sysaux.258.705064283 tag=TAG20091208T110241 RECID=2 STAMP=705064812
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:08:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/new/oracle/oradata/mydb/undotbs01.dbf
output file name=+DATA/mydb/datafile/undotbs1.259.705064821 tag=TAG20091208T110241 RECID=3 STAMP=705064897
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=+DATA/mydb/controlfile/backup.260.705064907 tag=TAG20091208T110241 RECID=4 STAMP=705064912
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/new/oracle/oradata/mydb/users01.dbf
output file name=+DATA/mydb/datafile/users.261.705064915 tag=TAG20091208T110241 RECID=5 STAMP=705064915
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 08-DEC-09
channel ORA_DISK_1: finished piece 1 at 08-DEC-09
piece handle=+DATA/mydb/backupset/2009_12_08/nnsnf0_tag20091208t110241_0.262.705064919 tag=TAG20091208T110241 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-DEC-09

RMAN> switch database to copy;

datafile 1 switched to datafile copy “+DATA/mydb/datafile/system.257.705063763”
datafile 2 switched to datafile copy “+DATA/mydb/datafile/sysaux.258.705064283”
datafile 3 switched to datafile copy “+DATA/mydb/datafile/undotbs1.259.705064821”
datafile 4 switched to datafile copy “+DATA/mydb/datafile/users.261.705064915”

RMAN> alter database open;
database opened

RMAN> exit

Recovery Manager complete.

SQL> conn sys/oracle as sysdba

Connected.

SQL> select tablespace_name,file_name from dba_data_files;

TABLESPACE_NAME                FILE_NAME
—————————— ———————————————

USERS                          +DATA/mydb/datafile/users.261.705064915

UNDOTBS1                     +DATA/mydb/datafile/undotbs1.259.705064821

SYSAUX                         +DATA/mydb/datafile/sysaux.258.705064283

SYSTEM                         +DATA/mydb/datafile/system.257.705063763

SQL> select name from v$controlfile;
NAME

——–
+DATA/ctf1.dbf

Step 4: Migrate temp tablespace to ASM.

SQL> alter tablespace temp add tempfile size 100m;

Tablespace altered.

SQL> select file_name from dba_temp_files;

FILE_NAME
———————————————
+DATA/mydb/tempfile/temp.263.705065455

otherwise,
Create temporary tablespace in ASM disk group.

SQL> CREATE TABLESPACE temp1 ADD TEMPFILE ‘+diskgroup1’;

Step 5:  Migrate redo logs to ASM.

SQL> select member,group# from v$logfile;

MEMBER                                                 GROUP#

————————————————– ———-
/u01/new/oracle/oradata/mydb/redo03.log                     3

/u01/new/oracle/oradata/mydb/redo02.log                     2

/u01/new/oracle/oradata/mydb/redo01.log                     1

SQL> alter database add logfile group 4 size 5m;

Database altered.

SQL> alter database add logfile group 5 size 5m;

Database altered.

SQL> alter database add logfile group 6 size 5m;

Database altered.

SQL> select member,group# from v$logfile;

MEMBER                                                                 GROUP#
————————————————–                     ———-

/u01/new/oracle/oradata/mydb/redo03.log                     3

/u01/new/oracle/oradata/mydb/redo02.log                     2

/u01/new/oracle/oradata/mydb/redo01.log                     1

+DATA/mydb/onlinelog/group_4.264.705065691                  4

+DATA/mydb/onlinelog/group_5.265.705065703                  5

+DATA/mydb/onlinelog/group_6.266.705065719                  6

SQL> alter system switch logfile;

System altered.

SQL> alter database drop logfile group 2;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database drop logfile group 1;

Database altered.

Add additional control file.

If an additional control file is required for redundancy, you can create it in ASM as you would on any other filesystem.

SQL> connect sys/sys@prod1 as sysdba
Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

SQL> alter database backup controlfile to ‘+DATA/cf2.dbf’;
Database altered.

SQL> alter system set control_files=’+DATA/cf1.dbf ‘,’+DATA/cf2.dbf’ scope=spfile;
System altered.

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

SQL> select name from v$controlfile;

NAME
—————————————
+DATA/cf1.dbf
+DATA/cf2.dbf

step 6:Migrate spfile to ASM:

Create a copy of the SPFILE in the ASM disk group.
In this example, the SPFILE for the migrated database will be stored as +DISK/spfile.

If the database is using an SPFILE already, then run these commands:

run {
BACKUP AS BACKUPSET SPFILE;
RESTORE SPFILE TO “+DISK/spfile”;
}

If you are not using an SPFILE, then use CREATE SPFILE from SQL*Plus to create the new SPFILE in ASM.
For example, if your parameter file is called /private/init.ora, use the following command:

SQL> create spfile=’+DISK/spfile’ from pfile=’/private/init.ora’;

NOTE:

After successfully migrating all the data files over to ASM, the old data files are no longer
needed and can be removed. Your single-instance database is now running on ASM

V$ASM views

The following v$ASM views describe the structure and components of ASM:

v$ASM_ALIAS
This view displays all system and user-defined aliases. There is one row for every alias present in every diskgroup mounted by the ASM instance. The RDBMS instance displays no rows in this view.

V$ASM_ATTRIBUTE
This Oracle Database 11g view displays one row for each ASM attribute defined. These attributes are listed when they are defined in CREATE DISKGROUP or ALTER DISKGROUP statements. DISK_REPAIR_TIMER is an example of an attribute.

V$ASM_CLIENT
This view displays one row for each RDBMS instance that has an opened ASM diskgroup.

V$ASM_DISK
This view contains specifics about all disks discovered by the ASM instance, including mount status, disk state, and size. There is one row for every disk discovered by the ASM instance.

V$ASM_DISK_IOSTAT
This displays information about disk I/O statistics for each ASM Client. If this view is queried from the database instance, only the rows for that instance are shown.

V$ASM_DISK_STAT
This view contains similar content as the v$ASM_DISK, except v$ASM_DISK_STAT reads disk information from cache and thus performs no disk discovery. This view is primarily used form quick access to the disk information without the overhead of disk discovery.

V$ASM_DISKGROUP
This view displays one row for every ASM diskgroup discovered by the ASM instance on the node.

V$ASM_DISKGROUP_STAT
This view contains all the similar view contents as the v$ASM_DISKGROUP, except that v$ASM_DISK_STAT reads disk information from the cache and thus performs no disk discovery. This view is primarily used for quick access to the diskgroup information without the overhead of disk discovery.

V$ASM_FILE
This view displays information about ASM files. There is one row for every ASM file in every diskgroup mounted by the ASM instance. In a RDBMS instance, V$ASM_FILE displays no row.

V$ASM_OPERATION
This view describes the progress of an influx ASM rebalance operation. In a RDBMS instance,v$ASM_OPERATION displays no rows.

V$ASM_TEMPLATE
This view contains information on user and system-defined templated. v$ASM_TEMPLATE displays one row for every template present in every diskgroup mounted by the ASM instance. In a RDBMS instance, v$ASM_TEMPLATE displays one row for every template present in every diskgroup mounted by the ASM instance with which the RDBMS instance communicates.

ASM

ASM Basics

  • The smallest unit of storage written to disk is called an “allocation unit” (AU) and is usually 1MB (4MB recommended for Exadata)
  • Very simply, ASM is organized around storing files
  • Files are divided into pieces called “extents”
  • Extent sizes are typically equal to 1 AU, except in 11.1 and 11.2 where it will use variable extent sizes that can be 1, 8, 64 AUs  or   1, 4, 16 AUs respectively
  • File extent locations are maintained by ASM using file extent maps.
  • ASM maintains file metadata in headers on the disks rather than in a data dictionary
  • The file extent maps are cached in the RDBMS shared pool; these are consulted when an RDBMS process does I/O
  • ASM is very crash resilient since it uses instance / crash recovery similar to a normal RDBMS (similar to using undo and redo logging)

ASM Diskgroups 

Creating Diskgroup:

CREATE DISKGROUP disk_group_1 NORMAL

REDUNDANCY

FAILGROUP failure_group_1 DISK

‘/devices/diska1’ NAME diska1,

‘/devices/diska2’ NAME diska2,

FAILGROUP failure_group_2 DISK

‘/devices/diskb1’ NAME diskb1,

‘/devices/diskb2’ NAME diskb2;
NOTE :  The above disk group given as NORMAL redundancy, that means it contain 2 Fail groups (i.e., 2 sets of each data is maintained) also similarly for HIGH redundancy each data is made into thrice(1 original and 2 duplicates) so it makes 3 fail groups in Disk group
Drop disk groups

DROP DISKGROUP DATA INCLUDING CONTENTS;

Add disks

ALTER DISKGROUP DATA ADD DISK ‘/dev/sda3’;

Drop a disk

ALTER DISKGROUP DATA DROP DISK DATA_0001;

Resize all disks in a disk group

ALTER DISKGROUP DATA RESIZE ALL SIZE 100G;

UNDROP DISKS clause of the ALTER DISKGROUP

ALTER DISKGROUP DATA UNDROP DISKS;

Rebalance diskgroup

ALTER DISKGROUP DATA REBALANCE POWER 5;

Check Diskgroup

ALTER DISKGROUP DATA CHECK;

ALTER DISKGROUP DATA CHECK NOREPAIR;

Diskgroup Metadata Backup

md_backup -b asm_backup.mdb.txt -g data,fra

ASM Specific Init.ora Parameters

*.cluster_database=true

*.asm_diskstring=’/dev/sd*1′

*.instance_type=asm

*.shared_pool_size=100M

*.large_pool_size=80M

*.db_cache_size=60M

*.asm_diskgroups=’DATA’,’FRA’

Initialize ASM for non-RAC

./localconfig add

Manually start CSSD (non-RAC)

/etc/init.d/init.cssd start

Manually stop CSSD ( non-RAC)

/etc/init.d/init.cssd stop

Resetting CSS to new Oracle Home

localconfig reset /apps/oracle/product/11.1.0/ASM

ASM Dictionary Views

v$asm_alias  —list all aliases in all currently mounted diskgroups

v$asm_client —list all the databases currently accessing the diskgroups

v$asm_disk —-lists all the disks discovered by the ASM instance.

v$asm_diskgroup —Lists all the diskgroups discovered by the ASM instance.

v$asm_file —Lists all files that belong to diskgroups mounted by the ASM instance.

v$asm_operation —Reports information about current active operations. Rebalance activity is reported in this view.

v$asm_template —Lists all the templates currently mounted by the ASM instance.

v$asm_diskgroup_stat —same as v$asm_diskgroup but does discover new disgroups. Use this view instead of v$asm_diskgroup.

v$asm_disk_stat —same as v$asm_disk but does not discover new disks. Use this view instead of v$asm_disk.

srvctl commands

ADD

srvctl add asm -n rac3 -i +ASM3 -o /opt/oracle/app/product/10.2.0/asm

ENABLE

srvctl enable asm -n rac3 -i +ASM3

DISABLE

srvctl disable asm -n rac3 -i +ASM3

START

srvctl start asm -n rac3

STOP

srvctl stop asm -n rac3

CONFIG

srvctl config asm -n rac1

REMOVE

srvctl remove asm -n rac1

STATUS

srvctl status asm

srvctl status asm -n rac1

MODIFY

srvctl modify asm -o -n rac1

ASMLIB commands ( as root)

/etc/init.d/oracleasm start

/etc/init.d/oracleasm stop

/etc/init.d/oracleasm restart

/etc/init.d/oracleasm configure

/etc/init.d/oracleasm status

/etc/init.d/oracleasm enable

/etc/init.d/oracleasm disable

/etc/init.d/oracleasm listdisks

/etc/init.d/oracleasm deletedisk

/etc/init.d/oracleasm scandisks

/etc/init.d/oracleasm querydisk /dev/sdb1

/etc/init.d/oracleasm createdisk /dev/sdb1 VOL1

/etc/init.d/oracleasm renamedisk /dev/sdb1 VOL1

asmcmd Commands

cd —–changes the current directory to  the specified directory

du —–Displays the total disk space occupied by ASM files in the specified

ASM directory and all its subdirectories, recursively.

find —–Lists the paths of all occurrences of the specified name ( with wildcards) under the specified directory.

ls +data/testdb —-Lists the contents of an ASM  director, the attributes of the specified file, or the names and attributes of all disk groups.

lsct —–Lists information about current ASM clients.

lsdg —-Lists all disk groups and their attributes

mkalias —-Creates an alias for a system generated filename.

mkdir —–Creates ASM directories.

pwd ——–Displays the path of the current ASM directory.

rm        ——-Deletes the specified ASM Files or directories.

rm -f  

rmalias ———Deletes the specified alias, retaining the file that the alias points to

lsdsk ———-Lists disks visible to ASM.

md_backup ——Creates a backup of all of the mounted disk groups.

md_restore ——Restores disk groups from a backup.

remap —-repairs a range of physical blocks on a disk.

cp ——copies files into and out of ASM.

SYSASM Role (Starting in Oracle Database 11g)

SQL> Grant sysasm to sys; —sysdba deprecated sqlplus / as sysasm

ASM Rolling Upgrades START

alter system start rolling migration to 11.2.0.2;

DISABLE

alter system stop rolling migration;

Database INIT parameters for ASM.

*.control_files=’+DATA/orcl/controlfile/control1.ctl’,’+FRA/orcl/controlfile/control2.ctl’

*.db_create_file_dest=’+DATA’

*.db_create_online_log_dest_1=’+DATA’

*.db_recovery_file_dest=’+DATA’

*.log_archive_dest_1=’LOCATION=+DATA’

*.log_file_name_convert=’+DATA/VISKDR’,’+DATA/VISK’ ##added for DG

Removing disks from an ASM disk group

SQL> select group_number,name from v$asm_disk  order by group_number,name;
GROUP_NUMBER   NAME
———— ——————————
1 ASM_ORADATA31_0000
1 ASM_ORADATA31_0001
1 ASM_ORADATA31_0002
1 ASM_ORADATA31_0003
1 ASM_ORADATA31_0004
1 ASM_ORADATA31_0005
2 ASM_ORADATA32_0000
2 ASM_ORADATA32_0001
2 ASM_ORADATA32_0002
2 ASM_ORADATA32_0003
2 ASM_ORADATA32_0004
2 ASM_ORADATA32_0005

12 rows selected.

SQL> ALTER DISKGROUP ASM_ORADATA31 DROP DISK ASM_ORADATA31_0005;
Diskgroup altered.

SQL> ALTER DISKGROUP ASM_ORADATA32 DROP DISK ASM_ORADATA32_0005;
Diskgroup altered.

SQL> select est_minutes from V$ASM_OPERATION;

EST_MINUTES
———–
6

see:    Adding Disks to ASM diskgroup Manually

MIGRATE to ASM using RMAN

run

{

backup as copy database format ‘+DATA’;

switch database to copy;

#For each logfile

sql “alter database rename ‘/data/oracle/VISK/redo1a.rdo’ to ‘+DATA’ “;

alter database open resetlogs;

#For each tempfile

sql “alter tablespace TEMP add tempfile” ;

}

Restore Database to ASM using SET NEWNAME 

run

{

allocate channel d1 type disk;

#For each datafile

set newname for datafile 1 to ‘+DATA’;

restore database;

switch datafile all;

release channel d1;

}

Refer more Master Note for Automatic Storage Management (ASM) (Doc ID 1187723.1)
Information Center: Install and Configure Oracle Automatic Storage Management (Doc ID 1522675.2)