SlideShare a Scribd company logo
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
ACFS Replication as of 12.2
Mathias Zarick, Regensdorf, Techevent September 2017
Agenda – ACFS Replication as of 12.2
ACFS Replication as of 12.22 9/15/2017
1. Retrospect 11.2 to 12.1
2. Grid Infrastructure 12.2
3. ACFS Replication 12.2
ACFS Replication as of 12.23 9/15/2017
Retrospect 11.2 to 12.1
ACFS – part of Grid Infrastructure
ACFS Replication as of 12.24 9/15/2017
- Available as of 11.2.0.1 as a general purpose cluster filesystem, based on ASM
- In ASM disk groups automatic dynamic volumes (ADVM) are created
- On those block devices an ACFS filesystem is created (special kernel modules)
ASM Disk Group
grid@red:~/ [+ASM1] ls -l /dev/asm/*
brwxrwx--- 1 root asmadmin 252, 67073 Mar 21 12:37 /dev/asm/clusterfs-131
grid@red:~/ [+ASM1] mount | grep clusterfs
/dev/asm/clusterfs-131 on /u00/app/oracle/clusterfs type acfs (rw)
ADVM - CLUSTERFS
ACFS History till 12.1
ACFS Replication as of 12.25 9/15/2017
Sep2009: Introduction with 11.2.0.1 – read only snapshots
At that time: “Oracle Cloud File System” license if used for application data
Sep2010: 11.2.0.2 brought ACFS replication, tagging, security, encryption
Changed conditions: License only needed if using such “higher” features
Sep2011: 11.2.0.3 – read write snapshots, backup pieces and data pump dumps
supported
Jun2013: 12.1.0.1 all kinds of db files supported to be stored on ACFS (default on
ODA)
Aug2013: 11.2.0.4 no ACFS enhancements
Sep2014: License not needed any more / product does not exist any more
Jul2014: 12.1.0.2 ACFS support on Exadata
Licenses as of 2017 – 12.2 License Guide
ACFS Replication as of 12.26 9/15/2017
The product “Oracle Cloud File System” does not exist anymore
If used for non db files no license is needed
If used for db files an Oracle database EE license is needed only in case snapshots
are used
ACFS auditing, encryption, replication, security not available for the use with db files
Support for ACFS is only provided if server operates with any Oracle product, which
is under contract, e.g. Oracle database, Oracle Linux, Solaris
ACFS Replication till 12.1
ACFS Replication as of 12.27 9/15/2017
Primary and standby file systems (only 1 standby is supported)
File system changes and captured and recorded in files called replication logs
(visible on .ACFS/repl subdirectory)
Logs are transported via Oracle Net (dbms_backup_restore.networkFileTransfer)
CRS background processes take care of transport, apply and monitor actions
Only between clusters – Oracle Restart not supported (Workaround: use 1-node
clusters)
No support in conjunction with encryption or security features
ACFS Replication Setup 12.1.0.2 (1)
ACFS Replication as of 12.28 9/15/2017
ASM disk group with ‘compatible.asm’ and ‘compatible.advm’ set to 11.2.0.3 or higher
Setup is typically performed by grid user, certain steps are performed by root
Optional: create replication user in ASM instance with sysdba and sysasm privileges
tnsnames.ora entries:
# ACFS replication, italy is SCAN name
# service name ACFS_IMAGES_FS is not yet registered
ACFS_IMAGES_FS_ITALY.trivadistraining.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = italy)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ACFS_IMAGES_FS)
)
)
ACFS Replication with Wallets ?
ACFS Replication as of 12.213 9/15/2017
By default: password of replication or sys user is stored in OCR and used during
Oracle Net transportation (by dbms_backup_restore) for authentication
As of docs it should be possible to better hide the password in a wallet, secure
external password store
It never worked (at least for me), worked on several SRs without success
ACFS Replication as of 12.214 9/15/2017
Grid Infrastructure 12.2
Some General Words about the New Version
ACFS Replication as of 12.215 9/15/2017
For RAC-RDBMS homes you should have a new group (e.g. racdba) for new
OSRAC system privileges group.
Members – typically user oracle – get the new SYSRAC administrative privilege,
which is used by oraagent (not SYSDBA anymore, least privileges principle)
Flex ASM is mandatory, even on NFS !!!
No cluster without ASM anymore – at least for standalone clusters.
Image based installation: unpack, then patch, then configure
You can separate disk groups for OCR and Voting (+GRID) and for GIMR (+MGMT)
At least 36 GB usable space for +MGMT – better more
Grid Infrastructure Installation 12.2
ACFS Replication as of 12.216 9/15/2017
Unpack, patch and start configuration
# as grid
unzip /u02/stage/V840012-01.zip -d /u00/app/grid/product/12.2.0.1
cd /u00/app/grid/product/12.2.0.1
rm -rf OPatch
unzip /u02/stage/p6880880_121010_Linux-x86-64.zip # OPatch update
./gridSetup.sh -applyPSU /u02/stage/26133434/ # Revision up. Jul 2017
./gridSetup.sh -applyOneOffs ... # if needed
./gridSetup.sh
Annoying Bug in GI 12.2
ACFS Replication as of 12.217 9/15/2017
When running root.sh it configures the cluster. Sure, but why it takes ages …?
First run took 46 min, would have taken even longer if I did not interfere
Second run on same hardware with special approach (see below) took 16 min.
Problem is bug 25717212 in CHM component, gdb processes eat up all CPU
Workaround:
“Unexpected clusterware crashes ... 12.2 Grid Infrastructure” (Doc ID 2251437.1)
“12.2 Grid Infrastructure .. Upgrade steps … Exadata …” (Doc ID 2111010.1)
# during step "Executing installation step 18 of 19: 'ConfigNode'"
<GRID_HOME>/bin/oclumon manage -disable diagsnap
killall gdb
ACFS Replication as of 12.218 9/15/2017
ACFS Replication 12.2
Fundamental Architecture Change
ACFS Replication as of 12.219 9/15/2017
Replication is still asynchronous and is now based on
– Snapshots
– Ability to capture and apply differences between snapshots
– SSH (also on Windows – another “how to install Cygwin guide” in Oracle’s docs )
so the traffic it is definitely encrypted
Interesting part from docs:
A primary site running Linux, Solaris or AIX can replicate to a standby site running
any of those operating systems. A primary site running Windows can replicate only to
a standby site running Windows.
Still only one standby file system supported
Tags for subset replication are still supported
Snapshot Based Replication (1)
ACFS Replication as of 12.220 9/15/2017
Primary file system
Standby file system
Last snapshots on both file systems represent same contents of data (with exception
of not replicated data of course, see tagging)
t1
t1
Snapshot Based Replication (2)
ACFS Replication as of 12.221 9/15/2017
Primary file system
Standby file system
Create a new snapshot t2 on primary site
t1
t1
t2
Snapshot Based Replication (3)
ACFS Replication as of 12.222 9/15/2017
Primary file system
Standby file system
Extract the data changes between t2 and t1, a so called snapshot duplication stream
t1
t1
t2
𝑑𝑎𝑡𝑎 𝑡2 − 𝑡1 = 𝑓(𝑑𝑎𝑡𝑎 𝑡1 , 𝑑𝑎𝑡𝑎 𝑡2 )
Snapshot Based Replication (4)
ACFS Replication as of 12.223 9/15/2017
Primary file system
Standby file system
Snapshot duplication stream is applied to standby file systems,
t1 snapshot is referenced, t2 snapshot is the result
t1
t1
t2
t2
ACFS Replication Setup 12.2 (1)
ACFS Replication as of 12.224 9/15/2017
ASMCA supports creation of disk groups and ACFS, but for the actual replication
setup command line is used
Create a disk group with ‘compatible.asm’ and ‘compatible.advm’ set to at least 12.2
Setup is basically the same, few differences regarding used parameters
– Create an replication apply user on OS (repluser)
– Exchange ssh keys between root on primary and repluser on standby (also in
other direction in case role changes are planned)
– Create volume and file system on both clusters
– Initialize replication on standby then on primary
ACFS Replication Setup 12.2 (2)
ACFS Replication as of 12.225 9/15/2017
Repluser needs to have OSASM right by OS group (typically asmadmin)
Generate ssh keys for root user on all primary cluster nodes and insert all public
keys of those in ~repluser/.ssh/authorized_keys on all standby nodes (docs claim we
should use authorized_keys2, but this is not working in recent version of SSH
anymore)
Root on primary needs to be able to logon as repluser on standby without password
Test all connections to produce .ssh/know_hosts entries, also use (SCAN) VIPs
# useradd -g oinstall -G oinstall,asmadmin,asmdba,asmoper -u 700 repluser
[root@zam101 ~]# ssh repluser@zam102
ACFS Replication Setup 12.2 (3)
ACFS Replication as of 12.226 9/15/2017
Validation as root, I use SCAN here, known_hosts file is extended by this call if needed
Or simply
It is comfortable (I would say even recommended) if all nodes in a cluster share the
same SSH host keys, else this will happen after a VIP moves to other cluster node
To set this up copy over /etc/ssh/ssh_host* files and restart sshd
acfsutil repl info -c -v -u repluser cluster102 /u00/app/grid/acfsmounts/images_fs
A valid 'ssh' connection was detected for standby node cluster102 as user repluser.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
ssh -o StrictHostKeyChecking=no repluser@cluster102
ACFS Replication Setup 12.2 (4)
ACFS Replication as of 12.227 9/15/2017
Docs: consider to lower sshd log level not to flood your syslog
Oracle recommend to set it to ERROR, default is INFO
– On a RHEL7 / OL7 this does not change anything, as systemd logs user sessions
– There is a workaround: create a discard filter with rsyslog (see notes)
– See https://access.redhat.com/solutions/1564823
ACFS Replication Setup 12.2 (5)
ACFS Replication as of 12.228 9/15/2017
File system setup as usual – grid user
+APX instances with 1G memory target are started on all nodes in cluster, which
mount the ACFS
asmcmd volcreate -G ACFS -s 100G images_fs
sudo /sbin/mkfs -t acfs /dev/asm/images_fs-*
sudo srvctl add filesystem -device /dev/asm/images_fs-* 
-path /u00/app/grid/acfsmounts/images_fs -user grid,oracle
srvctl start filesystem -device /dev/asm/images_fs-*
ACFS Replication Setup 12.2 (6)
ACFS Replication as of 12.229 9/15/2017
Unmount file systems on both sides on all but one node
Again first the standby is initialized
Then primary, here you can configure with “acfsutil repl init primary”
– A refresh interval or constant mode (-i or -C)
– Compression vs. no compression (-z on or -z off)
– Tags
– Debug level (default is 3)
– Some ssh options
sudo acfsutil repl init standby -u repluser 
/u00/app/grid/acfsmounts/images_fs
ACFS Replication Setup 12.2 (7)
ACFS Replication as of 12.230 9/15/2017
Example with tag “image_data”, compression (-z) and constant mode (-C)
Example without tag and 2 hours refresh interval (-i)
File system mount point is referenced twice (source, target), because it is allowed to
be different on both clusters
Now mount the file systems on other nodes
sudo acfsutil repl init primary -C -s repluser@cluster102 
-m /u00/app/grid/acfsmounts/images_fs -z on image_data 
-o sshStrictKey=n /u00/app/grid/acfsmounts/images_fs
sudo acfsutil repl init primary -i 2h -s repluser@cluster102 
-o sshStrictKey=n -m /u00/app/grid/acfsmounts/images_fs 
/u00/app/grid/acfsmounts/images_fs
ACFS Replication Resource
ACFS Replication as of 12.231 9/15/2017
In CRS there is 1 new resource (former architecture: 3 on primary, 4 on standby)
Log on primary (quite silent in debug level 0,1, more details starting with 2)
Logs on standby (one per sync, has its own debug level defined)
acfsutil repl bg info /u00/app/grid/acfsmounts/images_fs
Resource: ora.repl.dupd.acfs.images_fs.acfs
Target State: ONLINE
Current State: ONLINE on zam101
<ORACLE_BASE>/diag/crs/<hostname>/crs/trace/sdapply_<pid>.trc
<ORACLE_BASE>/diag/crs/<hostname>/crs/trace/acfsdupd_images_fs-117.trc
This is What Happens During Sync
ACFS Replication as of 12.232 9/15/2017
1. create snapshot, 2. extract duplication stream and apply it, 3.delete snapshot
acfsutil snap create -r -R -S REPL_BASEFS_1501851997 
/u00/app/grid/acfsmounts/images_fs
acfsutil snap dup create -R -i REPL_BASEFS_1501851476 
REPL_BASEFS_1501851997 /u00/app/grid/acfsmounts/images_fs | 
ssh -o BatchMode=true -o StrictHostKeyChecking=no 
-o Ciphers=aes128-ctr -x repluser@cluster102 
acfsutil snap dup apply -R -b '/u00/app/grid/acfsmounts/images_fs'
acfsutil snap delete -R -S REPL_BASEFS_1501851476
/u00/app/grid/acfsmounts/images_fs
UNIX
times
STDOUT is piped
as STDIN to
remote command
Some Explanations and Considerations
ACFS Replication as of 12.233 9/15/2017
-R and -S for snapshot creation and deletion are not documented, my assumption
– -R means “special snapshot for replication purposes”
– -S silent, no output during snapshot creation
“snap dup create|apply” are documented and can be used for similar purposes also
on our own (on same server/cluster but different file system(s), from/to several local
or remote file systems, …),
create writes to STDOUT, apply reads from STDIN
-b option of apply creates a backup snapshot on standby, e.g.
SDBACKUP_1503568991_REPL_BASEFS_1503568962
which represents same contents as the corresponding snapshot on primary, e.g.
REPL_BASEFS_1503568962
If you enable compression this leads to SSH compression (-C option)
Manual and Automatic Sync
ACFS Replication as of 12.234 9/15/2017
Manual sync
acfsutil repl sync /u00/app/grid/acfsmounts/images_fs
primary ACFS changed
since last refresh
noop or
sleep a
second
no
current time – last refresh
> configured interval
yes
no
sync
yes
Constant mode
– means that
interval is 0
– file system
with
permanent
write IO 
endless sync
loop
sleep
until X
Interval mode
More Facts about Snapshot Duplication Streams
ACFS Replication as of 12.235 9/15/2017
An empty ACFS file system (freshly formatted) can be target of a complete sync of
any source ACFS file system
Afterwards only incremental applies (from snapshot to snapshot) are allowed
The target file system must not be manipulated, no IO writes at all! If you want to
allow subsequent incremental syncs
– Manual approach: no safeguard against this
– Regular replication: IO writes are not allowed by ACFS kernel modules on standby
– As of documentation a remaster to former snapshot should allow continuation of
syncs, but in my tests … it did not work
-b option should be used to know the currentness of target file system
More Facts about ACFS and ACFS Replication
ACFS Replication as of 12.236 9/15/2017
Standby file system is read only
Regular replication uses a backup snapshot at standby file system
You can create additional custom snapshots (read only or read write) – also on the
standby file system for testing workloads (like a snapshot standby)
Information about ACFS file systems can be queried (via proxy instance +APX..)
– v$asm_acfsvolumes
– v$asm_filesystem
– v$asm_acfssnapshots
– v$asm_acfsrepl (only useful for former architecture)
– v$asm_acfstag
ACFS Replication – Operation (1)
ACFS Replication as of 12.237 9/15/2017
Checks
Comparison on primary – standby must be mounted locally, e.g. nfs
Resize – volume and file system is increased (5 times if compatible.advm < 11.2.0.4)
acfsutil repl info -c /u00/app/grid/acfsmounts/images_fs
acfsutil repl bg info /u00/app/grid/acfsmounts/images_fs
acfsutil repl compare /u00/app/grid/acfsmounts/images_fs /nfs/images_fs
acfsutil size +10G /u00/app/grid/acfsmounts/images_fs
ACFS Replication – Operation (2)
ACFS Replication as of 12.238 9/15/2017
Snapshots status
Replication status
IO changes on file system per time? Which bandwidth is needed?
Upgrade from old replication?
– After cluster is upgraded, replication is still old style
– Either terminate and rebuild or use “acfsutil repl upgrade”
acfsutil snap info /u00/app/grid/acfsmounts/images_fs
acfsutil repl info -c /u00/app/grid/acfsmounts/images_fs
acfsutil info fs -s /u00/app/grid/acfsmounts/images_fs
ACFS Replication – Role Changes?
ACFS Replication as of 12.239 9/15/2017
No fully integrated operations for switchover or failover
Failover is like this
Switchover like this
– Stop IO on primary
– Last sync
– Terminate replication on both sides
– Setup replication in the other direction (complete sync)
sudo acfsutil repl terminate standby /u00/app/grid/acfsmounts/images_fs
Use Cases?
ACFS Replication as of 12.240 9/15/2017
High availability for database with external files, e.g. BFILES
– Data Guard (database) + ACFS replication (ext. files) (better performance) or
– Data Guard + DBFS for files (better consistency)
HA for application file systems (cross platform)
HA for GoldenGate trail files
Can be useful for deployment/cloning methods for application file systems (cross
platform)
ACFS Replication – Conclusion
ACFS Replication as of 12.241 9/15/2017
Fundamental change in architecture
Platforms can be mixed (but
Windows stays an island)
Not only automatic replication, sync
mechanisms can be used for
custom deployment tasks
Uncertain about synchronicity on file
systems with high IO utilization
DBFS is an alternative solution in case
you need more consistency and
synchronicity between database and file
system
No support for database files  !
ACFS Replication as of 12.242 9/15/2017
Further information …
Oracle © Automatic Storage Management Administrator's Guide 12c Release 2 (12.2)
http://docs.oracle.com/database/122/OSTMG/understand-acfs-admin.htm
http://docs.oracle.com/database/122/OSTMG/configure-acfs-replication.htm
Questions and answers …
Mathias Zarick
Mathias.Zarick@trivadis.com
9/15/2017 ACFS Replication as of 12.243
Session Feedback – now
Please use the Trivadis Events mobile app to give feedback on each session
Use "My schedule" if you have registered for a session
Otherwise use "Agenda" and the search function
If the mobile app does not work (or if you have a Windows smartphone), use your
smartphone browser
– URL: http://trivadis.quickmobileplatform.eu/
– User name: <your_loginname> (such as "svv")
– Password: sent by e-mail...
9/15/2017 ACFS Replication as of 12.244

More Related Content

PDF
SnapDiff
PDF
Your first dive into systemd!
PDF
제2회난공불락 오픈소스 세미나 커널튜닝
PDF
Difference between cluster image package show-repository and system image get
PDF
Building a Two Node SLES 11 SP2 Linux Cluster with VMware
PPTX
Storage spaces direct webinar
PPT
SnapDiff
Your first dive into systemd!
제2회난공불락 오픈소스 세미나 커널튜닝
Difference between cluster image package show-repository and system image get
Building a Two Node SLES 11 SP2 Linux Cluster with VMware
Storage spaces direct webinar

What's hot (20)

PDF
Linux High Availability Overview - openSUSE.Asia Summit 2015
PDF
SUSE Expert Days Paris 2018 - SUSE HA Cluster Multi-Device
PDF
Exch2007 sp1 win2008
PDF
quickguide-einnovator-10-redis-admin
PDF
Cgroup resource mgmt_v1
PDF
systemd
PDF
Oracle database might have problems with stale NFSv3 locks upon restart
PDF
Full system roll-back and systemd in SUSE Linux Enterprise 12
PDF
Lavigne bsdmag apr13
PDF
LISA15: systemd, the Next-Generation Linux System Manager
PDF
Scale2014
PDF
Percona xtrabackup - MySQL Meetup @ Mumbai
PDF
Containers with systemd-nspawn
PDF
Docker and coreos20141020b
PDF
Linux clustering solution
ODP
Linux26 New Features
PPTX
RAC-Installing your First Cluster and Database
PDF
제4회 한국IBM과 함께하는 난공불락 오픈소스 인프라 세미나-Asible
PPT
Xenalyze: Finding meaning in the chaos
PDF
Linux con europe_2014_f
Linux High Availability Overview - openSUSE.Asia Summit 2015
SUSE Expert Days Paris 2018 - SUSE HA Cluster Multi-Device
Exch2007 sp1 win2008
quickguide-einnovator-10-redis-admin
Cgroup resource mgmt_v1
systemd
Oracle database might have problems with stale NFSv3 locks upon restart
Full system roll-back and systemd in SUSE Linux Enterprise 12
Lavigne bsdmag apr13
LISA15: systemd, the Next-Generation Linux System Manager
Scale2014
Percona xtrabackup - MySQL Meetup @ Mumbai
Containers with systemd-nspawn
Docker and coreos20141020b
Linux clustering solution
Linux26 New Features
RAC-Installing your First Cluster and Database
제4회 한국IBM과 함께하는 난공불락 오픈소스 인프라 세미나-Asible
Xenalyze: Finding meaning in the chaos
Linux con europe_2014_f
Ad

Similar to Trivadis TechEvent 2017 ACFS Replication as of 12 2 by Mathias Zarick (20)

PDF
E-Business Suite Rapid Provisioning Using Latest Features Of Oracle Database 12c
PPTX
Using ACFS as a Storage for EBS
PPTX
Oracle cloud storage and file system
PPT
Distributed File Systems
PDF
LinuxTag2012 Rear
PDF
gDBClone - Database Clone “onecommand Automation Tool”
PPTX
Oracle acfs in oracle 11
PDF
Linuxkongress2010.gfs2ocfs2.talk
ODP
Gluster 3.3 deep dive
POT
Kosmos Filesystem
PPT
Presentation on nfs,afs,vfs
PDF
openbsd-as-nas.pdf
ODP
How we setup Rsync-powered Incremental Backups
PPT
Gfs google-file-system-13331
PDF
AFS case study
PPTX
Oracle ACFS High Availability NFS Services (HANFS)
PPT
Solaris 10 administration 2 Configuring NFS
PDF
Oracle ACFS High Availability NFS Services (HANFS) Part-I
PDF
OpenNebulaConf 2014 - OpenNebula and MooseFS for disaster recovery_real cloud...
PDF
OpenNebula Conf 2014 | OpenNebula and MooseFS for disaster recovery: real clo...
E-Business Suite Rapid Provisioning Using Latest Features Of Oracle Database 12c
Using ACFS as a Storage for EBS
Oracle cloud storage and file system
Distributed File Systems
LinuxTag2012 Rear
gDBClone - Database Clone “onecommand Automation Tool”
Oracle acfs in oracle 11
Linuxkongress2010.gfs2ocfs2.talk
Gluster 3.3 deep dive
Kosmos Filesystem
Presentation on nfs,afs,vfs
openbsd-as-nas.pdf
How we setup Rsync-powered Incremental Backups
Gfs google-file-system-13331
AFS case study
Oracle ACFS High Availability NFS Services (HANFS)
Solaris 10 administration 2 Configuring NFS
Oracle ACFS High Availability NFS Services (HANFS) Part-I
OpenNebulaConf 2014 - OpenNebula and MooseFS for disaster recovery_real cloud...
OpenNebula Conf 2014 | OpenNebula and MooseFS for disaster recovery: real clo...
Ad

More from Trivadis (20)

PDF
Azure Days 2019: Azure Chatbot Development for Airline Irregularities (Remco ...
PDF
Azure Days 2019: Trivadis Azure Foundation – Das Fundament für den ... (Nisan...
PDF
Azure Days 2019: Business Intelligence auf Azure (Marco Amhof & Yves Mauron)
PDF
Azure Days 2019: Master the Move to Azure (Konrad Brunner)
PDF
Azure Days 2019: Keynote Azure Switzerland – Status Quo und Ausblick (Primo A...
PDF
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
PDF
Azure Days 2019: Get Connected with Azure API Management (Gerry Keune & Stefa...
PDF
Azure Days 2019: Infrastructure as Code auf Azure (Jonas Wanninger & Daniel H...
PDF
Azure Days 2019: Wie bringt man eine Data Analytics Plattform in die Cloud? (...
PDF
Azure Days 2019: Azure@Helsana: Die Erweiterung von Dynamics CRM mit Azure Po...
PDF
TechEvent 2019: Kundenstory - Kein Angebot, kein Auftrag – Wie Du ein individ...
PDF
TechEvent 2019: Oracle Database Appliance M/L - Erfahrungen und Erfolgsmethod...
PDF
TechEvent 2019: Security 101 für Web Entwickler; Roland Krüger - Trivadis
PDF
TechEvent 2019: Trivadis & Swisscom Partner Angebote; Konrad Häfeli, Markus O...
PDF
TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
PDF
TechEvent 2019: Status of the partnership Trivadis and EDB - Comparing Postgr...
PDF
TechEvent 2019: More Agile, More AI, More Cloud! Less Work?!; Oliver Dörr - T...
PDF
TechEvent 2019: Kundenstory - Vom Hauptmann zu Köpenick zum Polizisten 2020 -...
PDF
TechEvent 2019: Vom Rechenzentrum in die Oracle Cloud - Übertragungsmethoden;...
PDF
TechEvent 2019: The sleeping Power of Data; Eberhard Lösch - Trivadis
Azure Days 2019: Azure Chatbot Development for Airline Irregularities (Remco ...
Azure Days 2019: Trivadis Azure Foundation – Das Fundament für den ... (Nisan...
Azure Days 2019: Business Intelligence auf Azure (Marco Amhof & Yves Mauron)
Azure Days 2019: Master the Move to Azure (Konrad Brunner)
Azure Days 2019: Keynote Azure Switzerland – Status Quo und Ausblick (Primo A...
Azure Days 2019: Grösser und Komplexer ist nicht immer besser (Meinrad Weiss)
Azure Days 2019: Get Connected with Azure API Management (Gerry Keune & Stefa...
Azure Days 2019: Infrastructure as Code auf Azure (Jonas Wanninger & Daniel H...
Azure Days 2019: Wie bringt man eine Data Analytics Plattform in die Cloud? (...
Azure Days 2019: Azure@Helsana: Die Erweiterung von Dynamics CRM mit Azure Po...
TechEvent 2019: Kundenstory - Kein Angebot, kein Auftrag – Wie Du ein individ...
TechEvent 2019: Oracle Database Appliance M/L - Erfahrungen und Erfolgsmethod...
TechEvent 2019: Security 101 für Web Entwickler; Roland Krüger - Trivadis
TechEvent 2019: Trivadis & Swisscom Partner Angebote; Konrad Häfeli, Markus O...
TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
TechEvent 2019: Status of the partnership Trivadis and EDB - Comparing Postgr...
TechEvent 2019: More Agile, More AI, More Cloud! Less Work?!; Oliver Dörr - T...
TechEvent 2019: Kundenstory - Vom Hauptmann zu Köpenick zum Polizisten 2020 -...
TechEvent 2019: Vom Rechenzentrum in die Oracle Cloud - Übertragungsmethoden;...
TechEvent 2019: The sleeping Power of Data; Eberhard Lösch - Trivadis

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
A Presentation on Artificial Intelligence
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Chapter 3 Spatial Domain Image Processing.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
A Presentation on Artificial Intelligence
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
The AUB Centre for AI in Media Proposal.docx
NewMind AI Weekly Chronicles - August'25 Week I
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

Trivadis TechEvent 2017 ACFS Replication as of 12 2 by Mathias Zarick

  • 1. BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH ACFS Replication as of 12.2 Mathias Zarick, Regensdorf, Techevent September 2017
  • 2. Agenda – ACFS Replication as of 12.2 ACFS Replication as of 12.22 9/15/2017 1. Retrospect 11.2 to 12.1 2. Grid Infrastructure 12.2 3. ACFS Replication 12.2
  • 3. ACFS Replication as of 12.23 9/15/2017 Retrospect 11.2 to 12.1
  • 4. ACFS – part of Grid Infrastructure ACFS Replication as of 12.24 9/15/2017 - Available as of 11.2.0.1 as a general purpose cluster filesystem, based on ASM - In ASM disk groups automatic dynamic volumes (ADVM) are created - On those block devices an ACFS filesystem is created (special kernel modules) ASM Disk Group grid@red:~/ [+ASM1] ls -l /dev/asm/* brwxrwx--- 1 root asmadmin 252, 67073 Mar 21 12:37 /dev/asm/clusterfs-131 grid@red:~/ [+ASM1] mount | grep clusterfs /dev/asm/clusterfs-131 on /u00/app/oracle/clusterfs type acfs (rw) ADVM - CLUSTERFS
  • 5. ACFS History till 12.1 ACFS Replication as of 12.25 9/15/2017 Sep2009: Introduction with 11.2.0.1 – read only snapshots At that time: “Oracle Cloud File System” license if used for application data Sep2010: 11.2.0.2 brought ACFS replication, tagging, security, encryption Changed conditions: License only needed if using such “higher” features Sep2011: 11.2.0.3 – read write snapshots, backup pieces and data pump dumps supported Jun2013: 12.1.0.1 all kinds of db files supported to be stored on ACFS (default on ODA) Aug2013: 11.2.0.4 no ACFS enhancements Sep2014: License not needed any more / product does not exist any more Jul2014: 12.1.0.2 ACFS support on Exadata
  • 6. Licenses as of 2017 – 12.2 License Guide ACFS Replication as of 12.26 9/15/2017 The product “Oracle Cloud File System” does not exist anymore If used for non db files no license is needed If used for db files an Oracle database EE license is needed only in case snapshots are used ACFS auditing, encryption, replication, security not available for the use with db files Support for ACFS is only provided if server operates with any Oracle product, which is under contract, e.g. Oracle database, Oracle Linux, Solaris
  • 7. ACFS Replication till 12.1 ACFS Replication as of 12.27 9/15/2017 Primary and standby file systems (only 1 standby is supported) File system changes and captured and recorded in files called replication logs (visible on .ACFS/repl subdirectory) Logs are transported via Oracle Net (dbms_backup_restore.networkFileTransfer) CRS background processes take care of transport, apply and monitor actions Only between clusters – Oracle Restart not supported (Workaround: use 1-node clusters) No support in conjunction with encryption or security features
  • 8. ACFS Replication Setup 12.1.0.2 (1) ACFS Replication as of 12.28 9/15/2017 ASM disk group with ‘compatible.asm’ and ‘compatible.advm’ set to 11.2.0.3 or higher Setup is typically performed by grid user, certain steps are performed by root Optional: create replication user in ASM instance with sysdba and sysasm privileges tnsnames.ora entries: # ACFS replication, italy is SCAN name # service name ACFS_IMAGES_FS is not yet registered ACFS_IMAGES_FS_ITALY.trivadistraining.com = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = italy)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ACFS_IMAGES_FS) ) )
  • 9. ACFS Replication with Wallets ? ACFS Replication as of 12.213 9/15/2017 By default: password of replication or sys user is stored in OCR and used during Oracle Net transportation (by dbms_backup_restore) for authentication As of docs it should be possible to better hide the password in a wallet, secure external password store It never worked (at least for me), worked on several SRs without success
  • 10. ACFS Replication as of 12.214 9/15/2017 Grid Infrastructure 12.2
  • 11. Some General Words about the New Version ACFS Replication as of 12.215 9/15/2017 For RAC-RDBMS homes you should have a new group (e.g. racdba) for new OSRAC system privileges group. Members – typically user oracle – get the new SYSRAC administrative privilege, which is used by oraagent (not SYSDBA anymore, least privileges principle) Flex ASM is mandatory, even on NFS !!! No cluster without ASM anymore – at least for standalone clusters. Image based installation: unpack, then patch, then configure You can separate disk groups for OCR and Voting (+GRID) and for GIMR (+MGMT) At least 36 GB usable space for +MGMT – better more
  • 12. Grid Infrastructure Installation 12.2 ACFS Replication as of 12.216 9/15/2017 Unpack, patch and start configuration # as grid unzip /u02/stage/V840012-01.zip -d /u00/app/grid/product/12.2.0.1 cd /u00/app/grid/product/12.2.0.1 rm -rf OPatch unzip /u02/stage/p6880880_121010_Linux-x86-64.zip # OPatch update ./gridSetup.sh -applyPSU /u02/stage/26133434/ # Revision up. Jul 2017 ./gridSetup.sh -applyOneOffs ... # if needed ./gridSetup.sh
  • 13. Annoying Bug in GI 12.2 ACFS Replication as of 12.217 9/15/2017 When running root.sh it configures the cluster. Sure, but why it takes ages …? First run took 46 min, would have taken even longer if I did not interfere Second run on same hardware with special approach (see below) took 16 min. Problem is bug 25717212 in CHM component, gdb processes eat up all CPU Workaround: “Unexpected clusterware crashes ... 12.2 Grid Infrastructure” (Doc ID 2251437.1) “12.2 Grid Infrastructure .. Upgrade steps … Exadata …” (Doc ID 2111010.1) # during step "Executing installation step 18 of 19: 'ConfigNode'" <GRID_HOME>/bin/oclumon manage -disable diagsnap killall gdb
  • 14. ACFS Replication as of 12.218 9/15/2017 ACFS Replication 12.2
  • 15. Fundamental Architecture Change ACFS Replication as of 12.219 9/15/2017 Replication is still asynchronous and is now based on – Snapshots – Ability to capture and apply differences between snapshots – SSH (also on Windows – another “how to install Cygwin guide” in Oracle’s docs ) so the traffic it is definitely encrypted Interesting part from docs: A primary site running Linux, Solaris or AIX can replicate to a standby site running any of those operating systems. A primary site running Windows can replicate only to a standby site running Windows. Still only one standby file system supported Tags for subset replication are still supported
  • 16. Snapshot Based Replication (1) ACFS Replication as of 12.220 9/15/2017 Primary file system Standby file system Last snapshots on both file systems represent same contents of data (with exception of not replicated data of course, see tagging) t1 t1
  • 17. Snapshot Based Replication (2) ACFS Replication as of 12.221 9/15/2017 Primary file system Standby file system Create a new snapshot t2 on primary site t1 t1 t2
  • 18. Snapshot Based Replication (3) ACFS Replication as of 12.222 9/15/2017 Primary file system Standby file system Extract the data changes between t2 and t1, a so called snapshot duplication stream t1 t1 t2 𝑑𝑎𝑡𝑎 𝑡2 − 𝑡1 = 𝑓(𝑑𝑎𝑡𝑎 𝑡1 , 𝑑𝑎𝑡𝑎 𝑡2 )
  • 19. Snapshot Based Replication (4) ACFS Replication as of 12.223 9/15/2017 Primary file system Standby file system Snapshot duplication stream is applied to standby file systems, t1 snapshot is referenced, t2 snapshot is the result t1 t1 t2 t2
  • 20. ACFS Replication Setup 12.2 (1) ACFS Replication as of 12.224 9/15/2017 ASMCA supports creation of disk groups and ACFS, but for the actual replication setup command line is used Create a disk group with ‘compatible.asm’ and ‘compatible.advm’ set to at least 12.2 Setup is basically the same, few differences regarding used parameters – Create an replication apply user on OS (repluser) – Exchange ssh keys between root on primary and repluser on standby (also in other direction in case role changes are planned) – Create volume and file system on both clusters – Initialize replication on standby then on primary
  • 21. ACFS Replication Setup 12.2 (2) ACFS Replication as of 12.225 9/15/2017 Repluser needs to have OSASM right by OS group (typically asmadmin) Generate ssh keys for root user on all primary cluster nodes and insert all public keys of those in ~repluser/.ssh/authorized_keys on all standby nodes (docs claim we should use authorized_keys2, but this is not working in recent version of SSH anymore) Root on primary needs to be able to logon as repluser on standby without password Test all connections to produce .ssh/know_hosts entries, also use (SCAN) VIPs # useradd -g oinstall -G oinstall,asmadmin,asmdba,asmoper -u 700 repluser [root@zam101 ~]# ssh repluser@zam102
  • 22. ACFS Replication Setup 12.2 (3) ACFS Replication as of 12.226 9/15/2017 Validation as root, I use SCAN here, known_hosts file is extended by this call if needed Or simply It is comfortable (I would say even recommended) if all nodes in a cluster share the same SSH host keys, else this will happen after a VIP moves to other cluster node To set this up copy over /etc/ssh/ssh_host* files and restart sshd acfsutil repl info -c -v -u repluser cluster102 /u00/app/grid/acfsmounts/images_fs A valid 'ssh' connection was detected for standby node cluster102 as user repluser. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! ssh -o StrictHostKeyChecking=no repluser@cluster102
  • 23. ACFS Replication Setup 12.2 (4) ACFS Replication as of 12.227 9/15/2017 Docs: consider to lower sshd log level not to flood your syslog Oracle recommend to set it to ERROR, default is INFO – On a RHEL7 / OL7 this does not change anything, as systemd logs user sessions – There is a workaround: create a discard filter with rsyslog (see notes) – See https://access.redhat.com/solutions/1564823
  • 24. ACFS Replication Setup 12.2 (5) ACFS Replication as of 12.228 9/15/2017 File system setup as usual – grid user +APX instances with 1G memory target are started on all nodes in cluster, which mount the ACFS asmcmd volcreate -G ACFS -s 100G images_fs sudo /sbin/mkfs -t acfs /dev/asm/images_fs-* sudo srvctl add filesystem -device /dev/asm/images_fs-* -path /u00/app/grid/acfsmounts/images_fs -user grid,oracle srvctl start filesystem -device /dev/asm/images_fs-*
  • 25. ACFS Replication Setup 12.2 (6) ACFS Replication as of 12.229 9/15/2017 Unmount file systems on both sides on all but one node Again first the standby is initialized Then primary, here you can configure with “acfsutil repl init primary” – A refresh interval or constant mode (-i or -C) – Compression vs. no compression (-z on or -z off) – Tags – Debug level (default is 3) – Some ssh options sudo acfsutil repl init standby -u repluser /u00/app/grid/acfsmounts/images_fs
  • 26. ACFS Replication Setup 12.2 (7) ACFS Replication as of 12.230 9/15/2017 Example with tag “image_data”, compression (-z) and constant mode (-C) Example without tag and 2 hours refresh interval (-i) File system mount point is referenced twice (source, target), because it is allowed to be different on both clusters Now mount the file systems on other nodes sudo acfsutil repl init primary -C -s repluser@cluster102 -m /u00/app/grid/acfsmounts/images_fs -z on image_data -o sshStrictKey=n /u00/app/grid/acfsmounts/images_fs sudo acfsutil repl init primary -i 2h -s repluser@cluster102 -o sshStrictKey=n -m /u00/app/grid/acfsmounts/images_fs /u00/app/grid/acfsmounts/images_fs
  • 27. ACFS Replication Resource ACFS Replication as of 12.231 9/15/2017 In CRS there is 1 new resource (former architecture: 3 on primary, 4 on standby) Log on primary (quite silent in debug level 0,1, more details starting with 2) Logs on standby (one per sync, has its own debug level defined) acfsutil repl bg info /u00/app/grid/acfsmounts/images_fs Resource: ora.repl.dupd.acfs.images_fs.acfs Target State: ONLINE Current State: ONLINE on zam101 <ORACLE_BASE>/diag/crs/<hostname>/crs/trace/sdapply_<pid>.trc <ORACLE_BASE>/diag/crs/<hostname>/crs/trace/acfsdupd_images_fs-117.trc
  • 28. This is What Happens During Sync ACFS Replication as of 12.232 9/15/2017 1. create snapshot, 2. extract duplication stream and apply it, 3.delete snapshot acfsutil snap create -r -R -S REPL_BASEFS_1501851997 /u00/app/grid/acfsmounts/images_fs acfsutil snap dup create -R -i REPL_BASEFS_1501851476 REPL_BASEFS_1501851997 /u00/app/grid/acfsmounts/images_fs | ssh -o BatchMode=true -o StrictHostKeyChecking=no -o Ciphers=aes128-ctr -x repluser@cluster102 acfsutil snap dup apply -R -b '/u00/app/grid/acfsmounts/images_fs' acfsutil snap delete -R -S REPL_BASEFS_1501851476 /u00/app/grid/acfsmounts/images_fs UNIX times STDOUT is piped as STDIN to remote command
  • 29. Some Explanations and Considerations ACFS Replication as of 12.233 9/15/2017 -R and -S for snapshot creation and deletion are not documented, my assumption – -R means “special snapshot for replication purposes” – -S silent, no output during snapshot creation “snap dup create|apply” are documented and can be used for similar purposes also on our own (on same server/cluster but different file system(s), from/to several local or remote file systems, …), create writes to STDOUT, apply reads from STDIN -b option of apply creates a backup snapshot on standby, e.g. SDBACKUP_1503568991_REPL_BASEFS_1503568962 which represents same contents as the corresponding snapshot on primary, e.g. REPL_BASEFS_1503568962 If you enable compression this leads to SSH compression (-C option)
  • 30. Manual and Automatic Sync ACFS Replication as of 12.234 9/15/2017 Manual sync acfsutil repl sync /u00/app/grid/acfsmounts/images_fs primary ACFS changed since last refresh noop or sleep a second no current time – last refresh > configured interval yes no sync yes Constant mode – means that interval is 0 – file system with permanent write IO  endless sync loop sleep until X Interval mode
  • 31. More Facts about Snapshot Duplication Streams ACFS Replication as of 12.235 9/15/2017 An empty ACFS file system (freshly formatted) can be target of a complete sync of any source ACFS file system Afterwards only incremental applies (from snapshot to snapshot) are allowed The target file system must not be manipulated, no IO writes at all! If you want to allow subsequent incremental syncs – Manual approach: no safeguard against this – Regular replication: IO writes are not allowed by ACFS kernel modules on standby – As of documentation a remaster to former snapshot should allow continuation of syncs, but in my tests … it did not work -b option should be used to know the currentness of target file system
  • 32. More Facts about ACFS and ACFS Replication ACFS Replication as of 12.236 9/15/2017 Standby file system is read only Regular replication uses a backup snapshot at standby file system You can create additional custom snapshots (read only or read write) – also on the standby file system for testing workloads (like a snapshot standby) Information about ACFS file systems can be queried (via proxy instance +APX..) – v$asm_acfsvolumes – v$asm_filesystem – v$asm_acfssnapshots – v$asm_acfsrepl (only useful for former architecture) – v$asm_acfstag
  • 33. ACFS Replication – Operation (1) ACFS Replication as of 12.237 9/15/2017 Checks Comparison on primary – standby must be mounted locally, e.g. nfs Resize – volume and file system is increased (5 times if compatible.advm < 11.2.0.4) acfsutil repl info -c /u00/app/grid/acfsmounts/images_fs acfsutil repl bg info /u00/app/grid/acfsmounts/images_fs acfsutil repl compare /u00/app/grid/acfsmounts/images_fs /nfs/images_fs acfsutil size +10G /u00/app/grid/acfsmounts/images_fs
  • 34. ACFS Replication – Operation (2) ACFS Replication as of 12.238 9/15/2017 Snapshots status Replication status IO changes on file system per time? Which bandwidth is needed? Upgrade from old replication? – After cluster is upgraded, replication is still old style – Either terminate and rebuild or use “acfsutil repl upgrade” acfsutil snap info /u00/app/grid/acfsmounts/images_fs acfsutil repl info -c /u00/app/grid/acfsmounts/images_fs acfsutil info fs -s /u00/app/grid/acfsmounts/images_fs
  • 35. ACFS Replication – Role Changes? ACFS Replication as of 12.239 9/15/2017 No fully integrated operations for switchover or failover Failover is like this Switchover like this – Stop IO on primary – Last sync – Terminate replication on both sides – Setup replication in the other direction (complete sync) sudo acfsutil repl terminate standby /u00/app/grid/acfsmounts/images_fs
  • 36. Use Cases? ACFS Replication as of 12.240 9/15/2017 High availability for database with external files, e.g. BFILES – Data Guard (database) + ACFS replication (ext. files) (better performance) or – Data Guard + DBFS for files (better consistency) HA for application file systems (cross platform) HA for GoldenGate trail files Can be useful for deployment/cloning methods for application file systems (cross platform)
  • 37. ACFS Replication – Conclusion ACFS Replication as of 12.241 9/15/2017 Fundamental change in architecture Platforms can be mixed (but Windows stays an island) Not only automatic replication, sync mechanisms can be used for custom deployment tasks Uncertain about synchronicity on file systems with high IO utilization DBFS is an alternative solution in case you need more consistency and synchronicity between database and file system No support for database files  !
  • 38. ACFS Replication as of 12.242 9/15/2017 Further information … Oracle © Automatic Storage Management Administrator's Guide 12c Release 2 (12.2) http://docs.oracle.com/database/122/OSTMG/understand-acfs-admin.htm http://docs.oracle.com/database/122/OSTMG/configure-acfs-replication.htm
  • 39. Questions and answers … Mathias Zarick Mathias.Zarick@trivadis.com 9/15/2017 ACFS Replication as of 12.243
  • 40. Session Feedback – now Please use the Trivadis Events mobile app to give feedback on each session Use "My schedule" if you have registered for a session Otherwise use "Agenda" and the search function If the mobile app does not work (or if you have a Windows smartphone), use your smartphone browser – URL: http://trivadis.quickmobileplatform.eu/ – User name: <your_loginname> (such as "svv") – Password: sent by e-mail... 9/15/2017 ACFS Replication as of 12.244