What Is Volume Shadow Copy Service?

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

What Is Volume Shadow Copy Service?

In this section

  • Volume Shadow Copy Service Scenarios

  • Related Information

The Volume Shadow Copy Service provides the backup infrastructure for the Microsoft Windows XP and Microsoft Windows Server 2003 operating systems, as well as a mechanism for creating consistent point-in-time copies of data known as shadow copies.

Previous to the Volume Shadow Copy Service and its standard set of extensible application programming interfaces (APIs), there was no standard way to produce “clean” (uncorrupted) snapshots of a volume. Snapshots often contained corruptions due to “torn writes” that required the use of utilities such as Chkdsk.exe to repair. Torn writes occur when an unplanned event (such as a power failure) prevents the system from completely writing a block of data to disk. The Volume Shadow Copy Service APIs prevent torn writes by enabling applications to flush partially committed data from memory.

The Volume Shadow Copy Service has native support for creating consistent shadow copies across multiple volumes, regardless of the snapshot technology or application. The Volume Shadow Copy Service can produce consistent shadow copies by coordinating with business applications, file-system services, backup applications, fast recovery solutions, and storage hardware. Several features in the Windows Server 2003 operating systems use the Volume Shadow Copy Service, including Shadow Copies for Shared Folders and Backup.

Volume Shadow Copy Service Scenarios

Shadow copies can be used for a number of purposes such as:

  • Creating consistent backups of open files and applications

  • Creating shadow copies for shared folders

  • Creating transportable shadow copies using a hardware provider — for backup, testing and data mining scenarios

  • Quickly recovering and restoring files and data

The Volume Shadow Copy Service is commonly used in the following scenarios.

Consistent backups of open files and applications

Applications that are running often keep their files open continuously. For backup, this can present a problem because this prevents backup applications from accessing and copying these files to backup media. Even if an application does not have its files open, it is possible—because of the finite time needed to open, back up, and close a file—that files copied to the backup media might not all reflect the same application state at the same point in time.

Additionally, backing up servers that are running critical applications such as databases or messaging services presents a unique challenge. These applications run in a volatile state as a result of extensive optimizations that deal with huge flows of transactions and messages. Because these applications keep their data in a constant flux between memory and disk, it is difficult to pinpoint the data that needs to be archived. The most straightforward solution is to interrupt the application during backup, which puts the data into a stable state, but might result in unacceptable amounts of downtime, particularly if the applications are large.

For both problems, the Volume Shadow Copy Service provides a solution by enabling a snapshot of the data at a given point in time, while minimizing the interruption to applications. This can involve cooperation from the applications, so that they can notify the operating system that they are briefly quiescing their data for archival. During quiescence, applications make data on the disk consistent. For example, an application might flush its buffers to disk or write out in-memory data to disk.

The Volume Shadow Copy Service provides interfaces for storage-management applications (called requestors), business applications (called writers) and storage devices (with components called providers) to ensure that volume shadow copies are in a consistent state.

Shadow Copies for Shared Folders

Shadow Copies for Shared Folders uses the Volume Shadow Copy Service to provide point-in-time copies of files that are located on a shared network resource, such as a file server. With Shadow Copies for Shared Folders, users can quickly recover deleted or changed files that are stored on the network without administrator assistance, which can increase productivity and reduce administrative costs.

For more information about Shadow Copies for Shared Folders, see “Shadow Copies for Shared Folders Technical Reference.”

Shadow Copy Transport

With a hardware provider that is designed for use with the Volume Shadow Copy Service, you can create transportable shadow copies that can be imported onto servers within the same subsystem (for example, a storage area network (SAN)). While multiple servers can access the same storage array, they do not share access to the same storage unit or LUN. For servers to share the same data, the traditional solution is to first copy the data on one server and then restore it to a second server. This process can be quite lengthy.

With the Volume Shadow Copy Service and a storage array with a hardware provider designed for use with the Volume Shadow Copy Service, it is possible to create a shadow copy of the source data volume on one server and then to import the shadow copy onto another server (or back to the same server). This process is accomplished in a few minutes, regardless of the size of the data. The transport process is accomplished through a series of steps using a shadow copy requestor (storage-management application) that supports transportable shadow copies. The following is a generalized version of those steps:

  1. Create a transportable shadow copy of the source data on a server.

  2. Import the shadow copy to a server connected to the SAN (you can import to a different server or the same server).

  3. The data is now ready to be used.

Note that shadow copies are read-only. If you want to convert a shadow copy to a read/write LUN, you can use a storage-management application (including some requestors) that is compatible with the Virtual Disk Service, in addition to the Volume Shadow Copy Service. Using this application, you can remove the shadow copy from Volume Shadow Copy Service management and convert it to a read/write LUN.

Volume Shadow Copy Service transport is an advanced solution on computers running Windows Server 2003, Enterprise Edition or Windows Server?2003, Datacenter Edition that works only if there is a hardware provider on the storage array. Shadow copy transport can be used for a number of purposes, including tape backups, data mining, and testing.

Transport for Tape Backups

Backing up data to tape is perhaps the most I/O intensive operation that an application can perform. On a production local area network (LAN), this is problematic because the data must travel across two systems: from the storage on the server across to the network to the backup system, and from the backup system to the tape device. This high traffic process can result in considerable congestion on the production network, degrading application performance.

One way to alleviate this problem is to transport shadow copies from the production server onto a backup server, where the shadow copy volumes can be backed up to tape. This option removes backup traffic from the production server. While some backup applications might be designed with the hardware provider software that enables transport, others are not. The administrator should determine whether or not this functionality is included in the backup application.

Transport for Data Mining

The data in use by a particular production server is often useful to different groups or departments within an organization. Rather than add additional load to the production server, a shadow copy of the data can be made available through transport to another server. The shadow copy can then be processed for different purposes, without any performance impact on the original server.

Transport for Testing

Shadow copies can be particularly useful for software developers, who often need data against which to test new versions of an application. Developers can make a shadow copy of the source data and transport it to a different server in order to test an application. If an application corrupts the shadow copy of the data, there is no impact on the original data.

Fast Recovery

Fast recovery uses shadow copies as a complement to traditional tape-based recovery solutions. Using point-in-time shadow copies with Active Directory and Exchange Server configurations, for example, helps you to quickly recover from a number of specific system problems, including:

  • Hardware failure

  • Storage failure

  • Software corruption

Because this mirroring (or “cloning”) process is fast and nondisruptive to system performance, shadow copies can be made more frequently than tape backups. Shadow copies that are kept locally on a storage area network can be quickly accessed. With the appropriate hardware provider, they can be transported to a backup server, backed up to tape, and sent to off-site storage for archiving.

With the Volume Shadow Copy Service and the Virtual Disk Service, Windows Server 2003 contains the functionality to enable fast data restores that only take a few minutes — compared to the hours it can take with tape backups.

As with tape-based recovery of data, recovery using the Volume Shadow Copy Service and Virtual Disk Service requires planning well ahead of the potential server failure. The difference is that the data recovery from tape is far slower and more labor intensive than when using Windows Server 2003 technology and storage area networks.

Mechanisms Underlying Fast Recovery

The following sections briefly outline the conceptual aspects of each of these fast recovery solution components.

Shadow Copy Creation

The process of creating shadow copies begins when the backup application (requestor) contacts the Volume Shadow Copy Service to request a shadow copy. The Volume Shadow Copy Service, acting as a coordinator, notifies each of the writers to prepare for shadow copy creation. Once the writers indicate they are prepared, the requestor instructs the Volume Shadow Copy Service to create the shadow copy. The Volume Shadow Copy Service informs the writers to quiesce their stores and briefly freeze (stop) writes to disk for the few seconds it takes the provider to create the point-in-time shadow copies of the volumes.

Once a shadow copy of one or more volumes is made, the Volume Shadow Copy Service informs the writers they can thaw (resume writing to disk) and the original data continues to be used in production. At this point, the read-only shadow copy resides in the storage array until a need arises.

Fast Recovery Process

After a failure event, a management application using both the Volume Shadow Copy Service and the Virtual Disk Service can remove the failed LUNs from the system. The shadow copies of the LUNs can be converted from read-only to read/write. The LUNs can then be assigned to another server.

A generalized example of shadow copy creation and transport between two servers is shown in the following diagram. A single point-in-time shadow copy is made of the three LUNs assigned to Server 1. This shadow copy set can be accessed by Server 2 through the process of first unmasking, then mounting the LUNs. The complete process is called “shadow copy transport.”

Shadow Copy Creation and Transport Between Two Servers

Shadow Copy Creation and Transport

Note that this is a general example of transporting shadow copies of LUNs between two servers.

The following resources contain additional information that is relevant to this section.