The views expressed on this blog are my own and do not necessarily reflect the views of Oracle

August 9, 2014

How to resize grid disks in Exadata

This document explains how to resize the grid disks in Exadata (to make them larger), when there is free space in the cell disks. The free space can be anywhere on the cell disks. In other words, the grid disks can be built from and extended with the non-contiguous free space.

Typically, there is no free space in Exadata cell disks, in which case the MOS Doc ID 1465230.1 needs to be followed. But if there is free space in the cell disks, the procedure is much simpler and it can be accomplished with a single ASM rebalance operation.

This document has an example of performing this task on a quarter rack system (two database servers and three storage cells). With an Exadata with more storage cells, the only additional steps would be to resize the grid disks on additional storage cells.

Storage cells in the example are exacell01, exacell02 and exacell03, the disk group is DATA and the new grid disk size is 100000 MB.

Resize grid disks on storage cells

Log in as root to storage cell 1, and run the following command:

# cellcli -e alter griddisk  DATA_CD_00_exacell01, DATA_CD_01_exacell01, DATA_CD_02_exacell01, DATA_CD_03_exacell01, DATA_CD_04_exacell01, DATA_CD_05_exacell01, DATA_CD_06_exacell01, DATA_CD_07_exacell01, DATA_CD_08_exacell01, DATA_CD_09_exacell01, DATA_CD_10_exacell01, DATA_CD_11_exacell01 size=100000M;

Log in as root to storage cell 2, and run the following command:

# cellcli -e alter griddisk  DATA_CD_00_exacell02, DATA_CD_01_exacell02, DATA_CD_02_exacell02, DATA_CD_03_exacell02, DATA_CD_04_exacell02, DATA_CD_05_exacell02, DATA_CD_06_exacell02, DATA_CD_07_exacell02, DATA_CD_08_exacell02, DATA_CD_09_exacell02, DATA_CD_10_exacell02, DATA_CD_11_exacell02 size=100000M;

Log in as root to storage cell 3, and run the following command:

# cellcli -e alter griddisk  DATA_CD_00_exacell03, DATA_CD_01_exacell03, DATA_CD_02_exacell03, DATA_CD_03_exacell03, DATA_CD_04_exacell03, DATA_CD_05_exacell03, DATA_CD_06_exacell03, DATA_CD_07_exacell03, DATA_CD_08_exacell03, DATA_CD_09_exacell03, DATA_CD_10_exacell03, DATA_CD_11_exacell03 size=100000M;

As noted earlier, If you have a larger system, e.g. Exadata half rack with 7 storage cells, resize the grid disks for disk group DATA on all other storage cells.

Resize ASM disks

Log in as the Grid Infrastructure owner to database server 1, and log in to ASM instance 1 as sysasm.

$ sqlplus / as sysasm

Resize all disks in disk group DATA, with the following command:

SQL> ALTER DISKGROUP DATA RESIZE ALL;

Note that there was no need to specify the new disk size, as ASM will get that from the grid disks. If you would like to speed up the rebalance, add REBALANCE POWER 32 to the above command.

The command will trigger the rebalance operation for disk group DATA.

Monitor the rebalance with the following command:

SQL> select * from gv$asm_operation;

Once the command returns "no rows selected", the rebalance would have completed and all disks in disk group DATA should show new size.

Check that the ASM sees the new size, with the following command:

SQL> select name, total_mb from v$asm_disk_stat where name like 'DATA%';

The TOTAL_MB should show 100000M for all disks in disk group DATA.

Conclusion

If there is free space in Exadata cell disks, the disk group resize can be accomplished in two steps - grid disk resize on all storage cells followed by the disk resize in ASM. This requires a single ASM rebalance operation.

I have published this on MOS as Doc ID 1684112.1.

July 27, 2014

How to reconfigure Oracle Restart

The other day I had to reconfigure an Oracle Restart 12c environment, and I couldn't find my blog post on that. It turns out that I never published it here, as my MOS document on this topic was created back in 2010 when this blog didn't exist!

The original document was written for Oracle Restart 11gR2, but it is still valid for 12c. Here it is.

Introduction

This document is about reconfiguring the Oracle Restart. One reason for such action might be the server rename. If the server was renamed and then rebooted, the ASM instance startup would fail with ORA-29701: unable to connect to Cluster Synchronization Service.

The solution is to reconfigure Oracle Restart as follows.

1. Remove Oracle Restart configuration

This step should be performed as the privileged user (root).

# $GRID_HOME/crs/install/roothas.pl -deconfig -force

The expected result is "Successfully deconfigured Oracle Restart stack".

2. Reconfigure Oracle Restart

This step should also be performed as the privileged user (root).

# $GRID_HOME/crs/install/roothas.pl

The expected result is "Successfully configured Oracle Grid Infrastructure for a Standalone Server"

3. Add ASM back to Oracle Restart configuration

This step should be performed as the Grid Infrastructure owner (grid user).

$ srvctl add asm

The expected result is no output, just a return to the operating system prompt.

4. Start ASM instance

This step should be performed as the Grid Infrastructure owner (grid user).

$ srvctl start asm

That should start the ASM instance.

Note that at this time there will be no ASM initialization or server parameter file.

5. Recreate ASM server parameter file (SPFILE)

This step should be performed as the Grid Infrastructure owner (grid user).

Create a temporary initialization parameter file (e.g. /tmp/init+ASM.ora) with the content similar to the this (of course, with your own disk group names):

asm_diskgroups='DATA','RECO'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'

Mount the disk group where the new server parameter file (SPFILE) will reside (e.g. DATA) and create the SPFILE:

$ sqlplus / as sysasm

SQL> alter diskgroup DATA mount;

Diskgroup altered.

SQL> create spfile='+DATA' from pfile='/tmp/init+ASM.ora';

File created.

SQL> show parameter spfile

NAME   TYPE   VALUE
------ ------ -------------------------------------------------
spfile string +DATA/asm/asmparameterfile/registry.253.707737977

6. Restart HAS stack

This step should be performed as the Grid Infrastructure owner (grid user).

$ crsctl stop has

$ crsctl start has

7. Add components back to Oracle Restart configuration

Add the database, the listener and other components, back into the Oracle Restart configuration.

7.1. Add database

This step should be performed as RDBMS owner (oracle user).

In 11gR2 the command is:

$ srvctl add database -d db_unique_name -o oracle_home

In 12c the command is:

$ srvctl add database -db db_unique_name -oraclehome oracle_home

7.2. Add listener

This step should be performed as the Grid Infrastructure owner (grid user).

$ srvctl add listener

7.3. Add other components

For information on how to add back additional components in 11gR2 see:
Oracle® Database Administrator's Guide 11g Release 2 (11.2)
Chapter 4 Configuring Automatic Restart of an Oracle Database

For 12c see:
Oracle® Database Administrator's Guide 12c Release 1 (12.1)
Chapter 4 Configuring Automatic Restart of an Oracle Database

Conclusion

As noted earlier, I have published a MOS document on this: How to Reconfigure Oracle Restart - MOS Doc ID 986740.1.