HP StorageWorks Guidelines for Protecting Data using HP StorageWorks Storage Mirroring with Volume Shadow Copy Service (VSS) Application Note Part number: T2558-96332 First edition edition: February 2009
Legal and notice information © Copyright 2009 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents About this guide ................................................................................... 7 Intended audience ...................................................................................................................... 7 Prerequisites ............................................................................................................................... 7 Related documentation ...............................................................................................
Figures 1 SAMPLE_PRESNAPSHOT.TXT .................................................................................... 18 2 SAMPLE_PRESNAPSHOT.BAT .................................................................................... 18 3 SAMPLE_POSTSNAPSHOT.TXT ................................................................................. 19 4 SAMPLE_POSTSNAPSHOT.BAT ................................................................................. 19 5 SAMPLE_DOSNAPSHOT.BAT ................................
Tables 1 Document conventions ...............................................................................................
About this guide This document is a HP StorageWorks Storage Mirroring application note. An application note provides guidelines on the use of Storage Mirroring in a specific environment. This document contains: Document Overview: Explains what an application note contains, how it should be used, what you need to know before trying to use the application note, and where you can go for more information.
Related documentation Before you begin to configure your solution, make sure that you have complete documentation for your operating system, application, and Storage Mirroring. This application note does not provide step-by-step instructions for using standard operating system, application, and Storage Mirroring functionality.
CAUTION: Indicates that failure to follow directions could result in damage to equipment or data. IMPORTANT: Provides clarifying information or specific instructions. NOTE: Provides additional information. TIP: Provides helpful hints and shortcuts. HP technical support For worldwide technical support information, see the HP support website: http://www.hp.
Documentation feedback HP welcomes your feedback. To make comments and suggestions about product documentation, please send a message to storagedocsFeedback@hp.com. All submissions become the property of HP.
1 Solution Overview Volume Shadow Copy Service (VSS) on Microsoft® Windows® Server 2003 allows a snapshot (or shadow copy) of all files on a volume to be made at regular, scheduled intervals. Shadow copies are useful for recovery of lost or corrupted files on a shared resource without the need for administrative intervention. However, shadow copies do not replace backups. If the drive that holds the shadow copies fails, the shadow copies are lost.
• VSS on Source and Target: Storage Mirroring provides failover of the source server identity and maintains a real-time copy of the source production data. VSS is enabled on the source and target servers, and snapshots are created on each server of the same data. In case of a source failure, the target can fill in for the source completely, including allowing the user complete access to production data and applications, as well as full capabilities to initiate file-level restore.
For any replication set that may generate a significant amount of data, you should enable compression for the connection. For more information about enabling compression, see the HP StorageWorks Storage Mirroring User’s Guide. Storage Mirroring compression algorithms were designed to minimally impact processor utilization for replication in most environments while providing significant bandwidth savings.
Solution Overview
2 Sample Implementation This section describes an example of how to configure Storage Mirroring and Volume Shadow Copy. Use these procedures as a guideline for creating your own implementation. Because no two environments or configurations are exactly the same, you will probably need to implement additional or different steps than what is documented here in order to make the solution work in your environment.
4. 5. 6. Right-click the source machine and select New, Replication Set. Enter a name for the replication set. Select the portion of the VSS volume that you want to protect (for instance, select the entire volume for a file server, or select only the data files for a database application). Deselect the System Volume Information folder. 7. 8. 9. Right-click the replication set name and select Save to save the replication set. Drag and drop the replication set onto the target.
snapshots, this strategy produces snapshots of the exact same data on both the source and target. To use synchronous snapshots, you need to use Storage Mirroring’s in-band control feature to kick off snapshots (as opposed to using the VSS built-in scheduling feature). Synchronous snapshot strategies work well for transactional applications, such as databases.
The sample batch files provided are only examples. Because no two environments or configurations are exactly the same, you MUST modify the sample scripts in order to make the solution work in your environment. Figure 1 SAMPLE_PRESNAPSHOT.TXT . NOTE: Because the following files use the login command, which displays the password of the user ID specified, you may not want to use the network administrator account.
Figure 3 SAMPLE_POSTSNAPSHOT.TXT . 4. Create a batch file to run this script using the following POSTSNAPSHOT.BAT sample batch file. Figure 4 SAMPLE_POSTSNAPSHOT.BAT . 5. Run presnapshot.bat before starting your snapshot and run postsnapshot.bat after the snapshot is complete. NOTE: ’ ’ You can also incorporate these two scripts into an automated script that can be scheduled to run at the desired time through Windows Task Scheduler.
Setting up crash-consistent synchronous snapshots For this strategy to work, you will have to initiate snapshots on both the source and target using either Storage Mirroring’s in-band control feature or the Windows Task Scheduler. By using Storage Mirroring to insert and run tasks at various points during the replication of data, you can coordinate a point-in-time snapshot with real-time replication.
NOTE: The dosnapshot.bat, task.txt, and snapshotcommand.bat files should be stored on the source in the Storage Mirroring directory (typically c:\Program Files\DoubleTake). The snapshotcommand.bat file should also be stored in the Storage Mirroring directory on the target. The files may be run manually when desired, or they can be scheduled using the Windows Task Scheduler. See your Microsoft Windows reference guide for more information about scheduling.
Figure 6 SAMPLE_TASK.TXT file used in DOSNAPSHOT.BAT . Figure 7 SAMPLE_SNAPSHOTCOMMAND..BAT file used in TASK.TXT . Setting up data-consistent synchronous snapshots For this strategy to work, you will have to initiate snapshots manually on both the source and target using either the Storage Mirroring in-band control feature or the Windows Task Scheduler. To ensure that all data is committed to the database and that the data is in a data-consistent state, you will need to stop the database service.
5. 6. The data is applied on the target as it is received. Since the task command was inserted inline, the replication data from the source is applied to the target first. When the target gets to the Storage Mirroring task command, the target data will be in the exact same state as the source data when the source application service was stopped. Since this was a stable point on the source, it is also a stable point on the target.
Figure 8 SAMPLE_SQL_SNAPSHOT.BAT .
Figure 9 SAMPLE_TASK.TXT file used in SQL_SNAPSHOT.BAT . Figure 10 SAMPLE_SNAPSHOTCOMMAND.BAT file used in TASK.TXT .
Sample Implementation