ORACLE/ADMIN2023. 6. 8. 16:55
반응형

ORACLE ASM DISK 삭제 CRS_003-- ASM DISKGROUP 상태 확인

DISK_GROUP LABEL      STATE
---------- ---------- ----------
CRS        CRS_0000   MOUNTED
CRS        CRS_0001   MOUNTED
CRS        CRS_0002   MOUNTED
CRS        CRS_0003   MOUNTED
DATA       DATA2      MOUNTED
DATA       DATA_0000  MOUNTED
FRA        FRA_0000   MOUNTED

7 rows selected.

-- ASM DISKGROUP  세부 정보 확인
SQL> col path for a30
SQL> col name for a14
SQL> select group_number, disk_number, name, mount_status, path, total_mb, free_mb
  2  from v$asm_disk
  3  order by 1,3;
 
GROUP_NUMBER DISK_NUMBER NAME           MOUNT_STATUS          PATH                             TOTAL_MB    FREE_MB
------------ ----------- -------------- --------------------- ------------------------------ ---------- ----------
           1           0 CRS_0000       CACHED                /dev/oracleasm/disks/CRS1            1020        760
           1           1 CRS_0001       CACHED                /dev/oracleasm/disks/CRS2            1020        764
           1           2 CRS_0002       CACHED                /dev/oracleasm/disks/CRS3            1020        760
           1           3 CRS_0003       CACHED                /dev/oracleasm/disks/CRS4            1020        816
           2           1 DATA2          CACHED                /dev/oracleasm/disks/DATA2          50996      47884
           2           0 DATA_0000      CACHED                /dev/oracleasm/disks/DATA           30716      28820
           3           0 FRA_0000       CACHED                /dev/oracleasm/disks/FRA            20476      19084

7 rows selected.

-- CRS_003 삭제

SQL> alter diskgroup crs drop disk CRS_0003;

-- ASM DISKGROUP  세부 정보 확인
SQL> col path for a30
SQL> col name for a14
SQL> select group_number, disk_number, name, mount_status, path, total_mb, free_mb
  2  from v$asm_disk
  3  order by 1,3;

GROUP_NUMBER DISK_NUMBER NAME           MOUNT_STATUS          PATH                             TOTAL_MB    FREE_MB
------------ ----------- -------------- --------------------- ------------------------------ ---------- ----------
           0           0                CLOSED                /dev/oracleasm/disks/CRS4               0          0
           1           0 CRS_0000       CACHED                /dev/oracleasm/disks/CRS1            1020        700
           1           1 CRS_0001       CACHED                /dev/oracleasm/disks/CRS2            1020        696
           1           2 CRS_0002       CACHED                /dev/oracleasm/disks/CRS3            1020        696
           2           1 DATA2          CACHED                /dev/oracleasm/disks/DATA2          50996      47884
           2           0 DATA_0000      CACHED                /dev/oracleasm/disks/DATA           30716      28820
           3           0 FRA_0000       CACHED                /dev/oracleasm/disks/FRA            20476      19084

7 rows selected.

--  OS에서 CRS4번 disk 정보 삭제
[root@rac1 disks]# oracleasm deletedisk crs4
Clearing disk header: done
Dropping disk: done


[root@rac1 disks]# oracleasm listdisks
CRS1
CRS2
CRS3
DATA
DATA2
FRA

-- ASM DISKGROUP  세부 정보 CLOSE 였던 CRS_003 목록에서 사라짐 확인
GROUP_NUMBER DISK_NUMBER NAME           MOUNT_STATUS          PATH                             TOTAL_MB    FREE_MB
------------ ----------- -------------- --------------------- ------------------------------ ---------- ----------
           1           0 CRS_0000       CACHED                /dev/oracleasm/disks/CRS1            1020        700
           1           1 CRS_0001       CACHED                /dev/oracleasm/disks/CRS2            1020        696
           1           2 CRS_0002       CACHED                /dev/oracleasm/disks/CRS3            1020        696
           2           1 DATA2          CACHED                /dev/oracleasm/disks/DATA2          50996      47884
           2           0 DATA_0000      CACHED                /dev/oracleasm/disks/DATA           30716      28820
           3           0 FRA_0000       CACHED                /dev/oracleasm/disks/FRA            20476      19084

6 rows selected.

반응형
Posted by [PineTree]