Disk Scrubbing Feature Oracle Exadata Database Machine

Por Yenugula Venkata Ravi Kumar e Rodrigo Mufalani Oracle ACE
Publicado en Junho 2017


Revisado por Marcelo Pivovar

Introdução:

A nova funcionalidade Disk scrubbing foi introduzida no Oracle 11.2.0.4 e na versão do software de sotargrOracle Exadata 11.2.3.3.0. O uso do disk scrubbing é para periodicamente validar a integridadede dos extents ASM espelhados e assim eliminar uma corrupção latente. Disk Scrubbing foi desenhado para agendar nos servidores de produção quando a media de utilização de I/O for mínima porque o disk scrubbing pode causar picos na utilização dos discos, latência e inadvertidamente afetar a performance de um banco de dados. Por default, o hard disk scrub roda a cada 2 semanas.

Os seguintes parâmetros controlam o disk scrubbing:

  • hardDiskScrubInterval:

    Configura o intervalo para pro-ativamenteresilvering (resilvering = mover dados de um device para outro)de latentes setores danificados. Opçõesválidassãodaily, weekly, biweekly e none.

  • hardDiskScrubStartTime:

    Configura o início pro-ativo para o processo de resilveringdos latentes setores danificados. Opções válidas são uma combinação de data/hora ou now (início imediato).


Agendamentos disponíveis para habilitar a atividade de Harddiskscrub

  • hardDiskScrubInterval=daily
  • hardDiskScrubInterval=weekly
  • hardDiskScrubInterval=biweekly

Maneiras de checar o alert log em um Oracle ExadataStorage Server

  1. ADRCI
  2. CELLTRACE

Onde olhar em um Oracle ExadataStorage Servers:

ExadataStorage Server-1: CellServer01

[celladmin@CellServer01 ~]$ cd $CELLTRACE
[celladmin@CellServer01 trace]$pwd
/opt/oracle/cell12.1.2.3.3_LINUX.X64_161109/log/diag/asm/cell/CellServer01/trace
[celladmin@CellServer01 trace]$ ls -l alert*
-rw-rw---- 1 root celladmin 254890 Mar 11 05:03 alert.log
[celladmin@CellServer01 trace]$

(OU)

[celladmin@CellServer01~]$adrci
ADRCI: Release 12.1.0.2.0 - Production on Mon Mar 13 
12:49:12 2017
Copyright (c) 1982, 2016, Oracle and/or its affiliates.  
All rights reserved.
ADR base = "/opt/oracle/cell12.1.2.3.3_LINUX.
X64_161109/log"

adrci> show alert

Choose the home from which to view the alert log:

1: diag/asm/user_root/host_136421473_80
2: diag/asm/user_root/host_136421473_82
3: diag/asm/cell/CellServer01
4: diag/asm/cell/SYS_121233_161109
5: diag/asm/cell/SYS_112331_151006
Q: to quit

Please select option: 3
Output the results to file: /tmp/
alert_35417_1399_CellServer01_1.ado

Begin scrubbing CellDisk:CD_03_CellServer01.
Begin scrubbing CellDisk:CD_04_CellServer01.
Begin scrubbing CellDisk:CD_07_CellServer01.
Begin scrubbing CellDisk:CD_06_CellServer01.
Begin scrubbing CellDisk:CD_10_CellServer01.
Begin scrubbing CellDisk:CD_05_CellServer01.
Begin scrubbing CellDisk:CD_01_CellServer01.
Begin scrubbing CellDisk:CD_09_CellServer01.
Begin scrubbing CellDisk:CD_11_CellServer01.
Begin scrubbing CellDisk:CD_08_CellServer01.
Begin scrubbing CellDisk:CD_00_CellServer01.
Begin scrubbing CellDisk:CD_02_CellServer01.

2017-02-24 10:55:08.976000 -05:00
Finished scrubbing CellDisk:CD_01_CellServer01, 
scrubbed blocks (1MB):7465024, found bad blocks:0
2017-02-24 12:19:33.389000 -05:00
Finished scrubbing CellDisk:CD_00_CellServer01, 
scrubbed blocks (1MB):7465024, found bad blocks:0
2017-02-24 17:40:33.013000 -05:00
Finished scrubbing CellDisk:CD_05_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 17:44:36.352000 -05:00
Finished scrubbing CellDisk:CD_08_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 17:50:16.765000 -05:00
Finished scrubbing CellDisk:CD_10_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 17:50:20.052000 -05:00
Finished scrubbing CellDisk:CD_07_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 17:53:45.900000 -05:00
Finished scrubbing CellDisk:CD_06_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 17:57:31.965000 -05:00
Finished scrubbing CellDisk:CD_04_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:23:17.292000 -05:00
Finished scrubbing CellDisk:CD_11_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:47:43.248000 -05:00
Finished scrubbing CellDisk:CD_09_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 19:12:58.308000 -05:00
Finished scrubbing CellDisk:CD_02_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 22:25:42.408000 -05:00
Finished scrubbing CellDisk:CD_03_CellServer01, 
scrubbed blocks (1MB):7499632, found bad blocks:0	

ExadataStorage Server-2: CellServer02

[celladmin@CellServer02 ~]$ cd $CELLTRACE
[celladmin@CellServer02 trace]$pwd
/opt/oracle/cell12.1.2.3.3_LINUX.X64_161109/log/diag/asm/cell/CellServer02/trace
[celladmin@CellServer02 trace]$ ls -lrth alert*
-rw-rw---- 1 root celladmin 4.2M Mar 11 02:57 alert.log
[celladmin@CellServer02 trace]$

(OU)

[celladmin@CellServer02~]$adrci
ADRCI: Release 12.1.0.2.0 - Production on Mon Mar 13 
13:32:42 2017
Copyright (c) 1982, 2016, Oracle and/or its affiliates.  
All rights reserved.

ADR base = "/opt/oracle/cell12.1.2.3.3_LINUX.X64_161109/log"
adrci> show alert

Choose the home from which to view the alert log:

1: diag/asm/user_root/host_1634209856_80
2: diag/asm/user_root/host_1634209856_82
3: diag/asm/cell/CellServer02
4: diag/asm/cell/SYS_112331_151006
5: diag/asm/cell/SYS_121233_161109
Q: to quit

Please select option: 3
Output the results to file: /tmp/
alert_5413_14027_CellServer02_1.ado

Begin scrubbing CellDisk:CD_02_CellServer02.
Begin scrubbing CellDisk:CD_00_CellServer02.
Begin scrubbing CellDisk:CD_11_CellServer02.
Begin scrubbing CellDisk:CD_10_CellServer02.
Begin scrubbing CellDisk:CD_09_CellServer02.
Begin scrubbing CellDisk:CD_06_CellServer02.
Begin scrubbing CellDisk:CD_01_CellServer02.
Begin scrubbing CellDisk:CD_04_CellServer02.
Begin scrubbing CellDisk:CD_05_CellServer02.
Begin scrubbing CellDisk:CD_03_CellServer02.
Begin scrubbing CellDisk:CD_07_CellServer02.
Begin scrubbing CellDisk:CD_08_CellServer02.
2017-02-24 11:32:04.092000 -05:00
Finished scrubbing CellDisk:CD_01_CellServer02, 
scrubbed blocks (1MB):7465024, found bad blocks:0
2017-02-24 12:47:37.032000 -05:00
Finished scrubbing CellDisk:CD_00_CellServer02, 
scrubbed blocks (1MB):7465024, found bad blocks:0
2017-02-24 18:33:47.058000 -05:00
Finished scrubbing CellDisk:CD_06_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:34:45.791000 -05:00
Finished scrubbing CellDisk:CD_02_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:39:05.954000 -05:00
Finished scrubbing CellDisk:CD_03_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:45:55.826000 -05:00
Finished scrubbing CellDisk:CD_08_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:51:21.961000 -05:00
Finished scrubbing CellDisk:CD_05_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:56:44.404000 -05:00
Finished scrubbing CellDisk:CD_07_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 19:07:25.359000 -05:00
Finished scrubbing CellDisk:CD_10_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 19:09:20.616000 -05:00
Finished scrubbing CellDisk:CD_04_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 19:10:06.256000 -05:00
Finished scrubbing CellDisk:CD_09_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 22:56:26.134000 -05:00
Finished scrubbing CellDisk:CD_11_CellServer02, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-03-08 19:00:06.986000 -05:00	

ExadataStorage Server-3: CellServer03

[celladmin@CellServer03 ~]$adrci

ADRCI: Release 12.1.0.2.0 - Production on Tue Mar 14 
14:48:47 2017

Copyright (c) 1982, 2016, Oracle and/or its affiliates.  
All rights reserved.

ADR base = "/opt/oracle/cell12.1.2.3.3_LINUX.X64_161109/
log"
adrci> show alert

Choose the home from which to view the alert log:

1: diag/asm/user_root/host_4214962514_80
2: diag/asm/user_root/host_4214962514_82
3: diag/asm/cell/SYS_112331_151006
4: diag/asm/cell/SYS_121233_161109
5: diag/asm/cell/CellServer03
Q: to quit

Please select option: 5
Output the results to file: /tmp/
alert_37829_1402_CellServer03_1.ado

Begin scrubbing CellDisk:CD_02_CellServer03.
Begin scrubbing CellDisk:CD_07_CellServer03.
Begin scrubbing CellDisk:CD_10_CellServer03.
Begin scrubbing CellDisk:CD_11_CellServer03.
Begin scrubbing CellDisk:CD_01_CellServer03.
Begin scrubbing CellDisk:CD_05_CellServer03.
Begin scrubbing CellDisk:CD_06_CellServer03.
Begin scrubbing CellDisk:CD_08_CellServer03.
Begin scrubbing CellDisk:CD_09_CellServer03.
Begin scrubbing CellDisk:CD_04_CellServer03.
Begin scrubbing CellDisk:CD_03_CellServer03.
Begin scrubbing CellDisk:CD_00_CellServer03.
2017-02-24 12:26:46.102000 -05:00
Finished scrubbing CellDisk:CD_00_CellServer03, 
scrubbed blocks (1MB):7465024, found bad blocks:0
2017-02-24 13:31:16.168000 -05:00
Finished scrubbing CellDisk:CD_01_CellServer03, 
scrubbed blocks (1MB):7465024, found bad blocks:0
2017-02-24 18:02:35.900000 -05:00
Finished scrubbing CellDisk:CD_03_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 18:35:41.075000 -05:00
Finished scrubbing CellDisk:CD_04_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 19:36:04.680000 -05:00
Finished scrubbing CellDisk:CD_10_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 20:12:15.913000 -05:00
Finished scrubbing CellDisk:CD_11_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 20:12:55.832000 -05:00
Finished scrubbing CellDisk:CD_09_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 20:36:54.813000 -05:00
Finished scrubbing CellDisk:CD_06_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 20:42:25.369000 -05:00
Finished scrubbing CellDisk:CD_05_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-24 20:58:07.648000 -05:00
Finished scrubbing CellDisk:CD_07_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-25 04:16:47.907000 -05:00
Finished scrubbing CellDisk:CD_08_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0
2017-02-25 09:07:33.619000 -05:00
Finished scrubbing CellDisk:CD_02_CellServer03, 
scrubbed blocks (1MB):7499632, found bad blocks:0

Nota: O mesmo processo que podemos fazer em Oracle Exadata Database Machine (1/8, Quarter, Half e Full Rack).

Comando para verificar a atividade de Harddiskscrubhabilitada no Oracle Exadata:

[celladmin@CellServer01 ~]$cellcli -e list cell 
attributes name,hardDiskScrubInterval
         CellServer01    biweekly

[celladmin@CellServer02 ~]$cellcli -e list cell 
attributes name,hardDiskScrubInterval
         CellServer02    biweekly

[celladmin@CellServer03 ~]$cellcli -e list cell 
attributes name,hardDiskScrubInterval
CellServer03    biweekly

Comando para para desabilitar a atividade de Harddiskscrubno Oracle Exadata:

[celladmin@CellServer01 ~]$cellcli –e alter 
cell hardDiskScrubInterval=none
[celladmin@CellServer02 ~]$cellcli –e alter 
cell hardDiskScrubInterval=none
[celladmin@CellServer03 ~]$cellcli –e alter 
cell hardDiskScrubInterval=none


Quando agendar:

A atividade de Disk scrubbingirá consumir I/O quando estiver executando nos storage servers, então haverá uma pequena carga no Oracle Database. Antes de rodar o disk scrubbing em uma janela de livre (período idle) para um banco de dados de produção de missão crítica. Cheque os passos abaixo para agendar que no tempo planejado:

Para o disk scrubbing e então reagende ele para um período que não haja picos de I/O.

CellCLI> ALTER CELL hardDiskScrubInterval=none

Por favor, decida quando ohardDiskScrubStartTimedeverá iniciar, todo o final de semana/perído de menor atividade e configure adequadamente.

CellCLI> ALTER CELL hardDiskScrubStartTime='< Coloque o data e horário>'

Mudar o interval para BIWEEKLY se o plano de ação anterior foiimplementadopara parar o disk scrub.

CellCLI> ALTER CELL hardDiskScrubInterval=biweekly

Conclusão:

|A nova funcionalidade Disk scrubbingé usada periodicamente para validar a integridade de extents ASM espelhados ao longo dos Oracle Exadatastorage servers eassim eliminar corrupções.


Y V Ravi Kumar é um Oracle ACE e Oracle Certified Master (OCM) com 18 anos de experiência em instituições financeiras, serviços financeiros e seguros (BFSI) e atuou em diversos papeis como Senior Database Architect e Production DBA. Ele também é OCP em Oracle 8i, 9i, 10g, 11g & 12c e Certificado em Golden Gate, RAC, Performance Tuning& Oracle Exadata. Ele continua motivando muitos DBAs e ajudando a Oracle Community publicando suas dicas /ideias/sugestões/soluções em seu blog. Ele escreveu 40+ artigos OTN sobre Oracle Exadata, Oracle RAC e Oracle GoldenGate para a OTN em Espanhol, OTN em Português e OTN em inglês e 19 artigos para a TOAD World, 2 Artigos para o UKOUG, 3 Artigos para OTech Magazine e 2 Artigos para a Redgate. Ele é membro do AllIndia Oracle UserGroup (AIOUG) e frequente Oracle speaker in @NYOUG, @OTN, AIOUG, Sangam e IOUG. Ele desenha, projeta e implementa Core Banking System (CBS) Databases para o Central Banks em dois países – India e Mahe, Seychelles. Ele é Co-Founder do OraWorld (www.oraworld.com). Leia mais sobre o seu perfil na LaserSoft

Rodrigo Mufalani é um DBA Sr. com mais de 10 anos de experiência, começou com o Oracle 8i, mas teve a oportunidade de dar suporte a Oracle 7.3.4 em diante. É especialista em banco de dados Oracle com foco principal em Performance & Tuning e RAC. É palestrante em eventos de Oracle como: OTN LAD TOUR e outros. Atualmente trabalha como consultor diversas empresas no segmento de variados ramos como: Educação, Saúde, Tecnologia, Seguros e etc. Foi o terceiro Oracle ACE a ser nomeado no Brasil e é OCP DBA nas versões 10g e 11g. Atualmente trabalha na Mufalani. Twitter @mufalani / blog www.mufalani.com.br/blog

Este artigo foi revisto pela equipe de produtos Oracle e está em conformidade com as normas e práticas para o uso de produtos Oracle.