Home > Server Virtualization All-in-One Guides > Xen > Managing Xen virtual environments > Configuring Xen HA with Heartbeat for SUSE Linux Enterprise Server
All-in-One Guides: Xen:
EMAIL THIS
 START   GETTING STARTED WITH XEN   INSTALLING XEN   CREATING VMS AND GUEST OPERATING SYSTEMS WITH XEN   MANAGING XEN VIRTUAL ENVIRONMENTS   XEN IN THE NEWS   
Managing Xen virtual environments

<< PREVIOUS | NEXT >>: Xen virtual machines: Management options
 TIPS & NEWSLETTERS TOPICS 

ADMINISTRATOR

Configuring Xen HA with Heartbeat for SUSE Linux Enterprise Server


Sander van Vugt
01.17.2008
Rating: -3.41- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


If a server goes down, essential services don't have to shut down along with it. To prevent downtime, Linux administrators can set up a Heartbeat cluster on Linux. Heartbeat adds the advantage of a cluster to Xen virtual machines (VMs), thus maintaining VMs' uptime when a server crashes.

This series explains how to configure and use a Heartbeat cluster on SUSE Linux Enterprise Server using a storage area network (SAN) and a Xen VM as a cluster resource. I'll also discuss the Linux Heartbeat project, whose mission is improving critical services availability in the network environment at critical times. In this, the first installment, I cover installation of a SAN. In the next tip, I'll cover the configuration of the Oracle cluster file system (OCFS2).

Configuring the SAN
We begin building our Heartbeat cluster by configuring shared storage on the SAN.

Before we start, let's make a small list of required components to build a complete cluster solution with heartbeat:

  • A storage volume that allows simultaneous write access to all nodes in the cluster
  • A file system that allows for simultaneous writes
  • The Heartbeat software for high availability clustering
  • One or more Xen VMs

The first part of installing a Xen VM high availability environment (which we'll refer to as Xen HA) involves configuring a SAN. This is done with services included in SUSE Linux Enterprise Server. In a Xen HA environment, you need the SAN to store the Xen disk images and configuration files on a centralized location where they can be reached by both nodes simultaneously. If one node goes down, you still want the other node to be able to reach the required configuration files.

To prepare your cluster for storage, just create two logical unit numbers (LUNs) on the SAN. If a SAN is already in place, you can use that, but if you don't yet have a SAN, SUSE Linux Enterprise Server (SLES) 10.1 includes everything you nee...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


<< PREVIOUS | NEXT >>: Xen virtual machines: Management options
VIEW ALL IN THIS CATEGORY


RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


d to create one based on iSCSI. One can be created with a server running SLES 10.1 as the storage server and with two servers running SLES 10.1 that access the LUNs that are offered by the storage server.

Creating a shared storage device
A shared device needs to be created on the storage server: it can be a complete hard disk, a partition or logical volume or a file that is created as a disk image file. Since you'll need at least four gigabytes to store the Xen virtual disk image, I recommend using a real device such as a partition or volume for better performance. And make sure this device is available before you proceed.

In case you don't have the opportunity to use a real device, you can use to create a 4 GB file to be used for storing the Xen disk image. Of course, a 4 GB file size isn't very large to store images of Xen VMs; just increase the number used with the count parameter to make this file size bigger.

Make sure you have a small device available for storing the Xen VM configuration files. For example, use to create this as a 1 GB disk image file.

Defining an iSCSI target
Next, you have to configure an iSCSI target at the storage server that shares the disk devices. Start YaST, and enter the password for the user root and from Miscellaneous. Then, start the iSCSI Target module. At the service tab, make sure that "when booting" is selected. On the targets tab, delete the example target that exists already. Proceed by clicking "add" to add a new target. This brings up a window as shown in Figure 1: [IMAGE]
figure 1: From this interface, you specify what LUNs to offer using the iSCSI target.

Click "add" to define the LUNs. Every LUN is offered as a device at the nodes in the cluster. For every LUN that you create, you need a separate device to share. Therefore, select the LUN number for your first LUN and in the path field, specify the name of the device that you want to share, for example, . Click OK to add the device, and close the iSCSI Target configuration program.

Connecting the shared device
Now that your server is offering shared storage, go to the nodes console and start the iSCSI Initiator module from YaST. At the service tab, make sure that "when booting" is selected. Next, select the discovered targets tab and from there, click the discovery button. Enter the IP address of the iSCSI target server, leave the authentication options blank and click "next". This brings up a window (see figure 2) that mentions the name of the iSCSI target service. Click the link, and select "log in" to make sure that you are connected. [IMAGE]
figure 2: Before proceeding, establish a connection between the iSCSI initiator and the iSCSI target.

Click the connected targets tab, then click "toggle start-up". This ensures that the connection is established automatically the next time that your server reboots. Click Finish to complete the wizard. To connect all other nodes in the network that need access to the shared storage, repeat the steps for connecting the shared device.

Testing the SAN
To verify that the SAN is working, you can use the command at all nodes in the cluster. This command should list two new available disk devices. Also, you can use the command to display the session that exists from the initiator to the target.

Now you've learned how to configure an iSCSI SAN using SUSE Linux Enterprise Server 10.1, an affordable alternative to proprietary SANs. In Part 2, you'll learn how to create a cluster safe OCFS2 file system on this SAN, and providing high availability to VMs.

About the author: Sander van Vugt is an author and independent technical trainer, specializing in Linux since 1994. Vugt is also a technical consultant for high availability (HA) clustering and performance optimization, as well as an expert on SUSE Linux Enterprise Desktop 10 (SLED 10) administration.


Rate this Tip
To rate tips, you must be a member of SearchEnterpriseLinux.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Linux Web Server & Application Server
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts