Reducing the Backup Window With Sun StorEdge Instant Image Software



Similar documents
Sun StorEdge A5000 Installation Guide

Sun Management Center Change Manager Release Notes

N1 Grid Service Provisioning System 5.0 User s Guide for the Linux Plug-In

Sun StorEdge RAID Manager Release Notes

LAN-Free Backups Using the Sun StorEdge Instant Image 3.0 Software

Upgrading the Solaris PC NetLink Software

Sun Cluster 2.2 7/00 Data Services Update: Apache Web Server

Solaris 10 Documentation README

Optimizing Solaris Resources Through Load Balancing

Sun Enterprise Optional Power Sequencer Installation Guide

Sun StorEdge Availability Suite Software Point-in-Time Copy Software Maximizing Backup Performance

Service Level Definitions and Interactions

Scrubbing Disks Using the Solaris Operating Environment Format Program

Sun StorEdge T3 Dual Storage Array - Part 1

SunFDDI 6.0 on the Sun Enterprise Server

Sun StorEdge N8400 Filer Release Notes

Sun Enterprise 420R Server Product Notes

Service Level Agreement in the Data Center

Comparing JavaServer Pages Technology and Microsoft Active Server Pages

Solaris Bandwidth Manager

Sun Management Center 3.6 Version 5 Add-On Software Release Notes

Sun StorEdge Instant Image 3.0 and Oracle8i Database Best Practices

Exploring the iplanet Directory Server NIS Extensions

Sun StorEdge Enterprise Backup Software 7.2

Solaris 9 9/05 Installation Roadmap

JumpStart : NIS and sysidcfg

Sun Management Center 3.5 Update 1b Release Notes

Java Dynamic Management Architecture for Intelligent Networks

Disaster Recovery Requirements Analysis

Managing NFS Workloads

Sun TM SNMP Management Agent Release Notes, Version 1.6

Power Savings in the UltraSPARC T1 Processor

Sun Ultra TM. 5 and Ultra 10 Product Notes. Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA U.S.A.

Important Note on New Product Names

Sun Management Center 3.6 Version 4 Add-On Software Release Notes

Sun StorEdge Network FC Switch-8 and Switch-16 Release Notes

HelloWorld SOAP Sample:

Sun Management Center 3.0 Platform Update 4 Release Notes for Sun Fire 15K/12K Systems

Developing a Security Policy

Sun SNMP Management Agent Release Notes, Version 1.5.5

Sun Fire 6800/4810/4800/3800 Systems Software Release Notes

Sun Grid Engine Release Notes

N1 Grid Engine 6 Release Notes

Rapid Recovery Techniques: Exploring the Solaris Software Registry

Service Level Management in the Data Center

Sun Fire 6800/4810/4800/ 3800 Systems Product Notes

Consolidation in the Data Center

Rapid Recovery Techniques: Auditing Custom Software Configuration

Solaris Resource Manager

The UltraSPARC T1 Processor - High Bandwidth For Throughput Computing

Sun Fire 15K/12K Dynamic Reconfiguration Installation Guide and Release Notes

Sun Fire B10n Content Load Balancing Blade Product Notes

SCSI Sense Key Error Guide

The Solaris Fingerprint Database - A Security Tool for Solaris Operating Environment Files

Start Here. Installation and Documentation Reference. Sun StorEdgeTM 6120 Array

RAID Controller PCI Card for the Sun Fire V60x and V65x Servers Release Notes

Java Management Extensions SNMP Manager API

Data Center Design Philosophy

Automating Centralized File Integrity Checks in the Solaris 10 Operating System

Sun StorEdge RAID Manager 6.22 User s Guide

Sun Microsystems, Inc Garcia Avenue Mountain View, CA FAX

Solaris 9 Installation Roadmap

Sun Fire 6800/4810/4800/3800 Systems Firmware Release Notes

Sun StorEdge SAN Foundation Release Notes

Trust Modeling for Security Architecture Development

Brocade SilkWorm 4100 FC Switch Release Notes

SunPCi Supporting Highly Available PC Applications with Solaris

Netra Data Plane Software Suite 2.0 Update 2 Release Notes

Sun StorEdge T3 Dual Storage Array - Part 3 Basic Management. By Mark Garner - Enterprise Engineering Sun BluePrints OnLine - April 2001

Java Technologies for Interactive Television

Sun Ray, Smart Cards, and Citrix

Solaris Patch Management: Recommended Strategies

Sun Remote System Control (RSC) Installation Guide

Sun Fire V480 Server Product Notes

Sun StorEdge network FC switch-8 and switch-16 Release Notes

Sun N1 Service Provisioning System User s Guide for Linux Plug-In 2.0

Sun Fire Midframe Server Best Practices for Administration

Java Card Platform Security

A Strategy for Managing Performance

Sun Blade 1500 Workstation Product Notes

Sun 450 MHz UltraSPARC -II Module Upgrade

Conference Calling Using SunForum 3

Sun Fire V20z Server Release Notes

Veritas Storage Foundation 5.0 Software for SPARC

Sun Ray Server Software 3 Release Notes

Distributed Application Management using Jini Connection Technology

Solaris Volume Manager Administration Guide

Operations Management Capabilities Model

Getting StartedWith Sun Java System Application Server 9.1 Update 2

MIGRATION WHITEPAPER MIGRATING FROM MICROSOFT OFFICE TO OPENOFFICE.ORG OR STAROFFICE 9

Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide

Netra X4200 M2 Server Site Planning Guide

Brocade 5300 Switch Hardware Release Notes

Using Linux mdadm Multipathing with Sun StorEdge Systems

Brocade 300 Switch Hardware Release Notes

Platform Notes: The SunHSI/P Device Driver

Sun Blade 100 and Sun Blade 150 Workstations

Sun Ultra 80 SCSI Cable Installation Guide

Sharing NFS and Remote File Systems via Solaris PC NetLink Software

Sun StorEdge FC-100 Long Wave Gigabit Interface Converter Guide

Transcription:

Reducing the Backup Window With Sun StorEdge Instant Image Software Selim Daoud, Sun Professional Services, Switzerland Sun BluePrints OnLine July 2002 http://www.sun.com/blueprints Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95045 U.S.A. 650 960-1300 Part No. 816-5243-10 Revision 1.0, 7/15/02 Edition: July 2002

Copyright 2002 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, Sun BluePrints, Sun Solstice Backup, Sun StorEdge, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the US and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun s written license agreements. RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g)(2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-3(a). DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, Californie 94303 Etats-Unis. Tous droits réservés. Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l autorisation préalable et écrite de Sun et de ses bailleurs de licence, s il y en a. Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun. Des parties de ce produit pourront être dérivées des systèmes Berkeley BSD licenciés par l Université de Californie. UNIX est une marque enregistree aux Etats-Unis et dans d autres pays et licenciée exclusivement par X/Open Company Ltd. Sun, Sun Microsystems, le logo Sun, Sun BluePrints, Sun Solstice Backup, Sun StorEdge, et Solaris sont des marques de fabrique ou des marques déposées, ou marques de service, de Sun Microsystems, Inc. aux Etats-Unis et dans d autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par Sun Microsystems, Inc. L interface d utilisation graphique OPEN LOOK et Sun a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d utilisation visuelle ou graphique pour l industrie de l informatique. Sun détient une licence non exclusive de Xerox sur l interface d utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l interface d utilisation graphique OPEN LOOK et qui en outre se conforment aux licences écrites de Sun. CETTE PUBLICATION EST FOURNIE "EN L ETAT" ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N EST ACCORDEE, Y COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L APTITUDE DE LA PUBLICATION A REPONDRE A UNE UTILISATION PARTICULIERE, OU LE FAIT QU ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE GARANTIE NE S APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU. Please Recycle

Reducing the Backup Window With Sun StorEdge Instant Image Software This article discusses the advantages and methods of using a point-in-time (PIT) type of backup system versus a more traditional backup approach that requires extended downtime. This article is for anyone interested in reducing the backup window (improving the uptime of important applications) while backing up a system that is nearly online. The process described here is called nearly online because you must take into consideration that to create a consistent snapshot of a file system, you must take the system offline to perform the following procedures: Quiesce I/O on the volume. Make sure the applications and data associated with this volume are in a good state (Oracle software must be in backup mode, file systems must be synchronized with utilities like fsck, and so on). Postpone all write operations until the snapshot is complete. While the backup techniques described in this article are not focused on specific versions of backup software or hardware, this article uses the following products to provide realistic examples: Sun Solstice Backup software Sun s OEM version of Legato s Networker software Sun StorEdge Instant Image software Sun s software snapshot product Almost any supported version of these two products can be integrated into your networked computing environment to gain the advantages of reducing the backup window and backing up a nearly online system. 1

Why Create a Snapshot? Creating a snapshot of a volume (file system or raw partition) has several advantages: You obtain a PIT image of the data so all data is backed up at the same point-in-time, whatever the size of the master volume. The snapshot relieves the original volume (master volume) from excessive I/O during the backup. Note I/O is only relieved on the master volume when the snapshot is an independent snapshot as opposed to a dependent snapshot (also referred to as a copy-on-write). When performing a read I/O on a dependent snapshot, unmodified blocks are read from the master volume and modified blocks are read from the shadow volume. By contrast, read I/O from independent snapshots is performed entirely from the shadow volume, relieving the I/O on the master volume. The latter point is true in the case where the snapshot is a full copy (independent snapshot) of a volume. As a consequence, a volume that has been copied can be made available to the original application. This has the following advantages: The window to backup this volume is very small. You can obtain several backups during the day. There is minimum disruption on the master volume. A copy of the primary volume is available for special applications (testing, data warehousing, and so on). 2 Reducing the Backup Window With Sun StorEdge Instant Image Software July 2002

Comparison To appreciate the benefits of a PIT backup system, consider the comparison between a PIT backup and a non-pit backup. Traditional Backup In a traditional non-pit file system backup, the backup process works schematically as shown in the following figure. Client system 1 2 /export Master volume Backup server FIGURE 1 Non-PIT Backup 1. The backup server contacts the client, and arguments are passed defining what to save. 2. The client daemon selects all the files, and transfers them back to the server. Why Create a Snapshot? 3

PIT Backup When using the snapshot technology for a PIT backup, the backup process works schematically as shown in the following figure. Client system 1 3 /mnt/ snapshot Snapshot volume /export 2 Master volume Backup server FIGURE 2 PIT Backup 1. The backup server contacts the client, and arguments are passed defining what to save. 2. The client creates the snapshot image (quick update). 3. The client daemon selects all the files on the snapshot volume and transfers them back to the server. Notice that there is an additional step consisting of creating the snapshot volume. What happens is, in fact, a quick update because only modified parts (disk blocks) of the master volume are updated. Therefore, the creation of the snapshot is very quick. 4 Reducing the Backup Window With Sun StorEdge Instant Image Software July 2002

Results The following two graphs illustrate the I/O measurements that occur during the two types of backups. In the first graph, the backup is performed without an Instant Image snapshot. The master volume experiences a sustained high level of I/O activity. The second graph reflects the I/O measurements while performing a PIT backup using a snapshot with Instant Image software. You can observe that in terms of I/O, there is a load on the master volume at the beginning of the backup, but the duration is short when compared to the other I/O graph. This short period of master volume activity corresponds to the quick update phase of the backup. Following this, all the I/O is diverted to the shadow volume, relieving the master volume. 12000 11000 10000 Backup without Instant Image Combined I/O (KB/s) 9000 8000 7000 6000 5000 4000 3000 2000 1000 Master Vo 0 FIGURE 3 Master volume Backup I/O Statistics Without Instant Image Software Combined Kb/s 12000 11000 10000 9000 8000 7000 6000 5000 4000 3000 2000 1000 Master Volum Shadow Volu 0 Master volume Shadow volume FIGURE 4 Backup I/O Statistics With Instant Image Software Why Create a Snapshot? 5

Creating a Snapshot Creating a snapshot of a master volume with Instant Image software (and generally with any PIT software) involves three components: Master volume Snapshot volume (also called the shadow volume) Bitmap volume (a raw partition) To create an independent snapshot (a full copy, for example), the size of the master volume and the shadow volume are identical. The bitmap volume is much smaller and is equal to: Bitmap Size = 8KB per GB + 24KB The examples in this article use the following parameters: Volume Device Capacity Mount Point Master volume /dev/rdsk/c0t0d0s6 7GB /export Shadow volume /dev/rdsk/c0t11d0s6 7GB /mnt/snapshot Bitmap volume /dev/rdsk/d0t11d0s0 80 KB II Group name Solstice Backup Group name BACKUP Default Pre-Processing Script A pre-processing script is created on the client, and initiated by the backup server. This script prepares the snapshot just before the backup operation, and consists of the following steps: 1. Synchronizing the master volume. 2. Locking the master volume against any modification. 3. Initiating the update. 4. Unlocking the master volume. 5. Mounting the snapshot image. 6 Reducing the Backup Window With Sun StorEdge Instant Image Software July 2002

The following code sample is an example of a pre-processing script. #!/bin/sh # need to explicit binary path when running pres/post script PATH=/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/ usr/opt/sunwesm/sbin export PATH # definition of volumes used in II SHADOW_RAW=/dev/rdsk/c0t11d0s6 SHADOW=/dev/dsk/c0t11d0s6 PRIMARY_MNT=/export SHADOW_MNT=/mnt/snapshot II_GROUP=BACKUP # we re-direct output in a logfile exec >> /nsr/logs/snapshot.log 2>&1 # we lock the Master volumes so no I/O take place during "Quick Update" echo "Quick update started" lockfs -f -w $PRIMARY_MNT iiadm -g $II_GROUP -u s if [! "$?" = 0 ] ; then echo "failed to update shadow volume" exit 1 fi echo "Update finished." # we wait for Instant Image to finish its operations iiadm -g $II_GROUP -w # Master Volume can be reactivated and ready for normal operations lockfs -u $PRIMARY_MNT # when doing PIT of a mounted volume, fsck must be executed on snapshot fsck -y $SHADOW # we mount the snapshot volume, ready to be backed up mount $SHADOW $SHADOW_MNT echo "Pre-Script finished" Creating a Snapshot 7

Post-Processing Script A post-processing script is also created so that normal operations can continue when the snapshot is complete. The post-processing script is much simpler with one purpose, to unmount the shadow volume. The following code sample is an example of a post-processing script. #!/bin/sh # need to explicit binary path when running pres/post script PATH=/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/ usr/opt/sunwesm/sbin export PATH SHADOW_MNT=/mnt/snapshot II_GROUP=BACKUP # we re-direct output in a logfile exec >> /nsr/logs/snapshot.log 2>&1 echo " " echo "Unmounting snapshot volume ($SHADOW_MNT)..." echo "-----------------------------------" umount $SHADOW_MNT echo "Post-Script finished." 8 Reducing the Backup Window With Sun StorEdge Instant Image Software July 2002

Putting Everything Together 1. Configure Instant Image software. In this example, Instant Image software is activated using the following command: # iiadm -g BACKUP -e ind /dev/rdsk/c0t0d0s6 /dev/rdsk/c0t11d0s6 /dev/rdsk/c0t11d0s0 2. Create the pre-processing and post-processing scripts on the client. If you are using Solstice Backup software, the two scripts must be placed in the /nsr/res directory, along with a file called SBU_Group.res. The SBU_Group.res file defines the pre- and post-processing scripts. In our example, the SBU_Group.res file contains the following Solstice Backup software parameters: # cat Default.res type: savepnpc; precmd: /nsr/res/start.snapshot; pstcomd: /nsr/res/stop.snapshot; timeout: 12:00pm ; Putting Everything Together 9

3. Configure Solstice Backup software to activate the scripts. For each specific client, in the corresponding Solstice Backup software group, modify the definition of this client so that the parameter Backup Command displays savepnpc, as shown in the following figure. FIGURE 5 Modified Backup Command in the Sun Solstice Backup Client Window 10 Reducing the Backup Window With Sun StorEdge Instant Image Software July 2002

Conclusion While the examples in this article use Sun StorEdge Instant Image software and Sun Solstice Backup software, it is possible to obtain similar results with other backup tools such as Veritas Netbackup. Veritas Netbackup also includes a snapshot option called FlashBackup. FlashBackup uses a dependent copy (or copy-on-write). Although this feature is an interesting way of obtaining a PIT copy (because it can be created quickly), it does not relieve the I/O on the master volume, and therefore the backup degrades performance of applications using this volume. The PIT method described in this article is particularly applicable if the volume backed up is a UFS type file system. The main reason is that a snapshot is successful if the master volume can be quiesced during creation of the shadow volume. In our examples, we used the command lockfs to achieve this. This is not applicable for raw partitions, however. For raw partitions, other processes must be developed to make sure nothing is written on the volume (unmounting it, stopping all applications using it, and so on). In conclusion, with a small investment in backup planning and configuration, you can implement backup strategies that effectively shorten the backup window, thus improving the availability of important applications such as databases, web servers, and home directories. About the Author Selim Daoud is a recognized leader in data storage and backup technologies for open systems. He obtained an MSc in computer science at the University of Wales (UK), and an MSc in applied mathematics in computing at Toulouse University in France. Over the course of his career in the computer industry, Selim gained valuable experience working with data backup technology, storage system design (mainly RAID implementations), and UNIX systems administration. He managed a support organization (dealing with storage and backup technology) in London, served as a consultant specializing in backup systems in Paris, and was in charge of multiple migrations of backup systems and storage deployment for the European Organization for Nuclear Research (CERN) in Geneva, Switzerland. Selim currently holds a project engineering position, specializing in computer storage and backup technology in the Sun Professional Services organization in Switzerland. Conclusion 11

Ordering Sun Documents The SunDocs SM program provides more than 250 manuals from Sun Microsystems, Inc. If you live in the United States, Canada, Europe, or Japan, you can purchase documentation sets or individual manuals through this program. Accessing Sun Documentation Online The docs.sun.com web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com/. To reference Sun BluePrints OnLine articles, visit the Sun BluePrints OnLine Web site at: http://www.sun.com/blueprints/online.html 12 Reducing the Backup Window With Sun StorEdge Instant Image Software July 2002