Method of protecting virtual tape data from accidental loss due to overwriting
In one embodiment, a system includes a main data system, a virtual tape volume coupled to receive a write request from the main data system, and an accidental loss protection system configured to receive the write request to the virtual tape volume, detect whether the write request overwrites a label of the virtual tape volume, and prevent the overwriting of the label.
Latest EMC Corporation Patents:
- Combining explicit and implicit feedback in self-learning fraud detection systems
- System and method to enhance phrase search with nested thesaurus parsing
- Systems and methods for bi-directional replication of cloud tiered data across incompatible clusters
- Method and system for adaptive wear leveling in solid state memory
- Handling deletes with distributed erasure coding
This application is a continuation of U.S. application Ser. No. 13/340,280, filed Dec. 29, 2011 now abandoned.
The entire teachings of the above application are incorporated herein by reference.
BACKGROUNDIn a system with virtual tape volumes coupled to a mainframe, errant commands from the mainframe can overwrite volume labels in the virtual tape volumes. Overwriting a volume label accidentally can cause significant data loss, such as losing all data on the virtual tape volume. This can occur in several ways, but one common way is when the mainframe software repositions the virtual tape volume to the beginning of the volume. Starting to write data from this point can overwrite the label or labels written at the beginning of the volume. With the labels now overwritten, all of the data on the virtual tape volume may not be recovered properly. Further, changing mainframes and mainframe software to stop the errant commands from being issued in the first place is difficult and costly because of the many varieties of mainframes and mainframe software that would have to be redesigned.
SUMMARYIn one embodiment, a system includes a main data system, a virtual tape volume coupled to receive a write request from the main data system, and an accidental loss protection system configured to receive the write request to the virtual tape volume, detect whether the write request overwrites a label of the virtual tape volume, and prevent the overwriting of the label.
The accidental loss protection system may be configured to detect whether the write request overwrites the label of the virtual tape volume with user data by determining whether (i) at least one previous write request wrote user data to the virtual tape volume, (ii) the write request jumped or rewound to the beginning of the virtual tape volume, (iii) the virtual tape volume has a label, and (iv) determining whether content of the write request is user data and not a label. If the determinations of all of (i), (ii), (iii), and (iv) are positive, then the accidental loss protection system may prevent the overwriting of the label. If the determinations of at least one of (i), (ii), and (iii), (iv) are negative, then the write request may be executed.
Preventing the overwriting of the label may further include setting the virtual tape to read-only. Preventing the overwriting of the label may further comprise sending an error message to the mainframe. The error message includes the reason the virtual tape volume prevented the write request.
The accidental loss protection system may operate transparent to the mainframe user or application software, or alternatively be further configured to allow the user to disable overwrite protection.
In one embodiment, a method comprises, in a hardware processor, receiving a write request to a virtual tape volume from a mainframe, detecting whether the write request overwrites a label of the virtual tape volume with user data and preventing the overwriting of the label.
The foregoing will be apparent from the following more particular description of example embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating embodiments of the present invention.
A description of example embodiments follows.
A product such as the Data Library for Mainframe (DLm) available from EMC, Inc. of Hopkinton, Mass. is a virtual tape library for an IBM or compatible mainframe.
Returning to
Distinguishing between accidental overwrites of a volume label and intentional overwrites of a volume label is also desirable to protect each tape volume image 110 without limiting a user or software application from having full access to the virtual tape volume. An accidental overwrite is a write request that 1) is directed to a tape volume image 110 that has already received data writes, 2) jumps or rewinds to the beginning of the tape volume image 110, 3) is directed towards a tape volume image 110 that includes a volume label or 4) is attempting to overwrite the volume label with data, not another label. Any combination of these factors may indicate an accidental overwrite. In one embodiment, all four factors indicate an accidental overwrite. An accidental loss protection system 120 which can be, for example, a subsystem of the input/output controller 100, can test these factors to differentiate between accidental and intentional volume label overwrites without requiring changes to the application, software, user behavior or mainframe 102. The accidental loss protection system 120 does not change the behavior of a user, the mainframe, mainframe software, mainframe applications. Rather, the accidental loss protection system 120 checks write requests 112 from an unmodified user, mainframe, mainframe software, or mainframe application for an errant command that overwrites a label.
Upon receiving the write request 112, accidental loss protection system 120 checks whether the write request 112 targets and overwrites a volume label on the tape volume image 110 such that data on the tape volume image 110 is not recoverable (Step 114). If the write request 112 attempts to overwrite a volume label such that data on the tape volume image 110 is not recoverable, the accidental loss protection system 120 prevents execution of the write request 112 by setting the tape volume image 110 to read-only mode (Step 116). If the write request 112 does not overwrite a volume label such that data on the tape volume image 110 is not recoverable, the accidental loss protection system 120 allows execution of the write request 112 from the input/output controller 100 (Step 118).
If previous write requests wrote data to the tape volume image 110, however, writing to the beginning of the volume overwrites the volume label and corrupts all data on the tape volume image 110. In this scenario, the accidental loss protection system 120 determines whether the write request 112 is attempting to write data or a label (Step 306). If the write request 112 is attempting to write a label, then the accidental loss protection system allows execution of the write request 112 (Step 118). If the write request 112 is attempting to write user data, however, the accidental loss protection system prevents execution of the write request 112 (Step 116).
If the accidental loss protection system 120 is enabled, it determines whether data has previously been written to the volume before the current write request 112 (Step 406). If no data has previously been written, as described above, the write request 112 at the beginning of the drive is unlikely to be accidental. Therefore, without previous data writes to the tape volume image 110, then the accidental loss protection system 120 allows execution of the write request 112 (Step 118).
If there have previously been data writes to the tape volume image 110, then the accidental loss protection system 120 determines whether the write request 112 either rewinds or jumps to the beginning of the virtual tape volume by determining whether the write request 112 is directed at the beginning of the tape volume image 110. (Step 408). If the write request 112 does not rewind or jump to the beginning of the virtual tape volume, the accidental loss protection system 120 allows execution of the write request 112 (Step 118).
If the write request 112 does rewind or jump to the beginning of the virtual tape volume, the accidental loss protection system 120 determines whether the tape volume image 110 has a volume label at its beginning by 120 determining whether the first block of the tape includes a volume label. If the tape volume image 110 does not have a volume label, an accidental label overwrite of a volume label cannot occur and therefore the write request 112 can write data to any location on the tape volume image 110. Therefore, if the volume has no label, the accidental loss protection system 120 allows execution of the write request 112 (Step 118).
If the tape volume image 110 does have a volume label, however, the accidental loss protection system 120 determines, as described above in reference to
(Step 504). Setting the tape volume image 110 to read-only causes a write request failure because the mainframe attempts to execute the write request 112 by forwarding the write request to the tape volume image 110, however, the tape volume image 110 issues an error message because it cannot write any write request while in read-only mode. The error message can be a standard generic error return status, such as a “unit check.” The mainframe receives the error message generated by the tape volume image 110 (Step 506). The mainframe can issue a “sense command” upon receiving the unit check to the tape volume image 110 to obtain more detail regarding the error. The tape volume image then returns that the error is a write protection error. The mainframe handles the error according to its own programming.
A person of ordinary skill in the art will appreciate that embodiments or aspects of the method and system described above may be implemented in the form of hardware, software, or firmware. If implemented in software, the software may be any form of software capable of performing operations consistent with the example embodiments disclosed herein. The software may be stored in any non-transient computer readable medium, such as RAM, ROM, magnetic disk, or optical disk. When loaded and executed by processor(s), the processor(s) are configured to perform operations consistent with the example embodiments disclosed herein. The processor(s) may be any form of processor(s) capable of being configured to execute operations as disclosed herein.
While this invention has been particularly shown and described with references to example embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.
Claims
1. A system comprising:
- a virtual tape volume, coupled to receive a write request from a main data system; and
- an accidental loss protection system configured to detect whether the write request overwrites a label of the virtual tape volume based on at least one previous write request and the write request by determining whether (i) at least one previous write request wrote user data to the virtual tape volume, (ii) the write request jumped or rewound to the beginning of the virtual tape volume, (iii) the virtual tape volume has a label, and (iv) determining whether content of the write request is user data and not a label; if the determinations of all of (i), (ii), (iii), and (iv) are positive, then preventing the overwriting of the label; and if the determinations of at least one of (i), (ii), and (iii), (iv) are negative, then executing the write request.
2. The system of claim 1, wherein preventing the overwriting of the label further comprises setting the virtual tape to read-only.
3. The system of claim 2, wherein preventing the overwriting of the label further comprises sending an error message to the mainframe.
4. The system of claim 3, wherein the error message includes the reason the virtual tape volume prevented the write request.
5. The system of claim 1, wherein the accidental loss protection system is further configured to operate transparent to a mainframe user or application software.
6. The system of claim 1, wherein the accidental loss protection system is further configured to allow disabling of overwrite protection.
7. A method comprising:
- in a hardware processor: detecting whether a write request received at a virtual tape volume overwrites a label of the virtual tape volume based on at least one previous write request and the write request by determining whether (i) at least one previous write request wrote user data to the virtual tape volume, (ii) the write request jumped or rewound to the beginning of the virtual tape volume, (iii) the virtual tape volume has a label, and (iv) determining whether content of the write request is user data and not a label; if the determinations of all of (i), (ii), (iii), and (iv) are positive, then preventing the overwriting of the label; and
- if the determinations of at least one of (i), (ii), and (iii), (iv) are negative, then executing the write request.
8. The method of claim 7, wherein preventing the overwriting of the label further comprises setting the virtual tape to read-only.
9. The method of claim 8, wherein preventing the overwriting of the label further comprises sending an error message to the mainframe.
10. The method of claim 9, wherein the error message includes the reason the virtual tape volume prevented the write request.
11. The method of claim 7, further comprising operating transparent to a mainframe user or application software.
12. The method of claim 7, further comprising enabling or disabling of overwrite protection according to a configuration or an operator command.
8291183 | October 16, 2012 | McCloskey et al. |
20050131955 | June 16, 2005 | Borthakur et al. |
20050235103 | October 20, 2005 | Saliba et al. |
20090319772 | December 24, 2009 | Singh et al. |
20100165503 | July 1, 2010 | Choi et al. |
Type: Grant
Filed: Apr 11, 2012
Date of Patent: Dec 30, 2014
Assignee: EMC Corporation (Hopkinton, MA)
Inventors: Larry W. McCloskey (Burlington, MA), Thomas McCafferty (Peabody, MA)
Primary Examiner: Aimee Li
Assistant Examiner: Christopher Do
Application Number: 13/444,562
International Classification: G06F 12/00 (20060101);