Pré Requisitos

Alterne para o usuário grid:

# su - grid

Verifique se existe uma entrada para a instância ASM no arquivo /etc/oratab

$ grep ASM /etc/oratab
# a database or ASM Configuration Assistant while creating ASM instance.
+ASM1:/u01/app/19.0.0.0/grid:N

Configure as variáveis de ambiente para o Grid (usando a conf da instância ASM):

$ . oraenv <<< +ASM1
ORACLE_SID = [+ASM1] ? The Oracle base has been set to /u01/app/grid

Verificando tamanho atual da partição ACFS (opção T mostra o tipo de filesystem):

$ df -hT /u02/app/oracle/oradata/biqlik
Filesystem             Type  Size  Used Avail Use% Mounted on
/dev/asm/datbiqlik-153 acfs  500G  433G   68G  87% /u02/app/oracle/oradata/biqlik

Verificando Capacidade de Expansão

Uma partição ACFS é criada em cima de um volume ADVM criado sobre um Diskgroup no ASM, o volume é apresentado ao sistema operacional como um Block Device. A etapa a seguir não é obrigatória, mas é recomendada: Verificar o espaço livre no diskgroup antes de expandir a partição.

Identificando o nome do diskgroup no qual o volume foi criado:

$ acfsutil info fs /u02/app/oracle/oradata/biqlik | grep diskgroup
        ADVM diskgroup:        DATA

Verificando espaço livre no diskgroup:

$ asmcmd lsdg DATA
State    Type  Rebal  Sector  Logical_Sector  Block       AU  Total_MB   Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  FLEX  N         512             512   4096  4194304  37361664  12174196                0               0              0             Y  DATA/

Considere o valor de Usable_file_MB quando Type for EXTERNAL, NORMAL ou HIGH.

Considere o valor de Free_MB quando Type for FLEX

Expandindo a Partição

Por fim, aumentando o tamanho da partição, um único comando expande o volume e o filesystem automaticamente (Sim, isso é fantástico!).

Existem 2 abordagens possíveis: A primeira é definir o novo tamanho e a segunda é definir quanto deseja acresentar ao tamanho atual, escolha uma abordagem de sua preferência.

Abordagem 1 – Definindo um novo tamanho:

$ acfsutil size 600G /u02/app/oracle/oradata/biqlik
acfsutil size: Resizing file system in steps
acfsutil size: Resizing file system to 0.5039 TB
acfsutil size: Resizing file system to 0.5195 TB
acfsutil size: Resizing file system to 0.5352 TB
acfsutil size: Resizing file system to 0.5508 TB
acfsutil size: Resizing file system to 0.5664 TB
acfsutil size: Resizing file system to 0.5820 TB
acfsutil size: Resizing file system to 0.5859 TB
acfsutil size: new file system size: 644245094400 (614400MB)

$ df -hT /u02/app/oracle/oradata/biqlik
Filesystem             Type  Size  Used Avail Use% Mounted on
/dev/asm/datbiqlik-153 acfs  600G  433G  168G  73% /u02/app/oracle/oradata/biqlik

Abordagem 2 – Definindo quanto deseja acresentar ao tamanho atual:

A diferença é o uso do sinal “+” antes do valor.

$ acfsutil size +50G /u02/app/oracle/oradata/biqlik
acfsutil size: Resizing file system in steps
acfsutil size: Resizing file system to 0.6016 TB
acfsutil size: Resizing file system to 0.6172 TB
acfsutil size: Resizing file system to 0.6328 TB
acfsutil size: Resizing file system to 0.6348 TB
acfsutil size: new file system size: 697932185600 (665600MB)
$ df -hT /u02/app/oracle/oradata/biqlik
Filesystem             Type  Size  Used Avail Use% Mounted on
/dev/asm/datbiqlik-153 acfs  650G  433G  218G  67% /u02/app/oracle/oradata/biqlik

Observações

a) Em um ambiente RAC, a partição será expandida em todos os nodes em que ela estiver montada. Trata-se de um storage compartilhado, é o mesmo volume apresentado em todos os nodes (no qual a partição é montada).

b) Cuidado com o uso das 2 abordagens e evite usar o sinal “+” quando a intenção for definir o novo tamanho total da partição. Por exemplo, isso poderia causar um erro como adicionar 1TB ao tamanho já existente ao invés de aumentar para 1 TB.

Leave a Reply

Discover more from Blog do Dibiei

Subscribe now to keep reading and get access to the full archive.

Continue reading