ASM QUICK REF‎ > ‎

alter diskgroup

posted Mar 15, 2011, 12:38 PM by Sachchida Ojha   [ updated Mar 15, 2011, 2:10 PM ]
show parameter ASM_DISKSTRING

$sqlplus / as sysasm;

SQL> select path from v$asm_disk;

PATH
--------------------------------

/dev/rhdisk10
/dev/rhdisk11
/dev/rhdisk12
/dev/rhdisk13
/dev/rhdisk14
/dev/rhdisk15
/dev/rhdisk16
/dev/rhdisk17
/dev/rhdisk18
/dev/rhdisk19
/dev/rhdisk20
/dev/rhdisk21
/dev/rhdisk22
/dev/rhdisk23
/dev/rhdisk24
/dev/rhdisk5
/dev/rhdisk6
/dev/rhdisk7
/dev/rhdisk8
/dev/rhdisk9
*************************new added disks after this
/dev/rhdisk25 
/dev/rhdisk26
/dev/rhdisk27
/dev/rhdisk28
/dev/rhdisk29
/dev/rhdisk30
/dev/rhdisk31
/dev/rhdisk32
/dev/rhdisk33
/dev/rhdisk34
/dev/rhdisk35
/dev/rhdisk36
/dev/rhdisk37
/dev/rhdisk38
/dev/rhdisk39
/dev/rhdisk40
/dev/rhdisk41
/dev/rhdisk42
/dev/rhdisk43
/dev/rhdisk44
/dev/rhdisk45
/dev/rhdisk46

21 rows selected.



SQL> select PATH,NAME,GROUP_NUMBER from v$asm_disk;

PATH                             NAME                             GROUP_NUMBER
-------------------------------- -------------------------------- ------------
/dev/rhdisk10                    DEV_DATA_0000                               1
/dev/rhdisk11                    DEV_DATA_0001                               1
/dev/rhdisk12                    DEV_DATA_0002                               1
/dev/rhdisk13                    DEV_DATA_0003                               1
/dev/rhdisk15                    DEV_DATA_0012                               1
/dev/rhdisk16                    DEV_DATA_0009                               1
/dev/rhdisk17                    DEV_DATA_0010                               1
/dev/rhdisk18                    DEV_DATA_0011                               1
/dev/rhdisk19                    DEV_DATA_19                                 1
/dev/rhdisk20                    DEV_DATA_0014                               1
/dev/rhdisk21                    DEV_DATA_0015                               1
/dev/rhdisk22                    DEV_DATA_0016                               1
/dev/rhdisk23                    DEV_DATA_0017                               1
/dev/rhdisk24                    DEV_DATA_24                                 1
/dev/rhdisk5                     DEV_DATA_0004                               1
/dev/rhdisk6                     DEV_DATA_0005                               1
/dev/rhdisk7                     DEV_DATA_0006                               1
/dev/rhdisk8                     DEV_DATA_0007                               1
/dev/rhdisk9                     DEV_DATA_0008                               1

/dev/rhdisk14                    QA_FLASH_0000                               2
                                 _DROPPED_0001_QA_FLASH                      2

SQL>  alter diskgroup QA_FLASH REBALANCE POWER 11;


SQL> alter diskgroup Qa_FLASH add disk
'/dev/rhdisk45' rebalance power 11;

SQL> alter diskgroup QA_FLASH drop disk
'QA_FLASH_0000' rebalance power 11;


SQL>  alter diskgroup DEV_DATA REBALANCE POWER 11;


SQL> alter diskgroup DEV_DATA add disk
  2  '/dev/rhdisk25',
  3  '/dev/rhdisk26',
  4  '/dev/rhdisk27',
  5  '/dev/rhdisk28',
  6  '/dev/rhdisk29',
  7  '/dev/rhdisk30',
  8  '/dev/rhdisk31',
  9  '/dev/rhdisk32',
 10  '/dev/rhdisk33',
 11  '/dev/rhdisk34',
 12  '/dev/rhdisk35',
 13  '/dev/rhdisk36',
 14  '/dev/rhdisk37',
 15  '/dev/rhdisk38',
 16  '/dev/rhdisk39',
 17  '/dev/rhdisk40',
 18  '/dev/rhdisk41',
 19  '/dev/rhdisk42',
 20  '/dev/rhdisk43',
 21  '/dev/rhdisk44' rebalance power 11;

Diskgroup altered.

SQL> select * from v$asm_operation;

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE
------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------
           1 REBAL RUN          11         11       2056    1049030       9393         112
           2 REBAL ERRS         11                                                         ORA-15041

SQL> alter diskgroup Qa_FLASH add disk
'/dev/rhdisk45' rebalance power 11;
  2

Diskgroup altered.

SQL> SQL> select * from v$asm_operation;

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE
------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------
           1 REBAL RUN          11         11      16418    1050621       8933         115
           2 REBAL WAIT         11

SQL>


SQL> select * from v$asm_operation;
SQL> select * from gv$asm_operation;

SQL> alter diskgroup dev_data drop disk
'DEV_DATA_0000',
'DEV_DATA_0001',
'DEV_DATA_0002',
'DEV_DATA_0003',
'DEV_DATA_0012',
'DEV_DATA_0009',
'DEV_DATA_0010',
'DEV_DATA_0011',
'DEV_DATA_19',
'DEV_DATA_0014',
'DEV_DATA_0015',
'DEV_DATA_0016',
'DEV_DATA_0017',
'DEV_DATA_24',
'DEV_DATA_0004',
'DEV_DATA_0005',
'DEV_DATA_0006',
'DEV_DATA_0007',
'DEV_DATA_0008' rebalance power 11;

SQL> select * from v$asm_operation;
SQL> select * from gv$asm_operation;



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;  2    3

PATH                                GROUP_#     DISK_# MOUNT_S HEADER_STATU STATE      TOTAL_MB    FREE_MB
-------------------------------- ---------- ---------- ------- ------------ -------- ---------- ----------
/dev/rhdisk10                             1          0 CACHED  MEMBER       NORMAL       112001       4793
/dev/rhdisk8                              1          7 CACHED  MEMBER       NORMAL       112001       4629
/dev/rhdisk9                              1          8 CACHED  MEMBER       NORMAL       112001       4624
/dev/rhdisk11                             1          1 CACHED  MEMBER       NORMAL       112001       4631
/dev/rhdisk12                             1          2 CACHED  MEMBER       NORMAL       112001       4627
/dev/rhdisk13                             1          3 CACHED  MEMBER       NORMAL       112001       4626
/dev/rhdisk15                             1         12 CACHED  MEMBER       NORMAL       112001       4626
/dev/rhdisk16                             1          9 CACHED  MEMBER       NORMAL       112001       4630
/dev/rhdisk17                             1         10 CACHED  MEMBER       NORMAL       112001       4629
/dev/rhdisk18                             1         11 CACHED  MEMBER       NORMAL       112001       4628
/dev/rhdisk19                             1         13 CACHED  MEMBER       NORMAL       112001       4628
/dev/rhdisk20                             1         14 CACHED  MEMBER       NORMAL       112001       4626
/dev/rhdisk21                             1         15 CACHED  MEMBER       NORMAL       112001       4626
/dev/rhdisk22                             1         16 CACHED  MEMBER       NORMAL       112001       4627
/dev/rhdisk23                             1         17 CACHED  MEMBER       NORMAL       112001       4629
/dev/rhdisk24                             1         18 CACHED  MEMBER       NORMAL       112001       4629
/dev/rhdisk5                              1          4 CACHED  MEMBER       NORMAL       112001       4622
/dev/rhdisk6                              1          5 CACHED  MEMBER       NORMAL       112001       4631
/dev/rhdisk7                              1          6 CACHED  MEMBER       NORMAL       112001       4624
/dev/rhdisk14                             2          0 CACHED  MEMBER       NORMAL        51200      35813
                                          2          1 MISSING UNKNOWN      FORCING           0          0

va-idevdb02:+ASM:/dev $sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 15 19:34:29 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option

SQL> alter diskgroup Qa_FLASH add disk
'/dev/rhdisk46/QA_FLASH_0012' rebalance power 11;  2
alter diskgroup Qa_FLASH add disk
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15031: disk specification '/dev/rhdisk46/QA_FLASH_0012' matches no disks


SQL> alter diskgroup Qa_FLASH add disk
'/dev/rhdisk46' rebalance power 11;  2

Diskgroup altered.

SQL> select * from v$asm_operation;

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE
------------ ----- ---- ---------- ---------- ---------- ---------- ----------
EST_MINUTES ERROR_CODE
----------- --------------------------------------------
           2 REBAL RUN          11         11        449      28496       5222
          5

SQL> /

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE
------------ ----- ---- ---------- ---------- ---------- ---------- ----------
EST_MINUTES ERROR_CODE
----------- --------------------------------------------
           2 REBAL REAP         11          1      26054      26054      15895
          0


SQL> /

GROUP_NUMBER OPERA STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE
------------ ----- ---- ---------- ---------- ---------- ---------- ----------
EST_MINUTES ERROR_CODE
----------- --------------------------------------------
           2 REBAL WAIT         11



SQL> /

no rows selected


SQL> alter diskgroup QA_FLASH drop disk
'/dev/rhdisk14' rebalance power 11;  2
alter diskgroup QA_FLASH drop disk
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/RHDISK14" does not exist in diskgroup "QA_FLASH"


SQL> select group_number,name from v$asm_diskgroup where group_number=2;

GROUP_NUMBER NAME
------------ ------------------------------
           2 QA_FLASH

SQL> select path,name,header_status from v$asm_disk where group_number=2;

PATH                 NAME                           HEADER_STATU
-------------------- ------------------------------ ------------
/dev/rhdisk14        QA_FLASH_0000                  MEMBER
/dev/rhdisk46        QA_FLASH_0002                  MEMBER

SQL> select path,name from v$asm_disk where group_number=2;

PATH                 NAME
-------------------- ------------------------------
/dev/rhdisk14        QA_FLASH_0000
/dev/rhdisk46        QA_FLASH_0002

SQL> alter diskgroup QA_FLASH drop disk  QA_FLASH_0000;

Diskgroup altered.

SQL>


SQL>

Comments