–weryfikacja czy dyski są niedostępne / wylecialy (kolumna Offline_disks)
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
…
MOUNTED NORMAL N 512 4096 1048576 3145725 75745 1048575 -486415 3 N DATA/
— sprawdzamy jakie poleciały
SQL> select name,failgroup,state from v$asm_disk a where state <> 'NORMAL’;
NAME FAILGROUP STATE
_DROPPED_0002_DATA DATAFG1 FORCING
_DROPPED_0001_DATA DATAFG1 FORCING
_DROPPED_0000_DATA DATAFG1 FORCING
— albo z logów ASM-a (od razu będą widoczne nazwy dysków jakie poleciały):
[root@db ~]# grep -B10 -A100 DROPPED alert_+ASM1.log |grep -B1 „ASM SERVER”
2021-11-11T08:44:14.694313+01:00
SUCCESS: alter diskgroup DATA1 drop disk DATAC1_CD_00_DBCELADM01 force /* ASM SERVER */
— dodatkowo badamy jakie są
SQL> select name,failgroup,state from v$asm_disk where name like '%DATA%’;
NAME FAILGROUP STATE
_DROPPED_0002_DATA DATAFG1 FORCING
_DROPPED_0001_DATA DATAFG1 FORCING
_DROPPED_0000_DATA DATAFG1 FORCING
ASMDATA1B DATAFG2 NORMAL
ASMDATA2B DATAFG2 NORMAL
ASMDATA3B DATAFG2 NORMAL
[root@DBNOD1 ~]# /etc/init.d/oracleasm listdisks | grep DATA
ASMDATA1A
ASMDATA2A
ASMDATA3A
ASMDATA1B
ASMDATA2B
ASMDATA3B
— sprawdzamy czy dyski w ogole są żyjące
[root@DBNOD1 ~]# /etc/init.d/oracleasm querydisk -d ASMDATA1A
Disk „ASMDATA1A” is a valid ASM disk on device [249,103]
[root@DBNOD1 ~]# /etc/init.d/oracleasm querydisk -d ASMDATA2A
Disk „ASMDATA2A” is a valid ASM disk on device [249,105]
[root@DBNOD1 ~]# /etc/init.d/oracleasm querydisk -d ASMDATA3A
Disk „ASMDATA3A” is a valid ASM disk on device [249,107]
— po upewnieniu się, że to są te co wylecialy dodajemy je z forcem
ALTER DISKGROUP DATA ADD
FAILGROUP DATAFG1
DISK
’ORCL:ASMDATA1A’ name ASMDATA1A FORCE,
’ORCL:ASMDATA2A’ name ASMDATA2A FORCE,
’ORCL:ASMDATA3A’ name ASMDATA3A FORCE;
— jak chcemy żeby rbl poszedł szybciej
ALTER DISKGROUP DATA rebalance power 8;
— po dodaniu sprawdzamy:
SQL> select GROUP_NUMBER, OPERATION, STATE, ACTUAL, SOFAR, EST_MINUTES from v$asm_operation;
GROUP_NUMBER OPERA STATE ACTUAL SOFAR EST_MINUTES
5 REBAL DONE 1 0 0
5 REBAL RUN 1 146 795
5 REBAL WAIT 1 0 0
— stan podczas dodawania (widoczne są pod nową nazwą jak i zdropowane)
SQL> select name,failgroup,state from v$asm_disk where name like '%DATA%’;
NAME FAILGROUP STATE
GROUP_NUMBER OPERA STATE ACTUAL SOFAR EST_MINUTES
_DROPPED_0000_DATA DATAFG1 FORCING
_DROPPED_0001_DATA DATAFG1 FORCING
_DROPPED_0002_DATA DATAFG1 FORCING
ASMDATA1A DATAFG1 NORMAL
ASMDATA2A DATAFG1 NORMAL
ASMDATA3A DATAFG1 NORMAL
ASMDATA1B DATAFG2 NORMAL
ASMDATA2B DATAFG2 NORMAL
ASMDATA3B DATAFG2 NORMAL
SQL> select GROUP_NUMBER, OPERATION, STATE, ACTUAL, SOFAR, EST_MINUTES from v$asm_operation;
5 REBAL DONE 8 0 0
5 REBAL RUN 8 4140 220
5 REBAL WAIT 8 0 0
SQL> select GROUP_NUMBER, OPERATION, STATE, ACTUAL, SOFAR, EST_MINUTES from v$asm_operation;
no rows selected
— weryfikacja czy jest ok po rebalance
SQL> select name,failgroup,state from v$asm_disk where name like '%DATA%’;
NAME FAILGROUP STATE
ASMDATA1A DATAFG1 NORMAL
ASMDATA2A DATAFG1 NORMAL
ASMDATA3A DATAFG1 NORMAL
ASMDATA1B DATAFG2 NORMAL
ASMDATA2B DATAFG2 NORMAL
ASMDATA3B DATAFG2 NORMAL