2009년 8월 21일 금요일

ASM 사용하기

▣ ASM 인스턴스 사용하는 DB의 startup 절차

  1. 리스너 startup

    [oracle@edrsr4p1 ~]$ lsnrctl start
     

  2. ASM startup

    [oracle@edrsr4p1 ~]$ ORACLE_SID=+ASM;sqlplus / as sysdba

    SQL> startup
     

  3. DB startup

    [oracle@edrsr4p1 ~]$ ORACLE_SID=orcl;sqlplus / as sysdba

    SQL> startup

  4. Isqlplus startup

    [oracle@edrsr4p1 ~]$ isqlplusctl start

       

  5. Em startup

    [oracle@edrsr4p1 ~]$ ORACLE_SID=orcl;emctl start dbconsole;

   

▣ 기본 정보 확인

SQL> select group_number,name from v$asm_diskgroup;

   

GROUP_NUMBER NAME

------------ ------------------------------

1 DISK1

   

SQL> select path from v$asm_disk;

   

PATH

------------------------------

/dev/raw/raw1

/dev/raw/raw2

/dev/raw/raw3

/dev/raw/raw4

/dev/raw/raw6

/dev/raw/raw5

   

6 rows selected.

   

▣ ASM disk1에서 asm disk 삭제

ALTER DISKGROUP DISK1 DROP DISK DISK1_0000,DISK1_0001

   

SQL> alter diskgroup disk1 drop disk DISK1_0000,DISK1_0001;

   

Diskgroup altered.

   

▣ Failure Group

   

▣ Failure Group 생성

CREATE DISKGROUP DISK2 NORMAL REDUNDANCY

FAILGROUP DISK2_B DISK

'/dev/raw/raw1' SIZE 392 M ,

FAILGROUP DISK2_A DISK

'/dev/raw/raw2' SIZE 392 M

/

   

SQL> select group_number,name from v$asm_diskgroup;

GROUP_NUMBER NAME

------------ ------------------------------

           1 DISK1

           2 DISK2

SQL> col path form a20

SQL> select failgroup,path,name from v$asm_disk

  2  where group_number=2;

FAILGROUP                      PATH                 NAME

------------------------------ -------------------- ------------------------------

DISK2_A                        /dev/raw/raw1        DISK2_0002

DISK2_A                        /dev/raw/raw2        DISK2_0003

DISK2_B                        /dev/raw/raw3        DISK2_0000

DISK2_B                        /dev/raw/raw4        DISK2_0001

   

▣ Disk group Dynamic Rebalance

  • Automatic online rebalance whenever storage configuration changes
  • Only move data proportional to storage added
  • No need for manual I/O tuning
  • Online migration to new storage
  • Configurable load on system using ASM_POWER_LIMIT

       

       

▣ Rebalance 설정

SQL> alter diskgroup disk1 rebalance;

댓글 없음:

댓글 쓰기