New Failover Clustering Improvements in Windows Server 2012 and Its Benefits for SAP NetWeaver High Availability
SAP recently announced its support on Windows Server 2012. As usual, SAP support for Windows Server Failover Clustering (WSFC) is also there. This includes installation (integrated in SWPM – sapinst), upgrades and operational support.
Clustering in Windows Server 2012 brought many new features and improvements, and the particularly interesting one is Continuous Availability File Server. This feature brings ZERO DOWNTIME for SAP SAPMNT file server share and SAP global file systems, and enables continuous non-interrupted access to SAP global files and folders for different SAP processes (like batch, spool, dialog process etc.), during the failover of (A)SCS instance.
SAP Architecture and Single Points Of Failures (SPOF)
SAP NetWeaver high availability system architecture is relatively simple:
- You need to protect SAP unique instances (so called Single-points-of-failures – SPOF), e.g. DBMS and (A)SCS instances, with some kind of clustering solution like WSFC What is WSFC
- Distribute SAP redundant components, e.g. application servers across multiple OS
Picture: SAP NetWeaver HA Architecture, with protected SPOFs components (DB and (A)SCSinstances) and redundant SAP components (Primary Application Server – PAS and Additional Application Servers – AAS)
One important question to clarify is, how would the downtime of one or more SAP system components, reflects on overall SAP system availability and functionality.
Protection of (A)SCS instance
(A)SCS Instance is one SAP SPOF. Unique components in (A)SCS instance are:
- Message Server process
Message server is used for communication and also load balancing. It is a stateless process.
- Enqueue server process
Enqueue is SAP database independent lock mechanism. It holds and lock table in computer RAM.
If enqueue process crash, enqueue lock table is lost and end user will eperience roll back of all open transaction.
- SAPMNT file share and (A)SCS instance virtual host name and associated IP address
- Global files located in …\SYS\..\folder
Global files and folders are used by all instances and different SAP processes. They are accessed on Windows via (A)SCS Instance virtual host name and SAPMNT share, e.g. via UNC path:
Picture: ASCS Instance components unique components: process, global files, sapmnt file share and corresponding SAPGLOBALHOST virtual host name with IP address
If global files and folders are not accessible, it will disrupt some SAP operations.
SAP Batch Process
One very important SAP process that is accessing global files and folders is SAP batch process. During the job activity (which can take longer time), SAP batch process will constantly write log files into global folder:
Picture: SAP Batch Process are accessing global file system over SAPMNT share to write their log files
If the global folder is not accessible for writing, even for a short time, SAP batch job activities will be canceled!
SAP HA with Windows Server Failover Clustering on Windows Server 2008 R2 (or lower)
This is exactly what will happen during the (A)SCS instance failover, if you use Windows Server 2008 R2 (or lower editions) – during the (A)SCS instance failover global files and folders over SAPMNT are not accessible to SAP batch processes. All open file handles on global file system are lost and SAP batch jobs activities are canceled! Every new attempt to access global fails will also fail.
Picture: Failover of ASCS Instance cause cancelation of SAP batch job activities
Continuous Availability File Server and new SMB 3.0 protocol in Windows Server 2012
The Server Message Block (SMB) protocol is the Microsoft access protocol for file shares. Microsoft enhanced SMB 3.0 version with many new features: http://support.microsoft.com/kb/2709568
Microsoft decided to enhance SMB 3.0 protocol to provide file-based access to application data. Now, in Windows Server 2012, sever based applications like Hyper-V and SQL Server can store their files on file share, and access it via UNC path e.g. \\hostname\fileshare\.. Of course these file shares can be protected by Windows Server Failover Cluster.
Another feature is called continuous availability, which means that in case of file share failover, access to file share will be guaranteed, and all open file handles will be restored during the failover in a fully transparent manner to clients without any downtime! Technology behind is called SMB transparent failover.
In Windows Server 2012 Failover Cluster there are two types of clustered file shares:
- File Server for general use
this file server option is used to provide central location on network for users to share files or server applications that open and close files frequently.
This type of file server is used for SAP SAPMNT file share
- Scale-Out File Share for application data
this file server option is used to provide central location on network to provide storage for sever applications (like SQL Server) or virtual machines (e.g. Hyper-V) that leaves files open for extended period of time. This type is primarily used as remote storage for Hyper-V and SQL Server. You should use dedicated cluster for protection of file shares. Hyper-V or SQL Server machines are running on a separate machine(s), outside of Scale out file share cluster.
Picture: Microsoft Failover Cluster Wizard to Create File Server
Both of them support continuous availability during the failover.
SAP HA with Windows Server Failover Clustering on Windows Server 2012
As already mentioned, file server for general use is type of clustered file share that is used for SAP SAPMNT file share, that is part of SAP (A)SCS clustered instance.
If during runtime of SAP Batch job activities (or any other SAP process that writes to global file system) a failover of (A)SCS instance happens, file server service will offer UNINTERRUPTED file and folder access! If there are any files opened, all file handled will be moved to another server that is fully transparent to clients.
Practically, this means that SAP batch job activities will not be stopped and it will continue to run during and after the (A)SCS instance failover!
Picture: Failover of ASCS instance will be transparent to SAP batch job activities
SAP Application servers are clients that consume SAPMNT file share. Prerequisite is that that SAP application servers are also running on Windows Server 2012.
Installation of SAP Application Servers outside of WSFC
As Microsoft do not support SMB loopback, it is not possible to run file server client and server on the same cluster which protect SAPMNT File Server.
Therefore, ALL SAP application servers have to be installed and run outside of WSFC cluster.
How to enable Continuous Availability File Server
Currently SAP installation tool doesn’t active continuous availability feature for SAPMNT share. You need to enable it manually.
To enable continious availability feature, after the SAP installation, open failover cluster manager, select SAP <SID> cluster group, on the lower tab select Shares. Notice that Continious Availability for sapmnt file share is set to No.
Double click on sapmnt share, and choose Settings tab.
Make sure that Enable continuous availability is checked.
Notice that now Continuous Availability for sapmnt file share is set to Yes.
You can also use PowerShell to change enable continuous availability for sapmnt file share like this:
set-smbshare -Name sapmnt -ContinuouslyAvailable 1 –Force
Running WSFC in Physical and Virtual Environment
You can run WSFC to protects SAP SPOFs both in physical or virtual environment. If you run WSFC inside of guest OS virtual machines, this type of clustering is called guest clustering. Both Microsoft Hyper-V and VMware vSphere supports guest clustering with Windows Severe Failover Cluster.
For more information on SAP NetWeaver HA in physical and virtual environment you can check in this White Paper: SAP NetWeaver High Availability and Business Continuity in Virtual Environments with VMware and Hyper-V on Microsoft Windows
Utilizing Continuous Availability File Server Feature to Achieve Zero Downtime for SAP SAPMNT file share in unplanned and planned downtime scenarios
Continuous Availability File Server can be used both in:
- unplanned downtime scenarios like: crash of Windows OS, ASCS instance, or hypervisor in virtual environment , and
- planned downtime scenarios like: patching and rebooting of Windows Server cluster nodes that is protecting (A)SCS Instance, SAP kernel patching – which requires restart of (A)SCS instance
For both scenarios Continuous availability feature is offering ZERO DOWNTIME for SAPMNT file share.
Clustering whole SAP NetWeaver Stack with Microsoft WSFC
You can cluster many DBMS with Microsoft WSFC like SAP Sybase ASE, MaxDB, Microsoft SQL Server, Oracle and IBM DB2. In this way complete SAP NetWeaver stack will run on Windows 2012 platform.
Running hybrid SAP HA scenario with SAP HANA DB and Microsoft WSFC
If you would love to utilize benefits of running SAP NetWeaver on top In-memory HANA DB, and have HA setting and benefits of Windows Sever 2012 failover features, you can run heterogeneous setting like this:
- as SAP HANA DB is running on SuSE Linux OS, you have to separately deal with HANA HA setting
- Use Windows Severe 2012 Failover Clustering to protect (A)SCS Instance and run SAP Application servers on Windows Server 2012
All These Windows instances can run in physical or virtual environment.
This is supported scenario by SAP, and it is the way how we in SAP Global IT are setting internal HANA business critical SAP systems.
Picture: Hybrid HA deployment of NetWeaver on HANA, where HANA is running on SuSE Linux, (A)SCS is protected with Windows Cluster, and Application servers are also on Windows 2012
For more details on HANA HA check this White Paper: Introduction to High Availability for SAP HANA (updated for SPS06)