Tag Archives: Snapshot

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.

How to convert snapshot standby to primary

In our test environment we are using flashback technology. This technology afford to us to keep our test servers in the actual state regarding to production server, and the same time give the opportunity for testers make their tests for the new features for our system. We can roll back all changes which has made our testers, and roll forward all new changes which has made on primary server without restore whole database. This is very convenient. Couple days ago my colleague asked me if I can convert snapshot standby to primary without roll back changes which has made on this standby. This is important point, because in a normal way if you want to convert snapshot standby  you have to flashback your database, and roll back all changes. But we can escape this.

Continue reading