Tag Archives: ASM

Duplicate database from RAC to Single node

I bet you know how to duplicate database from primary, or read only standby databases. But do you know how to duplicate from active database RAC environment into Single instance node without ASM or any shared file system? It’s really awkward feeling while searching this simple information, because no one mention about it. While you duplicating database from RAC to the Single, you needs to configure controlfile snapshot to the ASM or shared filesystem. If you haven’t any, you need to create some. Fortunately we’ve got very small ASM diskgroup only for ocr and voting files. So we can involve this group to our process.


rman target sys/pass@RO_standby auxiliary sys/pass@AIM_standby

RMAN> configure snapshot controlfile name to '+ocrvt/hostname';
RMAN> duplicate target database for standby from active database nofilenamecheck;

The duplicate process just using this controlfile snapshot for creating normal controlfile in location which mention in the spfile.

ACFS snapshot size

Today I had to know how to find ACFS snapshot size individually. Unfortunately it seems there are no comfortable way to know it. But I found some indirect way.

  • You can use “du” tool

du -lhs /local/.ACFS/snaps/*
8,4G /local/.ACFS/snaps/2E51DA81AB9E4609E05321948C253C38
17G /local/.ACFS/snaps/2F1D951E0D934052E05321948C2587CF
77G /local/.ACFS/snaps/2F1D951E0D964052E05321948C2587CF
97G /local/.ACFS/snaps/2F1D951E0D974052E05321948C2587CF
117G /local/.ACFS/snaps/2F1D951E0D984052E05321948C2587CF
137G /local/.ACFS/snaps/2F1D951E0D994052E05321948C2587CF
157G /local/.ACFS/snaps/2F1D951E0D9A4052E05321948C2587CF
17G /local/.ACFS/snaps/321C75093C79394DE05321948C259F9C
17G /local/.ACFS/snaps/321C75093C7A394DE05321948C259F9C
17G /local/.ACFS/snaps/321C75093C7B394DE05321948C259F9C
17G /local/.ACFS/snaps/321D040845EB1AA6E05321948C253F96
17G /local/.ACFS/snaps/321D040845EC1AA6E05321948C253F96
17G /local/.ACFS/snaps/321D040845ED1AA6E05321948C253F96
17G /local/.ACFS/snaps/321D040845EE1AA6E05321948C253F96
17G /local/.ACFS/snaps/321D040845EF1AA6E05321948C253F96
405G /local/.ACFS/snaps/32452DC651615E85E05321948C25098B

Repeatable size tell us that nothing has changed, or changed not significant related by size. Use “–exclude” if you need that.

The snapshot “2F1D951E0D9A4052E05321948C2587CF” increased.

  • Use “acfsutil info file” for each snapshot to confirm that the offset was changed.

/sbin/acfsutil info file -d /local/.ACFS/snaps/2E51DA81AB9E4609E05321948C253C38
/local/.ACFS/snaps/2E51DA81AB9E4609E05321948C253C38
flags: Directory
inode: 288230376151711746
owner: oracle
group: oinstall
size: 4096 ( 4.00 KB )
allocated: 4096 ( 4.00 KB )
hardlinks: 6
device index: 1
major, minor: 251,185345
access time: Fri Mar 18 12:30:50 2016
modify time: Fri Mar 18 14:19:16 2016
change time: Fri Mar 18 14:19:16 2016
extents:
-offset ----length | -dev --------offset
0 4096 | 1 86016
----current offset | -cur vol offset -mir --extent -device name --------doffset --length -ASMdev
0 | 86016 0 1 ORCL:DISK132 16863232 4096 68
0 | 86016 1 1 ORCL:DISK205 16863232 4096 4
-------------------------------------------------------------------------------------------------


/sbin/acfsutil info file -d /local/.ACFS/snaps/2F1D951E0D9A4052E05321948C2587CF
/local/.ACFS/snaps/2F1D951E0D9A4052E05321948C2587CF
flags: Directory
inode: 2594073385365405698
owner: oracle
group: oinstall
size: 4096 ( 4.00 KB )
allocated: 4096 ( 4.00 KB )
hardlinks: 17
device index: 1
major, minor: 251,185345
access time: Fri Mar 18 12:30:50 2016
modify time: Mon Mar 28 18:20:54 2016
change time: Mon Mar 28 18:20:54 2016
extents:
-offset ----length | -dev --------offset
0 4096 | 1 32382976
----current offset | -cur vol offset -mir --extent -device name --------doffset --length -ASMdev
0 | 32382976 0 13 ORCL:DISK201 20848640 4096 0
0 | 32382976 1 13 ORCL:DISK133 1306001285120 4096 69
-------------------------------------------------------------------------------------------------

The offset has changed.

ASM Fast Rebalance and ADVM volume.

Good after noon everyone. Today I wanna share you how you can increase rebalance speed for ADVM volume if you didn’t know it yet. Since 11g Oracle has new feature by the name “ASM Fast Rebalance”. All you need to achieve this feature is remount your diskgroup which contain ADVM volume in the restricted mode.

SQL>; alter diskgroup data dismount force;

Diskgroup altered.

SQL>; alter diskgroup data mount restricted;

Diskgroup altered.

This restricted mode prevent any connection from RDBMS and cluster agents for ADVM. And it’s eliminate locks extent map during rebalance operations. In my environment with diskgroup which contain 15Tb ADVM volume, rebalance operation in the normal mount state has took 15 hours for ADVM volume plus 5 hours for database files, and 20 hours in total. When I’ve re-mounted diskgroup in the restricted mode rebalance operation has took 4 hours for ADVM volume plus 3 hours for database files, and 7 hours in total. So as you can see ASM Fast Rebalance has increased my rebalance operations in 3 times.

ORA-15196: invalid ASM block header. Continued investigation.

Hey fellas. As you know from previous article, I’ve got the error around ASM block header. Which I also tried to solve with scrubbing mechanism which has appeared in 12c Oracle. You know this mechanism is working well, but only one’s you need to know, you must have at least one type of block (primary or mirror) in correct state, and then the scrubbing mechanism can afford to save your data. But not in my situation which I’ve described in previous article.

Continue reading

Useful environment variable for asmcmd debugging


$ export DBI_TRACE=1

ASMCMD> ls -l data
<- prepare('/* ASMCMD */ select to_char(current_date, 'J') "JULIAN_DATE" from dual')= ( DBI::st=HASH(0x1ed2c48) ) [1 items] at asmcmdshare.pm line 3256
<- execute= ( '0E0' ) [1 items] at asmcmdshare.pm line 3461
<- fetchrow_hashref= ( HASH(0x1f3fa68)1keys ) [1 items] row1 at asmcmdshare.pm line 3282
<- finish= ( 1 ) [1 items] at asmcmdshare.pm line 3303
<- DESTROY(DBI::st=HASH(0xa24e00))= ( undef ) [1 items] at asmcmdbase.pm line 1130
<- prepare('/* ASMCMD */ select group_number, state from v$asm_diskgroup_stat where name='DATA'')= ( DBI::st=HASH(0x1ecc8b0) ) [1 items] at asmcmdshare.pm line 3256
<- execute= ( '0E0' ) [1 items] at asmcmdshare.pm line 3461
<- fetchrow_hashref= ( HASH(0x1ecc6b8)2keys ) [1 items] row1 at asmcmdshare.pm line 3282
<- finish= ( 1 ) [1 items] at asmcmdshare.pm line 3303
<- DESTROY(DBI::st=HASH(0x1f3f5d0))= ( undef ) [1 items] at asmcmdshare.pm line 1744
<- prepare('/* ASMCMD */ select name,
group_number,
file_number,
reference_index,
parent_index,
alias_directory,
system_created
from v$asm_alias where group_number=1 and parent_index=16777216')= ( DBI::st=HASH(0x1ecc598) ) [1 items] at asmcmdshare.pm line 3256
<- execute= ( '0E0' ) [1 items] at asmcmdshare.pm line 3461
<- fetchrow_hashref= ( HASH(0x1ec81f8)7keys ) [1 items] row1 at asmcmdshare.pm line 3282
<- fetchrow_hashref= ( undef ) [1 items] row3 at asmcmdshare.pm line 3282
<- finish= ( 1 ) [1 items] at asmcmdshare.pm line 3303
<- DESTROY(DBI::st=HASH(0x1ecc8c8))= ( undef ) [1 items] at asmcmdbase.pm line 2311
Type Redund Striped Time Sys Name
Y CLONE1H/
N CLONE1H.backup/
N test/