Adding Disks to ASM diskgroup Manually

ASM

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]