Abstract:
A snapshot manager switches the roles of a production storage device and a corresponding snapshot device by modifying read and write requests to the devices. Thus, translation mapping information concerning the acting snapshot device does not change, so a remote computing device can perform a backup from the acting snapshot without having to restart every time content is written to the production device. After the backup operation, the snapshot manager can update the underlying data source from the acting production device to capture writes to production that occurred during the backup. The snapshot manager then reverts the roles of the storage device and the snapshot to normal.

Description:
TECHNICAL FIELD 
   This invention pertains generally to backing-up computer storage, and more specifically to improving backup performance by eliminating mapping changes to snapshot devices. 
   BACKGROUND 
   Typically, in order to backup data on a production storage device, a copy or snapshot of the production device is taken, and the backup is made from this snapshot. This allows the production device to remain active during the backup operation. In order to execute such a back-up operation, a copy-on-write snapshot is often used. A copy-on-write snapshot initially comprises file system location information of the files on the underlying storage device, but not the actual files themselves. Thus, initially no actual copy of the data on the production storage device is created, thereby saving storage space and computing resources. However, if a user attempts to modify (e.g., write to) the snapshot, a snapshot copy of the target data is made, and then modified by the user operation. Thus, only the snapshot copy is updated, but the underlying production device is not. On the other hand, when a user writes to the production device, the original target data on the production device is first copied to the snapshot, such that the snapshot now includes a copy of the data prior to the write operation. The write operation to the production device then occurs. Thus, updates to the production device do not modify the snapshot, only the production device. 
   Backup operations are often performed “off-host” (i.e., where the actual backup is performed by a computing device other than the one associated with the storage device being backed-up). This frees up the resources of the primary computing device that would otherwise be devoted to the backup operation. A remote computing device performing a backup from a snapshot does not have internal access to the file system of the computing device being backed-up. Therefore, the remote computing device needs access not only to the snapshot itself, but it also needs the direct translations between the snapshot and the underlying physical storage device, so that it can access the actual files. For off-host backups, a file mapping methodology is used to create this mapping information between the snapshot and the underlying storage device. The snapshot and these physical storage mappings are transferred to the computing device which is to perform the backup, such that it can directly access the underlying storage device. 
   However, where a copy-on-write snapshot is used for an off-host backup operation, every write operation to the production device during the backup operation results in changes to the translation mappings of the snapshot device. Any such changes occurring during the backup require translation mappings to be refreshed at the backup host. That of course means that the backup will need to be restarted for that snapshot every time a write operation occurs during the backup operation. Such write operations can be frequent. This makes the backup operation both time and resource intensive, thereby prolonging the backup cycle. 
   What is needed are methods, computer readable media and computer systems for enabling off-host backup from a copy-on-write snapshot, without the problems described above. 
   SUMMARY OF INVENTION 
   The roles of a storage device and a snapshot copy of the storage device are switched, so that the storage device can be backed-up without having to start over every time a change is made to the storage device during the backup. More specifically, read and write requests to the production storage device and the snapshot are modified so that the snapshot device acts as the production storage device and vice versa. Thus, translation mapping information concerning the acting snapshot device (the underlying data source) does not change, so a remote computing device can perform a backup from the acting snapshot without having to restart every time content is written to the production storage device. After the backup operation is complete, the underlying data source can be updated from the acting production device to capture writes to the production device that occurred during the backup. Then, the roles of the storage device and the snapshot copy are reverted to normal. 
   The features and advantages described in this summary and in the following detailed description are not all-inclusive, and particularly, many additional features and advantages will be apparent to one of ordinary skill in the relevant art in view of the drawings, specification, and claims hereof. Moreover, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter, resort to the claims being necessary to determine such inventive subject matter. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
       FIG. 1  is a block diagram illustrating a snapshot manager eliminating translation mapping changes to snapshot devices, according to some embodiments of the present invention. 
   

   The Figures depicts embodiments of the present invention for purposes of illustration only. One skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the invention described herein. 
   DETAILED DESCRIPTION 
     FIG. 1  illustrates a snapshot manager  101 , according to some embodiments of the present invention. It is to be understood that although the snapshot manager  101  is illustrated as a single entity, as the term is used herein a snapshot manager  101  refers to a collection of functionalities which can be implemented as software, hardware, firmware or any combination of these. Where a snapshot manager  101  is implemented as software, it can be implemented as a standalone program, but can also be implemented in other ways, for example as part of a larger program, as a plurality of separate programs, as a kernel loadable module, as one or more device drivers or as one or more statically or dynamically linked libraries. 
   As illustrated in  FIG. 1 , the snapshot manager  101  modifies the way copy-on-write snapshots  103  are configured and utilized, so as to avoid changes to the translation mappings  104  of the snapshot device  103  while a backup or other off-host procedure is ongoing. Although this specification discusses using the snapshot  103  modifications described herein for the facilitation of off-host backups, it will be apparent to those of ordinary skill in the relevant art in light of this specification that such methodology can be used for other off-host storage device processing as well, such as a scan of the storage device for malicious code (e.g., an anti-virus scan). 
   Before the backup is started but after the creation of the copy-on-write snapshot  103 , the snapshot manager  101  rearranges the underlying roles of the original production device  105  and the snapshot  103 . The snapshot manager  101  switches these roles such that the newly added snapshot  103  acts as the production device  105  and vice versa. For clarity, the newly added copy-on-write snapshot  103  will be referred to as the acting production device  107  and the original production device  105  as the acting snapshot  109 . As per the role switch, the acting snapshot  109  becomes the data source for the acting production device  107 . 
   The snapshot manager  101  subsequently processes I/O (input/output) requests to the respective devices as follows. When a read request  111  attempts to read from the production device  105 , the request  111  is routed to the acting snapshot device  109 , which is in fact the underlying data source as explained above. When a write request  113  attempts to write to the production device  105 , the content  106  that will be affected by the write is read from the acting snapshot  109  and written to the acting production device  107 . The write request  113  is then routed to the acting production device  107 . Thus, the write is executed on the acting production device  107 , and the underlying data source (the acting snapshot  109 ) is not affected. 
   Read requests  111  targeting the snapshot  109  are not rerouted (i.e., they read directly from the acting snapshot  109 ). Responsive to a write request  113  targeting the snapshot  109 , first the content  106  to be affected by the write is copied from the data source to the acting production device  107 , followed by a direct write to the acting snapshot  109 . 
   The acting snapshot  109  and the relevant mapping information  104  are made available to the off-host computing device  115  to execute the backup operation. As all of the underlying stored content is already on the acting snapshot  109  (which is in fact the underlying data source), the mapping information  104  does not change during the backup, and consequently the backup does not need to be restarted. 
   As the techniques described herein eliminate changes to mapping information  104  during backups, the backup window is significantly reduced. The off-host computing device  115  can access the acting snapshot device  109  directly, and make a backup. Since the mapping information  104  of the acting snapshot  109  does not change, the off-site computing device  115  need not request or receive modified mappings  104 . The backup cycle can thus be finished without interruption, greatly increasing performance. Ensuring that the backup process does not get interrupted also has the benefit that tape performance can be increased due to continuous data streaming to the tape(s). 
   If the configuration of the original production device  105  (the underlying storage device) and the newly allocated storage (the actual snapshot  103 , which functions as the acting production device  107  during the backup) do not match, the redundancy and/or performance characteristics of the acting production device  107  might be relatively deficient during the backup window. However, this should not be a matter of concern because this change is only for a temporary duration, i.e. until the backup completes. In any case, it can be easily ensured that the allocated storage for the acting production device  107  meets some minimal (or specified) redundancy and/or performance characteristics. 
   Once the backup cycle is complete, the snapshot manager  101  can refresh the acting snapshot  109  from the acting production device  107  to capture any updates that occurred to the acting production device  107  during the backup. The snapshot manager  101  can then undo the switch between the devices, restoring the underlying data source to its role as the production device  105 . Of course, without switching back the device roles, any writes  113  targeting the production device  105  during the backup cycle do not get written to actual production device storage  105 , as during the backup such writes  113  are routed to the acting production device  107 , which is the recently created snapshot  103 . 
   As will be understood by those familiar with the art, the invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. Likewise, the particular naming and division of the portions, modules, agents, managers, components, functions, procedures, actions, layers, features, attributes, methodologies and other aspects are not mandatory or significant, and the mechanisms that implement the invention or its features may have different names, divisions and/or formats. Furthermore, as will be apparent to one of ordinary skill in the relevant art, the portions, modules, agents, managers, components, functions, procedures, actions, layers, features, attributes, methodologies and other aspects of the invention can be implemented as software, hardware, firmware or any combination of the three. Of course, wherever a component of the present invention is implemented as software, the component can be implemented as a script, as a standalone program, as part of a larger program, as a plurality of separate scripts and/or programs, as a statically or dynamically linked library, as a kernel loadable module, as a device driver, and/or in every and any other way known now or in the future to those of skill in the art of computer programming. Additionally, the present invention is in no way limited to implementation in any specific programming language, or for any specific operating system or environment. Furthermore, it will be readily apparent to those of ordinary skill in the relevant art that where components of the present are implemented in whole or in part in software, the software components thereof can be stored as program code (for example as object code or executable images) on computer readable storage media as computer program products (articles of manufacture). As will be readily apparent to those of ordinary skill in the relevant art, any form of tangible computer readable storage medium can be used in this context, such as magnetic or optical storage media. Additionally, it will be readily apparent to those of ordinary skill in the relevant art that software components of the present invention can be instantiated as program code within the memory of any computing device, such that when the processor of the computing device processes the components, the computing device executes their associated functionality. It will be further readily apparent to those of ordinary skill in the relevant art that the terms “computer system” and “computing device” means one or more computers configured and/or programmed to execute the described functionality. Accordingly, the disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims.