Intrductin t Backup and Recvery in a Virtual Irn Envirnment Discusses backup and recvery f Virtual Servers (VSs) in an envirnment utilizing server virtualizatin technlgy frm Virtual Irn. Prvides a high-level verview f Virtual Irn s server virtualizatin technlgy and the methds that can be emplyed fr data backup and recvery.
CONTENTS Intrductin... 3 Virtual Irn Technlgy... 3 Virtual Irn Strage Cnfiguratin... 4 Lgical Disks...5 Raw Disks...5 Virtual Server Backup... 6 Backup and Recvery Overview...6 Virtualized Server Backup Challenges...7 Virtual Server Backup Advantages...7 Backup Strategies with Virtual Irn... 8 Overview...8 Backup Agent n Each Virtual Server...8 Snapshts and a Prxy Backup Hst...9 Raw Disk and Strage Subsystem Functins...11 Other Backup and Recvery Optins...12 Summary...12 Appendix: Snapsht Script...13 Intrductin t Backup and Recvery in a Virtual Irn Envirnment 2 f 16
INTRODUCTION If yu were t ask yurself, What is the significance f this tpic? the answer wuld be this: virtualized servers, while behaving like physical servers frm an applicatin perspective, have unique characteristics when it cmes t strage and backup and recvery. Fr that reasn, the backup and recvery techniques that a business currently uses in a physical server envirnment may nt be practical (r even pssible) in a virtualized envirnment. In additin, there may be mre effective ways t perfrm backup and recvery in a virtualized envirnment. This paper will identify these differences and describe the available backup and recvery techniques when Virtual Irn is used as the virtualizatin technlgy. Server virtualizatin is gaining wide acceptance in many IT shps tday, because it allws the data center t be mre respnsive t the needs f the business while at the same time reducing verall perating csts. Virtual Irn has chsen t wrk with Brcade t develp backup and recvering techniques and best practices because f Brcade s vast strage management and backup and recvery expertise. Brcade and Virtual Irn will cntinue t enhance and develp these techniques as Virtual Irn s server virtualizatin technlgy evlves. VIRTUAL IRON TECHNOLOGY Virtual Irn (VI) is an enterprise-class server virtualizatin technlgy that fully leverages the virtualizatin capabilities f tday s mdern x86 prcessr chips as well as industry standards. Virtual Irn s technlgy can be used t address many f the key server management challenges in a data center including the fllwing: Efficient utilizatin f server resurces Rapid prvisining and deplyment High availability and recvery Wrklad management Cst cntainment VI allws a prperly cnfigured physical server t be lgically partitined t run multiple instances f Windws- r Linux-based guest perating systems. These guests (als called Virtual Machines r VMs ) each run their wn perating system image and are allcated a specific number f CPUs, which are shared amng the ther VMs, and a fixed amunt f dedicated memry. In additin, each VM has access t ne r mre virtual Ethernet netwrk interfaces and strage (disks). The entire virtual envirnment is managed by Virtual Irn s Virtualizatin Manager. Virtualizatin Manager is used t perfrm all cnfiguratin and management functins in the virtual envirnment. The Virtual Irn architecture cnsists f the fllwing key cmpnents: Managed Nde. An industry-standard server utilizing Intel r AMD prcessrs with hardware-assist virtualizatin supprt. Virtual Data Center. A lgical gruping f managed ndes. Virtual machine/virtual server. An instance f a Windws- r Linux-based perating system running n a managed nde. Smetimes referred t as a guest perating system. Virtualizatin Manager. Virtual Irn management cnsle. Virtualizatin Manager Server. Server hst n which the Virtualizatin Manager applicatin runs. Virtualizatin Manager Client. Hst n which the Virtualizatin Manager GUI is executed. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 3 f 16
Hypervisr. The first sftware laded when a managed nde bts. Virtual Irn s hypervisr is derived frm the Xen pen surce prject; it manages all f the nde s hardware and allcates resurces t the virtual servers. Requires n disk resurces; uses nly a RAM-based disk fr executin. Service Partitin. Once the hypervisr has been laded a virtual service partitin is created n the managed nde, called the service partitin. This is a special privileged partitin that has access t all the hardware and als cntrls the hypervisr. The perating system that runs in this partitin is a very lean versin f the Nvell SUSE Linux Enterprise Server (SLES) 10 kernel. It uses a RAM disk fr peratin, and therefre des nt need any physical disk strage. The service partitin is cntrlled by Virtualizatin Manager via an embedded agent. The service partitin has n cnsle and is nt useraccessible. Ethernet netwrks. The managed nde may cntain ne r mre Gigabit Ethernet Netwrk Interface Cards (NICs). Virtual Gigabit NICs are assigned t each virtual server based n the server cnfiguratin. Disk strage. The managed nde cnnects t: directed-attached, iscsi, r Fibre Channel strage. The service partitin and Virtualizatin Manager are used t partitin the physical strage and assign ne r mre disk Lgical Units (LUNs) t the virtual servers. Frm a virtual server perspective the disk LUNs appear t be attached t a SCSI adapter. Fr mre detailed infrmatin n the Virtual Irn architecture, visit: http://www.virtualirn.cm/prducts/index.cfm VIRTUAL IRON STORAGE CONFIGURATION Physical disk strage must first be made accessible t the managed nde befre it can be prvisined t the virtual servers. The strage prvisining prcess fr the managed nde is generally the same as the prvisining prcess fr any ther physical server all the same prvisining steps are required (strage LUN cnfiguratin, zning, LUN masking, discvery, and s n). There are three ptins fr cnnecting disk LUNs t a managed nde: 1. Fibre Channel (FC) Strage Area Netwrk (SAN). In this case, ne r mre FC Hst Bus Adapters (HBAs) must be installed in the managed nde. The managed nde can then cnnect t any supprted strage subsystem accessible in the FC fabric. Nte that all the standard Fibre Channel strage prvisining tasks must be perfrmed t make the desired LUNs available t the managed nde. 2. iscsi. In this case the managed nde accesses Ethernet-attached strage via an iscsi-capable NIC. Nte that all the nrmal iscsi strage prvisining tasks must be perfrmed t make the desired LUNs available t the managed nde. 3. Lcal SATA, SAS r parallel SCSI disks. In this case the disk is accessed via the apprpriate SCSI adapter installed in the managed nde, which culd be internal strage r external strage. LUNs presented t the managed nde can be physical disks (fr example, lcally attached SATA, SAS, r SCSI disks) r abstracted LUNs frm a strage subsystem cntrller (fr example, a slice f grup f disks in a RAID-5 cnfiguratin). In either case, the service partitin n the managed nde autmatically discvers the LUNs and creates the crrespnding SUSE Linux disk device file entries. The disk devices that are discvered by the service partitin Linux perating system are managed by the Linux vlume manager. As previusly mentined, Virtualizatin Manager is the management interface t the service partitin. Using Virtualizatin Manager, disks are rganized int disk grups. Each disk can belng t nly ne disk grup. Disks are then made accessible t virtual servers in ne f tw ways: as a lgical disk r as a raw disk. These tw strage access methds are discussed in the fllwing sectins. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 4 f 16
Lgical Disks A lgical disk represents a specific quantity f capacity (fr example, 10 GB) in a disk grup. When a lgical disk is created via the Virtualizatin Manager, a Linux lgical vlume is created n the service partitin and the lgical vlume is presented t the virtual server as a SCSI disk drive. Nte that there is n file system layered between the lgical vlumes n the service partitin and the disk LUNs n the virtual servers. Cmpared t raw disks, lgical disks have the fllwing advantages and disadvantages: Advantages Easier t manage and allcate strage resurces withut SAN changes. Fr example, in the physical wrld, if 10 servers each required a 10 GB LUN, the array strage wuld have t be divided int 10 separate LUNs and then the strage prvisining prcess perfrmed fr each server (zning and LUN masking). Hwever, with 10 virtual servers, the prvisining f the strage takes place nly fr the service partitin (nce instead f 10 times). Then lgical disks can be created and assigned t each virtual server. Virtualizatin Manager can be used t: Clne Mve Imprt Exprt Entire virtual server can be archived, clned r restred Disadvantages Perfrmance may be impacted due t the verhead f I/O transactins passing thrugh the service partitin s lgical vlume manager. Hwever, because there is n file system used n the service partitin, impact n perfrmance is generally negligible. Strage subsystem tls cannt be used n individual virtual disks, since the SCSI pass-thrugh cmmands are nt supprted. Raw Disks As a raw disk, a LUN n the service partitin is presented cmpletely and directly t the virtual server. In this case, the service partitin s lgical vlume manager is nt used t access the disk. Cmpared t lgical disks, raw disks have the fllwing advantages and disadvantages: Advantages Ptentially better perfrmance than a lgical disk (althugh lgical disks perfrm very well t, since they are nt encapsulated within a file system n the service partitin). Strage subsystem tls (snapsht, replicate, and s n) can be used n individual virtual server disks (LUNs). Disadvantages Virtualizatin Manager cannt be used t perfrm useful functins such as snapsht, clne, mve, imprt, and exprt. Virtualizatin Manager cannt be used t archive, clne, r restre entire virtual servers. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 5 f 16
VIRTUAL SERVER BACKUP Backup and Recvery Overview Backup and recvery is a challenge in mst IT shps. Backup is nt a high-prfile, revenue-generating technlgy; and as a result generally receives little attentin and supprt frm senir. And yet, prtecting a business infrmatin assets is a critical functin f the IT rganizatin. As a result f this thinking, backup (and recvery) is ften an afterthught with little strategic planning r investment. Tday, there are many backup and recvery challenges, nt the least f which is defining the requirements. The requirements shuld drive decisins abut the backup and recvery slutins selected and ultimately the cst f prviding this service. Recvery requirements are generally defined by tw parameters: Recvery Pint Objective (RPO). The RPO is driven by tw key parameters: The number f transactins that can be lst, defined in terms f actual business applicatin transactins (fr example, fr a transactin-riented database) r in time units (fr example, 2 hurs). This determines hw much data/transactins the business deems acceptable t lse The pint in time it must be pssible t recver data frm, that is, hw far back in time must the data be recverable. This parameter generally drives the retentin settings that are used fr the prtected data. Recvery Time Objective (RTO). The RTO defines hw quickly the business functin must be restred. The RTO generally refers t the resumptin f business functin, nt necessarily the amunt f time available t perfrm data recvery. Mre demanding requirements (that is, fewer lst transactins ging back farther in time with a shrter recvery time) are mre cstly t satisfy per unit f strage than less demanding requirements. Therefre, the challenge fr businesses is t define the requirements and then develp a strategy fr meeting thse requirements in a cst-effective manner. Typically, this requires multiple slutins and, because a single technlgy may nt be able t meet the requirements f part f the business r there may be mre csteffective ways t meet thse requirements. Backup and recvery technlgies can generally be gruped int the fllwing three slutin categries: 1. Cre technlgy. Cre technlgy, smetimes called classic backup and recvery technlgy, is what mst businesses use tday. These slutins typically cnsist f a backup server and backup clients. Backup clients send their backup data ver the netwrk t a backup server and the backup server writes the data t strage. Managing this technlgy in a large shp is a sizable task. Sme f the mre ppular slutins are: IBM Tivli Strage Manager (TSM), Symantec NetBackup, EMC Legat NetWrker, CmmVault Galaxy, CA ARCserve, and HP Data Prtectr. These are typical large shp prducts, but there are als a large number f prducts that cater t smaller envirnments. 2. Strage-based technlgy. Strage-based technlgy utilizes functins in the strage subsystem t create additinal cpies f the data. These functins typically include: full-cpy data snapshts, pinter-based data snapshts, and synchrnus and asynchrnus replicated cpies, typically ver lng distances. 3. Specialized technlgy. Specialized technlgy describes thse technlgies that tend t be newer and leading edge, technlgies that have nt gained industry-wide acceptance and/r are targeted at a specific applicatin r envirnment. Examples f these include Cntinuus Data Prtectin (CDP) and remte ffice cnslidatin prducts. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 6 f 16
Virtualized Server Backup Challenges A virtualized server envirnment presents backup and recvery challenges, while at the same time prviding additinal capabilities that are nt available in a nn-virtualized envirnment. As with any backup and recvery design, understanding what recvery events yu are designing fr is a critical first. Fr example, are yu designing a slutin t recver an individual file, a cmplete drive/file system, an entire database, r a cmplete server? Then, when yu knw what events yu are designing fr, yu must understand what the recvery requirements (RPO and RTO) are fr each f thse events. The key challenges t be aware f in designing backup recvery slutins fr a virtualized server envirnment are: Virtual servers share and cmpete fr resurces n ne physical machine (the managed nde in a Virtual Irn envirnment). A backup jb using a cre backup technlgy is ften very resurce intensive (CPU, memry, I/O, and LAN utilizatin). With multiple virtual servers n managed nde simultaneusly running backup jbs, bttlenecks may result and perfrmance f ther critical business applicatin may be adversely affected. This is generally nt an issue in a nn-virtualized envirnment, since a server ften has a significant amunt f under-utilized resurces available t meet the demands f the backup jb. In additin, frm an applicatin server perspective, the scheduling f the backup jb has t be crdinated nly with the applicatin that runs n the server itself. Virtual servers access virtualized strage thrugh the service partitin and nt directly thrugh a strage interface, such has an FC HBA r iscsi NIC. As a result, sme f the slutins available t a physical server may nt be available t a virtual server. Fr example, a functin t initiate a LUN snapsht n an FC-attached strage subsystem may require the hst initiating the cmmand t have a Fibre Channel HBA cnnectin int the SAN. Because a virtual server des nt have a real (r emulated) FC HBA, the slutin may nt functin prperly (depending n the strage array). Virtual Server Backup Advantages It is imprtant t nte that a Virtual Irn virtualized server envirnment prvides additinal capabilities ver nn-virtualized envirnments that enhance backup and recvery. These additinal capabilities are derived frm the fact that the strage envirnment is virtualized and cntrlled thrugh the service partitin. Thrugh the Virtualizatin Manager, several Virtual Irn capabilities are available that may be used as a cmpnent in an verall backup and recvery strategy. These key capabilities are: Lgical disk snapshts. Snapsht capability allws a pint-in-time, pinter-based cpy f a lgical disk t be taken and used t supplement the backup and recvery prcess. Fr example, the snapsht can be munted n a prxy hst (that is, anther virtual server) and backed up. Lgical disk exprt and imprt. These functins allw prtable lgical disk images t be mved utside the Virtual Irn envirnment, using the industry-standard Micrsft Virtual Hard Disk (VHD) frmat. These VHD images can be used t archive the cmplete state f a virtual server at a pint in time. Lgical disk clning. Disk clnes can be used create a cnsistent cpy f a lgical disk in anther disk grup. While these features themselves d nt represent a cmprehensive backup and recvery slutin, they can be cmbined with ther technlgies (cre and strage-based) t prvide an enhanced capability. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 7 f 16
BACKUP STRATEGIES WITH VIRTUAL IRON Overview There are three basic backup and recvery techniques that can be deplyed in a Virtual Irn virtual server envirnment. Depending n business requirements, these techniques can be used independently r cmbined t build a cmprehensive backup and recvery slutin. The basic techniques are: 1. Install a standard sftware backup agent n each virtual server and utilize the native functinality f the backup agent t perfrm LAN-based backup and recvery. 2. Utilize Virtual Irn s lgical disk snapsht capability t take a snapsht f a virtual server s lgical disks and back up the snapshts n a prxy backup hst, using the standard backup agent (running n the prxy server). 3. Utilize Virtual Irn s raw disks and the native backup and recvery functins f the strage array. Each f these techniques is discussed in mre detail in the fllwing sectins. Backup Agent n Each Virtual Server This technique requires that the client sftware fr the cre backup and recvery technlgy (TSM, NetBackup, NetWrker, and s n) be installed n each virtual server, just as wuld be dne in a nnvirtualized server envirnment. The installatin requirements wuld be based n the guest perating system (Windws 2003, Windws Vista, SUSE Linux Enterprise Server 9, Red Hat Enterprise Linux 4, and s n). In general all the cnstraints and limitatins assciated with a nn-virtual server apply t a virtual server. Advantages This methd f backup and recvery is well understd and mst easily integrated int the current peratins, since it is the primary technique used in the nn-virtualized server envirnment. Backup administratrs and peratins staff will ntice very little, if any, changes t their current prcesses and prcedures. The granularity f backups is cntrlled by the client backup sftware and therefre can be custmized t meet the desired recvery bjectives. Fr example, image backups can be dne t prvide faster recvery f an entire drive f a file system while file-based backups can be dne t prvide recvery f specific files and directries. Mst, if nt all, f the backup client sftware functinality can be utilized n the virtual servers. The lgical drives and file systems n the virtual servers are nt altered in any way by Virtual Irn and therefre are cmpletely cmpatible with the backup client sftware. Additinal backup applicatin agents ( API agents) can be easily integrated t prvide applicatinaware backup and recvery. Fr example, the TSM API agent fr Oracle functins transparently n a virtual server. Disadvantages Each virtual server requires a backup client license and sftware installatin and custmizatin, ptentially increasing verall csts. Sme advanced functinality may be lst if a specific physical cnnectin t netwrked strage (iscsi r Fibre Channel) is required. Fr example, the TSM agent fr Micrsft Exchange has very specific strage and cnnectivity requirements if it is integrated with Micrsft Virtual SurceSafe (VSS) and strage-based snapshts. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 8 f 16
Other Discussin Pints Installatin f the backup client sftware can be made part f the master perating system images that are clned fr use as new virtual servers are installed, thereby mitigating the sftware installatin effrt. License ramificatins will depend n the sftware and the current licensing agreement. Fr example, a shp with a site license may nt incur additinal sftware licensing csts. Backups have t be LAN based since direct attachment f tape (r virtual tape) devices is nt supprted. Snapshts and a Prxy Backup Hst Virtual Irn s snapsht functinality prvides the ability t make a single (that is, yu cannt create multiple snapshts f the same lgical disk) pint-in-time cpy f a lgical disk. This snapsht can be used when significant changes are ging t be made t a lgical disk (fr example, during an perating system upgrade) as a means f prviding a quick methd f rlling back the changes. Hwever, the snapsht can als be used as the surce f a backup when the snapsht is made accessible t and munted n an alternate virtual server. This alternate virtual server, als called a Prxy Backup Hst (PBH), munts the lgical disk and then perfrms a backup f the disk n behalf f the primary server. This enables the backup prcessing wrklad t be ff-laded frm the primary server. The steps in the prcess are as fllws: 1. A snapsht f the primary vlume is taken. Nte that this is a cpy-n-write snapsht functin and therefre it is cmpleted in a matter f secnds. 2. The snapsht lgical disk is then assigned t the PBH (anther virtual server). 3. The PBH discvers the new lgical disk. Tday this requires the PBH t be rebted. 4. The PBH runs the backup f the lgical disk. This can be a file-based backup jb r an image-based backup jb. 5. Once the backup jb has been cmpleted, the lgical disk is unassigned frm the PBH. 6. The snapsht is then deleted. Advantages The backup prcessing wrklad is remved frm the primary applicatin virtual server. The snapsht prvides a crash-cnsistent cpy (that is, the state f the disk is the same as if the server had experienced a crash) f the lgical disk. Backup jbs are run frm a fewer number f backup clients (that is, ne r mre PBHs). Disadvantages Additinal cmplexity is added t the backup prcess. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 9 f 16
Other Discussin Pints As previusly mentined, currently the PBH has t be rebted in rder t discver newly assigned lgical disks (snapshts). This may make scripting the verall prcess smewhat cumbersme. Once a snapsht lgical disk is munted n the PBH, there are tw pssibly ways in which it can be backed up: As a munted file system/lgical drive. Fr example, in a Windws envirnment the drive culd be munted as the g: drive. Nte that this methd requires the PBH and the surce server t be running the same perating system (fr example, Windws). As a raw blck-level backup. Fr example, TSM s image backup capability can be used t back up a lgical disk, which eliminates the need t inspect each file and directry bject n the disk. This has the advantage f allwing, fr example, a Windws lgical disk snapsht t be munted n a Linux PBH and an image backup perfrmed. This backup technique was tested in Virtual Irn s lab as fllws: On a Windws 2003 virtual server a snapsht f the c: drive was created using Virtualizatin Manager. Virtualizatin Manager was then used t assign the snapsht t a Linux virtual server (the PBH) The snapsht was then discvered by the Linux PBH (via rebt). The fdisk l cmmand shwed the existence f a new disk /dev/sdb. The snapsht was backed up t the TSM server as an image backup: tsm> backup image /dev/sdb The lgical disk was remved frm the Linux PBH and the server rebted. Virtualizatin Manager was then used t delete the snapsht A new lgical disk was created, equal t the size f the lgical disk n the riginal Windws server frm which the snapsht was taken. This new lgical disk was assigned t the Linux PBH and discvered by the server. The existence f the new lgical disk was verified (as device /dev/sdb ): fdisk -l The image backup previusly taken was restred t the new disk device using TSM and verified: tsm> restre image /dev/sdb /dev/sdb fdisk -l The lgical disk was remved frm the Linux PBH and the server rebted A new Windws virtual server was created and assigned the new lgical disk (t which the restre peratin was directed) as its bt disk. The new Windws virtual server was able t bt frm and munt the lgical disk (an exact duplicate f the c: drive f the riginal Windws virtual server). In rder fr this methd t be practical in a large prductin shp, scripting must be used t autmate the backup prcess. Virtual Irn supprts an API t the Virtualizatin Manager via pen surce Pythn frm Pythn Sftware Fundatin (PSF) and Java. See the appendix fr an example f Virtual Irn s scripting t create a snapsht f a virtual server. T practically remve the backup wrklad frm a managed nde, the PBH shuld be a virtual server n a different managed nde in the same Virtual Irn Virtual Data Center (VDC). Intrductin t Backup and Recvery in a Virtual Irn Envirnment 10 f 16
A backup using a PBH, even in a server envirnment that is nt virtualized, presents challenges in the naming cnsistency f the items being backed up. Fr example, with TSM, the high-level naming cmpnent (called the filespace ) f a Windws disk device generally cntains the drive letter designatin. Hwever, the drive letter assigned t the snapsht lgical disk n the PBH may nt be the same as that assigned t the primary lgical disk n the surce hst. Keeping the names cnsistent, regardless f the backup applicatin, is imprtant t ensure that backups are cnsistent and t avid cnfusin. These issues shuld be addressed in the scripts that manage the munting f the snapshts. It may als be pssible t use functins f the backup client sftware t ensure cnsistent naming (fr example, the TSM snapshtrt functin). Raw Disk and Strage Subsystem Functins Tday, many businesses rely n the unique backup and recvery functins in strage subsystems as part f their data prtectin strategy. In particular, snapsht and mirrr (lcal and remte) functins are frequently used. These functins typically perate at the LUN level and as a result require that the fllwing rules be fllwed t ensure that these additinal cpies f the data (snapshts, remte mirrrs, and s n) are cnsistent and meaningful: Entire LUNs must be assigned t specific hsts (r clusters)/applicatins. Hsts access LUNs directly withut any intervening virtualizatin r encapsulatin. Therefre, in rder fr virtual servers t leverage these functins the virtualizatin layer must allw LUNs t be accessed directly by the virtual servers. Virtual Irn accmplishes this via the use f the raw disk. Virtual Irn s raw disk allws netwrked (iscsi r Fibre Channel) strage LUNs t be accessed directly by the virtual servers withut passing thrugh the Linux lgical vlume manager f the service partitin. Advantages All data mvement functins are ff-laded t the strage subsystem. Existing prcesses and prcedures fr strage subsystem-based functins can still be used, easing implementatin and verall csts. Clustered applicatins are supprted with raw device access. Disadvantages With raw disks, Virtual Irn s advanced lgical disk functins (snapsht, clne, archive, and s n) cannt be used. Other Discussin Pints The technique used t execute and manage strage array functins is a functin f the specific array. Fr example, sme arrays require sftware t be installed n the applicatin server and have a Fibre Channel cnnectin t the strage array. In ther cases, all that is required is an IP cnnectin t the strage array cntrller. With Virtual Irn, the virtual servers d nt have a physical cnnectin t netwrked strage arrays (iscsi r Fibre Channel). The disks just lk like lcally attached strage. Therefre, it is imprtant t understand the manner in which strage array functins are cntrlled when cnsidering using them fr virtual servers. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 11 f 16
Other Backup and Recvery Optins There are a variety f ther ptins, r cmbinatin f the abve ptins, that can be used fr backup and recvery in a virtualized server envirnment. Fr example, a business may nt want t install the client agent f their cre backup and recvery technlgy n every virtual server. This might be especially true fr the class f servers whse data des nt change very ften r thse servers that have a mre relaxed RPO. Fr these servers it may be acceptable t perfrm full backup nly nce a week and therefre nt wrth the time and effrt t install and manage the client backup agent. Instead, they may chse t execute a hme-grwn script n the virtual server that makes an image cpy f the virtual server s vlume t a disk, generally n a netwrk file server, fr example, Netwrk-Attached Strage (NAS). N backup agent sftware is required t perfrm this backup (a Linux virtual server culd use the dd r tar cmmand). If desired, these backup images n the NAS strage culd then be backed up by a prxy backup hst running the client backup agent. Recvery in this situatin wuld be a tw-step prcess in which the prxy backup hst first restres the image file t the NAS strage and then virtual server perfrms a restre frm the NAS strage. SUMMARY Server virtualizatin has a significant impact n physical strage especially as users take server virtualizatin int prductin envirnments. Virtualized servers have unique characteristics when it cmes t strage and backup and recvery and the techniques that a business currently uses fr their physical server envirnment may nt be best in a virtualized envirnment. It s imprtant that users understand the implicatins f virtualizatin n their backup and recvery infrastructure. Virtual Irn (VI) is an enterprise-class server virtualizatin technlgy that is designed t integrate easily and effectively with physical strage envirnments and enables flexible backup and recvery. It fully leverages industry standards and the virtualizatin capabilities f current mdern x86 prcessr chips and can be used t address many f the key server management challenges within a data center. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 12 f 16
APPENDIX: SNAPSHOT SCRIPT vssnapsht - snapht a VirtualServer frm cm.virtualirn.vce.mgmt.api imprt VirtualizatinManager frm cm.virtualirn.vce.mgmt.api.physical imprt frm cm.virtualirn.vce.mgmt.api.virtual imprt * imprt java.lang imprt s imprt string imprt sys imprt traceback def Usage(): if s.name == 'nt': cmmand = 'runner.bat' else: cmmand = 'runner.sh' print 'Usage: %s --inputfile=vssnapsht.py --vs="virtual Server" -- btdevice="dsl.is"' % (cmmand) sys.exit(1) parse cmmand line arguments vsname = Nne btname = Nne fr arg in sys.argv[1:]: if string.find(arg, "--vs=")!= -1: tkens = string.splitfields(arg, "=") vsname = tkens[1] if string.find(arg, "--btdevice=")!= -1: tkens = string.splitfields(arg, "=") btname = tkens[1] check if required arguments were specified if vsname is Nne r btname is Nne: Usage() get cnnectin t Database cnfiguratinmanager = VirtualizatinManager.getCnfiguratinManager() fundry = cnfiguratinmanager.getfundrycntext() vs = cnfiguratinmanager.findobject(virtualserver, vsname) if vs is Nne: print 'FAIL t find VirtualServer %s' % (vsname) sys.exit(1) btdevice = cnfiguratinmanager.findobject(stragedevice, btname) print 'FAIL t find btdevice %s' % (btname) sys.exit(1) set bttype depending n type f btdevice (nbd r disk) if NetwrkBlckDevice.isAssignableFrm(btDevice.getKind()): bttype = VirtualServer.BtInf.VS_BOOT_DEVICE_CDROM elif LvmStrageDevice.isAssignableFrm(btDevice.getKind()): r lgicaldisk nbd is virtualdisk Intrductin t Backup and Recvery in a Virtual Irn Envirnment 13 f 16
else: bttype = VirtualServer.BtInf.VS_BOOT_DEVICE_DISK print 'FAIL: %s is nt a VirtualDisk, LgicalDisk r NBD-Device' % (btname) sys.exit(1) snapsht VS try: jbname = java.lang.lng.tstring(cnfiguratinmanager.getlcaltime()) jb = cnfiguratinmanager.createjb(jbname) jb.begin() snapvs = vs.snapsht() jb.addoperatindescriptin("snapsht " + vs.getname(), vs, vs, vs) jb.cmmit() except java.lang.thrwable, thrw: jb.abrt() if jb fails, rllback thrw.printstacktrace() except: jb.abrt() if jb fails, rllback traceback.print_exc() if snapvs is Nne: print 'FAIL t snapsht VS' sys.exit(1) print "Snapsht:", vs.getsnapsht() change VS snapsht btdevice try: jbname = java.lang.lng.tstring(cnfiguratinmanager.getlcaltime()) jb = cnfiguratinmanager.createjb(jbname) jb.begin() snapvs.addstragedevicefirst(btdevice) jb.addoperatindescriptin("set BtDevice t " + btdevice, snapvs, snapvs, snapvs) snapvs.setbttype(bttype) jb.addoperatindescriptin("set BtType t " + bttype, snapvs, snapvs, snapvs) jb.cmmit() except java.lang.thrwable, thrw: jb.abrt() if jb fails, rllback thrw.printstacktrace() except: jb.abrt() if jb fails, rllback traceback.print_exc() start VS snapsht try: jbname = java.lang.lng.tstring(cnfiguratinmanager.getlcaltime()) jb = cnfiguratinmanager.createjb(jbname) Intrductin t Backup and Recvery in a Virtual Irn Envirnment 14 f 16
jb.begin() snapvs.start() jb.addoperatindescriptin("start VirtualServer " + snapvs.getname(), snapvs, snapvs, snapvs) jb.cmmit() except java.lang.thrwable, thrw: jb.abrt() if jb fails, rllback thrw.printstacktrace() except: jb.abrt() if jb fails, rllback traceback.print_exc() wait fr VS Snapsht t g Running EventLg = fundry.geteventlg() cunt = 0 fund = 0 while nt fund and cunt < 10: cunt += 1 Events = eventlg.listenfrevents(virtualserverevent, snapvs, 60*1000) if Events is Nne: print 'N Events' else: fr event in Events: print "Rcvd:", event if VirtualServerRunningEvent.isAssignableFrm(event.getKind()): fund = 1 if nt fund: print 'VS nt RUNNING', vs.getstatusevent() wait fr VS snapsht t shutdwn, wait fr VS Stpped event fund = 0 while nt fund and cunt < 10: cunt += 1 Events = eventlg.listenfrevents(virtualserverevent, snapvs, 60*1000) if Events is Nne: print 'N Events' else: fr event in Events: print "Rcvd:", event if VirtualServerStppedEvent.isAssignableFrm(event.getKind()): fund = 1 if nt fund: print 'VS nt RUNNING', vs.getstatusevent() delete VS snapsht and all its snapsht lgical disks try: jbname = java.lang.lng.tstring(cnfiguratinmanager.getlcaltime()) jb = cnfiguratinmanager.createjb(jbname) jb.begin() Intrductin t Backup and Recvery in a Virtual Irn Envirnment 15 f 16
Disks = snapvs.getstragedevices() fr snapdisk in Disks: if LgicalDisk.isAssignableFrm(snapdisk.getKind()) and snapdisk.getsnapshtparent() is nt Nne: lvmdiskgrup = snapdisk.getparentlvmdiskgrup() lvmdiskgrup.deletelgicaldisk(snapdisk) jb.addoperatindescriptin("delete Snapsht Disk" + snapdisk, snapdisk, snapdisk, snapdisk) else: print "WARNING: %s nt deleted" % (snapdisk) vs.deletesnapsht(snapvs) jb.addoperatindescriptin("delete Snapsht " + snapvs.getname(), snapvs, snapvs, snapvs) jb.cmmit() except java.lang.thrwable, thrw: jb.abrt() if jb fails, rllback thrw.printstacktrace() except: jb.abrt() if jb fails, rllback traceback.print_exc() 2008 Brcade Cmmunicatins Systems, Inc. All Rights Reserved. 03/08 GA-TB-051-00 Brcade, Fabric OS, File Lifecycle Manager, MyView, and StrageX are registered trademarks and the Brcade B-wing symbl, DCX, and SAN Health are trademarks f Brcade Cmmunicatins Systems, Inc., in the United States and/r in ther cuntries. All ther brands, prducts, r service names are r may be trademarks r service marks f, and are used t identify, prducts r services f their respective wners. Ntice: This dcument is fr infrmatinal purpses nly and des nt set frth any warranty, expressed r implied, cncerning any equipment, equipment feature, r service ffered r t be ffered by Brcade. Brcade reserves the right t make changes t this dcument at any time, withut ntice, and assumes n respnsibility fr its use. This infrmatinal dcument describes features that may nt be currently available. Cntact a Brcade sales ffice fr infrmatin n feature and prduct availability. Exprt f technical data cntained in this dcument may require an exprt license frm the United States gvernment. Intrductin t Backup and Recvery in a Virtual Irn Envirnment 16 f 16