Set up DB2 for Linux, UNIX, and Windows for High Availability Using Microsoft Cluster Server Virtualize DB2 on MSCS Using Vmware

Set up DB2 for Linux, UNIX, and Windows for High Availability Using Microsoft Cluster Server Virtualize DB2 on MSCS Using Vmware

Set up DB2 for Linux, UNIX, and Windows for high availability using Microsoft Cluster Server Virtualize DB2 on MSCS using VMWare Jack Xia December 06, 2012 Anthony Corrente IBM® DB2® for Linux®, UNIX®, and Windows® has a number of options to provide high availability for production systems such as high availability and disaster recovery (HADR), DB2 pureScale, and DB2 MSCS. This article shows you how to set up a DB2 cluster in a virtual Microsoft Windows environment, including how to quickly set up a training and testing system in a virtual environment such as the cloud. This article will also help you to learn and practice DB2 MSCS without special hardware. Finally, simple troubleshooting methods are introduced to help you with common issues. This article is an update of a previously published white paper on IBM.com. Introduction DB2 for Linux, UNIX, and Windows has been recognized for providing very resilient data management to achieve high data integrity, reliability, consistency, and availability. It has the following options to provide high availability for production systems. • DB2 high availability and disaster recovery (HADR), is a data replication feature that provides a high availability solution for both partial and complete site failures. HADR protects against data loss by replicating data changes from a source database (primary), to a target database (standby). HADR is available in all editions of DB2 10, and supports up to three standby nodes for high availability and disaster recovery. • DB2 pureScale, an optional feature, offers a shared-disk clustering technology that helps provide continuous availability and scalability. • DB2 MSCS is another option for users who require a high availability solution in a windows environment. This article concentrates on the last option that can be used for training, development, or testing scenarios running VMware images on a single physical Microsoft Windows machine. Figure 1 shows the typical topology of DB2 Enterprise Server Edition (ESE) and MSCS. © Copyright IBM Corporation 2012 Trademarks Set up DB2 for Linux, UNIX, and Windows for high availability Page 1 of 34 using Microsoft Cluster Server developerWorks® ibm.com/developerWorks/ Figure 1. Typical topology Environment used in this article In this article, a single physical personal computer was used. Three virtual systems running Window 2008 Server were created in this environment as follows. • One of the virtual machines is the domain controller and Microsoft iSCSI Software Target server. • The other two are domain member servers with iSCSI initiator installed. Note: Only Windows Server 2008 Enterprise and Datacenter support Failover Cluster. Figure 2 shows the db2cls.com domain consisting of two Virtual Windows 2008 Enterprise Server, Host 1 - Cluster node1, Host 2- Cluster node2, and one Virtual Windows 2008 Datacenter Server, Host 0 - Domain controller, all connected through a TCP/IP network cloud. Set up DB2 for Linux, UNIX, and Windows for high availability Page 2 of 34 using Microsoft Cluster Server ibm.com/developerWorks/ developerWorks® Figure 2. Environment used in this article Note: The following tables are used as reference throughout this article. Please refer to these details in subsequent sections. Table 1. Physical machine one Component Hardware used in this article CPU Intel Core i7 Q720 1.6GHz Memory 8GB Disk 500GB Network 1 network card Operation system Windows 7 Professional, 64 bit with SP1 Table 2. Virtual machine one Item Detail Role Domain controller Domain name db2cls.com Memory 1GB Disk 1 local OS disk of 15GB Operation system Windows 7 Professional, 64 bit with SP1 Set up DB2 for Linux, UNIX, and Windows for high availability Page 3 of 34 using Microsoft Cluster Server developerWorks® ibm.com/developerWorks/ IP addresses Total of 2 IP addresses • 192.168.64.10 • 192.168.109.1 Table 3. Virtual machine two Item Detail Role Member of domain: db2cls.com Cluster name db2cluster1 Memory 1GB Disks 1 local OS disk of 20GB 2 shared virtual disks: • Virtual disk1 for MSCS quorum of 512MB • Virtual disk2 for DB2 instance and database of 4GB Operation system Windows 7 Professional, 64 bit with SP1 IP addresses Total of 2 IP addresses • 192.168.64.11 • 192.168.109.2 Table 4. Virtual machine three Item Detail Role Member of domain: db2cls.com Cluster name db2cluster1 Memory 1GB Disks 1 local OS disk of 20GB 2 shared virtual disks: • Virtual disk1 for MSCS quorum of 512MB • Virtual disk2 for DB2 instance and database of 4GB Operation system Windows 7 Professional, 64 bit with SP1 IP addresses Total of 2 IP addresses • 192.168.64.12 • 192.168.109.3 Table 5. MSCS cluster Item Detail MSCS cluster name db2cls.com quorum configuration Node and disk majority Cluster IP address 192.168.64.100 Disks One shared disk for quorum Table 6. DB2 cluster Item Detail DB2 MSCS cluster name db2cluster1.db2cls.com DB2 cluster instance db3 Resource group name db2Group DB2 cluster host name db2clus Disks 1 for both db3 instance and database Set up DB2 for Linux, UNIX, and Windows for high availability Page 4 of 34 using Microsoft Cluster Server ibm.com/developerWorks/ developerWorks® IP address 192.168.64.89 Set up virtual machines and domain 1. Install VMware player version 4 on your physical machine as per the details in Table 1. 2. Create three Windows Server 2008 R2 VMware virtual machine images as per Table 2, Table 3, and Table 4. 3. Create db2cls.com domain on those three Windows Server 2008 R2 VMware images. From HOST0, two members (HOST1 and HOST2) can be found in Active Directory Users and Computers window as shown in Figure 3. Figure 3. db2cls.com domain with two nodes HOST1, HOST2 Set up shared disks for the cluster on HOST0 For a typical MSCS cluster, at least one shared disk is required for all nodes in the cluster. In this VMware environment, each normal VMware virtual disk can only be accessed by a single VMware image. The iSCSI storage overcomes this limit. So in this article, Microsoft iSCSI technology is used to create an iSCSI target with two virtual disks on HOST0, then set HOST1 and HOST2 to connect to it. You need two virtual disks because the cluster needs one, and the db2 instance and database need another one. Microsoft iSCSI Target software can be downloaded from the Related topics section. The version used in this article is 3.3. 1. As shown in Figure 4, a single iSCSI target host0-disk0 with two virtual disks is used. Set up DB2 for Linux, UNIX, and Windows for high availability Page 5 of 34 using Microsoft Cluster Server developerWorks® ibm.com/developerWorks/ Figure 4. Microsoft iSCSI target on HOST0 2. Right-click iSCSI Targets and click Create iSCSI Target, as shown in Figure 5. Figure 5. Creating a single iSCSI Target Set up DB2 for Linux, UNIX, and Windows for high availability Page 6 of 34 using Microsoft Cluster Server ibm.com/developerWorks/ developerWorks® 3. Type host0-disk0 in the iSCSI target name field, and type clustOS in the Description field, as shown in Figure 6. Figure 6. Set the iSCST target name as host0-disk0 4. Make sure the IP addresses for both HOST1 and HOST2 are added, which allows these two servers to access the virtual disks of the target, as shown in Figure 7. Set up DB2 for Linux, UNIX, and Windows for high availability Page 7 of 34 using Microsoft Cluster Server developerWorks® ibm.com/developerWorks/ Figure 7. Add the IP addresses of HOST1, HOST2 to the target 5. Create two virtual disks, as shown in Figure 8, and name one as Virtual Disk 0 with size 500MB, and the other as Virtual Disk 1, size 4GB. Set up DB2 for Linux, UNIX, and Windows for high availability Page 8 of 34 using Microsoft Cluster Server ibm.com/developerWorks/ developerWorks® Figure 8. Create virtual disk for the target 6. For the first virtual disk, Virtual Disk 0, add the description clusterOS, which is used by the cluster itself. Then specify F:\share-0.vhd, as shown in Figure 9. Figure 9. Set the virtual disk as local file share-0.vhd Set up DB2 for Linux, UNIX, and Windows for high availability Page 9 of 34 using Microsoft Cluster Server developerWorks® ibm.com/developerWorks/ 7. For the second virtual disk, Virtual Disk 1, add the description DB2 Shared Disk, which is used by db2 instance and database, and then specify G:\DB2Data\DB2Disk1.vhd, as shown in Figure 10. Figure 10. Local file DB2Disk1.vhd for Virtual Disk 1 8. After Virtual Disk 1 is created, there are two files created on HOST0, as shown in Figure 11. Figure 11. Two files created for Virtual Disk 1 Set up DB2 for Linux, UNIX, and Windows for high availability Page 10 of 34 using Microsoft Cluster Server ibm.com/developerWorks/ developerWorks® 9. As shown in Figure 12, the two virtual disks are ready for the cluster. Figure 12. Two virtual disks created under host0-disk0 Set up the shared disks on HOST1 and HOST2 1. Select the Microsoft iSCSI Initiator from the Start menu of the Windows operating system, as shown in Figure 13. Set up DB2 for Linux, UNIX, and Windows for high availability Page 11 of 34 using Microsoft Cluster Server developerWorks® ibm.com/developerWorks/ Figure 13. Start iSCSI Initiator on HOST1 2. Connect to the Target dialog box, and then click OK, as shown in Figure 14. Figure 14. Target dialog box Note: Make sure that both check boxes are selected in the Connect To Target dialog box. 3. Type host0 in the Target field, and then click Quick Connect, as shown in Figure 15.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    34 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us