Professional Documents
Culture Documents
Page 1
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 2
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
The information provided in this document is distributed "AS IS" basis without any
warranty either express or implied. IBM AND SAP DISCLAIM ALL EXPRESS AND
IMPLIED WARRANTIES WITH RESPECT TO SUCH INFORMATION, INCLUDING ANY
WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR
PURPOSE. The use of this information or the implementation of any of these
techniques is a customer responsibility and depends on the customer's ability to
evaluate and integrate them into their operating environment.
While the information contained in this paper has been reviewed by IBM and SAP for
accuracy, there is no guarantee that the same or similar results will be obtained
elsewhere. Customers attempting to adapt these techniques to their own environments
do so at their own risk. The performance data contained herein was obtained in a
controlled environment based on the use of specific data. Actual results that may be
obtained in other operating environments may vary significantly. These values do not
constitute a guarantee of performance.
References in this document to IBM and SAP products, programs, or services do not
imply that IBM or SAP intend to make such products available in all countries in which
each company operates. Neither IBM nor SAP warrants the others products. Each
companys products are warranted in accordance with the agreements under which they
are provided.
Page 3
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Abstract.......................................................................................................................................................... 5
Preamble ........................................................................................................................................................ 6
1
Introduction .......................................................................................................................................... 6
Customer Requirements...................................................................................................................... 7
DB2 UDB and ESS Features to Support the Split Mirror Backup / Recovery Solution................. 10
4A DB2 UDB Features ..................................................................................................................... 11
4B FlashCopy - ESS's Advanced Local Copy Function ............................................................... 12
4C Peer-to-Peer-Remote Copy (PPRC) ESSs Advanced Remote Copy Function .................. 13
Recovery.............................................................................................................................................. 38
Acknowledgements..................................................................................................................................... 43
Appendix ...................................................................................................................................................... 44
A) DB2 UDB Architectural Overview ............................................................................................. 44
B) DB2 UDB Database Growth and Impact on Storage ............................................................... 49
C) DB2 UDB Memory Management................................................................................................ 51
D) Backup and Recovery Management for DB2 UDB .................................................................. 52
E) Work Process Management in SAP R/3 with DB2 UDB and Storage..................................... 55
F) SAP R/3 data layout.................................................................................................................... 57
G) ESS Raid5 Disk Layout Considerations for SAP R/3 Environments ...................................... 59
H) Considerations for DB2 UDB database layout ......................................................................... 63
I)
Sub System Device Driver (SDD) .............................................................................................. 66
J) Volume Layout for DB2 UDB ..................................................................................................... 69
K) The Role of the ESS Specialist .................................................................................................. 71
References ................................................................................................................................................... 72
Page 4
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Abstract
Recent new products such as SAPs B2B Procurement, CRM, mySAP.com Portals and
Trading Exchange markets require an ever increasing need for continuous system
availability.
This paper provides information on an essential component of advanced infrastructure
solutions the High Availability Split Mirror Backup/Recovery (SMBR) for Systems of a
mySAP landscape on IBMs DB2 UDB operating in AIX environment. In the following R/3
will be used as a synonym for SAP products.
The solution described in this paper is intended to deliver a backup process with no
impact on the live R/3 system (server less) using the advanced functions of IBMs
Enterprise Storage Server (ESS). This zero downtime for the live R/3 system means
that SAP users typically will not see a disruption of activity while the backup of the live
database takes place. No transactions typically are cancelled during the copy
process/backup process.
Instant availability of consistent copies of the database provides the ability to place an
emergency system at the users disposal while recovering the live database from a
disaster. Beyond Backup / Recovery, a consistent copy of the database may be used for
various purposes, such as creation of a reporting instance, production-fix system or
repository for building Business Warehouse (BW) system.
Page 5
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Preamble
This white paper, written from the DBA's perspective, addresses the infrastructure
design, implementation tasks and techniques required for complex Enterprise
Application Integration landscapes for high availability SAP R/3 applications consisting of
a database (DB2 UDB), an operating system (AIX) and a storage subsystem (ESS)
which all interoperate to deliver an easy-to-manage backup & recovery solution for SAP
customers. Backup & Recovery solutions are mission critical activities in todays world of
7 x 24 computing and are a major focus for IT personnel, application management and
DBAs. With the exploding growth in storage requirements for SAP application
environments, this work touches on major elements of each area of technology spanning
critical operating requirements and how this storage-centric solution delivers compelling
value for SAP customers.
Introduction
Service level agreements increasingly have to reflect that in case of planned downtime
such as backup, hardware / software maintenance, R/3 upgrade and unplanned
downtime such as database Data Manipulation Language (DML) error, error analysis
and restores, the system has to be available within minutes.
SAPs Advanced Technology Group has developed scenarios using live databases that
constantly copy or mirror using storage subsystems, allowing business continuation
during the split (and resynchronization) of the mirror. Once the logical database mirrors
are established, additional copies are created for backup and for use by a standby SAP
R/3 System. This solution minimizes the I/O load impact of the live environment and
offloads the backup activity away from the live database server/storage server to a
standby/backup server host. The Split Mirror solution, based on this concept, was
successfully implemented using DB2 UDB database on the AIX platform using the
Enterprise Storage Server. This solution was implemented using SAP R/3 4.6B with DB2
UDB 7.1 on AIX 4.3.3. It can be implemented for either a single or a dual ESS
configuration using the ESSs advanced functions the local copy function FlashCopyTM
Page 6
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Customer Requirements
Increasingly, with the rapid trend towards very large databases, accompanied by the
need for high availability in a global computing environment, customers now demand
that production systems be available on a 7 x 24 basis. This also means that in case of a
disaster, the system has to be available within minutes or hardly longer than the time
needed for the physical reload of the database from a secondary or remote storage
media. This high availability requirement also implies that backup and the creation of an
emergency system may not cause any downtime of the live production system and all
procedures to achieve this must be seamlessly automated.
Customers are also very aware of the fact that software or application logical errors and
not hardware failures are the most likely causes for the need for disaster recovery
capabilities. But, for mission critical applications, customers will do everything possible to
optimally protect themselves from a hardware disaster. This means that cost effective,
Page 7
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
SAP Requirements
In order to deliver a solution that matches the complex requirements for high availability
backup, recovery and performance, the SAP administrative workload should be taken off
the live production system and performed on a copy of the system. The recommended
environment is depicted in Figure 1.
Page 8
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
A d m in is tr a tio n
D B C heck
U p d a te S ta tis tic
R /3 R e p o rtin g S y s te m
re m o te c o p y (s p lit)
2 n d m ir ro r lo c a l c o p y (s p lit) 3 rd m irro r
M irro re d D a ta
P ro d u c tio n D a ta
Page 9
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
In order to realize this concept, the database management system needs to cooperate
with storage subsystems to deliver the results. It should support the creation of a
consistent database copy during the application READ/WRITE processing in a manner
that exerts negligible impact on the production system, database or the live production
storage server.
Page 10
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
4A
For very large DB2 UDB databases in SAP R/3 production environments, the Split Mirror
backup capability is essential for the creation of consistent database backup copies
without stopping the production system. In order to make this possible, DB2 UDB
created a set of special commands that enable temporary suspension of writes to the
database:
DB2 SET WRITE SUSPEND FOR DATABASE: This command suspends the I/O
writes and puts the tablespaces into a new SUSPEND_WRITE state. Writes to the
logs are also suspended by this command. However, read-only transactions are
allowed to continue. Any changes to tablespace information needs to wait till the
writes are subsequently resumed. Once the SUSPEND_WRITE state is in effect
for the database, all files and directories within the database are protected from
updates.
DB2 SET WRITE RESUME FOR DATABASE: This command resumes I/O writing
and removes the SUSPEND_WRITE state and makes the tablespaces available
for updates.
For an overview of the DB2 UDB architecture and other features that take advantage of
ESS storage management capabilities, please refer to Appendix A (DB2 UDB
Architectural Overview), Appendix B (DB2 UDB Database Growth and Impact on
Storage) and Appendix C (DB2 UDB Memory Management).
Page 11
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
4B
The ESS administration tool (ESS Specialist) identifies the Logical Unit Numbers (LUNs)
by their ESS internal serial numbers. FlashCopy, ESSs near-instant local copy
function, can be used for all systems that have volumes or LUNs within the same Logical
Subsystem (LSS) of an ESS. FlashCopy is set up using the Web interface of the
StorWatch ESS Specialist. Then, task selections on the volume pair FlashCopy with
Full or No Copy, and WITHDRAW options can be made. See reference [12] for set up
details on FlashCopy.
The NO COPY option in FlashCopy is useful if the copy operation has to complete with
in a short time so that the source database/application are returned to their normal
usage from a quiesced state. WITHDRAW command enables the removal of source and
target relationships from a previously specified NOCOPY command. The relationship
between source and target will automatically end when the physical copy is completed.
Using the ESS Specialist, FlashCopy tasks - with either No Copy or Physical Copy
options are created. These tasks are initiated from the Unix command line using
Command Line Interface (CLI) rsExecuteTask. The status of those tasks can be queried
using the CLI, rsExecuteQuery. Based on the results of this query, the SMBR
automation process can capture the error code for each of the FlashCopy tasks.
FlashCopy, when set up by the StorWatch ESS Specialist, creates an identical copy of
the source volume onto target volumes when an appropriate task is initiated using CLI.
Volume identification or disk signatures need to be validated with respect to the host that
is connected to the ESS in order for that host to start using the target ESS FlashCopy
volumes. In order for a single host to mount both source and target volumes of
FlashCopy pairs, AIX provides the RECREATEVG command, which is packaged as a
PTF for AIX 4.3.3 in APAR IY10456. It is officially available in:
1. AIX 4.3.3 Recommended Maintenance Level 05 (RML05)
2. AIX 4.3.3 RML06
Page 12
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
4C
Page 13
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 14
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Before PPRC pairs can be established, logical paths must be defined between the
logical control unit images also called as Logical Sub Systems (LSS). The ESS supports
up to 16 logical Fixed Block (FB) control unit images and up to 32 SCSI/Fiber controller
images. Logical paths are established between LSS of the same type over physical
ESCON links that connect suspending and resuming pairs.
During the suspension of a pair, the primary control unit maintains a bitmap in NVS (Non
Volatile Storage) with a flag bit for each track that was changed on the primary volume.
This allows for a later resynchronization (RESYNCH) of the volume pair while allowing
only cylinders flagged in the bitmap table to be copied to the remote site.
Page 15
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
As with FlashCopy tasks, PPRC tasks are created via the ESS Specialist and then
invoked from the Unix command line using CLI interface. Based on the result of the
query - rsExecuteQuery, the SMBR automation process can capture the error code for
each of the PPRC tasks.
Page 16
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
5A
This Split Mirror Backup / Recovery solution utilized SAP designed SSQJ tool for load
simulation. This tool is a generic test measurement tool that was developed with ABAP/4
in core R/3 and it enables testing and measurement of the following functions in the R/3
Basis system such as runtimes of specific functions and their alternatives, resource
consumption, query plans in the case of DB statements and other functions. SSQJ runs
on all SAP-supported database systems with built in infrastructure for Measurement &
Analysis including environment History of measurements.
A number of test suites are included in the current version of the package:
1) SQL statements
2) ABAP statements
3) Large Tables for performance and throughput analysis
4) Archiving Systems
5) Data Conversion
6) TPC/D-Benchmark and
7) Business Warehouse
SSQJ is currently used for SAP Basis Benchmarking, by SAP Database Porting teams,
SAP Database Partners and other SAP Hardware Partners.
The SSQJ tool was used as the kernel database for the DB2 UDB SMBR testing.
SSQJ requires the creation of two new tablespaces, PSAPSSQJD for data and
PSAPSSQJI for indexes. The size of the SSQJ tablespaces depends on the required
database size. For the initial installation, we require at least 8GB for PSAPSSQJD and
4GB for PSAPSSQJI. The data files for PSAPSSQJD are in /db2/UDB/sapdata3 (total of
8 files of 2GB each), as shown in Figure 5, and the data files for PSAPSSQJI are in
/db2/UDB/sapdata4 (total of 4 files of 2GB each).
Page 17
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
5B
SAP R/3 Backup Objects and File Definitions for DB2 UDB
All objects in the R/3 environment need to be backed up. These objects are:
1. R/3 data objects:
a. R/3 archiving objects
b. R/3 Interfaces
c. SAP Executables
2. Computing center data such as:
a. The Operating System
b. Third Party Programs connected to R/3
3. Database objects
DB2 UDB supports both Online and Offline database backups. Given a properly
implemented database backup cycle, both forms of backup attain the same end goals.
The specific circumstances at each SAP R/3 installation determine which of the two
methods is appropriate. The SAP tools for database backup support both options. Figure
4 depicts the SAP Backup Objects and Figure 5 depicts the UDB File Systems for SAP.
Meaning
/$INSTDIR/db2_07_XX/<sqllib>
/db2/<SAPSID>
/db2/<SAPSID>/sqllib/bin,tsm,doc,..
/db2/<SAPSID?/sapdata1..N
/db2/<SAPSID>/log_dir
/db2/<SAPSID>/log_archive
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Function
Group
Sapvg
/usr/sap/UDB
Link to /sapmnt/UDB
/sapmnt/UDB
SAP Executables
60
/usr/sap/trans
Transport directory
60
/db2/UDB
DB2 Executables
130
/db2/db2as
Logvg
236
/db2/UDB/log_dir
50
/db2/UDB/sapdatat
Temporary Tablespace
50
/db2/UDB/log_archive
470
/db2/UDB/sapdata1
3810
/db2/UDB/sapdata2
3810
/db2/UDB/sapdata3
3810
/db2/UDB/sapdata4
3810
/db2/UDB/sapdata5
3810
/db2/UDB/sapdata6
3810
LSS16data
Not Assigned
Backupvg
/basebackup
SAP backups
2800
/usr/sap/trans/data
700
LSS10data
LSS12data
LSS14data
Page 19
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
SAP delivers binary executables in order to help achieve on-line and offline backups as
a part of the kernel installation. The external data management tools like Tivoli Storage
Manager (TSM) have products that integrate into SAP R/3 as referred in Appendix D. As
show in Figure 16, the SAP R/3 objects DB2 control files, DB2 containers, offline log
files and online log files are required for a consistent database backup and restore /
recovery.
In order to achieve SAP requirements for SMBR, the ESSs advanced copy functions,
namely FlashCopy and Peer-to-Peer-Remote-Copy are incorporated into the solution.
For the initial SAP installation, the file systems are created as shown in Figure 5.
As shown in Section F (SAP R/3 Data layout for UDB) of the Appendix, consideration
must be given to sizing recommendations, SAP landscape, and data layout spread
evenly across storage systems. ESS RAID5 disk layout considerations, as detailed in
Section G (ESS RAID Disk Layout Considerations for SAP R/3 Environments) of the
Appendix, ensure that the "hot spot phenomenon common in non-RAID5 environments
is eliminated by striping all DB2 UDB tablespaces across all devices, thus utilizing the
cumulative throughput of all device adapters. Additional considerations for DB2 UDB
database layout on ESS should incorporate optimal values for PREFETCHSIZE,
DB2_PARALLEL_IO,
DB2_STRIPED_CONTAINERS,
tablespace
EXTENTSIZE,
Page 20
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
5C
As shown in Figure 6, our live database consists of DBA for the SAP Instance UDB on
the primary ESS attached to host joyjoy. It contains all the DB2 binaries, SAP kernel,
transport directory, DB2 online / archive log directories, DB2 instance directory, DB2
data container file systems and SSQJ file systems.
DBC is the PPRC mirror of the live database DBA. DBB is the Safety FlashCopy of the live
database DBA. This safety copy is created in order to maintain point in time copy of the
live production database should there be any problems encountered with DBA during the
SMBR operation.
Figure 6: R/3 Split Mirror Backup & Recovery and Backup Host
Page 21
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
In situations where the customers Basis or DBA group would like to mount the file
systems for verification purposes by using the FlashCopy or PPRC target volumthe
In situations where the customers Basis or DBA group would like to mount the file
systems for verification purposes by using the FlashCopy or PPRC target volumes on
the same host, the Physical Volume Identifier (PVIDs) need to be renamed using the AIX
RECREATEVG command mentioned in Section 4B.
5D
For all references to LUN and volume group sizes, 1GB translates to 1*1000*1000*1000
bytes. All the LUNS for host joyjoy are defined only on cluster 1 for our SMBR solution
scenarios using FlashCopy and PPRC. Each of the 8 ranks on ESS1 (Cluster 1) consists
of twelve 8GB LUNs. In addition to these, two 1GB LUNs are also defined on each of the
ranks. The 8GB LUNs are used for the DB2 UDB data files, while one set of eight 1GB
LUNs is used for db2 log_dir and log archive files. The other set of eight 1GB LUNs is
used for the SAP R/3 and DB2 UDB executables and other temporary storage.
OSPL2 and OSPL6 are the production and disaster recovery ESS's in our setup.
For the initial installation, four 8GB LUNs from each rank are used to layout the SAP R/3
DB2 UDB data files. This leaves the other eight 8GB LUNs for FlashCopy (safety copy)
and PPRC.
Page 22
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
In an optimal database layout where the distribution of tablespaces follows the basic
principle spread the data over as many physical disk/arrays as possible (refer to [4])
tablespaces should be extended by at least one full stripe set across all arrays.
This ensures that tablespaces remain distributed across a stripe set. Allocation of a
specific number of arrays for a tablespace facilitates distribution and placement of the
data files. The more arrays that are in the allocation of arrays, the better the distribution.
Data file distribution should be based on a round-robin placement across ESS clusters
and arrays and the granularity can be achieved using AIX Logical Volume allocation.
In the Split Mirror Backup and Recovery Solution validation scenarios, the AIX Logical
Volume Manager maps the assigned ESS 8GB LUNs as hdisks. Grouping the LUNS of
a single RAID array can create volume groups. Under this traditional route for database
layouts, AIX file systems are created over AIX logical volumes that reside on a single
array. The data files of a tablespace are then distributed over file systems on different
arrays. The criterion for a data file to be placed in these file systems is still the same the overall I/O activity should be distributed across all available arrays. Creation of
volume groups and logical volumes should be within the constraints imposed by the AIX
Logical Storage Management.
5E
Once the LUNS are defined on each ESS and assigned to hosts "joyjoy" and "decme",
the LUNS are made available to "joyjoy" by running the cfgmgr command on that host.
The Subsystems Device Driver (SDD) is a high availability automatic I/O Path Failover
Function that provides management of active paths to the LUNs as outlined in Section I
of the Appendix. The SDD software needs to be installed on the hosts before running
cfgmgr.
The LUNs appear as hdisks on joyjoy. If a LUN is assigned to one path, an hdisk, lets
say hdisk5 is defined on joyjoy. As joyjoy has 4 SCSI adapters, the LUNs are configured
Page 24
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
such that they can be accessed through all four paths. For each additional path, another
hdisk is assigned. So for 4 paths, we have four hdisks all pointing to the same LUN on
the ESS.
When SDD is used, additional data path devices called vpath devices are created. Each
hdisk set (a set is based on the number of paths from the host to the LUN) is assigned a
vpath device. In our example, vpath0 will consist of hdisk5, hdisk45, hdisk89 and
hdisk125.
When a volume group is to be created on joyjoy, two options are available (in smitty)
(1) Add a Volume Group, or
(2) Add a Volume Group with Data Path Devices.
As we are using SDD, the volume groups are created with the second option.
Page 25
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
6A
Start Situation
The live system is in normal READ/WRITE operation state. The Log Volumes (log_dir,
log_archive) are in a constant synchronous PPRC connection between source DBA and
DBC across ESS1 and ESS2 along with Data Container Volumes as shown Figure 8.
After the prior SMBR backup activity, the DBD instance is in FlashCopy No Copy
relationship with DBC while DBB is in FlashCopy No Copy relationship with DBA.
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Backup Process
The first step in SMBR process would be to collect all the current layout details from
within the DB2 UDB database. Obtain the database structure information through the
query block ("LIST TABLESPACES SHOW DETAIL") that can determine the latest
information on the database structure including the log group, tablespaces, and
container information. During this step, the file structure information and volume group
layout along with device list from the host operating system is obtained.
On the Stand-by side shutdown all SAP and DB2 UDB processes and clean up any
semaphores that pertain to SAP/DB2 DB2 UDB on the target host decme and also on
the Safety FlashCopy target volumes (DBB) in the primary ESS. This step will confirm
that the current users in the SAP instance UDB on the decme host (probably the
Production Fix system users) are logged off and the journaled file systems on decme will
be unmounted. Unmount all the application related file systems except those that pertain
to the AIX host operating system on the decme host.
To be prepared for a new backup, the systems must be set back to the start situation.
When the DB2 suspend I/O command is issued on the primary system to stop data
volume activity, the suspension of writes on data and log volumes should prevent any
partial page writes for the next step. Read-only transactions will continue as long as they
are not requesting any resource held by the suspended I/O process.
While the database is in SUSPEND_WRITE state, any update operation to the
tablespaces, such as ALTER TABLESPACE, QUIESCE TABLESPACE, BACKUP
DATABASE ... FOR TABLESPACE, etc., will wait because they are waiting for the
tablespace write latch.
Page 27
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
The use of WRITE SUSPEND and WRITE RESUME commands exclusively developed
for the use with Hardware mirroring facilities, allows a consistent point-in-time snapshot
replica of the live database.
In the backup scenario as described above, we create a safety copy on the source
ESS1. This safety copy will enable us to recover the database with a DB2 conditional
restart on the secondary side, while the live system is available for error analysis.
In this SMBR set up, the following tasks were created with task names that are
indicative of the ESS CLI command sets:
FCAllNoBgCpWD:
ResyncPPRCAll:
Frzall:
FC11131517NoBgCp
OSPL2C0
OSPL6C0
rsExecuteTask.sh
Page 28
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 29
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Step 4: Quiesce the Production database and Suspend all the PPRC source
and target Volumes
i. Quiesce the DBA - Production database write I/O's using the DB2 UDB feature
db2 set write suspend for database
This will enable a freeze of all write activity on DBA so that PPRC targets - DBC can
function as a consistent FlashCopy source volumes for the final Split Mirror on DBD.
Page 30
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 31
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 32
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Step 9: Start DB2 UDB on the Backup Host for verification purposes
In order for us to verify that it is a consistent copy of the live database, this step is
optional. Startup DB2 UDB using db2inidb. Startup SAP after checking for db2 error
logs.
Page 33
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
6B
Customer Options and Configurations for Split Mirror Backup & Recovery
Scenario 1: Off-line Backup with FlashCopy using only one ESS storage
subsystem.
-
When "Logically Complete", start DBA, move DBB to tape; If customer elects FC
physical copy option for backup and reporting purposes, then wait for FC physical
completion, start DBA.
Move to tape with Tivoli Data Protection (TDP)/Tivoli Storage Manager (TSM).
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Scenario 2: Off-line Backup using FlashCopy and PPRC using two ESS
storage subsystems.
- Stop Live UDB DBA; Break/Suspend PPRC links from DBA to DBC
- FC DBA to DBB (safety copy); When "logical complete, FC DBC to DBD
- Start PPRC ReSynch
- When FC DBD "logical complete", start DBA
- Move DBD to tape with TDP/TS
This Scenario, while requiring production downtime for completion of the
FlashCopy command (logical completion), provides the disaster recovery
capability inherent in ESSs fault tolerant architecture.
Start PPRC ReSynch (logs, control and container files); For high availability
considerations it is advisable to make a FlashCopy Copy (physical copy) prior to
executing PPRC with remote ESS
FC DBC to DBD
This scenario is intended to keep the production system available during the
backup while providing the flexibility to transmit a point-in-time copy to a remote
Disaster Recovery site.
Page 35
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
FC DBA to DBB (safety copy before start of backup process); Execute DB2 UDBs
"Write SUSPEND", Write RESUME " commands for consistent FC.
ReSynch PPRC (logs + data volumes) pairs to include transactions during safety
copy step and all changed data since last data files resynch process
Monitor % resynch completion; this process creates complete mirror (logs + data) of
ESS1 on ESS2
As soon as 100% Resynch completes, execute UDB commands " Write SUSPEND "
Integrate all scripts for automation through backup agents like TSM, Legato
Networker etc.
Page 36
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Scenario 2: In this configuration using two ESSs, the customer expects to have
downtime while creating Point-in-Time Copy using FlashCopy (physical copy). PPRC is
used to move this FlashCopy (physical copy) on the Primary ESS to the Secondary
ESS. The PPRC targets on the secondary can then be sent to Tape for remote vaulting.
This scenario provides a disaster recovery capability.
Scenario 3: Repeats Scenario 2 keeping DB2 UDB in on-line mode with "Write
Suspend" and "Write Resume" Operations. With DB2 UDB functions, downtime is
avoided. As in scenario two above, PPRC provides disaster recovery and remote
vaulting capabilities.
Scenario 4: In this complete Split Mirror Backup solution using two - ESS's, customer
has the ability to bring up four copies (Production & Mirror [2 copies] + FlashCopy on
Primary ESS + FlashCopy on Secondary ESS) of the production database. DB2 UDB
"write suspend" and "write resume" features, enable consistent image copies of live DB2
UDB database to be created while suspending and resuming I/O.
After a successful backup, perform a test restore of the database to check the physical
correctness of the data transferred, of the tape device, and it's software drivers.
Depending on the number of different databases laid out within the same LSS and
depending on the requirements for a multi-system database point-in-time concurrent split
mirror backup, individual LUN level SUSPEND can be issued with the ESS CLI instead
of the PPRC Freeze command.
Page 37
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
The backup strategy should include verification of the data that was backed up. Perform
a logical data check using db2dart (during periods of low system activity) to verify the
consistency of the DB2 database. Corrupt DB2 blocks (error SQL2412) can appear in an
R/3 database as a result of operating system or hardware errors and may make the
backup unusable. The existence of these blocks only becomes evident during the next
read access attempt to a table within the database. Since this particular access attempt
may not occur often, and corrupt DB2 blocks are not recognized during a database
backup, corrupt blocks can remain undetected in an R/3 UDB system for a long time.
7 Recovery
The backup process described above will provide a consistent copy of the live database
achieved at the moment of application write suspension. This backup file set will be on
tape media and on the DBD volumes of ESS2 (OSPL6). Recovery process in DB2 can
be achieved in 2 types:
Rollforward recovery is performed when all or parts of the persistent storage (disk)
have been lost or corrupted. The process could be very lengthy and would require
manual intervention in a non-SMBR process.
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
The database restart brings the database to the latest consistent state based on the disk
image and the online log files. A restart recovery is based on the entries in the log
control file and the online log files. If a disk error occurs and the contents of the disk are
not recoverable, a restart recovery will not work. This applies to the containers of the
database, the online log files, and the log control file. Therefore, as discussed in Section
J of the Appendix, R/3 UDB Volume Layout has to use ESS RAID5's striping, which
allows a highly available disk subsystem that mirrors the data, the log files, the
containers, and the control files.
The contents of DBD and DBC volumes of the SMBR process differ from each other in
that the restart of the DBD SAP UDB instance will roll back all the transactions that were
open at the time of write suspension. Also, because of the RESYNC task in Step 8 of the
SMBR process, DBC and DBA volumes are a pair of synchronous mirrors and differ from
the DBD (Point In Time) volumes.
The DBD volumes can either be left open for multiple purposes like Database validity
checks, Database reorganization dry-run tasks, testing SAP support packages, testing
and applying of OSS notes or for the purposes of serving as a production fix system or
as a reporting instance. To set up the DBD volumes to serve as a standby database:
a) mount the volumes on host "decme"
b) place the DBD in roll-forward pending and then rollforward the mirror.
This is accomplished by running the tool "db2inidb UDB as standby" (UDB is the DB
instance) to place the mirrored database in roll-forward pending state, removing the
suspended write state and rollforward the database to the end of logs.
Page 39
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Crash Recovery
The time needed to perform a crash recovery depends on the amount of work DB2 has
to redo. DB2 must redo part of the transactions in the log files. That is committed
transactions are reapplied to the database and uncommitted transactions are removed
from the database. The starting point for this reapplying is found in the log control file.
This file contains the lowest log sequence number (LSN) needed for a crash recovery.
All log records that are older than the LSN are discarded because these changes to the
data in the buffer pool have already been written to disk during the soft checkpoint.
SOFTMAX (a DB2 UDB configuration parameter) specifies the percentage of a log file
used before a soft checkpoint will occur. Large databases are configured with
SOFTMAX spanning several log files.
DB2 UDB's Forward Recovery uses a backup image (DBD) and the entire subsequent
log files created after the backup are used to recover the database to a consistent state.
The design of a backup strategy should be based on how much time is to be spent on a
recovery. With ESS SMBR's advantage in providing rapid backup of VLDB's (Very Large
Data Base) made possible by the combination of PPRC and FlashCopy CopyServices
functions, customers can have multiple Point In Time backups which will enable them to
perform a faster recovery since there are fewer log files to redo.
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
By using the same size for the restore buffers as achieved in a good backup
performance with a certain backup buffer size, excellent restore performance can be
achieved. When a buffer is full, it is transferred to disk on FIFO (First In First Out) basis.
The number of db2med processes depends on the number of restore devices or
sessions. It is always much faster to empty the buffers to disk than to fill them from
tape/TSM. The usage of DB2 UDB parameter, PARALLELISM when reading the backup
image(s) from disk during a restore will be particularly helpful when not using multiple
tape devices or TSM sessions or when not using multiple db2bm processes.
Page 42
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Acknowledgements
Our sincerest thanks to Siegfried Schmidt and Dr. Jens Claussen, of SAPs
Advanced Technology Group (ATG) for their valuable guidance and for sharing
SAPs vision and requirements with us to accomplish the work that is reported in
this paper. In particular this white paper draws considerably from the insightful
experiments, observation and publications on DB2 UDB and storage, conducted by
Dr. Claussen at the SAP ATG labs in Walldorf, Germany. Siegfrieds earlier work
with us on the Split Mirror Backup & Recovery solution implementation on the
DB2OS390 platform with IBMs RVA and ESS storage subsystems have paved the
way for this current implementation with DB2 UDB on the AIX platform.
We would also like to thank a number of IBM colleagues with whose thoughtful
guidance, this work is brought forward with the benefit of their applied knowledge in
R/3, DB2 UDB and ESS, in delivering high availability, zero downtime, and easy to
use Split Mirror Backup and Recovery Solution for mission critical SAP customer
environments. Matt Huras, Jason Racicot, Bill Micka, David Short and James Teng
have been most helpful with their knowledge of DB2 UDB, the ESS and its
advanced functions and have endured this journey with us.
Sanjoy Das,
Siegfried Schmidt,
sanjoy@us.ibm.com
siegfried.schmidt@sap.com
Jens Claussen
BalaSanni Godavari
jens.claussen@sap.com
godavari@us.ibm.com
Page 43
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Appendix
A) DB2 UDB Architectural Overview
Page 44
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Below the level of SQL, DB2 UDB manages data objects using extents. An extent is an
adjacent grouping of a fixed number of DB2 pages.
In order to optimize disk I/O and data distribution, tablespaces manage pages by
grouping them into extents per each database object. The optimal R/3 UDB extent size
ranges from 8 to 64 pages. There should be enough free space in the container of a
tablespace to accommodate the additional extents required for database object growth.
The extent size (the number of adjacent pages) is defined on a per-tablespace level. It
cannot be changed, once it has been defined during installation of the R/3 database.
Typical extent size is eight for tablespaces with many small and unused tables, but up to
64 for the tablespace containing ABAP repository tables. All the extents for a data object
are in one tablespace, but can be spread over several OS files or devices. In DB2 these
storage facilities are called containers.
DB2 UDB supports two kinds of tablespaces:
-
SAP only uses DMS table spaces for data and indexes. The recommendation for R/3
Temp Space is on SMS and for BW on DMS for maximum performance. Both types of
tablespaces may be used in the same database. SMS tablespaces are called Systems
Managed because the operating systems file system manages the containers. With
DMS, DB2 itself manages the container space and allocates the space when the
container is created.
There is no set limitation on the number of extents in a tablespace, but a limit to the total
number of pages. This is reflected in the maximum table/tablespace size of 64 GB with
4K pages, 128 GB with 8K pages, 256 GB with 16K pages and 512 GB with 32K pages.
Page 45
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
The DB2 Extended Enterprise Edition (EEE) enables the distribution of a database
across multiple hosts and to install multiple partitions on a single host.
The limitation of 2
24
24
pages
per tablespace (n is the number of partitions on which the table space is stored). SAP,
however, currently supports EEE only for a few mySAP components.
When a DB2 UDB database instance is started, several processes are created:
1) Dedicated Shadow Processes are created when a new SAP work process
establishes a connection to DB2.
2) Shared Processes are required by the DBMS systems to function and perform
various database management tasks.
The UDB database is stored in 4/8/16/32 KB blocks in data files on disk. The container
files, online and offline log files and control files can be stored like in our test
environment in an underlying set of RAID5 disks of a storage sub system. In order to
accelerate read/write access to the data, these data blocks are cached in the database
buffer pool in production CPU main memory.
Any changes or modification to the database data are logged in the online log files. This
procedure ensures security of data. For fail-safe database operations, without using
additional operating system utilities, the control files and the online active/retained log
(log dir/log retain) files of the database system can be like in our test environment in
constant synchronous remote copy mode.
The UDB database management system holds the executable SQL Statements in the
Shared SQL Area which is part of the shared pool, only once for all processes. The DB2
Storage and Memory structures interact as depicted in Figure 11.
Page 46
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Each R/3 work process, as shown in Figure 12, does the following:
a. Connects to the database as one database user
b. Handles database requests for the different R/3 users
c. Communicates with a corresponding shadow process on the database
Page 47
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Figure 12: SAP R/3 Work Processes and their Interaction with DB2 UDB
The
R/3
naming
convention
for
tablespace
names
is
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
With ESSs robust RAID5 architecture and its use of striping different types of data on all
RAID arrays, the performance hot-spots are eliminated while I/O performance improves
through parallel access to all members of the array.
Page 49
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 51
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Figure 14: DB2 UDB Memory Management for each SAP work Process
DB2 Backup backs up the container files and the control information
The DB2 backup tools store information in the DB2 History file, which is then read by
R/3 tools.
Page 52
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Delete, marks database backup in TSM as inactive, deletion will take place
according to retention policy
Page 53
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
2) BRARCHIVE (Stores offline retained log files into TSM). BRARCHIVE backs up
the database log files from the offline log directory. BRARCHIVE can be invoked
through the command line, but is usually called from the R/3 DB2 Control Center
Extensions DB2Admin.
3) BRRESTORE (Restores offline archived log files from TSM. BRRESTORE is
used to retrieve log files into a log-retrieval directory (log_retrieve) during
recovery. It is typically used from the DB2 Control Center Extensions.
4) BRDB6QRY (Query for offline archived log files in TSM)
5) BRDBSDSD (Deletes offline archived log files from TSM)
As shown in the following Figure 16, the SAP delivered executables perform backup of
DB2 UDB Control Files, DB2 UDB Containers, Offline Log Files, On Line Log Files and
SAP objects.
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Figure 17: SAP R/3 Work Process Management with DB2 UDB
From the storage subsystems perspective, it is important to note how the SAP R/3
processes, as shown in Figure 17 above, handle database SQL statements and logging:
Page 55
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
1. A SQL statement is sent from the R/3 work process to its associated agent.
2. The DB2 Optimizer function in the DB2 agent transforms the SQL statement into an
UDB access plan, which is usually cached as part of a UDB function called dynamic
statement cache.
3. DB2 parallel I/O servers obtain information about the required buffer pool pages from
the data containers with the help of db2agents that execute in parallel, performing
the tasks defined in the DB2 access plan. The db2 agents also obtain
UPDATE/INSERT SQL statements from SAP R/3 application.
4. Data changes that occur in the buffer pool and not transferred to disk are written as
log records in the log buffer. The log file header (LFH) is moved forward to the first
log record, which contains data about pages that are changed and not on disk.
Changed pages from buffer pool(s) are copied asynchronously to containers. If the
LFH moves out of a log file, this file is not required for a crash recovery. If the file
sqlogctl.lfh containing the log file header is not readable, crash recovery is not
possible and the database must be restored.
5. A COMMIT / ROLLBACK SQL statement at the completion of the transaction causes
the contents of the log buffer to be synchronously written to the current log file in
log_dir directory.
6. Asynchronous I/O cleaners or page cleaners destage updated pages onto disk when
triggered by the following:
The maximum amount of log space that should be read during crash
recovery has been reached
Page 56
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
In preparation for SAP R/3 UDB data layout of the ESS, the following sequence of
activities should be considered:
-
Find Number and types of SAP systems to be installed in the system landscape
that typically includes Development, Quality Assurance and Production system
instances.
Network bandwidth
Design ESS configuration and perform configuration steps with ESS Specialist
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Figure 18: SAP R/3 and DB2 UDB Threads Impact on Disk Arrays
In the past, the database layouts have often tried to separate table spaces onto different
devices, e.g., separating data and index table spaces and putting each data table space
on different drives. The consequence was that the database often ended in hotspots on
Page 58
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
devices that carried a single table space. Manual intervention was necessary in each
case to alleviate the problem. Additional performance degradations occur over time due
to changing application profiles and data growth leading to more hotspots and
restructuring demands.
With advances in storage subsystem technologies and in particular advanced RAID5
implementations, application can now experience significant performance improvements,
high availability and recoverability. In a typical SMBR infrastructure set up, two ESS
storage sub systems would be used. In our SMBR set up, we have two ESS storage sub
systems (OSPL2 and OSPL6) for production and disaster recovery/backup server
access respectively. In OSPL2 we have OSPLC0 and OSPLC1 as high availability
cluster nodes.
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Within the ESS, as show in Figure 19 below, vertical boxes denote RAID5 volumes
(ranks) consisting of several physical disks.
Figure 19: Striping UDB Tablespaces and File Systems on ESS RAID5 Arrays
The ranks are connected via device adapters to the ESS fault tolerant control unit that
contains, e.g., cache and NVRAM as shown in the Figure 20. The control unit attaches
to host systems via SCSI or fiber channel adapters.
Page 60
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Figure 20: ESSs Fault Tolerant Architecture and Logical Sub Systems Design
Each UDB tablespace and each file system is striped across all RAID5 volumes. This is
the optimum configuration since the ESSs built-in I/O capabilities are allocated
automatically and dynamically on demand to all the table spaces.
In order to keep the containers balanced, all containers should have the same size.
Since DB2 applies a striping approach on extent basis, the individual containers should
not be striped once again across multiple volumes. Instead, each container should be
Page 61
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
kept locally on a single RAID volume. A clear one-to-one mapping between containers
and RAID logical volumes (LUNs) also simplifies administration.
A striped container is a DB2 Database Managed table space Storage (DMS) container,
or raw container that is mapped to a device which implements data striping beneath the
database i.e. at disk subsystem level.
Figure 21 shows a tablespace with twelve containers striped across all RAID volumes.
Two containers are mapped to each RAID volume.
Spreading this logical volume across separate hdisks on the same array would provide
no performance benefit, because all of the activity is still going to a single RAID5 array.
However, it should be noted that ESS stripes data equally across all disks in a single
array. The best technique for maximizing throughput of ESS is to balance workload
across as many RAID5 arrays as possible. For some applications, defining AIX logical
volumes across ESS logical disks on separate RAID5 arrays is one way to do this. How
ever, in cases of maintenance requirements to reformat a specific set of volumes
belonging to a single host or of the multiple hosts connected to an ESS, it would require
the reformatting of entire array. Another way would be to spread the database files
across RAID5 arrays.
ESS Configuration for performance may need to be balanced with availability
considerations. If all databases sharing the ESS should be highly available, the
database files of all the databases will be spread over the ESS clusters and DA pairs to
ensure that there are alternate paths to the same data. SDD allows for maintaining these
alternate paths and also can help in load balancing across multiple paths.
Page 62
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Ensuring that the PREFETCHSIZE of the tablespace is the RAID stripe size
multiplied by the number of RAID parallel devices. PREFETCHSIZE can be adjusted
to a value that is a product of EXTENTSIZE and number of containers. RAID stripe
size for 18GB Disk Drive Modules (DDM) is 32k and for 36GB DDM the stripe size is
64k.
Page 63
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Making the EXTENTSIZE of the tablespace equal to, or a multiple of, the RAID
stripe size.
Ensuring that the tablespaces are set up well for prefetching and parallel I/O (most
important for DMS raw containers since there is no operating system caching or
prefetching especially when sequential I/O is important (e.g. Business Warehouse
workloads).
Using larger page sizes for sequential row access workloads (e.g. SAP BW) and
smaller page sizes for random row access workloads (e.g. OLTP)
Page 64
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
ESS allows the administrator to define a logical disk that spans the entire RAID5 array,
and also allows for the RAID5 array to be split into many logical disks. For example, a
6+P array of 18.2 GB disks has roughly 104GB of usable space. This can be defined as
one 104GB logical disk, or as 4 x 24GB logical disks and 1 x 8GB logical disk, or 13 x
8GB logical disks.
Page 65
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
From a performance perspective, one 104GB logical disk should provide roughly the
same throughput as the aggregate of many smaller logical disks on the same array. It is
the array that determines the throughput, not the number of logical disks. There are no
recommended LUN sizes for the ESS. It will vary based on the application and customer
requirements.
Typically, one would allocate 8 or 16 GB LUNs over the available storage and then
distribute the data across the RAID5 arrays to get optimum performance. Further
distribution of I/O is achieved by creating AIX logical volumes using the ESS logical
volumes defined in multiple RAID arrays. Monitoring the I/O access pattern can then be
used for further tuning and re-distributing heavily accessed database files across the
arrays.
Page 66
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Figure 23: Steps in preparing the ESS for data layout and connectivity to hosts
In AIX, the Logical Volume Manager uses the defined 8GB LUNs by assigning them to
volume groups as hdisks. Each ESS logical disk translates to AIX like an hdisk (or vpath
if using SDD) as shown in the Figure 24.
maximum number of concurrent requests that it will send to ESS at 20, which is more
than enough to saturate the 7 disks in an array. This is referred to as queue_depth and
allows for high availability and data distribution across multiple disks in SAP
environments. 'queue_depth' specifies the maximum number of commands that the SSA
disk device driver dispatches for a single disk drive for a hdisk. For high OLTP SAP R/3
installations, ESS provides another parameter, MAX_COALESCE that is the maximum
number of bytes that the SSA disk device driver (SDD) attempts to transfer to or from an
SSA logical disk in one operation. For an N+P array, it is recommended to use
queue_depth=2N and MAX_COALESCE =64K * N during the ESS install procedure.
Page 67
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 68
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Serial No
Hdisk mapping
DA
loop
Volume
Group
vpath0
60012005 Hdisk5
Hdisk45
hdisk89
hdisk125 Loop A
LSS16data
vpath1
60112005 Hdisk6
Hdisk46
hdisk90
hdisk126 Loop A
LSS16data
vpath2
60212005 Hdisk7
Hdisk47
hdisk91
hdisk127 Loop A
LSS16data
vpath3
60312005 Hdisk8
Hdisk48
hdisk92
hdisk128 Loop A
LSS16data
vpath4
60C12005 Hdisk9
Hdisk49
hdisk85
hdisk129 Loop B
LSS16data
vpath5
60D12005 Hdisk10
Hdisk50
hdisk86
hdisk130 Loop B
LSS16data
vpath6
60E12005 Hdisk11
Hdisk51
hdisk87
hdisk131 Loop B
LSS16data
vpath7
60F12005 Hdisk12
Hdisk52
hdisk88
hdisk132 Loop B
LSS16data
vpath8
61812005 Hdisk13
Hdisk53
hdisk94
hdisk133 Loop A
Logvg
vpath9
61912005 Hdisk14
Hdisk54
hdisk93
hdisk134 Loop B
Logvg
vpath40
Sapvg
vpath41
Sapvg
vpath10
40012005 Hdisk15
Hdisk55
hdisk95
hdisk135 Loop A
LSS14data
vpath11
40112005 Hdisk16
Hdisk56
hdisk96
hdisk136 Loop A
LSS14data
vpath12
40212005 Hdisk17
Hdisk57
hdisk97
hdisk137 Loop A
LSS14data
vpath1
40312005 Hdisk18
Hdisk58
hdisk98
hdisk138 Loop A
LSS14data
vpath14
40C12005 Hdisk19
Hdisk59
hdisk99
hdisk139 Loop B
LSS14data
vpath15
40D12005 Hdisk20
Hdisk60
LSS14data
vpath16
40E12005 Hdisk21
Hdisk61
LSS14data
Vpath17
40F12005 Hdisk22
Hdisk62
LSS14data
Vpath18
41812005 Hdisk23
Hdisk63
Logvg
Vpath19
41912005 Hdisk24
Hdisk64
Logvg
Vpath42
Sapvg
Vpath43
Sapvg
Page 69
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Vpath
Device
Serial No
Hdisk mapping
DA
loop
Volume
Group
Hdisk65
LSS12data
Hdisk66
LSS12data
Hdisk67
LSS12data
Hdisk68
LSS12data
Hdisk69
LSS12data
Hdisk70
LSS12data
Hdisk71
LSS12data
Hdisk72
LSS12data
Hdisk73
Logvg
Hdisk74
Logvg
Sapvg
Sapvg
Hdisk75
LSS10data
Hdisk76
LSS10data
Hdisk77
LSS10data
Hdisk78
LSS10data
Hdisk79
LSS10data
Hdisk80
LSS10data
Hdisk81
LSS10data
Hdisk82
LSS10data
Hdisk84
Logvg
Hdisk83
Logvg
Sapvg
Sapvg
Page 70
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
Page 71
Storage Management for SAP and DB2 UDB: Split Mirror Backup / Recovery
with IBMs Enterprise Storage Server (ESS)
References
1. IBM Enterprise Storage Server - IBM Document Number: SG24-5465-00 (
http://www.redbooks.ibm.com/ )
2. Implementing the Enterprise Storage Server in your Environment IBM
Document Number SG24-5420-00 ( http://www.redbooks.ibm.com/ )
3. IBM Enterprise Storage Server Performance Monitoring and Tuning Guide IBM Document Number: SG24-5656-00
4. ESS Layout Considerations for a Heterogeneous System Landscape, Dr. Jens
Claussen, SAP Advanced Technology Group, December 2000.
5. Database Layout for SAP Installations with DB2 UDB for UNIX and Windows Dr. Jens Claussen, SAP AG, Advanced Technology Group, February 2001,
http://service.sap.com/atg.
6. SSQJ Documentation Version 9.B SAP Advanced Technology Group,
http://service.sap.com/atg ,May 31, 2000.
7. DB2 Internals for Administrators: With V7 Updates May 16 & 18, 2000, Matt
Huras, IBM Toronto Labs.
8. Fundamentals
of
Database
Layout
http://service.sap.com/atg , March, 2000.
SAP
AG,
Version
1.0,
Page 72