# Patent

## Title
Method and system for non-intrusive monitoring of library components

## Abstract

Embodiments of the present invention provide a method for monitoring components in a library by tracking the movement of library components. By tracking the movement of library components, the degradation of library components can be monitored and the reliability of library components determined, allowing unreliable components to be bypassed or replaced, enhancing the reliability of the library and preventing data loss.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
This application is a continuation of, and claims a benefit of priority under 35 U.S.C. 120 of the filing date of U.S. patent application Ser. No. 14/324,980, filed on Jul. 7, 2014, entitled “METHOD AND SYSTEM FOR NON-INTRUSIVE MONITORING OF LIBRARY COMPONENTS”, which is a continuation of, and claims a benefit of priority under 35 U.S.C. 120 of the filing date of U.S. patent application Ser. No. 11/801,809, filed on May 11, 2007, entitled “METHOD AND SYSTEM FOR NON-INTRUSIVE MONITORING OF LIBRARY COMPONENTS”, the entire contents of which are hereby expressly incorporated by reference for all purposes.


TECHNICAL FIELD OF THE INVENTION
The present invention relates to methods and systems for monitoring components of a library. More particularly, the present invention relates to methods and systems for monitoring library components by tracking library components in a non-intrusive manner using an out-of-band appliance.
BACKGROUND
Data represents a significant asset for many entities. Consequently, data loss, whether accidental or caused by malicious activity, can be costly in terms of wasted manpower, loss of goodwill from customers, loss of time and potential legal liability. To ensure proper protection of data for business and legal purposes, many entities back up data to a physical storage media such as magnetic tapes or optical disks. Traditionally, backup would occur at each machine controlled by an entity. As the sophistication of network technology increased, many entities turned to enterprise level backup in which data from multiple machines on a network is backed up to a remote library. Typically, a library includes a variety of components which include a plurality of media for data storage, e.g. multiple magnetic tapes. Centralized data backup has the advantage of increased volume, efficiency and redundancy.
In many systems, the data to be backed up and backup commands are sent over a network from multiple machines on the network to a library. In many instances, the data to be backed up and the backup commands are routed to the library through a switch.
One example of a library commonly used in enterprise backup systems is a magnetic tape library. A magnetic tape library can comprise components such as tape cartridges (containing magnetic tape), robots, tape slots and tape drives. A typical magnetic tape library contains multiple cartridge slots in which tape cartridges can be stored. Tape cartridges, commonly referred to as tapes, are physically moved between cartridge slots and tape drives by a robot. The robot is controlled by commands received from the host devices on the network. When specific data is required, a host device determines which cartridge slot contains the tape cartridge that holds the desired data. The host device then transmits a move-element command to the robot and the robot moves the tape cartridge to a tape drive which reads the desired data from the tape cartridge.
In a SCSI tape library, devices that are part of the library are typically addressed by target number. Thus, each drive and robot of a tape library typically has a target number. Cartridge slots, on the other hand, are addressed by element numbers that are used by the robot to locate the slots. Because the robot also places tape cartridges in the drives, each drive is also associated with an element number.
Components of a library are subject to wear and other forms of degradation which may degrade individual library component(s) to a point where the degraded component(s) can no longer be reliably used. Degradation of library components may render a library unreliable and prone to data loss, diminishing the library's usefulness as a backup device. The failing of even one library component can cause the loss of valuable data. Furthermore, the process of determining which library component is failing and rendering the library unreliable can be time consuming, uncertain and expensive.
SUMMARY OF THE INVENTION
Embodiments of the present invention provide a method and system of monitoring library components that eliminates, or at least substantially reduces, the shortcomings of prior art library systems and methods. More particularly, embodiments of the present invention comprise polling the state of a library at intervals and monitoring library components based on a set of returned library states from the polling of the library. The method can also comprise comparing returned library states to track the movement of one or more library component(s). The method can further comprise correlating errors with a particular library component based on the movement of one or more library component(s). Thus tape movements can be tracked and library components monitored.
Another embodiment of the present invention can include a set of computer instructions executable by a computer processor to poll the state of a library at intervals and monitor library components based on a set of returned library states from the polling of the library. The computer instructions can also be executable to compare returned library states to track the movement of one or more library component(s). The computer instructions can be further executable to correlate errors with a particular library component based on the movement of one or more library component(s). In this manner, the computer instructions can be executable to track tape movements and monitor library components.
The present invention provides an advantage over prior art systems and methods of monitoring libraries by providing a non-intrusive method of monitoring library components: the state of a library can be monitored without having to intercept commands and data being sent to or from the library. An additional advantage is that the monitoring appliance does not have to be in-band, but can be an out-of-band device. This allows the monitoring appliance to be a self-contained device which can be coupled to a switch or network, allowing for easy deployment. This can reduce the complexity and cost of monitoring library components.



BRIEF DESCRIPTION OF THE FIGURES
A more complete understanding of the present invention and the advantages thereof may be acquired by referring to the following description, taken in conjunction with the accompanying drawings in which like reference numbers indicate like features and wherein:
FIG. 1 is a diagrammatic representation of one embodiment of a library;
FIG. 2 is a diagrammatic representation of one embodiment of a backup system using a library and having a monitoring appliance;
FIG. 3 is a diagrammatic representation of one embodiment of a controller which can be used in a monitoring appliance;
FIG. 4 is a flowchart illustrating a method for monitoring library components according to one embodiment of the present invention;
FIG. 5 is an example representation of a library state; and
FIG. 6 is an example comparison of representations of library states polled at different times.



DETAILED DESCRIPTION
Preferred embodiments of the invention are illustrated in the FIGURES, like numerals being used to refer to like and corresponding parts of the various drawings.
Embodiments of the present invention provide a method and system for monitoring the components of a library. By monitoring library components, the degradation and reliability of library components can be monitored, allowing unreliable or unacceptably degraded components to be identified, thus allowing for the unreliable or degraded components to be bypassed or replaced, enhancing the reliability of the library and proactively preventing data loss.
FIG. 1 is a diagrammatic representation of one embodiment of a tape library, as would be understood by one of ordinary skill in the art. Library 100 can comprise drives 140a-140e, media changer 125 and associated robot 130, import/export element(s) 145 and slots 135a-135j. Drives 140a-140e can read/write data from/to magnetic tape (contained within cartridges), eject tape cartridges and perform other operations. Slots 135a-135j store the magnetic tape cartridges when they are not in a drive and robot 130 moves the magnetic tape cartridges between drives 140a-140e and slots 135a-135j. For example, robot 130 may move a tape cartridge stored at slot 135a to drive 140b so that data can be written to the tape cartridge. It should be noted that some libraries may employ a single robot or multiple robots in an expandable or modular configuration.
A Read Element Status (RES) command is a command which is used to poll the state of a library. That is, a RES command is sent to a library and in response, the library returns its current state, including the locations of individual tape cartridges. Thus a RES command provides a snapshot of a library at any one time. Examples of a RES command can be found in section 6.5 of NCITS T10/999D Revision 10a Specification, section 6.10 of INCITS T10/1383D Revision 7 Specification and section 6.10 of INCITS T10/1730-D Revision 5 Specification; all of the above-mentioned Specifications are hereby incorporated by reference.
A drive inquiry is an inquiry command that is used to query the serial number of components of a library such as a tape drive or other drive or a media changer. Embodiments of drive inquiry commands query single library components. That is, an individual drive inquiry may regard one library component.
Embodiments of the invention utilize a monitoring appliance which can be a Read Verify Appliance (RVA). The monitoring appliance polls the state of a library over time by sending RES commands to the library at intervals. Returned library states are compared. Based on the comparison between the returned library states, the movement of tape cartridges over time can be tracked.
In further embodiments of the invention, a library state is represented as a XML representation of data returned in response to a RES command. A XML representation can be supplemented with data returned in response to one or more drive inquires. For example, a supplemented XML representation of a library state can include serial numbers of library components determined from drive inquiries issued to corresponding library components. In other embodiments of the invention, a library state can be represented in a different format.
Tracking the movement of tape cartridges or other media allows sources of errors to be identified. For example, an individual tape cartridge may suffer from an increasing number of data errors in any drive: this implies that the tape cartridge is degrading and may require replacement. In another example, a tape cartridge may encounter errors when used with a tape drive A but may encounter no errors when used with other tape drives. If other tape cartridges encounter errors when used with tape drive A, but encounter no errors when used with other tape drives, this implies that tape drive A is unreliable. Accordingly, tape drive A may be bypassed or replaced. By tracking the movement of one or more tape cartridges, errors can be correlated to a particular tape or drive.
It should be noted that the intervals between polling can be fixed periods of time or of variable duration or a combination of the two. In one embodiment, the monitoring appliance polls a library every 30 seconds. In another embodiment, the time duration between polling is less than the backup time or the tape movement time. In embodiments of the invention, the intervals can be determined by computer algorithm or user input.
FIG. 2 is a diagrammatic representation of a system 200 in which a plurality of hosts 202a-202d have access to library 100 over network 205. Network 205 can comprise the Internet, a SAN, a LAN, a WAN, a wireless network or any other communications network known in the art. Hosts 202a-202d are coupled to library 100 via network 205 and switch 207. Similarly, library 100 can communicate with switch 207 over any suitable communications link or network known in the art and can use additional protocols such as iSCSI, TCP/IP, or other protocol known in the art. Switch 207 is connected to monitoring appliance 220.
Switch 207 is connected to library 100. Thus switch 207 can forward RES commands from monitoring appliance 220 to library 100. Switch 207 receives the library state generated in response to the RES command from library 100 and forwards the library state to monitoring appliance 220 which stores the library state and/or compares it with one or more previous library states. Thus monitoring appliance 220 can continually poll the state of library 100, track tape movements and monitor the components of library 100. Because monitoring appliance 220 tracks tape movements using RES commands, monitoring appliance 220 does not need to intercept commands or responses from network 205 to track tape movements. Thus, in one embodiment, monitoring appliance 220 can be an out-of-band appliance. This allows monitoring appliance 220 to be a non-intrusive device which does not monitor or interfere with commands from and responses to hosts 202a-202d. Consequently, monitoring appliance 220 can be a compartmentalized device which can be coupled to a switch and which does not have to be integrated into network 205. An advantage of this out-of-band methodology is that a monitoring appliance can be used to monitor library components without cumbersome configuring.
While shown as a physical media library in FIG. 2, library 100 can be a virtual media library that is a virtual representation of one or more physical media libraries as presented by switch 207, a library controller or other component. Examples of library virtualization are described in U.S. patent application Ser. No. 10/704,265, entitled SYSTEM AND METHOD FOR CONTROLLING ACCESS TO MULTIPLE PHYSICAL MEDIA LIBRARIES, and U.S. patent application Ser. No. 10/703,965, entitled SYSTEM AND METHOD FOR CONTROLLING ACCESS TO MEDIA LIBRARIES, both of which are hereby incorporated by reference herein.
FIG. 3 is a diagrammatic representation of a monitoring appliance controller 300 (“controller 300”). Controller can include a processor 302, such as an Intel Pentium 4 based processor (Intel and Pentium are trademarks of Intel Corporation of Santa Clara, Calif.), a primary memory 303 (e.g., RAM, ROM, Flash Memory, EEPROM or other computer readable medium known in the art) and a secondary memory 304 (e.g., a hard drive, disk drive, optical drive or other computer readable medium known in the art). A memory controller 307 can control access to secondary memory 304. Controller 300 can comprise a communications interface 306 (e.g., fibre channel interface, Ethernet port or other communications interface known in the art) to connect controller 300 to switch 207. An I/O controller 312 can control interactions with switch 207. Similarly, an I/O controller 314 can control interactions over I/O interfaces 308 and 310. Controller 300 can include a variety of input devices. Various components of controller 300 can be connected by a bus 326.
Secondary memory 304 can store a variety of computer instructions that include, for example, an operating system such as a Windows operating system (Windows is a trademark of Redmond, Wash. based Microsoft Corporation) and applications that run on the operating system, along with a variety of data. More particularly, secondary memory 304 can store a software program 330 that monitors library components. During execution by processor 302, portions of program 330 can be stored in secondary memory 304 and/or primary memory 303.
FIG. 4 is a flow chart illustrating one embodiment of a method for monitoring library components. According to one embodiment, the method of FIG. 4 can be implemented as a set of computer executable instructions stored on a computer readable medium at, for example, monitoring appliance 220. The set of computer executable instructions can, when executed, monitor library components in a non-intrusive manner. At step 455, the state of the library is polled by sending a RES command directly or indirectly to the library. The library returns its present state, including the locations of tapes in the library. The returned library state is received by the monitoring appliance. At step 460, the returned library state is compared to a previous library state. Based on the comparison between the returned library state and the previous library state, tape movements within the library can be tracked (step 465). For example, if in the previous library state, a tape was at a specified drive in the library and in the returned state of the library, the same tape is in a slot, it can be determined that the tape has been moved from the drive to the slot. Based on such comparisons between library states, the movement of tapes within a library can be tracked over time. At step 470, errors are correlated with library components based on tape movements. This allows the monitoring appliance to monitor the degeneration of library components. For example, if a drive registers an increasing number of errors, regardless of the robot or tape used with the drive, then the drive is likely degenerating and becoming increasingly unreliable. Accordingly, this allows the failing drive to be identified and bypassed or replaced before it causes data loss or library failure.
In embodiments of the invention, library states are supplemented with additional data. Such data can be obtained from, for example, one or more drive inquires and can include the serial number of one or more components.
Either tape movements can be stored and used to monitor library components or the actual library states can be stored and used to track tape movements. It is possible to store both tape movements or library states or any combination of the two. Tape movements or library states can be stored in memory, in a database or according to other data storage schemes to allow for easy access.
FIG. 5 is an example representation of a library state returned in response to a RES command. This representation is for a library with ten slots, one import/export element, two drives and two tapes.
FIG. 6 is an example comparison of representations of library states returned in response to RES commands issued at different times. State 610 is returned at a time. State 620 is returned at a subsequent time. By comparing the differences between the two states, it is possible to determine that the tape with volume identity 000105 has moved from the slot at element identity 0x1007 to the drive at element identity 0x101. This movement is shown by directional arrow 630.
Embodiments of the present invention can also be implemented with respect to libraries of media other than magnetic tapes. For example, the library can comprise a plurality of optical disks (i.e., an optical jukebox) or removable hard drives. Other libraries can utilize a combination of different storage media such as hard drives, magnetic media or optical media.
While the present invention has been described with reference to particular embodiments, it should be understood that the embodiments are illustrative and that the scope of the invention is not limited to these embodiments. Many variations, modifications, additions and improvements to the embodiments described above are possible. It is contemplated that these variations, modifications, additions and improvements fall within the scope of the invention as detailed in the following claims.

## Claims

1. A monitoring appliance, comprising,
a network interface, wherein the monitoring appliance is communicatively coupled to a media library through the network interface, the media library comprising library components including a plurality of drives and a plurality of tape cartridges;
a controller, including a processor, for monitoring components of the media library by:
sending a plurality of Read Element Status commands to the media library over a period of time;
tracking movement of tape cartridges in the media library based on differences between library states returned in response to the Read Element Status commands, wherein each of the returned library states comprises a current location of tape cartridges in the media library;
correlating errors appearing at library components with the tape cartridges based on the movement of the tape cartridges; and
identifying a library component of the media library as an error source based on the correlation.

2. The monitoring appliance of claim 1, wherein identifying a component of the media library as an error source comprises identifying a drive as the error source based on errors appearing in association with multiple tape cartridges accessed by the drive.

3. The monitoring appliance of claim 1, wherein identifying a component of the media library as an error source comprises identifying a tape cartridge as the error source based on errors associated with the tape cartridge occurring at multiple drives.

4. The monitoring appliance of claim 1, wherein the steps of sending and tracking are performed by a monitoring appliance.

5. The monitoring appliance of claim 4, wherein the monitoring appliance is an out-of-band monitoring appliance.

6. The monitoring appliance of claim 1, wherein sending the plurality of Read Element Status comprises sending plurality of Read Element Status commands are sent over the period of time such that a time duration between a first Read Element Status and a second Read Element Status command is less than a backup time.

7. The monitoring appliance of claim 1, wherein sending the plurality of Read Element Status comprises sending plurality of Read Element Status commands are sent over the period of time such that a time duration between a first Read Element Status and a second Read Element Status command is less than a tape movement time.

8. A monitoring appliance, comprising:
a network interface, wherein the monitoring appliance is configured to be communicatively coupled to a media library through the network interface; and
a controller, including a processor, for monitoring the media library by:
sending a first polling command to poll a first state of a monitored media library at a first time, wherein the monitored media library includes library components, the library components comprising a plurality of drives and a plurality of tape cartridges;
receiving the first state of the monitored media library in response to the first polling command, where the first state of the monitored media library includes a current location of at least one tape cartridge in the monitored media library;
tracking movement of the at least one tape cartridge in the monitored media library based on the first state of the monitored media library returned in response to the first polling command;
correlating errors appearing at library components with the at least one tape cartridge based on the movement of the at least one tape cartridge; and

identifying a library component of the monitored media library as an error source based on the correlation.

9. The monitoring appliance of claim 8, wherein tracking movement of the at least one tape cartridge comprises comparing the first state of the media library to a stored state of the media library.

10. The monitoring appliance of claim 9, wherein the controller monitors the media library by:
sending a second polling command to poll a second state of the media library at a second time;
receiving the second library state in response to the second polling command, where the second library state includes a current location of the at least one tape cartridge in the media library; and
wherein tracking the movement of the at least one tape cartridge comprises comparing the first library state to the second library state.

11. The monitoring appliance of claim 10, wherein identifying a library component of the media library as an error source comprises identifying the at least one tape cartridge as the error source based on errors associated with the at least one tape cartridge occurring at multiple drives of the media library.

12. The monitoring appliance of claim 8, wherein the first polling command is a Read Element Status command.

13. The monitoring appliance of claim 8, wherein the monitoring appliance is communicatively coupled to the media library through a network switch.

14. A system, comprising:
a media library, comprising library components including a plurality of drives and a plurality of tape cartridges; and
a monitoring appliance, comprising:
a network interface, wherein the monitoring appliance is communicatively coupled to the media library through the network interface; and
a controller, including a processor, for monitoring the media library by:
sending a first polling command to poll a first state of a media library at a first time;
receiving the first library state in response to the first polling command, where the library state includes a current location of at least one tape cartridge in the media library;
tracking movement of the at least one tape cartridge in the media library based on the first library state returned in response to the first polling command;
correlating errors appearing at library components with the at least one tape cartridge based on the movement of the at least one tape cartridge; and
identifying a component of the media library as an error source based on the correlation.

15. The system of claim 14, wherein tracking movement of the at least one tape cartridge comprises comparing the first state of the media library to a stored state of the media library.

16. The system of claim 15, wherein the controller monitors the media library by:
sending a second polling command to poll a second state of the media library at a second time;
receiving the second library state in response to the second polling command, where the second library state includes a current location of the at least one tape cartridge in the media library; and
wherein tracking the movement of the at least one tape cartridge comprises comparing the first library state to the second library state.

17. The system of claim 16, wherein identifying a library component of the media library as an error source comprises identifying the at least one tape cartridge as the error source based on errors associated with the at least one tape cartridge occurring at multiple drives of the media library.

18. The system of claim 14, wherein the first polling command is a Read Element Status command.

19. The system of claim 14, further comprising a network switch coupled to the network interface, a set of hosts, and the media library.

20. The system of claim 19, wherein the monitoring appliance is out-of-band of the set of hosts and the media library.