Storage-based system provisioning

How-To Guide SAP Landscape Virtualization Management, enterprise edition Document Version: 1.0 – 2014-07-01 Storage-based system provisioning with SA...
Author: Pierce Higgins
3 downloads 1 Views 2MB Size
How-To Guide SAP Landscape Virtualization Management, enterprise edition Document Version: 1.0 – 2014-07-01

Storage-based system provisioning with SAP Landscape Virtualization Management

CUSTOMER

Typographic Conventions

Type Style

Description

Example

Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Textual cross-references to other documents.

2

Example

Emphasized words or expressions.

EXAMPLE

Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE.

Example

Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

Example

Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.



Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

EXAMPLE

Keys on the keyboard, for example, F 2 or E N T E R .

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning Typographic Conventions

Document History

Version

Date

Change

1.0

2014-03-31

Initial version

Storage-based system provisioning Document History

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

3

Table of Contents

1 1.1 1.2 1.3

Introduction..............................................................................................................................................6 Purpose of the Document ....................................................................................................................................... 6 Intended Audience................................................................................................................................................... 6 Other Sources of Information................................................................................................................................. 6 1.3.1 SAP Help Portal ....................................................................................................................................... 6 1.3.2 SAP Community Network ...................................................................................................................... 7 1.3.3 SAP Service Marketplace ....................................................................................................................... 7

2

Prerequisites ............................................................................................................................................ 8

3 3.1 3.2 3.3

General Remarks ......................................................................................................................................9 Landscape Preparation ........................................................................................................................................... 9 SAP Host Agent ....................................................................................................................................................... 9 SAP Application Server File System Layout on Central Storage ...................................................................... 10 3.3.1 SAP Application Server NAS ................................................................................................................ 10 3.3.2 SAP AS on SAN ..................................................................................................................................... 13 Databases............................................................................................................................................................... 15 3.4.1 Microsoft SQL Server 2008 Enterprise .............................................................................................. 16 3.4.2 SAP MaxDB 7.8 and higher (NAS) ....................................................................................................... 16 3.4.3 Oracle on Windows ............................................................................................................................... 16 Users and Groups .................................................................................................................................................. 17 3.5.1 SAP User and Groups ........................................................................................................................... 17 3.5.2 DB Users and Groups ........................................................................................................................... 17 Virtual Hostnames ................................................................................................................................................. 17 Flexible License Mechanism ................................................................................................................................. 18 SAP Transport Directory....................................................................................................................................... 19 Diagnostic Agents..................................................................................................................................................20 3.9.1 Agents during Normal LVM Operations .............................................................................................. 21 3.9.2 Agents during System Provisioning .................................................................................................... 22

3.4

3.5

3.6 3.7 3.8 3.9

4 4.1

4.2

4.3

4.4

4.5

4

System Provisioning Processes ............................................................................................................ 23 Cloning Procedure ................................................................................................................................................. 23 4.1.1 Concept .................................................................................................................................................. 23 4.1.2 Recipe.....................................................................................................................................................26 Copy Procedure .....................................................................................................................................................36 4.2.1 Concept ..................................................................................................................................................36 4.2.2 Recipe.....................................................................................................................................................38 Refresh Procedure.................................................................................................................................................44 4.3.1 Concept ..................................................................................................................................................44 4.3.2 Recipe.....................................................................................................................................................49 Refresh DB Only Procedure .................................................................................................................................. 51 4.4.1 Concept .................................................................................................................................................. 51 4.4.2 Recipe..................................................................................................................................................... 52 Rename Procedure ................................................................................................................................................ 53

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning Table of Contents

4.6

4.5.1 Concept ................................................................................................................................................. 53 4.5.2 Recipe .................................................................................................................................................... 55 Near Zero Downtime Management (nZDM) Procedure .................................................................................... 56 4.6.1 Concept ................................................................................................................................................. 56 4.6.2 Recipe .................................................................................................................................................... 62

5

Troubleshooting Information ............................................................................................................... 64

6

References.............................................................................................................................................. 65

7

Important Disclaimers on Legal Aspects.............................................................................................. 67

Storage-based system provisioning Table of Contents

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

5

1

Introduction

1.1

Purpose of the Document

In this document you get an overview of the system provisioning processes that are supported by SAP Landscape Virtualization Management, enterprise edition software. The focus of this document will be on storage-based system provisioning. We explain which end-to-end (E2E) system provisioning processes are supported and what needs to be done to setup the landscape virtualization management (LVM) software. The relevant infrastructure components and the systems you will choose as the basis for your system provisioning process. It is a guide for you to prepare a system provisioning process in LVM Style of the Document The document follows a classical top down approach. It explains all supported system provisioning processes from a conceptual point of view. For a given process, it explains all relevant configuration and setup steps necessary for the managed system and the managing system. .

1.2

Intended Audience

The intended audience is SAP system administrators that plan to implement LVM for system provisioning in their landscapes.

1.3

Other Sources of Information

The LVM orchestrates a lot of tools to provide E2E SAP system provisioning processes. Therefore it touches a lot of ground and you need additional information sources to understand all facets.

1.3.1

SAP Help Portal

The official product documentation for LVM is available on SAP Help Portal at http://help.sap.com/lvment20. The online help has high visibility and provides links to additional LVM related information, so you can use it as an entry point for questions. It is also available as inline help in the LVM.

6

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning Introduction

1.3.2

SAP Community Network

http://scn.sap.com/docs/DOC-34922 SAP Landscape Virtualization Management - Information by Topic Areas http://scn.sap.com/docs/DOC-42216 Summary of SAP Partner integrations with SAP Landscape Virtualization Management 2.0 Here you find more dynamic information like white papers or important additional information from LVM technology partners about questions how to integrate their solutions with the LVM.

1.3.3

SAP Service Marketplace

http://service.sap.com/instlvm Installation and implementation information for LVM. http://service.sap.com/sltoolset Software Logistics Toolset 1.0 Documentation System Provisioning Installing SAP Systems Based on SAP NetWeaver 7.1 and Higher - Using Software Provisioning Manager 1.0 The chapters on distributed installation and HA installation contain helpful information on what needs to be done to create an adaptive enabled installation. If you have installed your SAP systems properly as adaptive enabled (see: General Remarks) systems, you are able to execute a storage-based system provisioning process without foreseeable trouble. http://service.sap.com/notes A lot of technical information relevant for your respective use cases is already available as SAP Notes on SAP Service Marketplace. This document guides you through the relevant SAP Notes.

Storage-based system provisioning Introduction

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

7

2

Prerequisites

You have installed SAP Landscape Virtualization Management, enterprise edition. For more information, see the Installation Guide for SAP Landscape Virtualization Management Enterprise Edition on SAP Service Marketplace at http://help.sap.com/instlvm. You have configured your managed systems in LVM. You have checked all operations such as start, stop, unprepare, and prepare with the systems that you want to clone, copy, and refresh with LVM. You have ensured that the systems and hosts that are involved in a system provisioning process have no validation warnings or errors.

Note If you ignore these warnings you will most probable run into trouble during a system copy or refresh. Resolving these problems will cost you much more time than taking care that you have no warnings. You have read the post-copy automation (PCA) installation and configuration guides before you start any refresh or copy processes. For more information, see the installation and configuration guides on SAP Service Marketplace at http://service.sap.com/instlvm.

Recommendation Clone or copy the systems involved in your provisioning process for testing purposes first. You can easily delete a provisioned system in the LVM without any traces.

8

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning Prerequisites

3

General Remarks

Without looking at a specific storage technology, SAP system, operating system (OS), or database (DB) type, the idea of adaptive enablement (Ref SAP Press Book SAP Adaptive Computing - Implementation and Operation) of the LVM should make you aware of the things that are critical when you use the storage-based system provisioning in LVM. Storage-based system provisioning is based on the adaptive enablement of the SAP systems which we use as the starting point of a system provisioning process. The core idea is to detach your SAP system from a given OS instance as follows: 1.

Store it on central storage

2.

Run any service processes the system needs and provides under virtual host names

Almost all problems using storage based system provisioning stem from: Errors due to an incorrect implementation of the “attaching, detaching from OS” for a given DB/OS/SAP system/storage type and technology combination A wrong system configuration in LVM The normal SAP Installation guides do not mention explicitly how to prepare or install your system to make it adaptive enabled. When you read SAP installation guides, you should concentrate on the section that handles the installation of a distributed and a HA system. The aspects mentioned there are also relevant for you when you install your system to be adaptive enabled.

Note To avoid any trouble during storage based system provisioning, ensure that you have read and comply with the Prerequisites.

3.1

Landscape Preparation

Prepare your landscape as described in chapter Landscape Preparation of the Online Help for LVM, enterprise edition. For more information, see SAP Help Portal at http://help.sap.com/lvment20 Application Help Landscape Preparation.

3.2

SAP Host Agent

SAP Host Agent (HA) is the most important agent in LVM. Ensure that you keep the HA up to date to the latest patch level on each host in the landscape. The SAP Host Agent provides an update feature that helps you with that task. For more information, see SAP Help Portal at http://help.sap.com/lvment20 Preparation SAP Host Agent.

Storage-based system provisioning General Remarks

Application Help

Landscape

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

9

Related SAP Notes 1031096 - Installing Package SAPHOSTAGENT 1473974 - Using the SAP Host Agent Auto Upgrade Feature

3.3

SAP Application Server File System Layout on Central Storage

An adaptive enabled system must be stored on central storage. To distribute the different parts of an SAP system on central storage, you have two choices: NAS (Network Attached Storage) Can be shared on multiple hosts at the same time. SAN (Storage Area Network) Is attached to only one host at a given point in time. Here you must be careful to store only SAP Application Server (AS) directories in one storage unit that is only needed on one host. See picture: Figure 3 . What needs to be or can be on central storage and what can be shared or not shared depends strongly on the DB and must be considered separately. For more information, see Databases. In the following, we will discuss the two choices for the parts of the SAP AS exclusive the DB.

3.3.1

SAP Application Server NAS

Under Linux with NFS as the standard default setting under Linux you can live with the simplest possible mount configuration. NFS allows you to share your mounts on multiple hosts without conflicts.

10

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

Figure 1: SAP Web AS File Structure under Linux

On every host of a transport group, share the directory /usr/sap/trans. For the DB, you must consider only the home directory of the DB, such as . ora user and oracle.

3.3.1.1

Simplest Possible Mount Configuration

You can bring up NFS shares on multiple hosts without the risk of file system inconsistencies. For the DB, you would use /oracle as mount point in the simplest possible case. With that mount configuration you also move the database completely; you do not only move the data files.

Storage-based system provisioning General Remarks

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

11

Figure 2: Mount Points (red) for NFS under Linux

For the system you have the mount point /usr/sap/trans (system wide).

3.3.1.1.1

SAP Instances

All SAP instances get the following mounts: /sapmnt/ /usr/sap/ /home/adm Depending on the version of the SAP NetWeaver AS and the database used, the instances also need to look into the database directories to be able to connect to the database. You must consult the DB-specific section of the installation guides and the corresponding SAP Notes to find out what needs to be done to ensure connectivity and adaptive enablement of the DB.(see 3.4 and 6 )

12

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

3.3.2

SAP AS on SAN

To use SAN, certain directories must still be shared on multiple hosts as there is for example: /usr/sap/trans (system wide) similar for the SAP instances to run in a distributed setup on multiple hosts you still need shared folders, See next chapter for a distributed set up. For a simple single system setup in one volume, see 3.3.2.1.2.

3.3.2.1.1

SAP Instances for distributed set up

All hosts of instances get the mounts: /sapmnt/ /home/adm /usr/sap//SYS The hosts of individual instances get only their share (literally): /usr/sap//DEVBMGS /usr/sap//D /usr/sap//ASCS /usr/sap//ERS

Storage-based system provisioning General Remarks

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

13

Figure 3: Mount configuration using SAN (Red) storage. There is still a need for shared storage (Blue) for the SAPGLOBALHOST and the SYS directory. (Mißbach, 2005) (Stezel, 2007)

3.3.2.1.2

SAP Single System on SAN

If your focus is not so much on distributing your system over multiple hosts but just to use central SAN storage for system provisioning, you can actually bring your SAP AS in one volume as follows.

14

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

/

/dev/sap

sapmnt/

usr/sap/

sapvolume/

/

sapmnt/

/

trans/

home/adm/

trans/

home/adm/

Figure 4: SAP AS in a SAN volume. The read arrows are symbolic links

For the database you could proceed accordingly, store it in one volume and bring it up on the same or another host. The symbolic links can be created beforehand on any host or with a custom hook. Figure 2

3.4

Databases

Databases are a critical part of the adaptive setup. Most SAP installation guides tell you little or nothing about the database part at all. The reason for that is that SAP has always kept itself independent from OS/DB vendors and allows you the usage of a DB of your own choice, As a consequence, we can give only recommendations for certain DBs and certain versions of these DBs and since a best practices guide gives only recommendations, we do not list all possible scenarios. In general, you have two options for an adaptive setup of your SAP system database. 1: Your database software runs together with you database files and is adaptive installed as a whole unit. 2: Only your database files are "adaptive" enabled and your database files will be moved around by the LVM. Obviously the software must then be installed on all eligible hosts. Depending on your database type you have both or only one option.

DB

Adaptive options

MS SQL Server

Database files only

Oracle

Database files only & Database and Database files.

MaxDB

Database files only & Database and Database files.

Storage-based system provisioning General Remarks

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

15

3.4.1

Microsoft SQL Server 2008 Enterprise

A rather detailed How-To-Guide is available to enable an SAP system. For detailed information, see the following: Adaptive Enabling an SAP System Windows/MSSQL/NetApp on SAP Community Network at http://scn.sap.com/docs/DOC-14416 Windows-How-To-Guide, which that is attached to SAP Note 1783702 - SAP Landscape Virtualization Management 2.0

3.4.2

SAP MaxDB 7.8 and higher (NAS)

You have initially installed the SAP system with SAP Max DB version 7.8. SAP systems that have been upgraded to MaxDB version 7.8 are not considered in this document. SAP MaxDB has the concept of Global Data Path and Global Program Path. You have installed the SAP systems on global storage. The SAP systems can be shared on multiple hosts. SAP MaxDB needs access to the installation file /etc/opt/sdb. This file needs to be shared on all hosts MaxDB is running on. So it conceptually belongs to the Global Data but is normally not contained in that path. On each host you want to run a DB instance, SAP MaxDB needs the directory /var/lib/sql/.

Note Do not share the directory on NFS storage. It can remain local. But it should have been created once on the host during a SAP MaxDB installation. On each host you consider an SAP MaxDB the DB host should have seen an SAP MaxDB instance installation once. The DB needs the following mounts: o /sapdb//db/ o /sapdb//data/ o /sapdb//saplog/ For the connectivity the SAP application server needs the mounts: o /sapdb/clients// For other configurations and SAP MaxDB releases, see Troubleshooting Information. For more information about SAP Max DB, see SAP Help Portal at http://help.sap.com/maxdb.

3.4.3

Oracle on Windows

For more information about setting up an Oracle DB on Windows, see SAP Help Portal at http://help.sap.com/lvment20 Application Help Landscape Preparation.

16

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

3.5

Users and Groups

When talking about users, we talk about SAP OS users and the DB OS users. Obviously when working in an adaptive enabled landscape were we also provision new systems it is highly recommended to manage these users and groups in a central identity management system like an LDAP or an Active Directory under Windows. For more detailed recommendations, see below.

3.5.1

SAP User and Groups

sapadm user should be local users on each host. adm user should be a user in a central user storage like LDAP, NIS, Active Directory sapsys group containing all adm users should be a group in a central user storage like LDAP, NIS, Active Directory Under Windows, the user and group structure is more complicated. For details, see http://scn.sap.com/docs/DOC-14416. Obviously, the home directories of the adm users must be placed on central storage and moved/shared on the respective hosts where SAP instances are running.

3.5.2

DB Users and Groups

Each database has its own user and group structure. Depending on the sematic of that structure, you must decide where to place the home directories of these users and which users (home directories) need to be in the central user store and which ones not.

3.6

Virtual Hostnames Recommendation Use an own virtual hostname for each SAP instance or DB. That gives you the greatest flexibility.

Caution No DNS aliases are allowed! Host name resolution must be unique in forward and backward lookup on each host in an LVM network and from the managing LVM! For naming patterns of the virtual host names, see the Online Help at http://help.sap.com.

Storage-based system provisioning General Remarks

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

17

Related SAP Notes 962955 - Use of virtual or logical TCP/IP host names 129997 - Hostname and IP address lookup 611361 - Hostnames of SAP servers 21151 - Multiple Network adapters in SAP Servers With regard to network topology considerations have a look at the SAP Document Network Integration of SAP Servers that is attached to this SAP Note. The document is quite old but is still valid for NetWeaver ABAP WEB AS.

3.7

Flexible License Mechanism

For the adaptive enablement of SAP systems, a usable license handling is equally important as virtual hostnames. SAP licenses are normally bound to a hardware key defined by the hardware of the message server. So as soon as you change the hardware your systems will stop working and tell you that you have no valid license anymore. When you plan to use the adaptive concept in your landscape, you need a way to automatically handle your licenses. Such a mechanism exists in form of the flexible license mechanism. The key idea of the flexible license mechanism is that the message server contacts a hardware key generator somewhere in the network. That hardware key together with network data is used to generate a network-ID that can be used to generate a license key that can then be used and remains valid if the message server is moved to another host. Key to that is of course that the network ID is not changed and that is the case as long as you use virtual hostnames.

18

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

Host B

AS Host HK R

SCS:civhostname MS

DB

R

HK-Generator R

Host A SCS:civhostname

R

MS

Figure 5: Network-ID that contains ID from HK-Generator and virtual hostname remains constant and so the stored license pulled for that key remains valid

The flexible license mechanism is not really necessary during system provisioning since during system rename a new temporary license is installed. You could of course preinstall valid licenses for the new SID of your copy or the SID of the system you are refreshing. Then you would gain flexibility with regard to the target host of your copy refresh. During the nZDM system cloning procedure, it is in any case helpful since your clone immediately has a valid license and will not stop working after 15 minutes.

Recommendation Prepare your landscape so that you are able to use the flexible license mechanism. For more information about how to setup and use the flexible license mechanism, see SAP Help Portal at http://help.sap.com.

Related SAP Notes 1629598 - SAP Kernel 720 will replace older kernel versions

3.8

SAP Transport Directory

An important part of each SAP system landscape is the transport directory used by every SAP system in a transport landscape. This transport directory is used by all SAP systems in one transport group and is therefore normally a shared folder on central storage. When you relocate your system in that transport landscape from one

Storage-based system provisioning General Remarks

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

19

host to another, you configure the transport directory as a mount configuration of one SAP instance of the system, e.g. as part of the central instance. Then the directory will be visible on each host where the central instance is running.

Figure 6: Transport directory in transport group, wavy arrows indicate file system exports and imports.

On the other hand, when you copy or refresh your system you normally will not copy the transport directory. Therefor you should not configure the SAP transport directory as a mount point of your system. Before doing refreshes you should also consider if you have pending transports to your productive system. Obviously the productive system and the quality/test system that is about to be refreshed should be on the same patch/SP level.

3.9

Diagnostic Agents

SAP Solution Manager uses its own agent to collect all types of information, such as, E2E root-cause analysis. This agent called Diagnostic Agent, is basically an own SAP systems with its own SID and installation. When you install your system, you will automatically get one Diagnostic Agent per SAP instance or DB instance. Actually the installation is per virtual host name, if you use one virtual host name for the entire SAP system you get only one Diagnostic Agent if you use one virtual host name for each instance in the system you will as many Diagnostic Agents installed. For detailed information about the Diagnostic Agent, see the SAP Solution Manager Documentation on SAP Help Portal at http://help.sap.com/solutionmanager. There you can also find recommendations with regard to your landscape set up with multiple SAP Solution Managers and detailed version information. In the context of the LVM two facets are important: Normal LVM operations for adaptive enabled systems with Diagnostic Agents

20

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

System provisioning operations in the LVM

3.9.1

Agents during Normal LVM Operations

You have two options to use Diagnostic Agents together with LVM: Diagnostic Agents handled transparently by LVM You configure the Diagnostic Agents together with the SAP system. The rest is done by LVM.

Figure 7: Normal Diagnostic Agent setup conform to LVM operations

LVM ignores Diagnostic Agent and the Diagnostic Agent of the host uses the 'agent on the fly' feature You configure the Diagnostic Agent that is installed on the host (without virtual host name) to use 'agents on the fly' and you do not configure the Diagnostic Agent with the system in the LVM. The rest is handled by the Diagnostic Agent. It will spawn new Diagnostic Agents on the fly in case new host names will be bound to the host.

Figure 8: On the host the Diagnostic Agent was set up to use Diagnostic Agents on the fly. Nothing must be done from LVM side.

Storage-based system provisioning General Remarks

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

21

Related SAP Notes 1473000 - Diagnostic Agent integration into Landscape Virtualization Management software

3.9.2

Agents during System Provisioning

During system provisioning processes you must consider the following: New SAP systems and clones are created. A system rename during system copy does not take care of a Diagnostic Agent. LVM creates a clone of a Diagnostic Agent if it was configured with the original system as described in SAP Note 1473000 (not using “the agent on the fly” feature).

Recommendation Do not configure the Diagnostic Agent together with systems that will be copied, cloned, or refreshed. To avoid inconsistent SAP Solution Manager data reported by inconsistent Diagnostic Agent, use consistently the 'Diagnostic Agent on the fly' concept in the LVM landscape. If you have configured the Diagnostic Agent together with the system, keep the firewall around the copied or refreshed system closed for the cloned Diagnostic Agent. Clean up the inconsistent Diagnostic Agent later on by hand uninstalling/installing a new Diagnostic Agent on the target host.

Related SAP Notes 1473000 - Diagnostic Agent integration into Landscape Virtualization Management software

22

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning General Remarks

4

System Provisioning Processes

In this section, you get an overview of all supported system provisioning processes in LVM. With the focus on the storage based version of these processes we describe the concept of what is happening during these system provisioning processes and give you a recipe how to enable these processes in LVM. For example, what needs to be done and configured before you can use that process type in LVM.

4.1 4.1.1

Cloning Procedure Concept

Cloning is the simplest system provisioning procedure. It is a fast way to create for example a test system for an update and throw it away afterwards. The clone is fenced off from the landscape and remains isolated for single system tests. In Figure 9 you see the starting position.

Figure 9: Start setup of system cloning process (simplified single host system).

The source system runs on a host, the clone will run on another host (clone host, that host will be fenced off from the landscape by using the OS firewall, therefore we need a second host). The system is adaptive installed with virtual host names (dbvh, civh, just one naming pattern as example) and the system is stored on a filer. We assume here and in the following chapters a simplified setup with a standard system (single host). The handling of a distributed system (here synonym for a system with multiple instances and hosts) is not different but more complicated. Actually LVM prepares the clone "by default" on one target host. It is easy for the user to move the different instances to another host once the system provisioning process is finished.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

23

There is a difference between a clone and a system copy/refresh, as explained in section 4.2. A clone is full oneto-one replication of its source, a copy will only contain the central instance (and central services instance), and additional application servers can be installed later via the LVM if needed. As a first step during a clone procedure LVM reserves new host names for the clone that will be used for the inbound traffic to the clone. (See Figure 10) Only LVM knows these host names, so there is no chance that any client could confuse the clone with the source system.

Figure 10: Cloning of the source system and reserving of the new host names, here the DB writes logs to ensure consistency.

You can either have the new hostnames of the clone reserved beforehand, in that case you don’t need a DNS configured or you can leave that job to the LVM. To ensure consistency of your system, different methods are possible, and they all depend on the DB type, e.g., set in Support IO or Backup mode, or stop the system. Another possibility would be to stop the system during the creation of the system snapshot but here you lose the speed of the cloning procedure (seconds!). In a next step, (Figure 11) the DB is restored to normal mode and any storage-specific cleanup work is done to bring the clone exports into working mode.

24

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 11: Preparing the clone on the new host.

On the host the DNS cache is cleaned and the “etc/hosts” and similar files for local name resolution are modified to forward all host name lookups for the old virtual hostnames to the new virtual host names of the clone (dbclone, ciclone, just one naming pattern proposed by the LVM). So the clone is completely unaware that it is started under new host names on a new host and all calls to the old system (host names) will be answered by the clone. Any outgoing network traffic into the landscape is fenced off by the OS firewall. Finally, the clone profiles are modified to use a new UUID to uniquely identify the clone and an inadvertent start of the clone without a firewall is prevented by performing a prestart check of the system.

Figure 12: Finalizing the clone by registering the instance agent and starting

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

25

The last phase (Figure 12) of the cloning is the registering of the instance agent and the starting of the system. Within a couple of minutes, you get a complete clone of your system completely (fool proved) fenced off from the landscape for testing. That clone can also be removed as quickly as you created it by using “Destroy System” in the System Provisioning tab.

4.1.2

Recipe

In this section we give an overview what needs to be done to enable cloning in LVM.

4.1.2.1

Prerequisites

You have installed the system adaptively with virtual hostnames on central storage. For more information, see General Remarks.

Note This is not a full-fledged configuration guide. It points to the relevant settings to get started with cloning. For more information, see http://help.sap.com/lvment20. Here, we only describe what you need to do in LVM itself to enable the cloning.

4.1.2.2

System Configuration

You must configure your system and the instances that make up the system as an adaptive installed service in LVM. LVM supports you with that task. For more information about the detailed configuration, see SAP Help Portal at http://help.sap.com/lvment20 Application Help Landscape Configuration. 1.

Detect the hosts of the system 1.

26

In LVM, choose Configuration

Hosts

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Discover.

Storage-based system provisioning System Provisioning Processes

Figure 13: Detect the hosts

2. Detect the source system: 2.

Choose Configuration

Systems Discover.

Figure 14: Detect the system

3.

Choose Configuration

Systems

.

4. Choose Edit. 5.

To enable the instances of the system as adaptive installed with virtual host names, maintain all marked areas:

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

27

Figure 15: Adaptive enable a service - Instance Properties

6.

Configure the network to which the instances belong.

7.

In the Mount points step, configure the mount configuration of the instances of the system.

8. Choose Retrieve Mount List.

Figure 16: Adaptive enable a service - Mount Points

3. Configure your host and the potential clone hosts: 9. To configure your host and the potential clone hosts, choose Configuration

28

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Hosts.

Storage-based system provisioning System Provisioning Processes

Your host and the host of the clone must be configured in LVM. In case you create the host of the clone during the provisioning process that is of course not necessary for the clone host. The hosts also need to be adaptive enabled and configured in the right network.

Note The clone host must also be "isolation-ready". For more information, see SAP Note 1691268 - IsolationReady Resource in SAP LVM 1.0 SP 3. 10. Maintain all marked areas:

Figure 17: Adaptive enable the hosts

4. Configure the source system: 11. Choose Configuration

Systems

12. Choose Edit. 13. Maintain all marked areas: 14. Select the cloning flag in the system configuration:

Note In case of Oracle: Configure a share for the redos written during snapshotting.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

29

Figure 18: Enable a system for cloning

15. Ensure that the system/UUID profile value has been set for the system. 16. Your source system needs a UUID (profile parameter system/UUID):

Figure 19: Ensure the UUID has been set on SAP service.

17.

30

If your system has no UUID, generate and add a UUID from LVM:

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 20: In case your system has no UUID, generate it from the LVM.

Related SAP Notes 1691268 - Isolation-Ready Resource in SAP LVM 1.0 SP 3.

4.1.2.3

Storage

What needs to be done to set up your storage provider depends on what you use in your landscape. An entry point what to do depending on your storage provider can be found here: http://scn.sap.com/docs/DOC-40364. The integration in the LVM is done in one simple UI (

Figure 21: Configure your storage provider). To configure your storage system, choose Infrastructure

Storage-based system provisioning System Provisioning Processes

Storage Managers:

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

31

Figure 21: Configure your storage provider

4.1.2.4

Optional: DNS

To use the feature of LVM that can reserve and bind new virtual host names during the system provisioning processes, you must configure the corresponding section in the LVM infrastructure:

32

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 22: Configure your DNS

For more information about how to set up a host (agent) to update a name server to be used with LVM, see SAP Note 1572841 - Setup of name server update of SAP LVM. In addition to that, you also need a set of free IP addresses per network that can be used for new host names. This must be configured as follows:

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

33

Figure 23: Provide an IP range of free IPS for new host names per network

4.1.2.5

Optional: Virtualization Provider

In the cloning road map you must configure a host for the clone. In case you would like to provision that during the system provisioning process via a virtualization provider you must configure one.

34

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 24: Configure your virtualization manager in case you need it

As for the storage manager, this is of course only the smaller part of the configuration work that needs to be done. For more information about documents the LVM technology partners provide how to integrate their virtualization technology with LVM, see SAP Community Network at http://scn.sap.com/docs/DOC-40364.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

35

4.2

Copy Procedure

4.2.1

Concept

The system copy in LVM is based on the cloning capabilities of LVM. The high level steps are as follows: 1.

Clone the system There is a difference between the cloning done during system copy and the cloning as describe in chapter 4.1. Here we clone only the database and the central instance, respectively the central services instance but not the simple application servers. You can later add them via dialog instance provisioning. See Chapter: Installing Application Servers on an Existing System in the SAP Help for the LVM.

2.

Rename the system

3.

Fence the system from the landscape

4.

Start the copy and run the post-copy automation (PCA) on the copy.

With one level more details the LVM implements this high level process as follows: The LVM creates internally a new configuration for the new copy. The configuration contains the new SID, new virtual host names, a new UUID, and new mount points, and exports from the storage system. The LVM starts now to create that new system in the physical world. First it reserves new host, according to the new system names for the copy. Then it does basically again the same as during the cloning (see chapter: Cloning Procedure). Figure 25 shows the initial situation:

Figure 25: Setup for system copy

The cloning phase is identical to the “cloning only case” as already shown in the chapter Cloning Procedure.

36

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 26: Cloning phase of system copy

Figure 27: System copy preparing the clone on the target host.

Now two new steps come into play, which you do not have when cloning a system: 1. You need new SAP system OS users for the new system. 2. Replace old by the new one 2.1 in the file system and in DB metadata information of the clone. 2.2 in the system (application layer) itself. Step 2.1 is done by SAP System Rename and Step 2.2 is done after starting the system by post-copy automation (PCA). In the chapter General Remarks we made some comments about the SAP system OS user management.

Note You do not need that step if you created these users beforehand.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

37

Figure 28: Last phase of System Copy; renaming the system and final clean up via PCA.

Please be aware that copying an SAP system almost always means copying a system in a landscape! The procedure how to copy in LVM (what, when,..) and what PCA task lists must be executed depends strongly on the SAP system type (SRM, SCM, CRM, BI, BW, etc..). So refer to the corresponding copy guides of the system type and the corresponding guides of the used PCA task lists!

4.2.2

Recipe

In this section, you get an overview of what needs to be done to enable and execute a system copy in LVM.

4.2.2.1

System Configuration

1.

Perform the same preparation steps as for cloning a system. In this chapter, we list only the additional steps.

2.

Configure the systems for copy

3.

Choose Configuration

4.

To enable the copying of the system, select Copying.

38

Systems

Provisioning & RFC.

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

5.

Maintain the RFC destination to the system. The RFC destination is used to trigger and monitor the PCA execution in the copy. For details about the user to use and the necessary user credentials, see the online documentation on SAP Help Portal at http://help.sap.com/lvment20.

Figure 29: System Copy specific settings in the system configuration Get the release of your system: see figure 30 below. Figure 30: Get the system version right, you can enter the system release version in the free text filed or relay on the SAP BASIS version retrieved via RFC.

6. The release version is used to determine the correct software provisioning manager to rename your system. If you are note sure about which version should be set (and so the correct System Rename used), see SAP Note 1680045 - Release Note for Software Provisioning Manager 1.0.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

39

Figure 30: Get the system version right, you can enter the system release version in the free text filed or relay on the SAP BASIS version retrieved via RFC.

4.2.2.2

System and AS Provisioning Configuration

You need the software provisioning manager to rename the clone, after preparation on the target host, configure it in LVM.

40

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 31: Provide a configuration of the SWPM system rename to use for your OS/release combination.

4.2.2.3

Network Components Assignment

In case you have a more complex landscape with multiple OSs and multiple network, it might be the case that you also use different user management tools or name servers. In that case, you must configure a corresponding combination to help LVM use the right combination. See Figure 32.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

41

Figure 32: Use the right combination of user management/Name Server/Os per network.

4.2.2.4

Enable Post-Copy Automation Execution

To use post-copy automation (PCA), you must configure it in the source system. For more information about the standard tasks and task lists, see the PCA installation and configuration guides on SAP Service Marketplace at http://service.sap.com/instlvm. In the system you will therefore find the necessary documentation when you customize the standard task lists or configure your own.

4.2.2.5

Plan your System Copy Project

A system copy with LVM looks like pressing just a button but this is not the case. The copy belongs to a landscape and the copy should later be integrated into that landscape. LVM takes a lot of nitty-gritty details that need to be done during a system copy away from you but in the end you need a clear understanding of what LVM and PCA do for you and what in addition to that needs to be done by you to get your copy properly working in your landscape. Once you have a clear understanding of how you can use the LVM and PCA in your landscape you can start with the execution in LVM but better not before that point.

4.2.2.6

Execution

Once you started the system copy in the provisioning view, monitor the process in the monitoring view. If there are any errors and the process fails, LVM provides you logs with the necessary information on what went wrong. Always check these logs first. Sometimes it is easy to remove the cause of the problem, and then you can retry the activity. It might also happen that a PCA activity fails due to an error. In that case:

42

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

1.

Try to understand why the step failed by looking at the logs of the failed step

2.

Try to fix the problem using transaction code STC02 in the copied system.

3.

Retry the process in LVM

4.2.2.7

Clean-up

If you are not able to finish a system copy successfully, delete the copy you created as follows: 1.

Choose Provisioning

System and AS Provisioning.

2.

Select the copy.

3.

Choose Destroy System

Delete partial provisioned system.

This is an important clean-up work because each system copy uses resources, such as snapshots, host names and users that are created or used during the copy process.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

43

4.3

Refresh Procedure

4.3.1

Concept

The system refresh in LVM is based on the copy capabilities of LVM. The concept is that you do a refresh of a test system from a productive system to update the business data but to keep any relevant configuration of the test system. The high level steps are: 1.

Export all relevant data (configuration) Stop and Unprepare the test system.

2.

Copy the productive system (clone and rename) to create a new test system (same SID as old test system).

3.

Import the configuration again by using the post-copy automation.

4.3.1.1

PCA Refresh Execution

When thinking about the refresh scenario you also need to think about the content of your source and target systems and what is executed by whom in which system, and client. Terminology: Source system stands for the productive system, which will be cloned. Test system is the system which contains the configuration, which will be exported. Target system is the newly created test system with new business data and test system configuration (which is imported from the former test system). As shown in Figure 33 below the refresh starts in the test system: LVM triggers the export of all relevant data by calling the task manager to execute the relevant refresh task list for the system type. That task list runs under a user (called LVM_RFC) in the task manager client, normally 000, which needs to be created beforehand with the right credentials (see Copy Procedure on page 38) and needs to be configured in LVM (see Figure 29). Now the task list run is also exported to be continued later in the copied system. Therefor the user used to run the task list in the target system needs to exist in the source system! Both users must have the same name (Here LVM_RFC) but can have different passwords. It is important to make sure that the users have the same, necessary credentials in the source and the target system! You must also be aware of the fact that the additional task lists you select must be from the source system.

44

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 33: Task list execution triggered by LVM

Another general facet of the refresh is the fact that the configuration data that are exported from the test system must be accessible from the target system and by the relevant user. This user is normally the adm of the target system. Ensure that the central shared folder used to store the export is accessible by the adm.

4.3.1.2

Steps in detail

LVM implements this high level process as follows. Source and test system are adaptive enabled systems correspondingly configured in LVM. Ideally the test system has been created via LVM as a copy of the source system. In that case, LVM has the complete provisioning history of the test system. The initial setup is shown in Figure 34 .

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

45

Before any activity on a resource, system the LVM modifies its configuration of the target system to contain the new proposed mount configuration of the test system

SOURCE SYSTEM

Instagent:00

sourcehost

Filer:export s

TEST SYSTEM

Instagent:00

(uuid:A)

dbvh:IP-A

targethost

Filer:exports

(uuid:B)

civh:IP-B

dbvh:IP-C

civh:IP-D

Figure 34: Initial setup of a system refresh

As a first step, LVM enables the PCA execution in the test system and runs the export phase of the refresh. Each system type that supports E2E system refresh via LVM provides one or more refresh task lists that are preselected by the LVM. You can provide (or must, if an initial configuration is required) a variant of these refresh task lists in the test system. The execution of these task lists starts with the “refresh task list” that is executed in the test system and exports all relevant data to the file system (see Figure 35). For more information about PCA and task list variants, see the Post-Copy Automation Configuration Guide on SAP Service Marketplace at http://service.sap.com/instlvm.

TEST SYSTEM Enable PCA in target system & Run PCA Export

Instagent:00

targethost

Filer:exports

(uuid:B)

dbvh:IP-C

civh:IP-D

Figure 35: Exporting all relevant data to the file system.

The test system is stopped and unprepared (see Figure 36). From then on, it exists only on central storage. In case you selected multiple task lists you must ensure that the additional (additional to the main refresh task list) task lists have also been configured in the source system. See below.

46

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

TEST SYSTEM Unprepare target system

targethost

Filer:exports

Figure 36: Dismantled target system.

Now we perform a fast forward, since now basically a system copy happens that copies the source system to a system with the target sid . We stop in that fast forward of the “system copy” movie were the copied system has been started and PCA will be started next (see Figure 37):

Figure 37: Situation just before PCA resumes.

The LVM now triggers the import of all formerly exported configuration data and the also exported PCA refresh task list run.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

47

TARGET SYSTEM

Filer:exports Start PCA Import and ensuing PCA run

targethost

Instagent:00

Filer:exports

(uuid:B)

dbvh:IP-a

civh:IP-b

Figure 38: Import PCA content & run. Continue with PCA execution.

The PCA run will finally reconfigure the new target system to become the refreshed “old” test system. In case you selected multiple task lists they will be triggered in the sequence you selected them. In the end the LVM will again disable the PCA execution in the target system and clean up the file system. During the configuration of the refresh in the LVM roadmap the user can choose to delete finally the storage of the old test system since it normally will not be used anymore and it will only clutter the storage system. In the end it will remain a conscious act of the administrator to turn down the still active firewall around the refreshed target system, provided the PCA run properly cleaned up the target system.

Figure 39: Final clean-up of refresh.

Please be aware of the fact that refreshing an SAP system almost always means refreshing a system in a landscape! The refresh procedure in LVM (what, when,..) and what PCA task lists must be executed depends strongly on the SAP System type (SRM, SCM, CRM, BI, BW, etc..), so refer to the corresponding refresh guides of the system type and the corresponding guides of the used PCA task lists (aka PCA content)!

48

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

4.3.2

Recipe

In this section, you get an overview what needs to be done to enable and execute a system refresh in LVM. As a general remark: First you must perform the same preparation steps as when copying a system (for both source and test system), so look there first! Here we list only the additional things that must be taken care of. Actually if you worked your way through the chapters about the Clone and Copy procedure your LVM configuration is already done.

4.3.2.1

Plan your “refresh project”

Plan your refresh “project”! Despite the fact that a refresh with LVM looks like pressing just a button it is of course not the case. The refresh belongs to a landscape and the refresh should again be integrated into that landscape. LVM lets you avoid a lot of nitty-gritty details that need to be done during a system refresh but in the end you need a clear understanding of what LVM and PCA can do for you and what in addition to that needs to be done by you to get your refreshed system properly working in your landscape. Once you have that clear understanding how you can use the LVM and PCA in your landscape you can start with the execution in the LVM but better not before that point.

4.3.2.2

Prepare your task lists in the source and test system

Refresh is different from copy due to the fact that you already have the “first version” of your test system. In that system, you need to configure the refresh task list (variant) that starts the whole process. But of course PCA must also be enabled and configured in the source system, there you might even have further task lists you want to execute after the first initial task list. Remember the source system becomes the new target system. It is the task of the system administrator to consistently prepare source and test systems with respect to PCA to ensure the whole refresh procedure works properly.

4.3.2.3

Optional: Do a test copy first

An easy test to check that your system environment is correctly configured, perform a smoke test copy of your systems. For these copies, you could use dummy PCA task lists since you would anyway throw away your test copy later. The nice thing about LVM is that you can delete your test copy with one click without leaving any remnants.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

49

4.3.2.4

Execute

Once you started the system refresh in the provisioning view you should monitor the process in the monitoring view. An activity may fail due to an error. In such a case, proceed as follows: 1.

Try to understand why the step failed.

2.

Look at the logs of the failed step.

3.

Try to fix the problem.

4.

Retry the process.

4.3.2.5

Optional: Clean up after you

Sometimes it is not possible to bring a system refresh to a successful end. In that case you should have an export of your LVM configuration ready that allows you to reimport the configuration of the test system. If the reimport of the configuration is enough to prepare a complete rerun of the refresh depends on the stage where the former refresh failed. This requires an intelligent decision by the system administrator.

50

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

4.4

Refresh DB Only Procedure

4.4.1

Concept

“Refresh DB Only” is a refresh where only the DB of the source system is copied (cloned and renamed) to become the new DB of the target system. This has the advantage that you can keep all your settings, such as performance tuning, done in the profiles of your test system. It is also conceptually closer to the usual DB-Export-Import procedure used for refresh. To configure your system correctly you need to understand the basic architecture of the LVM mount configuration and volume architecture you have chosen on your storage system.

Note The volumes are the entities that can be snapshotted and cloned.

Figure 40: LVM Mount Architecture: The volume is the entity that can be cloned! Normally you use either SAN or NFS.

During “Refresh DB Only” only the mounts that are exclusively needed by the (source) system DB are cloned in the sense that the volumes that belong to these mounts will be cloned. This is more or less the definition of “the DB” the LVM has. These mounts will replace the corresponding mounts of system DB of the target system. A trivial error would be that you have configured your system in a way that it has no exclusive DB mounts, and then LVM would not know what “the DB” is. Keep in mind that even so that the volumes of the system DB are cloned other mounts (of non-DB instances or nonexclusive DB mounts) that peek into the DB volumes will continue to look into the old volumes. The implication that this cloning behavior has for the volume layout must be considered by the customer. So as a general remark, think about your volume design first before using it together with LVM, a simple implementation would be that you should use at least one volume per instance. You see that different behavior in the storage step during the Refresh Road Map (see Figure 41: Only Exclusive DB volume cloned during Refresh DB only.

) here the system was installed in a way that one volume carries the DB.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

51

Figure 41: Only Exclusive DB volume cloned during Refresh DB only.

4.4.2

Recipe

There is no difference to the normal refresh procedure. No special preparation recipe is necessary. Ensure that the mount configuration allows the cloning of “the DB” according to the last chapter. In other words, your mount configuration has exclusive DB mounts. LVM is currently not executing any additional checks that ensure that. You must take care!

52

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

4.5 4.5.1

Rename Procedure Concept

The rename procedure of the LVM is more or less a system copy (as described in Chapter System Copy Procedure) without cloning the original system. i.e. it allows you to change the: SID of your system Host names of your system Instance numbers The users (i.e. new SID specific sap OS users will be created) This procedure will also work for traditionally installed systems but with an adaptive enabled system you have the benefit that you may restore your old system in case something goes wrong during the rename (in case you created a snapshot before). In detail the process looks as follows for a storage-based system rename. First, LVM internally creates a configuration for the renamed system and reserves new host names for the new SID (see Figure 42 and Figure 43).

Figure 42: Initial setup

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

53

Filer:exports

host

Instagent:00

User Store: SAP System Users for:

(uuid:A)

dbvh:IP-A

civh:IP-B

DNS Store: Update DNS to create new db.vcmlab and ci.vcmlab virtual host names and bind them to new Ips: dbvh:IP-a civh:IP-b

Figure 43: Create new host names

The system is stopped and unprepared. (see Figure 44)The local DNS cache is cleared. The mount points are renamed and the system volumes are mounted again on them. The new system is prepared on the old host. The new users are created. The PCA phase is prepared (see Figure 44 Figure 45) The system rename is executed.

Figure 44: Dismantle original system to remove it from its old mount points

54

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 45: Prepare snap shot volumes on new mount points, prepare PCA and run system rename, bring up OS firewall.

To prevent the renamed system from calling out into the system landscape before it is properly (PCA) renamed, an OS firewall is started. Then the system is started (including prepare of instance agent) and PCA is executed. Finally, inside LVM the original system configuration is deleted.

Figure 46: Finalize system rename

4.5.2

Recipe

There are no special preparation steps and execution steps required. Just prepare your system as if you would like to copy it.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

55

4.6

Near Zero Downtime Management (nZDM) Procedure

4.6.1

Concept

The LVM nZDM procedure is a feature of LVM that only works together with the near Zero Downtime Management (nZDM) for Enterprise Portal (EP). The aim of the integration is to provide a first simple integration between the nZDM EP procedure and the LVM to leverage the ability of LVM to create clones in a safe and fast way. The nZDM EP procedure so far could not create a clone and fence it off from the remaining network during the procedure; neither promote the clone to become the new productive EP system. That part is now automated by LVM. LVM only supports the nZDM procedure for EP. The other procedures for, e.g., PI, are conceptually different and the synergies are not given as for the nZDM procedure for EP. The integration supports all EP versions that are supported by the nZDM procedure itself. The way the source system was provisioned influences how LVM supports the integration. General remark: The system must be installed with virtual hostnames and it should be installed on central storage that is supported by LVM If the system is, for example, not installed on central storage but in a virtual machine, a lot of the benefits are lost because e.g. the clone process takes much more time. So in the following, we will assume that the administrator of the EP system has followed these recommendations. The key prerequisite for that is that the source system has been installed with virtual hostnames, as otherwise the hostnames and therefore the network identity could not be switched to the clone. If the system is not installed in central storage it must be installed in a VM that is managed by a virtualization infrastructure that is supported by LVM. The procedure involves migration of hostname/IPs from the source system to the cloned system to facilitate the switch from the old source system to the patched system (clone). Depending on the setup of the source system to listen to a fixed hostname/IP (either of the SAP System or the DB) a restart of the cloned system might be necessary. We try to predict that in our procedure but depending on the installation/configuration options of the system/DB that behavior differ. At best you avoid these settings (use fixed hostnames to listen to, for DB and SAP system) then your downtime can really be brought to a minimum. Do not bind the SAP System and/or the DB to fixed hostnames/IPs The procedure currently relies on the default ports for the DB clients to setup the necessary nZDM connectivity from the cloned system to the source system to transfer the DB delta logs. You need to enable the local port forwarding (see below) on the host of the source system via the following SAP Host Agent profile setting: acosprep/LVMEnableLocalForwarding = true

56

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

4.6.1.1

nZDM Workflow for EP

4.6.1.1.1

Prerequisites

You have prepared your EP system as described in the corresponding nZDM guide. For more information, see https://websmp206.sap-ag.de/~sapidb/011000358700000100742013E. You have setup and configured your EP system in LVM as an adaptive installed system. For more information, see General Remarks. During the procedure, you need the nZDM UI somewhere in the landscape where it can be started and can connect itself to the source system and the clone system.

Caution Do not store the nZDM UI in the home directory of the system (admin) you are cloning. The system will be decommissioned in the end. The mounts will be detached from the resource. If your nZDM UI is still running at that time the nZDM procedure will fail in the last step.

4.6.1.1.2

Steps

Step 0 1.

Configure your system in LVM as a system for that the nZDM procedure is enabled. This is a pure declaration that system is a system type that supports the nZDM procedure and that has been configured as described in the nZDM for EP users guide. There are not checks in LVM to ensure it. A new variant of the cloning procedure becomes visible in the provisioning tab of the LVM. The roadmap is slightly modified against the normal cloning roadmap. You see additional host names in the DNS step that will be used later by the nZDM procedure to safely communicate with the source system and you see the additional hostnames and ports that will be opened in the firewall around the target system. Here you should use the defaults.

2.

Start the process in LVM. Before any activity on a resource or service, LVM creates a new configuration of the new clone (with new clone virtual hostnames, new UUID:B and modified exports). In the pictures below we are using the NZ1 system (UUID:A). The NZ1 system runs as the source system on the acvml2121 resource. On the resource, the instance agents are registered. The IPs of the virtual host names are bound and the exports are prepared as shown in Figure 47.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

57

Step 1 1.

Once the process has provided the new additional host names, bound them to the source system and created a local port forwarding from the new additional host name port combination to the real virtual host name port combination of the source system the user is asked to start the change recording of the nZDM procedure.

2.

In the process the user gets the connection information which host name port combinations he should us in the nZDM UI.

3.

The nZDM UI is started and the recording of the changes (in the DBLOGS) in the source system is started. The restricted mode of the productive system starts. The nZDM UI connects again the source system via the application server (the additional host name or IP of physical (might be VM) host is used) of the source system.

4.

You can already configure the DB connection details in nZDM UI. Here you provide again the additional hostname or IP of the physical (might be VM) host of the source system.

5.

Now you can release the process in the LVM. Now the normal clone process continues. (The picture is not entirely correct in the process the registration of all host names is done first, the additional and the clone host names are not reserved in a separate step.)

Figure 47: Start of nZDM procedure nZDM restricted mode starts on step 1

Step 2 The volumes on the filer are cloned. Now, preparation work on the target system starts. First, the local host name lookup on the target system (acvml2121nzdm) is adjusted so that on the host of the clone the lookup to the old host names will be redirect to the new virtual host names of the clone (respectively the corresponding IPS). After

58

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

that, IP caches are invalidated, then the new virtual host names (IPs) of the clone are brought up on the target host and the cloned volumes are prepared on the target host.

Figure 48: Normal cloning steps

Step 3 The profiles of the target system are then modified to contain the new system UUID of the clone configuration in LVM. Finally the OS firewall is set up to block all outgoing connections on the target host, the instance agents of the clone are registered and then the clone system is started. The nZDM process stops now and waits for the finishing of the upgrade procedure of the clone. It should be clear that whatever the clone procedure is: VM-based or storage–based. The speed of the procedure does not matter. It just will be part of the overall upgrade procedure that easily can take hours/days.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

59

Sta rt

log tr a ns fer ea fte

ru pg r ad eo fc lon e.

Figure 49: Normal cloning procedure till second step to wait for the nZDM procedure to finish (finish of patching e.g.).

Upgrade step You now have a fully functional clone. The target system is up and running. You can apply your SPs, EHPs or whatever you want to do to your original source system. Once you are done with your work, you start the transfer of the deltas from the source to the target system via the nZDM UI. The LVM opens the firewall around the target system to allow a connection back to the additional hostnames/IPs of the host of the source system. Once the deltas have been transferred (or almost transferred) the nZDM UI finishes the procedure by shutting down the application servers. The creation of deltas will stop, the transfer will finish at some point and the nZDM procedure itself is finished and the UI can be closed. The switch over time started by stopping the source system and is counting now. Now LVM starts to promote the clone as the new source system in the landscape.

60

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 50: Promotion of the clone begins.

Step 5 The virtual IP addresses of the original NZ1 system are moved from the source to the target host. The local host name look up on the target host is cleaned up from the mapping and the OS fencing is removed. The cloned system can now be used as the new NZ1 system. The system downtime ends at this point. Inside the LVM the mount configurations of the clone and the original NZ1 system are exchanged. The clone configuration and the original configuration swap identity by exchanging the mount configurations and UUIDs. The configuration of the clone system (with the original mount configuration of the original NZ1 system) is set to operational so the system is no longer visible inside the LVM operations views.

Figure 51: Clone Promotion

Step 6 In the end, the original NZ1 system is dismantled on the source resource. Therefore, the original, virtual host names are locally resolved to the host name of the source host. The system is stopped completely. In case the system is installed adaptively, the instance agent on the source system is unregistered and the old NZ1 exports are unprepared and finally the local name resolution to the old NZ1 host names is reverted again.

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

61

Figure 52: Dismantle source system

In case you operated your EP system in the way that the SAP system and/or the DB is bound to a fixed IP addresses you would need to restart your EP system, that would really spoil you near zero downtime of you EP system so you should think about using that feature before you implement it.

4.6.2

Recipe

There is actually nothing special to consider during preparation of the process, as for LVM it is a clone process with some special handlings in between and in the end. So just ensure that you enabled the “nZDM cloning” in the system configuration (see

Figure 53: Enable nZDM cloning). The rest of the recipe is the same as for the normal cloning but make sure to enable port forwarding on the source system host, For details, see previous chapter in the beginning.

62

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning System Provisioning Processes

Figure 53: Enable nZDM cloning

Storage-based system provisioning System Provisioning Processes

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

63

5

Troubleshooting Information

This section contains troubleshooting information that helps you to check and resolve any problems that may occur. SAP Note

SAP Note Title

1084753

1084753 - Issues with sapacosprep

1113545

1113545 - Problems with SAP Host Agent

1250285

1250285 - SAP Host Agent problems on HP-UX with NSS LDAP

1292836

1292836 - Logfiles of the SAP Hostagent

1366774

1366774 - Monitoring Errors for Resources in ACC

1380240

1380240 - sapdbctrl on MaxDB attach does not work on Windows

1439391

1439391 - SAPOSCOL Service deleted after SAPHostAgent Installation

1561700

1561700 - Troubleshooting guide for Adaptive Computing Controller

1628593

1628593 - DB6: Host Agent GetDatabaseProperties Does Not Return Data

1654560

1654560 - SAPInst troubleshooting for storage base copy/refresh

1673528

1673528 - Failed to execute Instance Management Operations in ACC/LVM

1790812

1790812 - Problems with the SAP Host Agent rpm package

1801371

1801371 - LVM: No valid release configuration found

1831642

1831642 - sapinst doesn't start on windows with virtual hostnames

64

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning Troubleshooting Information

6

References

Mißbach, G. K. (2005). Adaptive Hardwareinfrastrukturen für SAP. SAP-Press. SAP AG. (kein Datum). 1673528 - Failed to execute Instance Management Operations in ACC/LVM . Von SAP Notes: http://service.sap.com/sap/support/notes/1673528 abgerufen SAP AG. (08. 05 2006). 8307 - Changing host name on R/3 host: What do you do? Von SAP Notes: http://service.sap.com/sap/support/notes/8307 abgerufen SAP AG. (10. 06 2008). 129997 - Hostname and IP address lookup. Von SAP Notes: http://service.sap.com/sap/support/notes/129997 abgerufen SAP AG. (11. 11 2008). 21151 - Multiple Network adapters in SAP Servers. Von SAP Notes: http://service.sap.com/sap/support/notes/21151 abgerufen SAP AG. (31. 03 2009). 1250285 - SAP Host Agent problems on HP-UX with NSS LDAP . Von SAP Notes: http://service.sap.com/sap/support/notes/1250285 abgerufen SAP AG. (28. 08 2009). 1380240 - sapdbctrl on MaxDB attach does not work on Windows . Von SAP Notes: http://service.sap.com/sap/support/notes/1380240 abgerufen SAP AG. (19. 11 2010). 1366774 - Monitoring Errors for Resources in ACC . Von SAP Notes: http://service.sap.com/sap/support/notes/1366774 abgerufen SAP AG. (02. 03 2010). 979401 - Adaptive Computing with MaxDB/liveCache . Von SAP Notes: http://service.sap.com/sap/support/notes/979401 abgerufen SAP AG. (03. 02 2010). 1292836 - Logfiles of the SAP Hostagent . Von SAP Notes: http://service.sap.com/sap/support/notes/1292836 abgerufen SAP AG. (29. 03 2010). 1306616 - User exits in SAP Hostagent 7.10 and 7.11. Von SAP Notes: http://service.sap.com/sap/support/notes/1306616 abgerufen SAP AG. (26. 07 2010). 1380240 - sapdbctrl on MaxDB attach does not work on Windows. Von SAP Notes: http://service.sap.com/sap/support/notes/1380240 abgerufen SAP AG. (24. 11 2010). 1439391 - SAPOSCOL Service deleted after SAPHostAgent Installation . Von SAP Notes: http://service.sap.com/sap/support/notes/1439391 abgerufen SAP AG. (19. 11 2010). 1527599 - Custom Links to RDP, SSH and SAP Logon within ACC . Von SAP Notes: http://service.sap.com/sap/support/notes/1527599 abgerufen SAP AG. (04. 10 2010). 1561700 - Troubleshooting guide for Adaptive Computing Controller . Von SAP Notes: http://service.sap.com/sap/support/notes/1561700 abgerufen SAP AG. (18. 01 2011). 1360067 - Custom Validation Scripts . Von SAP Notes: http://service.sap.com/sap/support/notes/1360067 abgerufen SAP AG. (17. 01 2011). 1467759 - Constraints for Custom Operations/Hook in ACC 7.30 . Von SAP Notes: http://service.sap.com/sap/support/notes/1467759 abgerufen SAP AG. (21. 09 2011). 1628593 - DB6: Host Agent GetDatabaseProperties Does Not Return Data . Von SAP Notes: http://service.sap.com/sap/support/notes/1628593 abgerufen SAP AG. (04. 10 2012). 1561700 - Troubleshooting guide for Adaptive Computing Controller . Von SAP Notes: http://service.sap.com/sap/support/notes/1561700 abgerufen SAP AG. (23. 11 2012). 1790812 - Problems with the SAP Host Agent rpm package . Von SAP Notes: http://service.sap.com/sap/support/notes/1790812 abgerufen

Storage-based system provisioning References

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

65

SAP AG. (19. 12 2012). 1801371 - LVM: No valid release configuration found . Von SAP Notes: http://service.sap.com/sap/support/notes/1801371 abgerufen SAP AG. (09. 09 2013). 1031096 - Installing Package SAPHOSTAGENT . Von SAP Notes: http://service.sap.com/sap/support/notes/1031096 abgerufen SAP AG. (12. 08 2013). 1084753 - Issues with sapacosprep . Von SAP Notes: http://service.sap.com/sap/support/notes/1084753 abgerufen SAP AG. (08. 11 2013). 1673528 - Failed to execute Instance Management Operations in ACC/LVM . Von SAP Notes: http://service.sap.com/sap/support/notes/1673528 abgerufen SAP AG. (11. 11 2013). 1113545 - Problems with SAP Host Agent. Von SAP Notes: http://service.sap.com/sap/support/notes/1113545 abgerufen SAP AG. (22. 03 2013). 1347299 - New User exits in SAP Hostagent . Von SAP Notes: http://service.sap.com/sap/support/notes/1347299 abgerufen SAP AG. (19. 04 2013). 1391239 - SAP LVM or ACC managing MDM 7.1 . Von SAP Notes: http://service.sap.com/sap/support/notes/1391239 abgerufen SAP AG. (23. 10 2013). 1396981 - Custom Services Configuration for ACC 7.3/SAP LVM . Von SAP Notes: http://service.sap.com/sap/support/notes/1396981 abgerufen SAP AG. (12. 11 2013). 1465491 - Provider Implementation Definition . Von SAP Notes: http://service.sap.com/sap/support/notes/1465491 abgerufen SAP AG. (11. 04 2013). 1646198 - URL Shortcuts and Parameters for LVM . Von SAP Notes: http://service.sap.com/sap/support/notes/1646198 abgerufen SAP AG. (08. 11 2013). 1673528 - Failed to execute Instance Management Operations in ACC/LVM . Von SAP Notes: http://service.sap.com/sap/support/notes/1673528 abgerufen SAP AG. (01. 03 2013). 1691268 - Isolation-Ready Resource in SAP LVM 1.0 SP 3. Von SAP Notes: http://service.sap.com/sap/support/notes/1691268 abgerufen SAP AG. (22. 03 2013). 1831642 - sapinst doesn't start on windows with virtual hostnames. Von SAP Notes: http://service.sap.com/sap/support/notes/1831642 abgerufen SAP AG. (25. 11 2013). 962955 - Use of virtual or logical TCP/IP host names. Von SAP Notes: http://service.sap.com/sap/support/notes/962955 abgerufen SAP AG. (13. 01 2014). 1654560 - SAPInst troubleshooting for storage base copy/refresh . Von SAP Notes: http://service.sap.com/sap/support/notes/1654560 abgerufen SAP AG. (01. 09 2014). 1654560 - SAPInst troubleshooting for storage base copy/refresh. Von SAP Notes: http://service.sap.com/sap/support/notes/1654560 abgerufen SAP AG. (27. 01 2014). 927637 - Web service authentication in sapstartsrv as of Release 7.00 . Von SAP Notes: http://service.sap.com/sap/support/notes/927637 abgerufen SAP AG. (2014). How to Guide: Adaptive Enabling an SAP System Windows/MSSQL/NetApp. Stezel, B. H. (2007). SAP on Windows. SAP-Press.

66

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning References

7

Important Disclaimers on Legal Aspects

This document is for informational purposes only. Its content is subject to change without notice, and SAP does not warrant that it is error-free. SAP MAKES NO WARRANTIES, EXPRESS OR IMPLIED, OR OF MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.

Coding Samples Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP intentionally or by SAP's gross negligence.

Accessibility The information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a binding guideline on how to ensure accessibility of software products. SAP specifically disclaims any liability with respect to this document and no contractual obligations or commitments are formed either directly or indirectly by this document.

Gender-Neutral Language As far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet Hyperlinks The SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. Regarding link classification, see: http://help.sap.com/disclaimer

Storage-based system provisioning Important Disclaimers on Legal Aspects

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

67

Open Source Software and Third Party Components Please refer to https://scn.sap.com/docs/DOC-42044 for information respecting open source software components made available by SAP as part of SAP NetWeaver and any specific conditions that apply to your use of such open source software components. Please refer to https://scn.sap.com/docs/DOC-42045 for information relating to SAP’s use of third party software with or within SAP NetWeaver.

68

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

Storage-based system provisioning Important Disclaimers on Legal Aspects

Storage-based system provisioning Important Disclaimers on Legal Aspects

CUSTOMER © 2014 SAP AG or an SAP affiliate company. All rights reserved.

69

www.sap.com/contactsap

© 2014 SAP AG or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies (“SAP Group”) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices. Material Number: