Professional Documents
Culture Documents
Document Location
This is a snapshot of an on-line document. Paper copies are valid only on the day they are printed. Refer to
the author if you are in any doubt about the currency of this document.
Revision History
This practical guide describes a Tivoli Storage FlashCopy Manager (TSFCM) installation and configuration as well as
the test procedures that have been performed for an Oracle database instance “SID”, which is running on a two-node
RAC cluster with Oracle Automatic Storage Management (ASM) on Red Hat Enterprise Linux, using IBM San Volume
Controller as the storage subsystem.
This document refers to Oracle Automatic Storage Management environments. Automatic Storage Management
environments will be referred as ASM in the following text. Tivoli Storage FlashCopy Manager provides its own backup
and recovery interface for native Oracle databases that creates full database backups and restores. Optionally, the
database control files can be backed up into the Tivoli Storage FlashCopy Manager backup repository. Tivoli Storage
FlashCopy Manager supports these backup functions:
More generic information about TSFCM configuration, HW and SW prerequisites etc., can be found in the IBM
Infocenter:
http://pic.dhe.ibm.com/infocenter/tsminfo/v7r1/index.jsp?topic=%2Fcom.ibm.itsm.fcm.unx.doc%2Ft_protect_fcmul.html
Basically, ASM could be considered as an evolution in file system and volume management functionality for Oracle
database files. Storage related tasks such as provisioning of volumes to the databases became much more simplified with
ASM, since ASM takes over the provisioning of file system and volume manager capabilities built into the oracle
database kernel. This eliminates the need for third-party volume manager and file systems for managing the Oracle
database files. ASM enables disk management by using either well known SQL commands (create/alter/drop) or the so
called ASMCMD which provides the corresponding operations over a command line interface. Among many other
benefits, ASM improves file system scalability and performance, manageability, and availability for single instance
databases as well as for Oracle Real Application Clusters (RAC) environments. ASM is easier to manage and faster than
conventional file systems, and it provides I/O balancing, large file support, automatic on line redistribution after the
incremental addition or removal of storage capacity. Further, for migration purposes, a new RMAN command enables
non-ASM managed files to be relocated to an ASM disk group. Figure 1depicts the architecture of ASM databases. In
the bottom the storage subsystems are shown, on top of them the ASM disk groups are built. Finally the Oracle Database
Servers reside in those disk groups.
The FlashCopy function creates an almost instant copy of active data for backup and cloning. SVC supports incremental
FlashCopy operations that copy only the portions of the source or target virtual disk updated since the last FlashCopy
function, and also backs up cascaded operations where the target of one FlashCopy relationship is further copied. These
abilities can help maintain and update a test environment based on production data.
On both backup servers (PS), add the following line to the profile (vi /home/fcmsid/.bashrc):
export ORAENV_ASK=NO;export ORACLE_BASE=/oracle/SID;export
ORACLE_HOME=/oracle/SID/112;export ORACLE_SID=SID;export ORAENV_ASK=YES;env|grep
ORA
export PATH=$ORACLE_HOME/bin:$PATH
When finished, perform the same steps for the patch level. Use the directory /opt/tivoli/tsfcm/acs_4.1.0.2 as
installation folder.
DEVICE_CLASS SVC_DC1
TARGET_VOLUME Proxy01_SID_DATA_VOL001
TARGET_VOLUME Proxy01_SID_DATA_VOL002
<<<
DEVICE_CLASS SVC_DC2
TARGET_VOLUME Proxy02_SID_DATA_VOL001
TARGET_VOLUME Proxy02_SID_DATA_VOL002
<<<
#!/bin/bash
/home/fcmsid/acs/acsora -f backup
EXIT;
EOF
#!/bin/bash
run
backup
FILESPERSET=1
format 'df_%t_%s_%p'
(database);
run
restore database;
recover database;
fcmsid@racnode1:/home/fcmsid/acs % ./setup_ora.sh
(1) On-Site Production System configuration with optional remote Backup System configuration
(2) On-Site Backup System configuration
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager on the production server with the option to remotely synchronize the
configuration of one or multiple backup systems using Secure Shell.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager on the backup system as a 'separate installation'.
[1]
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager for backup only.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager for cloning only.
Enter '3' to configure IBM Tivoli Storage FlashCopy(R) Manager for backup and cloning.
[1]
Currently off-lodaded backups are configured. Do you want to keep this setting? [y|n] [y]
Profile configuration
=====================
Special commands:
'?' -> Show help for current parameter
'!d' -> Delete current parameter instance / delete user input
Path of the IBM Tivoli Storage FlashCopy(R) Manager directory {ACS_DIR} = [/home/fcmsid/acs]
Hostname and port of machine running Management Agent {ACSD} (<hostname> <port>) = [racnode1 57328]
Do you want to continue by specifying passwords for the defined sections? [Y/N] [n]
y
Please enter the password for authentication with the ACS daemon: [***]
Please re-enter password for verification:
Please enter the password for primary storage device configured in section(s) SVC_DC2: [***]
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN>
TLS/SSL configuration:
GSKit is installed correctly with the supported version (8.0.14.28).
Found key database.
Consistency check ok.
Found FCM server certificate in key database.
Do you want IBM Tivoli Storage FlashCopy(R) Manager to create and start the upstart jobs for you? [y|n] [y]
The offload backup to Tivoli Storage Manager is performed by the IBM Tivoli Storage FlashCopy(R) Manager 'tsm4acs' offload agent.
Specify YES to offload the backup immediately after the FlashCopy backup finishes. This process creates and starts an upstart job
configuration for 'tsm4acs' offload agent.
The default is to run 'tsm4acs' as a daemon process on the production server.
In High Availability environments, an upstart job is not created since the 'tsm4acs' agent must be added to the High Availability
script.
Specify NO to schedule offload backups individually with a crontab entry.
Do you want off-loaded tape backups to begin immediately after the snapshot? [y|n] [n]
q
Quit configuration
Note: In the example above, the parameter for synchronizing the DB configuration between PS and BS is set to “NO”:
Synchronize database configuration file on the BS with PS {OVERWRITE_DATABASE_PARAMETER_FILE}
(YES|NO) = [NO]
During the very first configuration, the parameter needs to be set to YES instead – this will copy an SPfile extract from
the PS to the BS in order to startup the database there for an offloaded backup.
When this was done, the SPfile copy needs to be changed manually on the BS, as some parameters are valid on the PS
only. For details, see the BS configuration section of this document.
When the wizard completes, it writes down all information to /home/fcmsid/acs/profile .
The profile looks like this:
fcmsid@racnode1:/home/fcmsid/acs % cat profile
>>> GLOBAL
ACS_DIR /home/fcmsid/acs
ACSD racnode1 57328
# ENFORCE_TLS12 NO
# TRACE NO
<<<
>>> ACSD
ACS_REPOSITORY /home/fcmsid/acs/acs_repository
# REPOSITORY_LABEL TSM
# SYNCHRONOUS_RECONCILE RESTORE_AND_DELETE
<<<
>>> CLIENT
# BACKUPIDPREFIX ORCL__
APPLICATION_TYPE ORACLE
TARGET_DATABASE_SUSPEND YES
VOLUME_MGR ASM
TSM_BACKUP LATEST
# MAX_VERSIONS ADAPTIVE
# NEGATIVE_LIST NO_CHECK
# TIMEOUT_FLASH 120
# GLODC1_SYSTEM_IDENTIFIER
DEVICE_CLASS SVC_DC1 SVC_DC2
<<<
>>> ORACLE
CATALOG_DATABASE_CONNECT_STRING CATALOGNAME
CATALOG_DATABASE_USERNAME CATALOGUSER
DATABASE_BACKUP_SCRIPT_FILE /home/fcmsid/acs/rman_script.sh
# TARGET_DATABASE_PARAMETER_FILE
# DATABASE_CONTROL_FILE_RESTORE NO
ASM_INSTANCE_USER oracle
ASM_INSTANCE_ID +ASM2
ASM_ROLE SYSASM
<<<
>>> OFFLOAD
BACKUP_METHOD ORACLE
OVERWRITE_DATABASE_PARAMETER_FILE NO
When the first offload was triggered and the DB config file was copied, it needs to be adapted to the BS properties:
vi /oracle/SID/112/dbs/initSID002.ora_fromSPfile
(1) On-Site Production System configuration with optional remote Backup System configuration
(2) On-Site Backup System configuration
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager on the production server with the option to remotely synchronize the
configuration of one or multiple backup systems using Secure Shell.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager on the backup system as a 'separate installation'.
[2]
Enter '1' to configure IBM Tivoli Storage FlashCopy(R) Manager for backup only.
Enter '2' to configure IBM Tivoli Storage FlashCopy(R) Manager for cloning only.
Enter '3' to configure IBM Tivoli Storage FlashCopy(R) Manager for backup and cloning.
[1]
Currently off-loaded backups are not configured. Do you want to configure off-loaded backups? [y|n] [n]
After the configuration of the off-loaded backups, the CLIENT section will be removed from the profile.
If you want to review the settings of the Client section to configure the .utl file, please have a look at the profile with the .bck
file name extension in the directory where the profile is stored.
Profile configuration
=====================
Special commands:
'?' -> Show help for current parameter
'!d' -> Delete current parameter instance / delete user input
Path of the IBM Tivoli Storage FlashCopy(R) Manager directory {ACS_DIR} = [/home/fcmsid/acs]
Hostname and port of machine running Management Agent {ACSD} (<hostname> <port>) = [racnode1 57328]
Please enter the password for authentication with the ACS daemon:
Please re-enter password for verification:
Please enter the password required for connecting to ORACLE catalog database:
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
TLS/SSL configuration:
GSKit is installed correctly with the supported version (8.0.14.28).
Found key database.
Consistency check ok.
Found FCM server certificate in key database.
Enter the device classes to use for this Backup System. Make sure each device class is separated by a comma.
SVC_DC1
IBM Tivoli Storage FlashCopy(R) Manager requires at least two daemon processes to be running always.
IBM Tivoli Storage FlashCopy(R) Manager can create and start upstart jobs for the necessary daemon processes.
Alternatively, you can choose to start and stop these processes yourself, for instance if you want to include the processes in your HA
policy.
Do you want IBM Tivoli Storage FlashCopy(R) Manager to create and start the upstart jobs for you? [y|n] [y]
The following examples show a complete backup and restore cycle using the TC target disks in DC1.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
System altered.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
fcmsid@racnode1:/home/fcmsid/acs %
fcmsid@racnode1:/home/fcmsid/acs % ./tsm_backup.sh
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> RMAN>
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> RMAN> 2> 3> 4> 5> 6> 7> 8> 9>
allocated channel: t1
channel t1: SID=24 device type=SBT_TAPE
channel t1: Data Protection for Oracle: version 6.3.0.0
RMAN-06497: WARNING: control file is not current, control file AUTOBACKUP skipped
released channel: t1
RMAN> RMAN>
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
COUNT(*)
----------
12
Note:
During a disk based restore (FlashBack), only one Failure Group (FG) is restored, while the other FG is set OFFLINE.
The FGs need to be re-synced after a restore!
The tape restore is triggered from the PS by using a basic rman script in this example:
root@racnode1:/root % su - oracle
oracle@racnode1:+ASM2> crsctl stop resource ora.DATA_SID.dg
CRS-2673: Attempting to stop 'ora.DATA_SID.dg' on 'racnode1'
CRS-2677: Stop of 'ora.DATA_SID.dg' on 'racnode1' succeeded
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> run
2> {
3> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/oracle/rman_sid002/tdpo/tdpo.db.opt)';
4>
5> restore database;
6> recover database;
7> alter database open;
8>
9> release channel t1;
10> }
11>
12>
allocated channel: t1
channel t1: SID=139 instance=SID002 device type=SBT_TAPE
channel t1: Data Protection for Oracle: version 6.3.0.0
database opened
released channel: t1
These Web sites provide useful references to supplement the information contained in this paper:
Oracle ASMLib:
http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html