Вы находитесь на странице: 1из 5

9/19/2017

12C ASM New feature

12C ASM New feature (Doc ID 1571975.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.1 and later Information in this document applies to any platform.

This document is a discussion of a few 12C ASM new features with examples:

1. Failgroup_repair_time

2. Online disk replace

3. Estimate Work

4. V$ASM_OPERATION view

1. FAILGROUP_REPAIR_TIME

For versions <= 11g, we had disk_repair_time, from 12C onwards we have failgroup_repair_time at the ASM level. Because failure group outages are more likely to be transient in nature and because replacing all the disks in a failure group is a much more expensive operation than replacing a single disk, it would typically make sense for failure groups to have a larger repair time to ensure that all the disks do not get dropped automatically in the event of a failure group outage. By default, the value of this diskgroup level attribute is 24Hours. To set this attribute at ASM diskgroup level, one must set compatible.asm and compatible.rdbms greater than or equal to 11.1.0.0.

T est Case:

## Newly created diskgroup,

SQL> create diskgroup test_failgroup normal redundancy failgroup A disk '/dev/sde2','/dev/sdh2' 2 failgroup B disk '/dev/sdb4','/dev/sdi1'; Diskgroup created. ## Tried to set this attribute on same diskgroup, SQL> alter diskgroup test_failgroup set attribute 'failgroup_repair_time'='3H'; alter diskgroup test_failgroup set attribute 'failgroup_repair_time'='3H'

*

ERROR at line 1:

ORA-15032: not all alterations performed ORA-15242: could not set attribute failgroup_repair_time ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 or higher <<<<<<

## Validated both attribute of this diskgroup,it remained same to support backward compatibilities.

9/19/2017

12C ASM New feature

NAME

COMPATIBILITY

DATABASE_COMPATIBILITY

TEST_FAILGROUP

10.1.0.0.0

10.1.0.0.0

## Changed only compatible.asm

SQL> ALTER DISKGROUP TEST_FAILGROUP SET ATTRIBUTE 'COMPATIBLE.ASM'='11.1.0.0'; Diskgroup altered.

SQL> select NAME ,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup where name='TEST_FAILGROUP';

NAME

COMPATIBILITY

DATABASE_COMPATIBILITY

TEST_FAILGROUP 11.1.0.0.0

SQL> alter diskgroup test_failgroup set attribute 'failgroup_repair_time'='3H'; alter diskgroup test_failgroup set attribute 'failgroup_repair_time'='3H'

*

ERROR at line 1:

ORA-15032: not all alterations performed ORA-15242: could not set attribute failgroup_repair_time ORA-15283: ASM operation requires compatible.rdbms of 11.1.0.0.0 or higher

10.1.0.0.0

## Now set compatible.rdbms to 11.1.0.0

SQL> ALTER DISKGROUP TEST_FAILGROUP SET ATTRIBUTE 'COMPATIBLE.RDBMS'='11.1.0.0'; Diskgroup altered.

SQL> select NAME ,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup where name='TEST_FAILGROUP';

NAME

COMPATIBILITY

DATABASE_COMPATIBILITY

TEST_FAILGROUP

11.1.0.0.0

11.1.0.0.0

## Then tried to set this parameter at diskgroup level

SQL> alter diskgroup test_failgroup set attribute 'failgroup_repair_time'='3H'; Diskgroup altered. ## Validate this change,

SQL> select group_number,name,value from v$asm_attribute where group_number=4 and name like 'failgroup%';

GROUP_NUMBER

NAME

VALUE

4

failgroup_repair_time

3H

2. Online disk replace

If an ASM disk becomes offline and cannot be repaired, administrators need the ability to replace the disk. In versions of ASM prior to 12c, there was no replace command. Rather, administrators had to drop the faulty disk and then add a new one back into the disk group which causes an ASM level rebalance. Depending on multiple internal and external factors, reblance can be time consuming.

In 12c, ASM allows DBAs to simply replace an offline disk using one fast and efficient operation. There is no need for any additional reorganization or rebalancing across the rest of the disk group.

ASM diskgroup level attribute compatible.asm should be of 12.1.0.0 for this feature Replacing disk should bad in true sense , ASM will not replace online disk.

9/19/2017

12C ASM New feature

The replacement disk takes the same name as the original disk and becomes part of the same failure group as the original disk. Then replacing good disk should be sized equal or greater than replacing bad disk.Else replace will fail.

T est case:

## Tried to replace a disk with compatible.asm 10.1.0.0

SQL> alter diskgroup test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdg1'; alter diskgroup test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdg1'

*

ERROR at line 1:

ORA-15032: not all alterations performed ORA-15221: ASM operation requires compatible.asm of 12.1.0.0.0 or higher

## Tried to remove online disk

SQL> alter diskgroup test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdg1'; alter diskgroup test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdg1'

*

ERROR at line 1:

ORA-15032: not all alterations performed ORA-15145: ASM disk 'TEST_FAILGROUP_0002' is online and cannot be replaced.

## To replace this disk ,for testing purpose ,change the permission of that disk .

SQL> !chmod 000 /dev/sdb4 SQL> alter diskgroup test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdg1'; Diskgroup altered. ## From alert log file , Tue Jul 30 12:29:34 2013 GMON updating disk modes for group 4 at 39 for pid 42, osid 9205 NOTE: group TEST_FAILGROUP: updated PST location: disk 0000 (PST copy 0) NOTE: group TEST_FAILGROUP: updated PST location: disk 0003 (PST copy 1) Tue Jul 30 12:29:34 2013 NOTE: PST update grp = 4 completed successfully NOTE: initiating PST update: grp 4 (TEST_FAILGROUP), dsk = 2/0x0, mask = 0x7d, op = assign Tue Jul 30 12:29:34 2013 GMON updating disk modes for group 4 at 40 for pid 42, osid 9205 NOTE: group TEST_FAILGROUP: updated PST location: disk 0000 (PST copy 0) NOTE: group TEST_FAILGROUP: updated PST location: disk 0003 (PST copy 1) Tue Jul 30 12:29:34 2013 NOTE: PST update grp = 4 completed successfully Tue Jul 30 12:29:34 2013 NOTE: Voting File refresh pending for group 4/0x60869f8 (TEST_FAILGROUP) NOTE: Attempting voting file refresh on diskgroup TEST_FAILGROUP Tue Jul 30 12:29:34 2013 SUCCESS: alter diskgroup test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdg1' Tue Jul 30 12:29:34 2013 NOTE: starting rebalance of group 4/0x60869f8 (TEST_FAILGROUP) at power 1 Starting background process ARB0

## Validated that replacing disk is taking same name as old disk

SQL> select name,path,total_mb from v$asm_disk where group_number=4;

NAME

PATH

TEST_FAILGROUP_0003

/dev/sdi1

2541

TOTAL_MB

9/19/2017

12C ASM New feature

TEST_FAILGROUP_0001

/dev/sdh2

2565

TEST_FAILGROUP_0002

/dev/sdg1

2165

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

 

TEST_FAILGROUP_0000

/dev/sde2

2565

## Added disk was lager in size of original disk. But at ASM level only same size allocated as old bad disk.

SQL> select name,path,total_mb,os_mb from v$asm_disk where group_number=4;

NAME

PATH

OS_MB

TOTAL_MB

TEST_FAILGROUP_0003

/dev/sdi1

2541

2541

TEST_FAILGROUP_0001

/dev/sdh2

2565

2565

TEST_FAILGROUP_0002

/dev/sdg1

2165

2541

<<<<<<<<<<<<

TEST_FAILGROUP_0000

/dev/sde2

2565

2565

## Simulate similar type of issue and tried to replace with less sized disk than bad disk. It did not allow replacement

SQL> alter diskgroup Test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdb4'; alter diskgroup Test_failgroup replace disk TEST_FAILGROUP_0002 with '/dev/sdb4'

*

ERROR at line 1:

ORA-15032: not all alterations performed ORA-15408: Replacement disk for 'TEST_FAILGROUP_0002' must be at least 2541 M.

3. Estimate Work

Before 12C, the only way to know how long an expensive operation like disk add/drop at diskgroup level was to actually perform the operation, so there was no way to predict before-hand how much time this would take.

In 12c ASM, a more detailed and more accurate work plan is created at the beginning of each rebalance operation. In addition, DBAs can separately generate and view the work plan before performing a rebalance operation. This allows DBA to better plan and execute various changes such as adding storage, removing storage or moving between different storage systems. DBAs can generate the work plan using the ESTIMATE WORK command.

Querying from V$ASM_ESTIMATE view give an idea of required time of that operation based on current workload on the system. This feature allows DBAs to consider system load implications while planning an operation before actually taxing the system.

Note: be sure to give the correct disk name, otherwise this estimation will fail

## Tried to estimate non-existence disk in a diskgroup

SQL> explain work set statement_id='drop_test_failgroup_0002' for alter diskgroup test_failgroup 2 drop disk test_failgroup_0005; explain work set statement_id='drop_test_failgroup_0005' for alter diskgroup test_failgroup

*

ERROR at line 1:

ORA-15032: not all alterations performed

9/19/2017

12C ASM New feature

ORA-15054: disk "TEST_FAILGROUP_0005" does not exist in diskgroup "TEST_FAILGROUP"

## Now generating estimation

SQL> explain work set statement_id='drop_test_failgroup_0000' for alter diskgroup test_failgroup 2 drop disk test_failgroup_0000; Explained. SQL> select est_work from v$asm_estimate where statement_id='drop_test_failgroup_0000'; EST_WORK

----------

42

4. V$ASM_OPEARATION view

From version 11g onwards, we have a compact phase while rebalancing. While this phase used to run at ASM level for a diskgroup, we cannot estimate compact phase timing approximately. We used to see EST_MINUTES is 0. At the same time we were also not able to track resync operations separately. In 12C, we can view these phases separately from v$asm_operation, giving a better idea about on-going operation based on current utilization of the system.

SQL> SELECT PASS, STATE, EST_MINUTES FROM V$ASM_OPERATION;

PASS

STAT

EST_MINUTES

RESYNC

RUN

1

REBALANCE

WAIT

20

COMPACT

WAIT

2

Things to Check in ASM When Replacing an ONLINE disk from Exadata Storage Cell (Doc ID

1326611.1)

Note---> This informationmation taken from oracle metalink. all copy rights oracle only.

Posted 8th June by Sateesh Kumar

0 Add a comment

Enter your comment

Comment as:

Unknown (Goo

Publish

Preview

Notify me