Virtual tape device and cleaning control method

A virtual tape device includes a first drive group of virtual tape drives, a first determination unit, and a first instruction unit. The first drive group is assigned to a first information processing apparatus. The first determination unit determines, upon receiving a first cleaning instruction for cleaning a first virtual tape drive included in the first drive group from the first information processing apparatus, whether the first cleaning instruction is to be output to a physical tape device connected to the virtual tape device. The first instruction unit instructs, when the first determination unit determines that the first cleaning instruction is to be output to the physical tape device, a first physical tape drive corresponding to the first virtual tape drive to perform cleaning. The first physical tape drive is included in the physical tape device.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2012-021287, filed on Feb. 2, 2012, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to a virtual tape device.

BACKGROUND

In general, a system including a tape library device which stores data in a tape cartridge of a magnetic tape or the like and a disk array device which virtually stores the data stored in the tape library device has been used as a virtual tape system.

A general virtual tape system will be described with reference toFIG. 8.FIG. 8is a diagram illustrating a configuration of a general virtual tape system. As illustrated inFIG. 8, a virtual tape system900includes a virtual tape device910and a tape library device920. The virtual tape system900is communicably connected to a host930which is a higher-level device.

The virtual tape device910includes a control server911and a disk array912and virtualizes the control server911and the disk array912as a tape library. That is, the virtual tape device910causes the host930to recognize that the tape library is directly connected to the host930. The virtual tape device910is actually connected to the tape library device920at a back-end. The tape library device920includes tape drives921to which tape cartridges are to be mounted. Data written by the host930is temporarily written in the disk array912, and thereafter, also written in one of the tape cartridges.

Each of the tape drives921allows a tape cartridge to be mounted and writes data to and reads data from the mounted tape cartridge using a magnetic head. When data is written and read a certain number of times, the magnetic head gets dirty. In this case, an error occurs frequently when data is written or read, and accordingly, retry is frequently performed. Therefore, the magnetic head is to be cleaned.

FIG. 9is a diagram illustrating general cleaning control. In the example ofFIG. 9, the tape library device920has a cleaning control function. Specifically, the tape library device920executes the cleaning control and when receiving a cleaning request from one of the tape drives921, the tape library device920cleans a magnetic head of the tape drive921which has issued the cleaning request.

Some tape library devices do not have the cleaning control function. Such a tape library device does not automatically perform cleaning of tape drives. Therefore, a user temporarily interrupts operation, manually performs cleaning of the tape drives, and thereafter, the operation is started again.

In a magnetic tape device connected to a higher-level device, a technique is employed in which the magnetic tape device adds up lengths corresponding to movements of a tape. When a value obtained by the adding up reaches a preset value, the magnetic tape device requests the higher-level device to perform cleaning, until the cleaning is executed, every time an instruction for unloading a magnetic tape is issued from the higher-level device.

A general virtual tape system has a problem in that a host is not capable of managing cleaning of tape drives. In a case of a tape library device having a cleaning control function, since the tape library device performs cleaning control, a host which is not directly connected to the tape library device is not capable of managing cleaning of tape drives. Also in a case of a tape library device which does not have a cleaning control function, since the tape library device is not capable of performing cleaning control, a host which is not directly connected to the tape library device is also not capable of managing cleaning of tape drives.

In a case of a magnetic tape device which is connected to a higher-level device, if a device corresponding to a virtual tape device is disposed between the higher-level device and the magnetic tape device, the magnetic tape device is not capable of transmitting a cleaning request to the higher-level device, and accordingly, the higher-level device is not capable of transmitting a cleaning request to tape drives.

As illustrated inFIG. 9, in the general cleaning control, tape control software describing a function of controlling cleaning of tape drives is installed in a host in some cases. In this case, the host is capable of controlling the tape library device by executing the tape control software installed in the host when the tape library device is directly connected to the host, and otherwise, the host is not capable of controlling the tape library device. Accordingly, the host is not capable of controlling cleaning of the tape drives included in the tape library device.

Note that the problems described above occur not only in magnetic heads of tape drives but also in reading heads and writing heads for general tapes such as paper tapes.

SUMMARY

According to an aspect of the present invention, provided is a virtual tape device including a first drive group of virtual tape drives, a first determination unit, and a first instruction unit. The first drive group is assigned to a first information processing apparatus. The first determination unit determines, upon receiving a first cleaning instruction for cleaning a first virtual tape drive included in the first drive group from the first information processing apparatus, whether the first cleaning instruction is to be output to a physical tape device connected to the virtual tape device. The first instruction unit instructs, when the first determination unit determines that the first cleaning instruction is to be output to the physical tape device, a first physical tape drive corresponding to the first virtual tape drive to perform cleaning. The first physical tape drive is included in the physical tape device.

DESCRIPTION OF EMBODIMENTS

Hereinafter, a virtual tape device and a cleaning control method according to embodiments disclosed in this application will be described in detail with reference to the accompanying drawings. Note that the technique is not limited to the embodiments. The embodiments may be appropriately combined with each other as long as no conflict in processing occurs. Hereinafter, a case where this technique is employed in a virtual tape system will be described.

First Embodiment

Configuration of Virtual Tape System

FIG. 1is a diagram illustrating a functional configuration of a virtual tape system according to a first embodiment. As illustrated inFIG. 1, a virtual tape system9includes a virtual tape device1and a tape library device2. The virtual tape system9is communicably connected to a host3.

The tape library device2includes physical tape drives21. Each physical tape drive21allows a tape cartridge to be mounted and reads and writes data in actual operation of the virtual tape system9. The number of the physical tape drives21is not limited to that illustrated inFIG. 1and may be changed.

The virtual tape device1virtualizes the tape library device2. The virtual tape device1includes an ICP (Integrated Channel Processor)11, an IDP (Integrated Device Processor)12, a disk array13, and a VLP (Virtual Library Processor)14.

The disk array13virtually stores data. The disk array13is a TVC (Tape Volume Cache), for example. The ICP11configures virtual tape drives111using the disk array13and controls an interface to the host3using the configured virtual tape drives111. The virtual tape drive111virtually stores data stored in a tape cartridge. Note that the number of the virtual tape drives111is not limited to that illustrated inFIG. 1and may be changed.

The IDP12controls an interface to the tape library device2. The VLP14manages the disk array13and controls the entire virtual tape device1. The VLP14includes a storage unit15and a control unit16.

The storage unit15is a storage device of a semiconductor memory device, such as a RAM (random access memory) or a flash memory. The storage unit15includes a control management table151, a virtual drive management table152, and a physical drive management table153.

The control management table151stores, in association with each virtual tape drive111, information used for cleaning control. The control management table151is updated by a cleaning request relay unit161and a threshold value calculation unit166, for example, which will be described later.

The virtual drive management table152stores, in association with each virtual tape drive111, a usage time of each virtual tape drive111, that is, total time in which virtual tapes have been mounted on each virtual tape drive111. The virtual drive management table152is updated, for example, by the ICP11through the VLP14.

The physical drive management table153stores, in association with each physical tape drive21, a usage time of each physical tape drive21, that is, total time in which tape cartridges have been mounted on each physical tape drive21. The physical drive management table153is updated by the VLP14, for example. The tables will be described in detail later.

The control unit16performs cleaning control on the physical tape drives21included in the tape library device2. For example, upon receiving an instruction for cleaning one virtual tape drive111assigned to the host3, the control unit16determines whether the cleaning instruction is to be output to the tape library device2which is connected to the virtual tape device1. Upon determining that the cleaning instruction is to be output to the tape library device2, the control unit16transmits the cleaning instruction to one of the physical tape drives21included in the tape library device2, which corresponds to the one virtual tape drive111which is a target of the cleaning instruction.

The cleaning instruction supplied from the host3is issued by a tape control unit31which is realized by executing tape control software installed in the host3, for example. The tape control unit31issues the cleaning instruction through one of the virtual tape drives111so as to cause the virtual tape device1to perform three types of cleaning process described below on the physical tape drives21. As a first cleaning process, when one of the physical tape drives21issues a cleaning request, the virtual tape device1performs cleaning on the physical tape drive21which issues the cleaning request. The first cleaning process is referred to as “cleaning requested by a physical tape drive”. As a second cleaning process, when a predetermined period of time has been elapsed, the virtual tape device1successively performs cleaning on all the physical tape drives21. The second cleaning process is referred to as “periodic cleaning”. As a third cleaning process, when a usage time of one of the physical tape drives21exceeds a predetermined threshold value, the virtual tape device1performs cleaning on the physical tape drive21having the usage time exceeding the threshold value. The third cleaning process is referred to as “cleaning performed when a usage time exceeds a threshold value”. As described above, the tape control unit31issues a cleaning instruction through one of the virtual tape drives111so as to cause the virtual tape device1to perform these cleaning processes. Thereafter, the control unit16converts the cleaning instruction supplied from the tape control unit31into an appropriate instruction so as to instruct the physical tape drives21to perform cleaning.

The control unit16may be, for example, an integrated circuit such as an ASIC (application specific integrated circuit) or an FPGA (Field Programmable Gate Array), or may be an integrated circuit such as a CPU (central processing unit) or an MPU (micro processing unit). The control unit16includes the cleaning request relay unit161, a cleaning instruction determination unit162, a first instruction unit163, a consecutive reception determination unit164, a second instruction unit165, the threshold value calculation unit166, and a third instruction unit167.

When receiving a cleaning request from one of the physical tape drives21included in the tape library device2, the cleaning request relay unit161selects a virtual tape drive111on which no virtual tape is not currently mounted. Thereafter, the cleaning request relay unit161relays the request for cleaning the selected virtual tape drive111to the host3. Specifically, the cleaning request relay unit161prompts the tape control unit31included in the host3to issue an instruction for cleaning the selected virtual tape drives111.

Furthermore, the cleaning request relay unit161turns on a “cleaning request flag” representing that a cleaning request has been issued to the host3. In the first cleaning process, the cleaning request relay unit161causes the host3to issue an instruction for cleaning an unused virtual tape drive111instead of the physical tape drive21which has issued the cleaning request.

Upon receiving the instruction for cleaning the virtual tape drive111from the host3, the cleaning instruction determination unit162determines whether the cleaning instruction is to be output to the tape library device2. For example, upon receiving the instruction for cleaning the virtual tape drive111from the host3, the cleaning instruction determination unit162determines whether the cleaning request flag is “ON”.

When the cleaning request flag is “ON”, the cleaning instruction determination unit162determines that the cleaning instruction is to be output to the tape library device2. Specifically, the cleaning instruction determination unit162determines that the cleaning instruction is an instruction for performing the “cleaning requested by a physical tape drive”. Thereafter, the cleaning instruction determination unit162instructs the first instruction unit163to perform cleaning on the virtual tape drive111.

When it is determined that the cleaning request flag is not “ON”, the cleaning instruction determination unit162determines that the cleaning instruction is not to be output to the tape library device2. Specifically, the cleaning instruction determination unit162determines that the cleaning instruction is an instruction for performing the cleaning performed when a usage time exceeds a threshold value. Thereafter, the cleaning instruction determination unit162outputs the instruction for cleaning the virtual tape drive111to the consecutive reception determination unit164.

Furthermore, the cleaning instruction determination unit162turns on a “reception flag” in the control management table151, which will be described hereinafter, in association with the virtual tape drive111. The reception flag represents that an instruction for cleaning a virtual tape drive has been received. A data configuration of the control management table151will be described with reference toFIG. 2.FIG. 2is a diagram illustrating an example of a data configuration of the control management table151according to the first embodiment.

As illustrated inFIG. 2, the control management table151stores a virtual drive identification number151a, a reception flag151b, and a reception timing151cin association with one another. The virtual drive identification number151arepresents an identification number of a virtual tape drive111. The reception flag151brepresents whether an instruction for cleaning the virtual tape drive111represented by the virtual drive identification number151ahas been received. For example, when the instruction for cleaning the virtual tape drive111has been received, “ON” is set, and otherwise, “OFF” is set. The reception flag151bis set by the cleaning instruction determination unit162as described above. The reception timing151crepresents usage time of the virtual tape drive111at the time when the cleaning instruction is received. The reception timing151cis set by the threshold value calculation unit166, which will be described later, when the instruction for cleaning the virtual tape drive111is received.

In the example of the control management table151illustrated inFIG. 2, a reception flag151bstoring “OFF” and a reception timing151cstoring “0” hours are associated with a virtual drive identification number151astoring“00”. Furthermore, a reception flag151bstoring “ON” and a reception timing151cstoring “101” hours are associated with a virtual drive identification number151astoring“01”.

Referring back toFIG. 1, the first instruction unit163replaces the virtual tape drive111which is instructed to be cleaned by the host3with the physical tape drive21which has requested the cleaning and instructs the physical tape drive21to perform cleaning. In other words, the first instruction unit163performs the “cleaning requested by a physical tape drive”. The first instruction unit163turns off the reception flag151bcorresponding to the virtual tape drive111which is instructed to be cleaned by the host3in the control management table151so as to reset the reception flag151b. Furthermore, the first instruction unit163turns off the cleaning request flag so as to reset the cleaning request flag.

The consecutive reception determination unit164determines whether an instruction for cleaning a virtual tape drive111which is the target of the cleaning instruction supplied from the host3and instructions for cleaning other virtual tape drives111have been issued within a predetermined period of time. For example, the consecutive reception determination unit164determines whether two or more instructions for cleaning a virtual tape drive111have been received within a predetermined period of time before an instruction for cleaning a virtual tape drive111is received. The determination as to whether instructions for cleaning a virtual tape drive111is made using the reception flags151bof the control management table151.

Furthermore, upon determining that the instruction for cleaning the virtual tape drive111which is the target of the cleaning instruction and the instructions for cleaning other virtual tape drives111have been issued within the predetermined period of time, the consecutive reception determination unit164determines that the cleaning instructions are consecutively received. That is, the consecutive reception determination unit164determines that the periodic cleaning in which all the physical tape drives21are successively cleaned in a certain cycle is performed. Thereafter, the consecutive reception determination unit164instructs the second instruction unit165to perform the periodic cleaning.

Upon determining that the instruction for cleaning the virtual tape drive111which is the target of the cleaning instruction and the instructions for cleaning other virtual tape drives111have not been issued within the predetermined period of time, the consecutive reception determination unit164determines that the cleaning instructions are not consecutively received. That is, the consecutive reception determination unit164determines that the cleaning performed when a usage time exceeds a threshold value is performed. Thereafter, the consecutive reception determination unit164instructs the threshold value calculation unit166to calculate a threshold value which specifies timing when the physical tape drives21are cleaned.

The second instruction unit165instructs all the physical tape drives21included in the tape library device2to perform cleaning. Specifically, the second instruction unit165converts the instruction for cleaning the virtual tape drive111supplied from the tape control unit31into instructions for periodically cleaning the physical tape drives21so that the cleaning of the physical tape drives21is performed. In other words, the second instruction unit165performs the “periodic cleaning”. Furthermore, the second instruction unit165turns off the reception flags151bcorresponding to all the virtual tape drives111in the control management table151so as to reset the reception flags151b.

The threshold value calculation unit166calculates a threshold value for usage times of the virtual tape drives111which is used in the host3and sets the obtained threshold value as a threshold value for usage times of the physical tape drives21. The threshold value calculation unit166performs the calculation for the cleaning performed when a usage time exceeds a threshold value.

Here, a demand for the calculation of the threshold value for usage times of the virtual tape drives111will be described. First, in the tape control unit31included in the host3, a virtual drive monitoring unit311monitors usage times of the virtual tape drives111, for example. When one of the usage times of the virtual tape drives111exceeds the predetermined threshold value, the virtual drive monitoring unit311issues an instruction for cleaning the virtual tape drive111having the usage time which exceeds the threshold value. However, the virtual drive monitoring unit311is not capable of monitoring usage states of the physical tape drives21included in the tape library device2which is not directly connected to the host3. On the other hand, the tape library device2is not capable of notifying the tape control unit31included in the host3which is not directly connected to the tape library device2of the usage states of the physical tape drives21included in the tape library device2. Therefore, the threshold value calculation unit166calculates the threshold value for the usage times of the virtual tape drives111, which is used in the monitoring performed by the virtual drive monitoring unit311. Specifically, in the virtual drive monitoring unit311, a cleaning condition used in monitoring (monitoring A) is defined as “a case where a mount time (usage time) of a tape cartridge on a drive exceeds a threshold value of 100 hours after a previous cleaning process”. In this case, the threshold value calculation unit166estimates the threshold value of 100 hours. Then the threshold value calculation unit166reflects the estimated threshold value to the monitoring of the usage times of the physical tape drives21.

For example, when an instruction for cleaning a virtual tape drive111is issued, the threshold value calculation unit166reads a usage time the virtual tape drive111from the virtual drive management table152. Then the threshold value calculation unit166records the read usage time in the control management table151as a reception timing151cwhich corresponds to the virtual tape drive111which is a target of the cleaning instruction. Thereafter, the threshold value calculation unit166resets, in the virtual drive management table152, the usage time of the virtual tape drive111which is the target of the cleaning instruction. This operation is performed to reliably add up the usage time of the virtual tape drive111which is the target of the cleaning instruction until a next cleaning instruction is issued. Then the threshold value calculation unit166calculates an average usage time at which the host3issues a cleaning instruction, by using reception timings151cstored for plural virtual tape drives111in the control management table151. As an example, the threshold value calculation unit166calculates an average value of usage times of three of the virtual tape drives111assigned to the host3. By this, the threshold value calculation unit166may estimate the threshold value used for the monitoring (monitoring A) of the usage times of the virtual tape drives111performed by the virtual drive monitoring unit311and may reflect the estimated threshold value to the usage times of the physical tape drives21(monitoring Z).

Furthermore, threshold value calculation unit166turns off the reception flags151bin the control management table151so as to reset the reception flags151bfor all the virtual tape drives111.

Although a case where the threshold value calculation unit166uses the usage times of three of the virtual tape drives111assigned to the host3when the average value of the usage times of the virtual tape drives111is calculated has been described, this technique is not limited to this. The threshold value calculation unit166may use usage times of four of the virtual tape drives111or usage times of five of the virtual tape drives111. Furthermore, the threshold value calculation unit166may use usage times of one quarter of the virtual tape drives111assigned to the host3. When the number of virtual tape drives111used for the calculation is increased, the threshold value calculation unit166may accurately calculate the threshold value used by the virtual drive monitoring unit311.

By using the usage time obtained by the threshold value calculation unit166as a threshold value, the third instruction unit167issues a cleaning instruction to a physical tape drives21having a usage time exceeding the threshold value. For example, the third instruction unit167monitors the usage times of the physical tape drives21by using the physical drive management table153. Specifically, the third instruction unit167reads the usage times of the physical tape drives21stored in the physical drive management table153in a certain cycle and determines whether the read usage time of each physical tape drive21exceeds the threshold value. When determining that at least one of the usage times of the physical tape drives21exceeds the threshold value, the third instruction unit167instructs the physical tape drives21having the usage times exceeding the threshold value to perform cleaning. In other words, the third instruction unit167performs the cleaning performed when a usage time exceeds a threshold value.

Next, a data configuration of the virtual drive management table152will be described with reference toFIG. 3.FIG. 3is a diagram illustrating a data configuration of the virtual drive management table152according to the first embodiment. As illustrated inFIG. 3, the virtual drive management table152stores a virtual drive identification number152aand a usage time152bin association with each other. The virtual drive identification number152arepresents an identification number of a virtual tape drive111. The usage time152brepresents an accumulated time in which virtual tapes have been mounted on the virtual tape drive111.

In the example of the virtual drive management table152illustrated inFIG. 3, a usage time152bstoring “67” is associated with a virtual drive identification number152astoring “00”. Furthermore, a usage time152bstoring “0” is associated with a virtual drive identification number152astoring “01”.

Next, a data configuration of the physical drive management table153will be described with reference toFIG. 4.FIG. 4is a diagram illustrating a data configuration of the physical drive management table153according to the first embodiment. As illustrated inFIG. 4, the physical drive management table153stores a physical drive identifier153aand a usage time153bin association with each other. The physical drive identifier153ais an identifier of a physical tape drive21. The usage time153brepresents an accumulated time in which tape cartridges have been mounted on the physical tape drive21.

In the example of the physical drive management table153illustrated inFIG. 4, a usage time153bstoring “89” is associated with a physical drive identifier153astoring “A”. Furthermore, a usage time153bstoring “50” is associated with a physical drive identifier153astoring “B”.

Procedure of Cleaning Control Process

Next, a procedure of a cleaning control process will be described with reference toFIGS. 5A,5B, and6.FIGS. 5A,5B, and6are diagrams illustrating an operation flow of the cleaning control process according to the first embodiment. It is assumed that the plurality of virtual tape drives111are assigned to the host3. InFIGS. 5A and 5B, identification numbers of the virtual tape drives111are represented by “No. n” (n represents natural numbers equal to or larger than 1). In the periodic cleaning, the host3successively issues cleaning instructions in ascending order of the identification numbers of the virtual tape drives111.

In the ICP11, the usage times of the virtual tape drives111are recorded in the virtual drive management table152(S11). In the VLP14, the cleaning request relay unit161determines whether a cleaning request has been received from one of the physical tape drives21included in the tape library device2(S12). When the cleaning request has not been received from the physical tape drives21(S12; No), the cleaning request relay unit161advances the process to S16to receive an instruction for cleaning one of the virtual tape drives111.

On the other hand, when the cleaning request has been received from one of the physical tape drives21included in the tape library device2(S12; Yes), the cleaning request relay unit161selects one of the virtual tape drives111on which a virtual tape is not currently mounted (S13). Then the cleaning request relay unit161relays the cleaning request to the tape control unit31by using the selected one of the virtual tape drives111(S14). The cleaning request relay unit161turns a “cleaning request flag” on (S15). Thereafter, the cleaning request relay unit161advances the process to S16to receive an instruction for cleaning one of the virtual tape drives111.

Subsequently, the cleaning instruction determination unit162receives from the host3an instruction for cleaning a virtual tape drive111of No. n (S16). It is assumed that the cleaning instruction determination unit162receives the cleaning instruction from the virtual drive monitoring unit311included in the host3. Thereafter, the cleaning instruction determination unit162turns on a reception flag151b, which represents that the instruction for cleaning the virtual tape drive111of No. n has been received, in the control management table151(S17). Then the cleaning instruction determination unit162notifies the tape control unit31of completion of the cleaning performed in response to the cleaning instruction (S18). Here, the cleaning completion is transmitted before a cleaning process in response to the cleaning instruction is performed since a next process is allowed to be performed in a virtual layer (in the VLP14) while the cleaning process is performed in a physical layer (in the tape library device2, for example). Specifically, stuck of processes in the virtual layer is suppressed.

Subsequently, the cleaning instruction determination unit162determines whether the cleaning request flag is “ON” (S19). When it is determined that the cleaning request flag is “ON” (S19; Yes), the first instruction unit163performs cleaning on the physical tape drive21from which the cleaning request is received (S20). That is, the first instruction unit163performs the cleaning requested by a physical tape drive. Then the first instruction unit163turns off the cleaning request flag so as to reset the cleaning request flag. The first instruction unit163turns off the reception flag151bin the control management table151for the virtual tape drive111of No. n so as to reset the reception flag151b(S21). The cleaning control process is thus terminated.

When it is determined that the cleaning request flag is not “ON” (S19; No), the consecutive reception determination unit164determines whether virtual tape drives111of No. n−1 and No. n−2 exist (S22). When the received cleaning instruction is for cleaning a virtual tape drive111having an identification number “00”, the consecutive reception determination unit164determines that virtual tape drives111of No. n−1 and No. n−2 do not exist since identification numbers “−01” and “−02” do not exist. When the received cleaning instruction is for cleaning a virtual tape drive111having an identification number “01”, the consecutive reception determination unit164determines that virtual tape drives111of No. n−1 and No. n−2 do not exist since an identification number “00” exists but an identification number “−01” does not exist. When the received cleaning instruction is for cleaning a virtual tape drive111having an identification number “02”, the consecutive reception determination unit164determines that virtual tape drives111of No. n−1 and No. n−2 exist since identification numbers “00” and “01” exist.

When it is determined that the virtual tape drive111of No. n−1 or No. n−2 does not exist (S22; No), the consecutive reception determination unit164advances the process to S11to receive a next cleaning instruction. On the other hand, when it is determined that both the virtual tape drives111of No. n−1 and No. n−2 exist (S22; Yes), the consecutive reception determination unit164determines whether reception flags of the virtual tape drives111of No. n−1 and No. n−2 are “ON” (S23).

When the reception flags of both the virtual tape drives111of No. n−1 and No. n−2 are “ON” (S23; Yes), the consecutive reception determination unit164determines that consecutive reception of cleaning instructions is going. That is, the consecutive reception determination unit164determines that the periodic cleaning is performed. The consecutive reception determination unit164determines whether a virtual tape drive111of No. n+1 exists so as to determine whether a further consecutive reception has been performed (S24). This operation is performed so that periodic cleaning is suspended in a case where a next instruction for cleaning one of the virtual tape drives111is further issued and the periodic cleaning is performed when all instructions are received.

When it is determined that a virtual tape drive111of No. n+1 exists (S24; Yes), the consecutive reception determination unit164advances the process to S11to receive a next cleaning instruction. On the other hand, when it is determined that a virtual tape drive111of No. n+1 does not exist (S24; No), the second instruction unit165executes cleaning on all the physical tape drives21included in the tape library device2(S25). That is, the second instruction unit165performs the periodic cleaning. Then the second instruction unit165turns off the reception flags151bin the control management table151for all the virtual tape drives111so as to reset the reception flags151b(S26). Then the cleaning control process is terminated.

When it is determined that at least one of the reception flags151bof the virtual tape drives111of No. n−1 and No. n−2 is not “ON” (S23; No), the consecutive reception determination unit164determines that consecutive reception of cleaning instructions is not going. That is, the consecutive reception determination unit164determines that the cleaning performed when a usage time exceeds a threshold value is performed.

Subsequently, the threshold value calculation unit166turns off the reception flags151bin the control management table151for all the virtual tape drives111so as to reset the reception flags151b(S27). Then the threshold value calculation unit166reads a usage time of the virtual tape drive111of No. n from the virtual drive management table152and records the read usage time as a reception timing in the control management table151(S28). Thereafter, the threshold value calculation unit166resets the usage time included in the virtual drive management table152for the virtual tape drive111of No. n (S29).

Then the threshold value calculation unit166determines whether an average value of usage times of three of the virtual tape drives111has been obtained (S30). For example, the threshold value calculation unit166calculates, as a threshold value, an average usage time of cleaning instructions issued by the host3using reception timings stored in the control management table151for three of the virtual tape drives111. When reception timings of three of the virtual tape drives111have been stored in the control management table151, the threshold value calculation unit166obtains an average value of the reception timings and determines that an average value of the usage times of the virtual tape drives111is obtained. On the other hand, when the reception timings of three of the virtual tape drives111have not been stored in the control management table151, the threshold value calculation unit166determines that an average value of the usage times of the virtual tape drives111is not obtained. When an average value of the usage times of three of the virtual tape drives111is not obtained (S30; No), the threshold value calculation unit166advances the process to S11to receive a next cleaning instruction.

On the other hand, when an average value of the usage times of three of the virtual tape drives111is obtained (S30; Yes), the threshold value calculation unit166determines whether a “reflection flag” is “ON” (S31). Here, the reflection flag represents whether the threshold value used by the tape control unit31has been reflected in the monitoring of the usage times of the physical tape drives21. For example, when the threshold value is reflected, “ON” is set, and otherwise, “OFF” is set.

When it is determined that the reflection flag is “ON” (S31; Yes), the threshold value calculation unit166advances the process to S11to receive a next cleaning instruction since the threshold value has been reflected. On the other hand, when it is determined that the reflection flag is not “ON” (S31; No), the threshold value calculation unit166determines the obtained average value of the usage times of the virtual tape drives111as a threshold value used in the monitoring A and reflects the average value to a threshold value used in the monitoring Z (S32). Then the threshold value calculation unit166turns the reflection flag on (S33).

Thereafter, the third instruction unit167periodically reads, in the monitoring Z, the usage times of the physical tape drives21from the physical drive management table153(S34). Then the third instruction unit167determines whether at least one of the usage times of the physical tape drives21exceeds the threshold value (S35). When it is determined that any one of the usage times of the physical tape drives21does not exceed the threshold value (S35; No), the third instruction unit167advances the process to S34to continue the monitoring.

On the other hand, when it is determined that at least one of the usage times of the physical tape drives21exceeds the threshold value (S35; Yes), the third instruction unit167performs cleaning on the physical tape drive21having the usage time exceeding the threshold value (S36). That is, the third instruction unit167performs the cleaning performed when a usage time exceeds a threshold value. Then the cleaning control process is terminated.

In the periodic cleaning, the case where the host3successively issues cleaning instructions in ascending order of the identification numbers of the virtual tape drives111has been described. However, the operation of the host3is not limited to this and the host3may successively issue cleaning instructions in descending order of the identification numbers of the virtual tape drives111. In this case, in522, the consecutive reception determination unit164may determine whether virtual tape drives111of No. n+1 and No. n+2 exist. Furthermore, in this case, in S24, the consecutive reception determination unit164determines whether a virtual tape drive111of No. n−1 exists so as to determine whether a further consecutive reception is performed.

In the first embodiment described above, the case where the single host3is connected to the virtual tape device1has been described. However, a plurality of hosts3may be connected to the virtual tape device1. Next, a case where a plurality of hosts3, specifically, two hosts3, are connected to the virtual tape device1will be described as a second embodiment.

Second Embodiment

FIG. 7is a diagram illustrating a functional configuration of a virtual tape system according to a second embodiment. Note that components the same as those of the virtual tape device1illustrated inFIG. 1are denoted by reference numerals the same as those illustrated inFIG. 1, and redundant descriptions of the same components and the same operations are omitted. The second embodiment is different from the first embodiment in that two hosts3A and3B are connected to a virtual tape device1A included in a virtual tape system9A.

The host3A includes a tape control unit31A which is realized by executing tape control software installed in the host3A. The tape control unit31A includes a virtual drive monitoring unit311A. The host3B includes a tape control unit31B which is realized by executing tape control software installed in the host3B. The tape control unit31B includes a virtual drive monitoring unit311B. In the virtual drive monitoring units311A and311B, respective cleaning conditions for monitoring are defined by a user in advance. For example, in the virtual drive monitoring unit311A, “a case where a mount time (a usage time) of a tape cartridge on a drive exceeds a threshold value of 100 hours after a previous cleaning process” is defined as a cleaning condition used in monitoring (monitoring A). Furthermore, in the virtual drive monitoring unit311B, “a case where a mount time (a usage time) of a tape cartridge on a drive exceeds a threshold value of 30 hours after a previous cleaning process” is defined as a cleaning condition used in monitoring (monitoring B).

The second embodiment is further different from the first embodiment in that the virtual tape device1A includes two ICPs11A and11B.

The ICP11A configures virtual tape drives111A assigned to the host3A in a disk array13and controls an interface to the host3A using the constructed virtual tape drives111A. The ICP11B configures virtual tape drives111B assigned to the host3B in the disk array13and controls an interface to the host3B using the configured virtual tape drives111B.

The second embodiment is further different from the first embodiment in that the virtual tape device1A includes two IDPs12A and12B. The second embodiment is further different from the first embodiment in that a threshold value calculation unit166A is used instead of the threshold value calculation unit166and a third instruction unit167A is used instead of the third instruction unit167.

The threshold value calculation unit166A calculates, as a threshold value, an average usage time at which the host3A issues cleaning instructions to the virtual tape drives111A. Furthermore, the threshold value calculation unit166A calculates, as a threshold value, an average usage time at which the host3B issues cleaning instructions to the virtual tape drives111B. Note that a method for calculating the average usage times may be the same as that employed in the threshold value calculation unit166, and therefore, a description thereof is omitted.

The third instruction unit167A selects the smallest threshold value among threshold values obtained by the threshold value calculation unit166A. Then the third instruction unit167A instructs physical tape drives21having usage times exceeding the selected threshold value to perform cleaning. That is, the third instruction unit167A performs cleaning on the physical tape drives21while preferentially employing a cleaning condition corresponding to a threshold value of the shortest period among the cleaning conditions used in the monitoring A and the monitoring B. For example, it is assumed that a threshold value for an instruction for performing cleaning on the virtual tape drives111A assigned to the host3A is 100 hours. Furthermore, it is assumed that a threshold value for an instruction for performing cleaning on the virtual tape drives111B assigned to the host3B is 30 hours. In this case, the third instruction unit167A selects the smallest threshold value among the two threshold values, that is, 30 hours, and reflects the selected threshold value, that is, 30 hours, to the monitoring Z. Then the third instruction unit167A instructs physical tape drives21having usage times exceeding the threshold value of 30 hours to perform cleaning.

By this, since the third instruction unit167A reflects the smallest threshold value among the threshold values calculated by the threshold value calculation unit166A to the monitoring Z, intention of the user who defined the threshold values in the tape control unit31A and the tape control unit31B may be respected.

Effects of Embodiments

According to the foregoing embodiments, upon receiving an instruction for cleaning a certain one of the virtual tape drives111assigned to the host3from the host3, the virtual tape device1determines whether the cleaning instruction is to be output to the tape library device2connected to the virtual tape device1. When determining that the cleaning instruction is to be output to the tape library device2, the virtual tape device1instructs one of the physical tape drives21included in the tape library device2which corresponds to the certain one of the virtual tape drives111which is a target of the cleaning instruction to perform cleaning. With this configuration, the virtual tape device1determines the instruction for cleaning one of the virtual tape drives111supplied from the host3and instructs one of the physical tape drives21to perform cleaning in accordance with the determination. As a result, the host3may manage the cleaning performed on the physical tape drives21.

According to the foregoing embodiments, upon receiving a cleaning request from one of the physical tape drives21included in the tape library device2, the virtual tape device1selects one of the virtual tape drives111on which a virtual tape is not currently mounted. Then the virtual tape device1relays the request for cleaning the selected one of the virtual tape drives111to the host3. Upon receiving the instruction for cleaning one of the virtual tape drives111from the host3, the virtual tape device1determines that the cleaning instruction is to be output to the tape library device2. Furthermore, the virtual tape device1instructs one of the physical tape drives21from which the cleaning request is received to perform cleaning. With this configuration, the virtual tape device1uses one of the virtual tape drives111on which a virtual tape is not mounted to relay the cleaning request to the host3and instructs one of the physical tape drives21from which the cleaning request is received to perform cleaning. As a result, the host3may manage the cleaning performed in response to the cleaning request supplied from one of the physical tape drives21.

According to the foregoing embodiments, when it is determined that the cleaning instruction is not to be output to the tape library device2, the virtual tape device1performs the following process. The virtual tape device1determines whether the cleaning instruction and instructions for cleaning other virtual tape drives111different from the virtual tape drive111which is a target of the cleaning instruction have been issued within a predetermined period of time. When determining that the cleaning instruction and the instructions for cleaning other virtual tape drives111different from the virtual tape drive111which is the target of the cleaning instruction have been issued within the predetermined period of time, the virtual tape device1instructs all the physical tape drives21to perform cleaning. With this configuration, when at least two instructions for cleaning the virtual tape drives111have issued from the host3within the predetermined period of time, the virtual tape device1instructs all the physical tape drives21to perform cleaning. As a result, the host3may manage the periodic cleaning for periodically cleaning all the physical tape drives21.

Furthermore, with this configuration, when it is determined that the cleaning instruction and the instructions for cleaning other virtual tape drives111different from the virtual tape drive111which is the target of the cleaning instruction have not been issued within the predetermined period of time, the virtual tape device1performs the following process. The virtual tape device1calculates an average usage time at which the host3issues instructions for cleaning the virtual tape drives111by using the usage time of the virtual tape drive111which is the target of the cleaning instruction and usage times of virtual tape drives111corresponding to cleaning instructions issued before the cleaning instruction. Then the virtual tape device1instructs physical tape drives21having usage times exceeding the calculated average usage time to perform cleaning. With this configuration, the virtual tape device1may calculate timings (usage times) at which instructions for cleaning the virtual tape drives111are issued by the host3. Then the virtual tape device1may reflect the calculated timings to the timings at which the instructions for cleaning the physical tape drives21are issued. As a result, the virtual tape device1may perform cleaning on the physical tape drives21at the timings planned by the host3. Specifically, the host3may manage cleaning performed in accordance with the usage times of the physical tape drives21.

Furthermore, the virtual tape device1may calculate respective average usage times for issuing the instructions for cleaning the virtual tape drives111assigned to a plurality of hosts3. Then the virtual tape device1selects the smallest one of the obtained usage times and instructs physical tape drives21having usage times exceeding the selected usage time to perform cleaning. With this configuration, the virtual tape device1may reflect the smallest one of the obtained usage times to the timings at which the instructions for cleaning the physical tape drives21are issued. As a result, the virtual tape device1may considerably reflect plans of the plurality of hosts3.

Other Embodiment

Note that the virtual tape device1may be realized by an information processing apparatus such as a general personal computer, a work station, or the like, by implementing functions of the cleaning request relay unit161, the cleaning instruction determination unit162, and the like described above by executing software installed in the information processing apparatus.

It is not necessarily the case that components of the illustrated devices are physically configured as illustrated in the drawings. Specifically, specific conditions of separation and integration of the devices are not limited to those illustrated and all or some of the specific conditions may be functionally or physically configured in a separated or integrated manner in an arbitrary unit depending on various loads or usage conditions. For example, the cleaning instruction determination unit162and the consecutive reception determination unit164may be integrated as a single unit. On the other hand, the threshold value calculation unit166may be separated into a calculation unit which calculates the threshold value used by the host3and a reflection unit which reflects the obtained threshold value to the threshold value used to monitor the usage times of the physical tape drives21. Furthermore, a storage unit such as the control management table151may be connected to the virtual tape device1as an external device through a network.

Furthermore, all or arbitrary some of the processing functions performed by the virtual tape device1may be realized by a CPU, or a micro computer such as an MPU or an MCU (micro control unit) by executing programs, or may be realized as hardware configured by a wired logic.