Drive task management method, device and storage medium of tape library system

By setting up the drive task management module in the tape library system, the problem of readback task requests being blocked under high dump load state is solved, and the drive's response speed and efficiency to high-priority requests are improved.

CN119356625BActive Publication Date: 2025-04-18SHENZHEN JIETENG TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411944386.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-18
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

When the library system is in a high dump load state, the dump task does not actively release the tape, resulting in the tape resource requested by the readback task being blocked and the response waiting time is too long.

Method used

Set up a drive task management module in the data storage subsystem of the tape library system. When triggering the drive task update, determine the tape task to be executed in the task queue to be executed, obtain the drive status table, select the execution drive of the tape task to be executed, and add the execution command to the command queue of the execution drive.

Benefits of technology

It improves the drive's response speed to high-priority tape requests, reduces the response latency of high-priority tape requests, and enhances the scheduling capability of the tape library system to drives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356625B_ABST
    Figure CN119356625B_ABST
Patent Text Reader

Abstract

The present application discloses a drive task management method, device and storage medium of a tape library system, belonging to the field of data processing technology. The method comprises: after triggering a drive task update, determining a to-be-executed tape task in a to-be-executed task queue, obtaining a drive status table, and selecting an execution drive of the to-be-executed tape task according to the drive status table and the drive task update, and adding the execution command of the to-be-executed tape task to a command queue corresponding to the execution drive. The present application performs resource scheduling on the drive according to the to-be-executed tape task received by the drive task management module, or the task status of the drive, thereby improving the response speed of a tape request with a high priority.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a drive task management method, device and storage medium of a tape library system. Background Art

[0002] The tape library uses a robotic arm to remove and load tapes to achieve automatic storage and retrieval of data. When data on the tape needs to be read or written, the tape library system will command the robotic arm to take the tape out of the tape slot and put it into the tape drive so that the drive can read and write data based on demand.

[0003] In the related art, the tape library system schedules the tapes by priority and performs corresponding operations on the tapes through the driver based on the priority. In order to avoid the user waiting time, the tape library storage system usually increases the priority of the tape read-back task to improve the response speed of data reading.

[0004] However, when the tape library system is under high dump load, all drive resources may be occupied by the dump task. In this case, since the tape library system does not support preemption of tape requests that are not actively released, the continuous dumping of the tape without the dump task actively releasing the tape will cause the tape resources requested by the read-back task to be blocked.

[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of the present application is to provide a drive task management method, device and storage medium for a tape library system, aiming to solve the technical problem that when the tape library system is in a high dump load state, the dump task does not actively release the continuous dump of the tape, which will cause the response waiting time of the read-back task request to be too long.

[0007] To achieve the above object, the present application provides a drive task management method for a tape library system, which is applied to a drive task management module, wherein the drive management module is deployed in a data storage subsystem of the tape library system, and the method comprises the following steps:

[0008] After the drive task update is triggered, the to-be-executed tape task in the to-be-executed task queue is determined;

[0009] Obtaining a drive status table, and selecting an execution drive for the to-be-executed tape task according to the drive status table and the drive task update;

[0010] The execution command of the to-be-executed tape task is added to the command queue corresponding to the execution driver.

[0011] In one embodiment, after the driver task update is triggered, before the step of determining the to-be-executed tape task in the to-be-executed task queue, the method further includes:

[0012] Scanning the driver message queue, and acquiring the driver message in the message queue according to the scanning result;

[0013] Determining a message source driver of the driver message;

[0014] In the driver status table, resetting the driver task status of the message source driver to idle;

[0015] When the to-be-executed task queue is not empty, it is determined to trigger the driver task update.

[0016] In one embodiment, after the step of determining to trigger the driver task update when the to-be-executed task queue is not empty, the method further includes:

[0017] When there is a non-tape writing task in the to-be-executed task queue, matching the non-tape writing task with the processing tape of the message source drive;

[0018] According to the matching result and / or the priority of the non-writing tape task, selecting the to-be-executed tape task from the non-writing tape tasks;

[0019] Alternatively, when the non-tape writing task does not exist in the tasks to be executed, the task to be executed is selected from the tape tasks according to the matching result between the tape tasks in the task queue to be executed and the processed tape, and / or the priority of the tape tasks.

[0020] In one embodiment, after the driver task update is triggered, before the step of determining the to-be-executed tape task in the to-be-executed task queue, the method further includes:

[0021] Obtaining the priorities of the tape tasks in the to-be-executed task queue, and determining the priority execution tasks among the tape tasks according to the priorities;

[0022] Using the priority execution task as the tape task to be executed;

[0023] Based on the to-be-executed tape task, the drive task update is triggered.

[0024] In one embodiment, before the step of triggering the driver task update based on the to-be-executed tape task, the method further includes:

[0025] Get the preset maximum number of non-write tasks and the number of available drives;

[0026] Using the minimum value of the maximum number of non-write tasks and the number of available drives as a non-write task number threshold;

[0027] When the priority execution task is a non-tape writing task, sorting the non-tape writing task based on the non-tape writing task priority and the task submission time;

[0028] The non-writing tape tasks are scanned in sequence according to the sorting result, and the non-writing tape tasks sorted before the non-writing task quantity threshold are set to be scheduled, and the non-writing tape tasks sorted after the non-writing task quantity threshold are set to not be scheduled.

[0029] In one embodiment, the step of triggering the driver task update based on the to-be-executed tape task further comprises:

[0030] Adding the non-tape writing task to be scheduled into a temporary processing queue;

[0031] Matching the non-tape writing task with the drive task status of the scheduled drive, and determining a target drive in the scheduled drive according to the matching result;

[0032] Sending a task interruption command to the target drive, so that the drive task module interrupts the tape task currently executed by the target drive based on the interruption command;

[0033] The target drive is set in the drive status table to be preempted, and the drive task of the target drive is triggered to update, wherein the drive task module controls the drive to execute the tape task on the target tape after the target tape is loaded into the target drive based on the updated tape task;

[0034] The non-write tape task is removed from the temporary processing queue.

[0035] In one embodiment, after the driver task is updated, before the step of determining the to-be-executed tape task in the to-be-executed task queue, the method further includes:

[0036] Acquire driver information, and initialize the driver status table and driver message queue in the driver task management module;

[0037] generating a command queue for each driver according to the driver information, and starting a driver task for the driver;

[0038] The driver task is associated with the driver task status in the driver task management module.

[0039] In one embodiment, after the step of adding the execution command of the to-be-executed tape task to the command queue corresponding to the execution driver, the method further includes:

[0040] In a driver task module of the execution driver, determining a target tape task currently executed by the execution driver;

[0041] Determine the tape information of the target tape task;

[0042] In the to-be-executed task queue, determining the to-be-executed tape task corresponding to the tape information;

[0043] The to-be-executed tape task execution command is added to the command queue of the execution driver.

[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a drive task management device for a tape library system, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the drive task management method for the tape library system as described above.

[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the drive task management method of the tape library system as described above are implemented.

[0046] One or more technical solutions proposed in this application have at least the following technical effects:

[0047] The present application sets a drive task management module in the data storage subsystem of the tape library system, and can schedule the drive tasks when a high-priority read or write task occurs or after the drive completes a task, thereby improving the tape library system's scheduling capability for the drive, actively adjusting the way the drive handles tasks, improving the drive's response speed to high-priority tape requests, and reducing the response waiting time for high-priority tape requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0050] Figure 1 A schematic diagram of a flow chart of a first embodiment of a method for managing drive tasks of a tape library system of the present application;

[0051] Figure 2 A schematic diagram of the tape library system architecture involved in the first embodiment of the driver task management method for the tape library system of the present application;

[0052] Figure 3 A schematic diagram of a flow chart of a second embodiment of a method for managing drive tasks of a tape library system of the present application;

[0053] Figure 4 A schematic diagram of a process flow of a third embodiment of a method for managing drive tasks of a tape library system of the present application;

[0054] Figure 5 A schematic flow chart of a fourth embodiment of a method for managing driver tasks in a tape library system of the present application;

[0055] Figure 6 It is a structural diagram of a drive task management device of a tape library system in a hardware operating environment involved in an embodiment of the present application.

[0056] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0059] The main solution of the embodiment of the present application is: after triggering the drive task update, determine the pending tape task in the pending task queue; obtain the drive status table, and select the execution driver of the pending tape task based on the drive status table and the drive task update; add the execution command of the pending tape task to the command queue corresponding to the execution driver.

[0060] In the prior art, the tape library system performs corresponding operations on the tape through the driver based on the priority by scheduling the tape priority. In order to avoid the user waiting time process, the tape library storage system usually increases the priority of the tape read-back task to improve the response speed of data reading. However, when the tape library system is under a high dump load state, all driver resources may be occupied by the dump task. In this case, since the tape library system does not support the preemption of the tape request that is not actively released, the dump task does not actively release the continuous dump of the tape, which will cause the tape resources requested by the read-back task to be blocked all the time.

[0061] The present application sets a drive task management module in the data storage subsystem of the tape library system, and can schedule drive tasks when high-priority read and write tasks occur or after the drive completes a task, thereby actively adjusting the drive's task processing method, thereby improving the drive's response speed to high-priority tape requests and reducing the response waiting time for high-priority tape requests.

[0062] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0063] It should be noted that the execution subject of this embodiment can be a driver task management module, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a driver task management device of a tape library system, etc., and this embodiment does not specifically limit this. The driver task management module is taken as an example to illustrate this embodiment and the following embodiments.

[0064] Based on this, the embodiment of the present application provides a drive task management method for a tape library system, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the drive task management method of the tape library system of the present application.

[0065] In this embodiment, the drive task management method of the tape library system includes steps S10 to S30:

[0066] Step S10: after the driver task update is triggered, determining the to-be-executed tape tasks in the to-be-executed task queue;

[0067] In this embodiment, the tape library system can be deployed in a server. The server can be a cloud server or a terminal device such as a computer. The tape library system can access the drive and mechanical arm of the tape library to access and move the disks in the tape library. The tape library includes a drive slot, a storage slot, and an import and export slot. The drive slot is the slot where the drive is located, the storage slot is used to store the tape, and the import and export slot is used to take out the tape from the tape library or add the tape to the tape library.

[0068] Furthermore, the tape library system includes a resource management subsystem and a data storage subsystem. The resource management subsystem is responsible for managing and scheduling tape library resources. It can schedule tape tasks based on the priority of the tape request of the client, and mount the target tape corresponding to the tape request. The data storage subsystem can access the target tape through the mount path based on the target tape, and determine the tape tasks to be executed of the target tape based on the tape request. Among them, based on the number of drives and the number of files to be processed in the tape request, the data storage subsystem can determine one or more tape tasks to be executed based on a tape request.

[0069] It should be noted that, in the process of the tape library system executing the tape task through the driver, based on the fact that the data storage subsystem does not perceive the driver, when the tape library system is in a high dump load state, the data storage subsystem cannot call the driver occupied by the dump task, which causes the tape tasks other than the dump task, that is, the non-write tape tasks, to be in a blocked state for a long time. For example, since the tape read-back task needs to return the read data to the client, and the dump task can be processed asynchronously by the tape library system in the background, the tape library system needs to give priority to the read-back task, and since the driver cannot be released, the high-priority read-back task waits for a response for a long time.

[0070] Specifically, Figure 2 As shown, Figure 2 Schematic diagram of the tape library system architecture involved in the embodiment of the present application. Figure 2 The data storage subsystem includes a driver task management module and a driver task module. The driver task management module is responsible for scheduling driver tasks. For each driver configured by the data storage subsystem, a driver task is started. For each driver task, a driver command queue is constructed, and the command queue is used by the driver management module to send commands to the driver. For the driver task management module, a message queue is constructed, and the driver task sends messages to the driver task management module.

[0071] Optionally, the data storage subsystem is also equipped with a tape library management agent module, which is responsible for remote procedure calls to the resource management subsystem. The remote procedure calls mainly used by the data storage subsystem to the resource management subsystem include allocating tapes, releasing tapes and loading tapes.

[0072] As an optional implementation for triggering driver task update, step S10 may include steps S11 to S14:

[0073] Step S11: Scan the driver message queue, and obtain the driver message in the message queue according to the scanning result;

[0074] Step S12: determining the message source driver of the driver message;

[0075] Step S13: in the driver status table, resetting the driver task status of the message source driver to idle;

[0076] Step S14: when the to-be-executed task queue is not empty, determining whether to trigger the driver task update.

[0077] In this embodiment, the driver task management module will periodically check whether there is a driver message sent from the driver in the driver message queue based on the preset time in the system. Among them, the driver message contains the message type, the message source driver name and the message source driver status. If there is a driver message, the driver task management module will mark the message source driver as idle, record the current tape information of the message source driver, and modify the tape information in the driver status to be empty. If the driver to be preempted mark is true, the driver to be preempted mark is reset to false.

[0078] Exemplary, when the driver message type is a driver task end message, if the message source driver state is a read-back state, indicating that the driver ends from reading back, the file list in the tape read-back task is checked to be empty according to the recorded message source current tape, if empty, the tape read-back task is deleted, otherwise, the read-back command is sent to the driver again. If there is a tape read-back task in the tape library where the message source driver is located and needs to be scheduled, the tape library management submodule is requested to load the read-back tape to the message source driver, after the driver completes the tape loading, the read-back command is sent to the driver command queue, the driver task is recorded as being read back, the processing is terminated, and the tape read-back task is marked as having been scheduled. Otherwise, further check whether the dump file list is empty, if not empty, then request an available writable tape, request again that the available writable tape be dispatched to the driver, record the driver task as being dumped, and then send a dump command to the driver.

[0079] Specifically, when there is a non-write tape task in the queue of tasks to be executed, the driver task management module matches the non-write tape task with the processing tape of the message source driver, and selects the tape task to be executed from the non-write tape tasks according to the matching result and / or the priority of the non-write tape task. Alternatively, when there is no non-write tape task in the tasks to be executed, the driver task management module also selects the tape task to be executed from the tape tasks according to the matching result between the tape tasks in the queue of tasks to be executed and the processing tape, and / or the priority of the tape tasks.

[0080] Exemplarily, if there is a non-dump task to be scheduled, the first matching non-write tape task is selected, the task tape is loaded into the driver, and a specific task execution command is sent to the message source driver, and the driver status table is updated. In the process of matching the non-write tape task with the processing tape of the message source driver, the driver task management module first attempts to match the tape used by the driver last time, that is, the processing tape, with the corresponding non-write tape task to minimize the tape library moving tape. In addition, the task tape added by the driver cannot be a tape currently in the dump state.

[0081] Otherwise, the driver task management module attempts to schedule the driver task as a dump task. First, it checks whether there is a writable but unscheduled tape, otherwise it allocates a new tape. After obtaining a writable tape, it loads the writable tape into the driver, notifies the driver to perform the dump, and updates the driver task status table.

[0082] Optionally, the drive message type may also be a drive failure message or a drive dirty message. When the drive message type is a drive failure message, the drive failure state is recorded as true in the drive status table, and no tasks are subsequently scheduled to the failed drive. When the drive message type is a drive dirty message, a request is made to load a cleaning tape to the drive through the tape library management agent module. After the cleaning tape is loaded, the drive state is recorded as cleaning, and a cleaning command is sent to the message source drive.

[0083] In another feasible implementation, step S10 may include steps S15 to S17:

[0084] Step S15: obtaining the priority of the tape tasks in the to-be-executed task queue, and determining the priority execution task among the tape tasks according to the priority;

[0085] Step S16: taking the priority execution task as the tape task to be executed;

[0086] Step S17: triggering the drive task update based on the to-be-executed tape task.

[0087] In the present embodiment, based on different types of tape tasks to be performed, the tape library system is provided with different task priorities. For example, because the execution of the tape read-back task is usually in the waiting process of the user, in order to avoid the user's waiting time being too long, the task priority of the tape read-back task can be set to the highest. And the tape dump task, the tape garbage recovery task and the tape initialization task, then can be set with a lower priority. This priority can be adjusted over time by the tape library system according to the waiting time of the task or other factors. And when the driver task management system determines that there is a tape task with a priority higher than the priority threshold in the task queue to be performed, this tape task is used as a priority execution task, and the driver resource is preempted for this priority execution task, and the driver task management system is triggered to update the driver task.

[0088] Optionally, when the drive task management system concurrently receives multiple tape tasks to be executed, it can sort the execution order of the tape tasks based on the priorities of the tape tasks.

[0089] In one embodiment, before executing the driver task update, the driver task management module will also update the number of non-write tasks based on the non-write tape tasks. By obtaining the preset maximum number of non-write tasks and the number of available drives, the minimum value of the maximum number of non-write tasks and the number of available drives can be used as the threshold value of the number of non-write tasks. When the number of non-write tasks is greater than or equal to the threshold value of the number of non-write tasks, the driver task update of the non-write tape task is terminated. Among them, the non-write tape tasks are other tape tasks other than the dump tasks in the tape tasks, and the number of non-write tasks is the number of other tape tasks other than the dump tasks in the tape tasks.

[0090] Optionally, when the priority execution task is the non-write tape task, the driver task management module can sort the non-write tape tasks based on the non-write tape task priority and the task submission time. The higher the task priority of the non-write tape task and the earlier the task submission time, the higher the sorting. The non-write tape tasks are scanned in sequence according to the sorting result, and the driver task management module sets the non-write tape tasks that are sorted before the non-write task quantity threshold as to be scheduled, and sets the non-write tape tasks that are sorted after the non-write task quantity threshold as not to be scheduled.

[0091] It should be noted that, in order to prevent the driver from being in a state of continuous waiting for the dump task due to the preemption of high-priority tasks such as the tape read-back task, the driver task management module is provided with a maximum number of read-back tasks. Among them, the driver task management module counts the number of non-write tasks to be scheduled, and when the number of read-back tasks to be scheduled is greater than or equal to the maximum number of non-write tasks or the number of available drivers, the driver preemption operation is stopped to avoid the stagnation of the dump task. In the process of driver task scheduling, the driver task management module adds one to the current accumulated number of non-write tasks each time a non-write tape task to be scheduled is determined. Among them, the number of non-write tasks is the number of non-write tape tasks that need to be preempted by the driver, and the number of non-write tasks is the number of tape tasks that need to be preempted by the driver.

[0092] In one embodiment, when there is no driver status table in which the driver task status is idle, the driver task management module selects a target driver from the drivers in which the driver task status is a dump task, and sends a task interruption instruction to the target driver. The target driver is a driver that can be used for non-write tape task preemption. The driver task management module can update the driver task status of the target driver to be preempted in the driver status table.

[0093] Specifically, the driver task management module adds the non-write tape task to be scheduled to the temporary processing queue, matches the non-write tape task with the driver task status of the scheduled driver, and determines the target driver in the scheduled driver according to the matching result. By sending a task interrupt command to the target driver, the driver task of the target driver in the driver task module interrupts the tape task currently executed by the target driver based on the interrupt command. At the same time, the driver task management module sets the target driver to be preempted in the driver status table, triggers the driver task update of the target driver, and removes the non-write tape task from the temporary processing queue. Wherein, the driver task module controls the driver to execute the tape task on the target tape after the target tape is loaded into the target driver based on the updated tape task.

[0094] In one example, the driver task management module adds all non-writing tasks to be scheduled to the temporary processing queue. If the non-writing task tape to be scheduled is occupied by the dump task, such as reading the data on a tape currently being written, the dump task is interrupted and the non-writing task is deleted from the temporary processing queue. Interrupt the non-writing tape task that is not to be scheduled but has been scheduled. Specifically, the driver corresponding to the task can be found according to the driver task status table, and an interrupt instruction is sent to the driver. Each time a scheduled but non-writing task to be scheduled is preempted, if the non-writing task temporary queue is not empty, the non-writing tape task is removed from the temporary processing queue. If the non-writing task temporary processing queue is still not empty at this time, it is determined whether there is a driver in an idle state, and a notification that it is in an idle state is sent to the idle driver, so that it can feedback a message that it is in an idle state to the scheduling module, so as to realize that the driver idle message can be received later for scheduling processing. Each time a notification that it is in an idle state is sent, an element is deleted from the temporary processing queue. If the non-writing task temporary processing queue is still not empty at this time, it is further determined whether there is a driver in the dump task state that is not in an interrupt, that is, in a state to be preempted. If it exists, the dump task is interrupted and the element is deleted from the temporary processing queue.

[0095] In another example, the driver task management module will first check whether there is a tape in the dump task for the tape read back task. If there is, an interrupt command is sent to the driver corresponding to the tape, the state of the driver is adjusted to wait for preemption, and the need for scheduling of the tape read back task is marked as true. Further, the driver task management module checks whether there is a driver in an idle state or a clean state. When there is an idle state or a clean state driver, and there is a tape read back task that needs to be scheduled and marked as false in the tape library where the driver is located, the tape read task needs to be scheduled and marked as true. In addition, the driver task management module notifies itself that the idle command is sent to the driver in the idle state. Further, the driver task management module checks the driver in the dump state, and each dump driver is found, and the dump driver is marked as false to be preempted, and there is a tape read back task that needs to be scheduled and marked as false in the tape library where the driver is located, the tape read task needs to be scheduled and marked as true, and the task interrupt command is sent to the driver.

[0096] Optionally, if the file dump list is not empty and there is a drive in an idle state, set the most recent check without dump load to zero, and send a notification self-idle command to the drive. If the file dump list is empty, if the most recent check without dump load is zero, then set the most recent check without dump load to the current time. Otherwise, further check the most recent current time minus the most recent check without dump load to obtain how long there has been no dump load. When the configuration threshold is reached, it means that the data storage system has reached a certain period of time without dump load. In order to reduce the power consumption of idle state drives, a task interruption command is sent to all drives currently in the dump state.

[0097] Step S20: obtaining a drive status table, and selecting an execution drive for the to-be-executed tape task according to the drive status table and the drive task update;

[0098] In this embodiment, the driver task management module includes a driver status table, which records the driver task status, tape information and fault information of the driver. The driver task management module can match the driver task update action or the to-be-executed tape task based on the driver task status in the driver status table, and select an execution driver from the driver according to the matching result.

[0099] Specifically, the driver task update includes the read-back task update, which is the driver preemption process of updating the driver's current execution task to the tape read-back task. It also includes the idle driver update, which is the process of assigning tasks to idle drivers after determining in the driver message queue that the driver has completed the execution task and the status is updated to idle.

[0100] As an optional implementation, when the driver task update is a read-back task update, the driver task management module may select an execution driver from the drivers whose driver task status is to be preempted and / or idle.

[0101] As another optional implementation, when the driver task is updated to an idle driver update, the driver task management module may select a driver whose driver task status is idle as the execution driver.

[0102] Step S30: adding the execution command of the to-be-executed tape task to the command queue corresponding to the execution driver.

[0103] In this embodiment, the driver task management module controls the driver and schedules tasks through the command queue. The driver task management module can terminate the task currently being executed by the driver through a task termination command.

[0104] As an optional implementation, when the tape task to be executed is a file dump task, the driver task management module triggers a dump operation based on the file to be dumped received by the server, and adds the file to be dumped to the dump file list. Wherein, when the driver task management module checks that the dump file list is not empty, it sends a notification self-idle command to the driver task. After the driver task receives the notification self-idle command, it sends a task completion message to the message queue. After receiving the driver task completion message, the driver task management module schedules the tape to the driver and sends a dump command to the driver. The driver task receives the dump command, switches to the driver dump task, takes the required dump file information from the dump file list, dumps it to the tape, and records the file dump information.

[0105] Specifically, after receiving the dump command, the driver task module switches the driver task to the dump task, obtains the driver tape information, and loads the tape onto the driver so that the driver can read and write the tape. And by checking whether the tape is in the initialization state, if it is in the initialization state, the tape is formatted and switched to a writable state. The driver task module receives messages from the message queue in a periodic cycle. If a task interruption is received, the remaining disk space is less than a set threshold, the driver fails, the driver is dirty, or the tape fails, the tape is marked as a non-writable state and the cycle exits. According to the cycle exit reason, a message is sent to the message queue, and the driver is switched to an idle state again.

[0106] As another optional implementation, when the tape task to be executed is a file read-back task, the driver first determines whether there is a file to be read in the system cache data. If not, based on the dump information of the file to be read, the magnetic tape where the dump is located is obtained, and the magnetic tape is inserted into the read-back task. At this time, the need for scheduling of the tape read task is marked as false. The tape library system inserts the tape file information that needs to be read back as the file item that needs to be read back into the read-back file list of the tape read-back task, and waits for the read-back file to be processed.

[0107] Specifically, when there is no workload in the data storage submodule, the driver task management module detects that the tape read back task needs to be scheduled and is marked as false and an idle driver, marks the tape read back task needs to be scheduled as true, sends a notification self-idle command to the driver, and the driver task receives the notification self-idle command and sends a task processing completion message to the driver task management module. When there is a dump load in the data storage submodule, the driver task management module detects that the tape read back task needs to be scheduled and is marked as false and a driver being dumped, marks the tape read back task needs to be scheduled as true, and sends a task interruption command to the dump driver. The dump driver task receives the task interruption command, exits from the dump task, and sends a task processing completion message to the driver task management module.

[0108] Furthermore, when the driver task management module receives a task processing completion message and there is a read task that needs to be scheduled and marked as true, it will request the tape library resource management subsystem to load the tape onto the driver, mark the tape read task as scheduled, set the tape information in the driver status table to the read-back tape, and the driver status to the read-back state. Send a read-back command to the driver. The driver task receives the read-back command, obtains the tape information on the drive according to the driver status table, finds the tape read task, and processes the file item in the tape read task, that is, reads the file from the tape back to the cache, and wakes up the read-back file waiting process. The waiting process is woken up, the read-back file item is deleted, and the file content is read back from the cache.

[0109] Optionally, when the driver task module receives the read-back command, the driver task is switched to the read-back task, and the drive tape information is obtained, and the tape is loaded onto the drive, so that the drive performs read and write operations on the tape. The driver task module receives messages in the message queue in the same loop as the dump mode, and sends the exit reason to the driver message queue when exiting the loop.

[0110] The embodiment of the present application sets a drive task management module in the data storage subsystem of the tape library system, and can schedule the drive tasks when high-priority read and write tasks occur or after the drive completes a task, thereby actively adjusting the drive's task processing method, thereby improving the drive's response speed to high-priority tape requests and reducing the response waiting time for high-priority tape requests.

[0111] Based on the same inventive concept, the present application also provides a second embodiment, referring to Figure 3 , Figure 3 This is a flow chart of a second embodiment of a drive task management method for a tape library system of the present application.

[0112] In this embodiment, the drive task management of the tape library system includes steps S21 to S24:

[0113] Step S21: obtaining the driver status table, and determining the driver task status of the driver in the driver status table;

[0114] Step S22: when the driver task is updated to a read-back task update, the execution driver is selected from the drivers whose driver task status is to be preempted and / or idle;

[0115] Step S23: Alternatively, when the driver task is updated to an idle driver, the driver whose driver task status is idle is selected as the execution driver;

[0116] Step S24: Based on the to-be-executed tape task, in the drive status table, updating the drive task status of the executing drive.

[0117] In this embodiment, the driver task management module can determine the driver task status corresponding to all loaded drivers of the tape library system based on the driver status table. Wherein, based on the driver task status, the driver can be updated for the read-back task or the idle driver update, so as to allocate the driver more reasonably.

[0118] Further, after completing the allocation of the execution drive of the driver task update, the driver task management module will update the driver task status of the execution drive in the driver status table to a driver task status consistent with the tape task to be executed.

[0119] Since the system introduced in the second embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.

[0120] Based on the same inventive concept, the present application also provides a third embodiment, referring to Figure 4 , Figure 4 This is a flow chart of a third embodiment of a drive task management method for a tape library system of the present application.

[0121] In this embodiment, the drive task management of the tape library system includes steps S01 to S03:

[0122] Step S01: Acquire driver information, and initialize the driver status table and driver message queue in the driver task management module;

[0123] Step S02: generating a command queue for each driver according to the driver information, and starting a driver task for the driver;

[0124] Step S03: Associating the driver task with the driver task status in the driver task management module.

[0125] In this embodiment, the driver task management module needs to perform an initialization operation before performing driver task scheduling.

[0126] Specifically, the drive task module initializes a drive status table in memory state to indicate the status of each drive. It contains the current task status of the drive, the current tape information on the drive, and whether the drive is faulty. When the drive status table is initialized, each drive task status is in an idle state, and the tape information is empty. If the parameters of the drive configured by the data storage subsystem have specified that the drive is in a faulty state, the drive is marked as faulty in the drive status table, otherwise it is marked as normal.

[0127] Furthermore, the driver task management module initializes an empty message queue, a command queue, and starts a driver task for each configured driver. The message queue is used for the driver task to send messages to the driver task management module, and the command queue is used for the driver task management module to send commands to the driver task module. After the driver task management module is initialized, it enters the runtime state.

[0128] Since the system introduced in the third embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of the present application.

[0129] Based on the same inventive concept, the present application also provides a fourth embodiment, referring to Figure 5 , Figure 5 This is a flow chart of a fourth embodiment of a method for managing drive tasks in a tape library system of the present application.

[0130] In this embodiment, the drive task management of the tape library system includes steps S41 to S44:

[0131] Step S41: in the driver task module of the execution driver, determining the target tape task currently executed by the execution driver;

[0132] Step S42: determining the tape information of the target tape task;

[0133] Step S43: determining the to-be-executed tape task corresponding to the tape information in the to-be-executed task queue;

[0134] Step S44: adding the to-be-executed tape task execution command to the command queue of the execution driver.

[0135] In this embodiment, in order to avoid the situation where subsequent tasks still need to schedule the tape after the drive completes the tape file operation and unloads the tape, resulting in a waste of resources, the drive task module can control the tape to complete all tasks before unloading based on the tape tasks to be executed.

[0136] For example, suppose that a certain time period is used to issue a1, b1, and a2 of tape A to read tape A. Suppose that the maximum number of read-back tasks is set to 1. Since the read-back task of tape A arrives first, the driver task management module schedules a driver to load tape A for processing. Due to the limitation of driver resources, the read-back task of tape B is submitted, but it cannot be scheduled before tape A is processed. The driver read-back task processes files a1 and a2 on A in turn. After processing, all file items of the tape A read-back task are deleted, and the driver read-back task ends. The driver management module receives the driver processing task completion message. Since the message source task status is read-back, it further checks that the read-back file list of the tape on the driver is empty, deletes the read-back tape A task, and the read-back task is 0 at this time. It is checked that the current number of read-back tasks is less than the maximum number of read-back tasks 1, and there is a read task on tape B at this time, and the subsequent tape B read task is scheduled. In this way, the drive's task scheduling can avoid the problem that tape A is unloaded after completing the reading of a1, while a2 in tape A still needs to be read after completing the reading of b1 in tape B.

[0137] The present application uses a driver task management module to reasonably allocate tape processing resources, thereby avoiding resource waste and improving the processing efficiency of tape requests.

[0138] Since the system introduced in the fourth embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.

[0139] The present application provides a drive task management device for a tape library system, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the drive task management method for the tape library system in the above-mentioned embodiment 1.

[0140] Reference below Figure 6 , which shows a schematic diagram of the structure of a drive task management device of a tape library system suitable for implementing an embodiment of the present application. The drive task management device of the tape library system in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The drive task management device of the tape library system shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0141] like Figure 6As shown, the drive task management device of the tape library system may include a processing device 1001 (e.g., a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. Various programs and data required for the operation of the drive task management device of the tape library system are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the drive task management device of the tape library system to communicate with other devices wirelessly or by wire to exchange data. Although the drive task management device of the tape library system having various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0142] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0143] The driver task management device of the tape library system provided by the present application adopts the driver task management method of the tape library system in the above embodiment, which can solve the technical problem that when the tape library system is in a high dump load state, the dump task does not actively release the continuous dump of the tape, which will cause the response waiting time of the read-back task request to be too long. Compared with the prior art, the beneficial effects of the driver task management device of the tape library system provided by the present application are the same as the beneficial effects of the driver task management method of the tape library system provided by the above embodiment, and other technical features in the driver task management device of the tape library system are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0144] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0145] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0146] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the drive task management method of the tape library system in the above-mentioned embodiment.

[0147] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0148] The computer-readable storage medium may be included in the drive task management device of the tape library system; or may exist independently without being assembled into the drive task management device of the tape library system.

[0149] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the drive task management device of the tape library system, the drive task management device of the tape library system: after triggering the drive task update, determines the to-be-executed tape task in the to-be-executed task queue; obtains the drive status table, and selects the execution driver of the to-be-executed tape task according to the drive status table and the drive task update; and adds the execution command of the to-be-executed tape task to the command queue corresponding to the execution driver.

[0150] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0153] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the driver task management method of the tape library system, and can solve the technical problem that when the tape library system is in a high dump load state, the dump task does not actively release the continuous dump of the tape, which will cause the response waiting time of the read-back task request to be too long. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the driver task management method of the tape library system provided by the above embodiment, and will not be repeated here.

[0154] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A drive task management method for a tape library system, characterized in that: The method is applied to a driver task management module, wherein the driver task management module is deployed in a data storage subsystem of the tape library system, wherein the data storage subsystem includes the driver task management module and a driver task module, wherein the driver management module is used to schedule driver tasks in the driver task module, wherein the driver tasks correspond to the drivers one by one, and wherein the method comprises the following steps: Get the priority of the tape task in the task queue to be executed; When the tape task with a priority higher than the priority threshold exists in the to-be-executed task queue, the tape task is used as the to-be-executed tape task, the drive resource is preempted for the to-be-executed tape task, and the drive task update is triggered; Based on the to-be-executed tape task, a target drive is selected from the scheduled drives according to the drive status table, and a task interruption command is sent to the target drive, so that the drive task module interrupts the tape task currently being executed by the target drive based on the interruption command; Selecting the target drive as the execution drive of the tape task to be executed; The execution command of the tape task to be executed is added to the command queue corresponding to the execution driver, so that the driver task module controls the execution driver to execute the tape task to be executed on the target tape after the target tape is loaded into the execution driver based on the updated tape task.

2. The method according to claim 1, characterized in that Before the step of selecting a target drive from the scheduled drives based on the to-be-executed tape task according to the drive status table and sending a task interruption command to the target drive so that the drive task module interrupts the tape task currently being executed by the target drive based on the interruption command, the method further includes: Scanning the driver message queue, and acquiring the driver message in the message queue according to the scanning result; Determining a message source driver of the driver message; In the driver status table, resetting the driver task status of the message source driver to idle; When the to-be-executed task queue is not empty, it is determined to trigger the driver task update.

3. The method according to claim 2, characterized in that After the step of determining to trigger the driver task update when the to-be-executed task queue is not empty, the method further includes: When there is a non-tape writing task in the to-be-executed task queue, matching the non-tape writing task with the processing tape of the message source drive; According to the matching result and / or the priority of the non-writing tape task, selecting the to-be-executed tape task from the non-writing tape tasks; Alternatively, when the non-tape writing task does not exist in the tasks to be executed, the task to be executed is selected from the tape tasks according to the matching result between the tape tasks in the task queue to be executed and the processed tape, and / or the priority of the tape tasks.

4. The method according to claim 1, characterized in that Before the step of selecting a target drive from the scheduled drives based on the to-be-executed tape task according to the drive status table and sending a task interruption command to the target drive so that the drive task module interrupts the tape task currently being executed by the target drive based on the interruption command, the method further includes: Get the preset maximum number of non-write tasks and the number of available drives; Using the minimum value of the maximum number of non-write tasks and the number of available drives as a non-write task number threshold; When the to-be-executed tape task is a non-write-tape task, sorting the non-write-tape task based on the non-write-tape task priority and the task submission time; The non-writing tape tasks are scanned in sequence according to the sorting result, and the non-writing tape tasks sorted before the non-writing task quantity threshold are set to be scheduled, and the non-writing tape tasks sorted after the non-writing task quantity threshold are set to not be scheduled.

5. The method according to claim 4, characterized in that The step of selecting a target drive from the scheduled drives based on the to-be-executed tape task according to the drive status table, and sending a task interruption instruction to the target drive so that the drive task module interrupts the tape task currently being executed by the target drive based on the interruption command also includes: Adding the non-tape writing task to be scheduled into a temporary processing queue; Matching the non-tape writing task with the drive task status of the scheduled drive, and determining a target drive in the scheduled drive according to the matching result; Sending a task interruption command to the target drive, so that the drive task module interrupts the tape task currently executed by the target drive based on the interruption command; After the drive executes the tape task on the target tape, the non-write tape task is removed from the temporary processing queue.

6. The method according to claim 1, characterized in that Before the step of selecting a target drive from the scheduled drives based on the to-be-executed tape task according to the drive status table and sending a task interruption command to the target drive so that the drive task module interrupts the tape task currently being executed by the target drive based on the interruption command, the method further includes: Acquire driver information, and initialize the driver status table and driver message queue in the driver task management module; generating a command queue for each driver according to the driver information, and starting a driver task for the driver; The driver task is associated with the driver task status in the driver task management module.

7. The method according to claim 1, characterized in that After the step of adding the execution command of the to-be-executed tape task to the command queue corresponding to the execution driver so that the driver task module controls the execution driver to execute the to-be-executed tape task on the target tape based on the updated tape task after the target tape is loaded into the execution driver, the step further includes: In a driver task module of the execution driver, determining a target tape task currently executed by the execution driver; Determine the tape information of the target tape task; In the to-be-executed task queue, determining the to-be-executed tape task corresponding to the tape information; The to-be-executed tape task execution command is added to the command queue of the execution driver.

8. A drive task management device for a tape library system, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the drive task management method for the tape library system according to any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the drive task management method of the tape library system according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Tape library multi-driver backup method based on storage pool

    CN114637632A