A tape library multi-drive backup method based on storage pool
Through the multi-drive backup method of tape library based on storage pool, the problems of low backup efficiency and complex tape space release in the prior art are solved, efficient tape management and concurrent backup are realized, and backup efficiency and tape space utilization are improved.
Patent Information
- Application Number
- CN202210338249.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-04-01
AI Technical Summary
The existing tape library backup methods are inefficient, especially in the case of multiple drives, tape selection conflicts are prone to occur, and the release and reuse of tape space is complex, file search efficiency is slow, backup period is long, and data management is inconvenient.
Adopt the multi-drive backup method of tape library based on storage pool, through the management of tape library storage pool and multi-drive concurrent backup, the database records tape information and status, realize efficient organization and management of tapes, avoid tape selection conflicts, and support concurrent backups , realize conditional instant coverage of tape space.
It improves the management efficiency and file search speed of tape libraries, solves the tape selection conflicts during concurrent backups of multiple drives, realizes efficient backup processes and reuse of tape space, and reduces backup costs.
Smart Images

Figure CN114637632B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of information storage, in particular to a tape library multi-drive backup method based on a storage pool. Background Art
[0002] With the continuous development of storage technology, the choice of storage media is becoming more and more abundant. As a relatively old storage method, tape library still occupies an important position in the storage field due to its advantages of large capacity, low power consumption, low cost and support for offline storage.
[0003] Although tape libraries have their unique advantages, the use of tape libraries is a complex management process. This is mainly reflected in the following three aspects:
[0004] First, the organization of tapes and their data is flexible. Due to the limited number of tape slots, the tape library cannot guarantee that all required tapes can be loaded at one time. The import of new tapes and the export of old tapes will affect the current tape management. In addition, the sources of backup data are diverse, and various data are mixed and stored, which leads to low search efficiency. In order to facilitate management and improve search efficiency, the organization and management of tapes are very important.
[0005] The second is the release and reuse of tape space. Erasing tape data is a slow process, which will damage the tape itself and reduce the tape life. In addition, data may be associated within a single tape or between multiple tapes, so the release and reuse of tape space is also a very complicated process. Tape libraries are in urgent need of an efficient and reliable way to solve the problem of releasing and reusing storage space.
[0006] Finally, there is the issue of tape library backup efficiency. As a character device, the tape library itself cannot be separated from the tape drive for data storage, and the tape can only be written sequentially in an exclusive manner. In the case of a single drive, the backup efficiency is low and the backup cycle is long. When there are multiple drives, the concurrent operation process between the drives becomes very important.
[0007] The most common technical solution at present is to read and write tapes directly. The tape library application that adopts this method usually uses the tar package file format. tar, the full name of Tape Archive, is a file format specially used for tape archiving.
[0008] The main process of this solution is to place the tape directly in the tape slot. When backing up, select the tape to be used according to the needs, and then load it into the drive to back up the data. After reading and writing are completed, put the tape back in place. After all the tapes are used, the used tapes are exported, and then new tapes are imported, and the above steps are repeated.
[0009] In addition, this solution can be used directly for single-drive tape libraries. For multi-drive tape libraries, each drive needs to select a different tape for writing during concurrent backups, otherwise the tape you need to use may be occupied by other drives, resulting in a failure to back up.
[0010] The prior art has the following disadvantages:
[0011] 1. Directly specify the tape to back up the files
[0012] The tape is placed directly in the tape slot. When backing up, the tape to be used is selected according to the needs. Since the capacity of tapes is usually large, this method will not cause problems in the short term. However, as time goes by and the amount of data increases, this method requires the management of more and more tapes, and the import and export of tapes will become more frequent. Since this method requires manual assignment of tapes, it is easy to cause various types of data to be stored together. Even if restrictions are placed on the data source, the data is still too scattered and difficult to control.
[0013] 2. Slow file positioning
[0014] Writing data to a tape according to the TAR file format is a common and versatile method, but the efficiency of file search in this method is very low. Every time a specified file needs to be read, the file needs to be parsed according to the TAR format. Since the tape is stored sequentially, the file parsing process will be very slow, resulting in low efficiency.
[0015] 3. Backup efficiency is low and the window time is long.
[0016] Due to the price of tape drives and other factors, most manufacturers will use a single drive to back up data. This method has limited data channels, and the inherent mechanical movements in the use of tape libraries will greatly reduce the speed, which will lead to bottlenecks in the entire backup process. Even if a multi-drive method is used, since the tape slots are shared between the drives of the tape library, it is easy to cause conflicts when selecting a tape because the tape is occupied by other drives.
[0017] 4. Release of tape library data space
[0018] For a virtual tape library, releasing the tape library data is actually deleting the disk data, so it cannot be considered a true release because it cannot be applied to an actual physical tape library. To release the data in a physical tape library, you need to erase the tape data, which is a way to damage the tape and is not worth the loss. Summary of the invention
[0019] In order to solve the above problems, the present invention provides a convenient, reliable and efficient tape library multi-drive backup method based on a storage pool, which not only supports concurrent backup of multiple drives, but also solves the problem of conflicts that are easily generated when multiple drives load tapes, while facilitating the release of tape space and reducing economic costs.
[0020] In order to achieve the above object, the present invention is implemented by the following technical solutions:
[0021] The present invention is a tape library multi-drive backup method based on a storage pool, comprising the following steps:
[0022] Step (1): Management of the tape library storage pool, specifically including the following two steps:
[0023] Step (1.1): Scanning and recording tape library tape information;
[0024] Step (1.2): Creation and management of tape library tape storage pool;
[0025] Step (2): Concurrent backup of multiple drives based on a storage pool, specifically including the following two steps:
[0026] Step (2.1): Initialize the tape library and read the storage pool information;
[0027] Step (2.2): selection of storage pool and execution control of backup process;
[0028] Step (2.3): After the backup is completed, the storage pool and tape library resources are released.
[0029] A further improvement of the present invention is that the specific operation of step (1.1) is as follows:
[0030] Step (1.1.1): Clear the currently recorded tape library, drive, tape slot and tape information;
[0031] Step (1.1.2): Scan the tape library and record the information in the database, including the tape library name and the robot device path address;
[0032] Step (1.1.3): Scan the tape drive and record the information into the database, including the drive device path address and serial number;
[0033] Step (1.1.4): Scan the tape slot and record the tape information into the database, including the tape volume label and the tape slot location.
[0034] A further improvement of the present invention is that the specific operation of step (1.2) is as follows:
[0035] Step (1.2.1): Define a group of tapes as a storage pool and record the storage pool name, which is unique.
[0036] Step (1.2.2): Read each associated tape in the storage pool in turn. If the tape appears in the record of step (1.1.4), mark the tape status as online, otherwise mark it as offline.
[0037] A further improvement of the present invention is that the specific steps of step (2.1) are as follows:
[0038] Step (2.1.1): Scan the tape library and reset the drives to ensure that all drives do not contain tapes;
[0039] Step (2.1.2): Record the status of all tape drives into the database, with the initial status being idle;
[0040] Step (2.1.3): Record the storage pool status to the database, including the associated drive serial number, status, last used tape, and the initial status is empty;
[0041] Step (2.1.4): Create a task waiting queue for each storage pool, the content of which is the backup strategy. The initial content is empty and recorded in the database;
[0042] Step (2.1.5): Establish a global task manager to be responsible for the allocation and management of tape drives and storage pools. The task manager adopts serial mode;
[0043] Step (2.1.6): Establish a global task receiver, which is responsible for cyclically receiving the backup strategy. The task receiver runs in an independent thread.
[0044] A further improvement of the present invention is that the specific steps of step (2.2) are as follows:
[0045] Step (2.2.1): The task receiver receives the backup strategy and stores the backup task information in the task waiting queue corresponding to the storage pool according to the storage pool specified by the backup strategy;
[0046] Step (2.2.2): The task manager cyclically checks the task waiting queue of each storage pool. If there is a task, check the storage pool status. If the status is busy, check the status of the next storage pool. Otherwise, execute step 2.2.3.
[0047] Step (2.2.3): The task manager checks whether there is an idle tape drive. If so, it changes the current storage pool status and drive status to busy, and then starts a new task execution thread, which is executed asynchronously;
[0048] Step (2.2.4): The task manager continues to loop step 2.2.2 until the application exits.
[0049] A further improvement of the present invention is that the task execution thread in step (2.2.3) specifically includes the following steps:
[0050] Step (2.2.3.1): According to the database record, the task execution thread selects the last used tape from the tapes associated with the current storage pool, and then checks the status of the tape;
[0051] Step (2.2.3.2): If the tape is online, execute step (2.2.3.3). If the tape is offline, continue to select the next tape until an online tape that can be written to data is selected, and then update the last used tape information recorded in the storage pool;
[0052] Step (2.2.3.3): Load the selected tape into the tape drive, and locate the tape according to the recorded tape read / write position;
[0053] Step (2.2.3.4): Write data to the tape. During the writing process, record the location information before and after the file is written to the database. If the tape is full, execute step (2.2.3.1).
[0054] Step (2.2.3.5): After writing is completed, if there is a data file writing failure, restore the location information before writing and delete the backup record. Otherwise, this backup task is successful.
[0055] Step (2.2.3.6): Check the task waiting queue of the current storage pool. If there is a subsequent task, do not unload the tape and directly execute step (2.2.3.4) for the subsequent task. Otherwise, reset the current tape drive so that there is no tape in the tape drive, change the current drive status to idle, and change the current storage pool status to idle.
[0056] Step (2.2.3.7): Exit this task execution thread.
[0057] A further improvement of the present invention is that the specific steps of step (2.3) are as follows:
[0058] Step (2.3.1): The task manager receives the application exit notification and stops executing the storage pool task waiting queue check;
[0059] Step (2.3.2): After receiving the task end notification, the task manager automatically ends all task execution threads and resumes the tape reading and writing records;
[0060] Step (2.3.3): The task manager resets all tapes to the tape slots and releases the tape drive;
[0061] Step (2.3.4): Application exits.
[0062] The beneficial effects of the present invention are:
[0063] 1.Tape organization based on storage pool;
[0064] Compared with the method of directly selecting and using tapes, the method used in the present invention can classify tapes well. When importing and exporting tapes, changes in tape slots will not affect the defined storage pools, and tape management is completely performed by software, which facilitates tape management. In terms of the type of data stored, the storage pool is actually equivalent to a classification of tapes, because it can better implement data organization and simplify the complexity of tape management.
[0065] 2. The efficiency of file location and search is significantly improved;
[0066] The tape library application based on the tar file format is more versatile, but the file search efficiency is low. In the present invention, all records are stored based on the database, and when searching for files, the tape and tape position of the file can be quickly located through SQL statements, so the efficiency is higher.
[0067] 3. Concurrent backup of multiple drives is highly efficient, and tape selection will not cause conflicts;
[0068] The present invention supports concurrent backup based on storage pools, and each driver can perform backup tasks simultaneously during the backup process, so the efficiency is high. Different from other concurrent modes, the concurrent backup in the present invention is based on a tape storage pool. Since one tape belongs to only one storage pool, this mode can well solve the conflict in tape selection during multi-drive concurrency. In addition, the concurrent process in the present invention will be recorded in a database, and the status can be checked and controlled externally through the database, which greatly improves the controllability of the backup process and makes the backup process more flexible.
[0069] 4. Release of tape library data space;
[0070] The method provided by the present invention is a "conditional real-time data overwriting" method. Since all data in the present invention are recorded in the database, including the tape usage location and read and write records. During the backup process, if the task fails, the original record can be directly restored, and the next backup can be directly reused from the restored record, and the new data can be directly overwritten, thereby indirectly realizing the reuse of the tape space. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is the overall relationship structure diagram.
[0072] Figure 2 It is a tape library storage pool management data flow diagram.
[0073] Figure 3 It is a flowchart of tape library storage pool management.
[0074] Figure 4 It is the task receiver execution flow chart.
[0075] Figure 5 It is the task manager execution flow chart.
[0076] Figure 6 It is a task execution thread flow chart. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0078] like Figure 1-6 As shown, the present invention is a tape library multi-drive backup method based on storage pool, including two major steps: tape library storage pool management and multi-drive concurrent backup based on storage pool. In this embodiment, the backup server operating system used is 64-bit CentOS7.6, the tape library uses 03584L22, including 4 ULT3580-TD1 drives, 10 of which do not contain any data and are 1G tapes in size. The tape library and the backup server are connected via a network.
[0079] The specific steps for managing the tape library storage pool are as follows:
[0080] Step 1.1, scanning and recording of tape library tape information;
[0081] Step 1.1.1, scan the tape library connected to the current server and find the tape library 03584L22, named L1, and the robot device path address is / dev / sg4.
[0082] Step 1.1.2, scan and find that there are 4 tape drives in the current tape library:
[0083] Define drive D1, serial number 70000051, and device path address / dev / st1.
[0084] Define drive D2, serial number 70000052, and device path address / dev / st2.
[0085] Define drive D3, serial number 70000053, device path address / dev / st3.
[0086] Define drive D4, serial number 70000054, device path address / dev / st4.
[0087] Step 1.1.3, scan the tape library. The current tape library contains 20 tapes, and their volume labels are E01001L4, E01002L4, E01003L4, E01004L4, E01005L4, E01006L4, E01007L4, E01008L4,E01009L4, E01010L4, E01011L4, E01012L4, E01013L4, E01014L4, E01015L4,E01016L4, E01017L4, E01018L4, E01019L4, E01020L4.
[0088] The information scanned in steps 1.1.1 to 1.1.3 is stored in the database. Before executing step 1.1.1, it is also necessary to clear the currently recorded tape library, drive, tape slot and tape information. Since the present embodiment adopts a tape library, drive, tape slot and tape information without any data, this step is omitted.
[0089] Step 1.2, creation and management of tape library tape storage pool;
[0090] Based on the scanned information, three storage pools are defined, named P1, P2 and P3. The storage pool information is as follows:
[0091] Storage pool P1 consists of five tapes: E01001L4, E01002L4, E01003L4, E01004L4, and E01005L4. All tapes are online.
[0092] Storage pool P2 consists of five tapes: E01006L4, E01007L4, E01008L4, E01009L4, and E01010L4. All tapes are online.
[0093] Storage pool P3 consists of five tapes: E01011L4, T01012L4, E01013L4, E01014L4, and E01015L4. Except for tape T01012L4, which is offline, all other tapes are online.
[0094] Stores information about storage pools and their associated tapes in a database.
[0095] Defining multiple tapes as a group as a storage pool organization method makes multiple tapes become a whole. When using, tapes can be directly selected from the whole. This achieves isolation of tapes between wholes and avoids conflicts when multiple drives operate one tape. At the same time, it makes the organization and management of tapes more convenient and efficient.
[0096] Concurrent backup of multiple drives based on a storage pool includes the following steps:
[0097] Step 2.1: Initialize the tape library and read the storage pool information
[0098] Step 2.1.1, scan the tape library, clean the drives, make sure that all drives do not contain tapes, and record the tape library drive status to the database based on the scan information:
[0099] Tape drive D1, current status is idle;
[0100] Tape drive D2, current status is idle;
[0101] Tape drive D3, current status is idle;
[0102] Tape drive D4, current status is idle;
[0103] Step 2.1.2, record the status of each storage pool to the database:
[0104] Storage pool P1, the associated drive serial number is empty, the status is empty, and the last used tape is empty;
[0105] Storage pool P2, the associated drive serial number is empty, the status is empty, and the last used tape is empty;
[0106] Storage pool P3, the associated drive serial number is empty, the status is empty, and the last used tape is empty;
[0107] Step 2.1.3, create a task waiting queue for each storage pool:
[0108] Storage pool P1, create task waiting queue Q1, Q1 is currently empty, no waiting tasks need to be executed
[0109] Storage pool P2, create task waiting queue Q2, Q2 is currently empty, no waiting tasks need to be executed
[0110] Storage pool P3, create task waiting queue Q3, Q3 is currently empty, no waiting tasks need to be executed
[0111] The task waiting queue is stored in the database.
[0112] Step 2.1.4, establish a global task manager TaskMgr, which is responsible for the allocation and management of tape drives and storage pools. TaskMgr uses serial mode to check the storage pool task waiting queues Q1, Q2 and Q3 in sequence. Currently, all storage pool task waiting queues are empty. TaskMgr checks every 3 seconds. The detailed task manager process can be set by parameter Figure 5 .
[0113] Step 2.1.5, in an independent thread, establish a task receiver Recv to loop through the backup strategy. If there is a backup strategy, insert the strategy information into the task waiting queue of the storage pool according to the storage pool set in the strategy. The detailed task receiver execution process is as follows: Figure 4 shown.
[0114] Step 2.1.6, insert five backup strategy tasks in sequence:
[0115] Policy 1: Store a compressed file of size 700M in P1: File_700M01.tar.gz
[0116] Policy 2: Store a compressed file of size 1200M in P2: File_1200M01.tar.gz
[0117] Policy 3: Store a compressed file of size 1200M in P3: File_1200M02.tar.gz
[0118] Policy 4: Store a compressed file of size 800M in P1: File_800M01.tar.gz
[0119] Policy 5: Store a 5G compressed file in P2: File_5G01.tar.gz
[0120] The task receiver Recv receives the five strategies in sequence and inserts them into the corresponding storage pool task waiting queue.
[0121] Current task waiting queue information:
[0122] Q1: Policy1, Policy4
[0123] Q2: Policy 2, Policy 5
[0124] Q3: Policy3;
[0125] Step 2.2, storage pool selection and backup process execution control;
[0126] The task manager TaskMgr performs a periodic cyclic check and finds that there is a backup task Policy1 in the task waiting queue Q1. It determines that the status of P1 is idle and that P1 is not currently associated with a tape drive. It checks and finds that there is an available tape drive, selects the first idle drive D1, and records the associated drive serial number 70000051, then changes the status of P1 to busy and D1 to busy, and starts a new task execution thread T1. Task thread T1 starts to check that the last tape used in the storage pool P1 is empty, selects the first available online tape E01001L4, and records the last tape used in the storage pool as the current tape, loads the tape, and starts writing data after locating the tape to the writable position. This step is performed asynchronously.
[0127] The task manager TaskMgr performs a scheduled cyclic check and finds that there is a backup task Policy2 in the task waiting queue Q2. It determines that the P2 status is idle and that P2 is not associated with a tape drive. It checks and finds that there is an available tape drive, selects the first idle drive D2, and records the serial number of the associated drive as 70000052. It then changes the P2 status to busy and the D2 status to busy, and starts a new thread T2 to execute the task. Task thread T2 starts to check that the last tape used in the storage pool P2 is empty, selects the first available online tape E01006L4, records the last tape used in the storage pool as the current tape, loads the tape, locates it to a writable position, and starts writing data. This operation is performed asynchronously.
[0128] Check that there is a backup task Policy3 in the task waiting queue Q3, judge that the P3 status is idle, and P3 is not associated with a tape drive. Check and find that there is an available tape drive, select the first idle drive D3, and record the serial number of the associated drive as 70000053, then modify the P3 status to busy and D3 status to busy, and start a new thread T3 to execute the task. Task thread T3 starts to check that the last used tape in the storage pool P3 is empty, selects the first available and online tape E01011L4 and records the last used tape in the storage pool as the current tape, then loads the tape, locates it to the writable position, and starts writing data. This step is performed asynchronously.
[0129] It is checked that there is a backup task Policy4 in the task waiting queue Q1, and the P1 status is busy and cannot be executed. Continue to check and find that there is a backup task Policy5 in Q2, but the P2 storage pool status is busy and cannot be executed. Continue to cycle through each storage pool task waiting queue until there is an executable task.
[0130] Task thread T1 first writes 700M data, and Policy1 ends. After the task ends, it checks whether Q1 has a subsequent task Policy4, does not unload the tape E01001L4, changes the storage pool P1 status to idle, and task thread T1 ends and exits. When the task manager TaskMgr starts a new task thread T4, after T4 starts, it finds that P1 has been associated with the drive serial number 70000051. There is no need to load the tape, directly locate the read and write position, and start writing data. After writing about 300M of data, tape E01001L4 is full. The tape is unloaded and the next available and online tape E01002L4 is loaded. The last used tape recorded in the database storage is updated to tape E01002L4. Data writing begins until the backup is completed. Because there is no subsequent task for Q1, tape E01002L4 is unloaded, the storage pool associated serial number is changed to empty, the storage pool P1 status is changed to idle, the drive D1 status is changed to idle, the task ends, and task thread T4 exits.
[0131] After task thread T2 finishes writing 1000M of data, tape E01006L4 in P2 is full, so it unloads the tape and loads the next available online tape E01007L4. It updates the database record of the last used tape to E01007L4, starts locating and writing data, and after writing 200M, the Policy2 task is completed. The job execution thread checks and finds that Q2 has a subsequent task Policy5. T2 does not unload tape E01007L4, and after changing the P2 status to idle, the T2 task thread ends and exits. Subsequently, task Policy5 is loaded and a new task thread is started, which starts writing data directly without loading the tape. Since the size is 5G, which exceeds the total capacity of the tape, Policy5 fails to perform the backup task due to lack of available storage space after all the tapes are used up. The recorded backup information is deleted and the information recorded before the backup is reset. Since there is no subsequent task for Q2, the current tape is unloaded and the storage pool associated drive serial number is updated to be empty. The storage pool P2 status is modified to be idle and the drive D2 status is modified to be idle, and thread T5 exits.
[0132] After task thread T3 finishes writing 1000M of data, tape E01011L4 in P3 is full, so it unloads the tape and selects the next tape T01012L4, which is not online. It continues to select the next tape E01013L4, which is online and available. It updates the database record of the last used tape to E01013L4, starts locating and writing data, and after writing 200M, Policy3 task is completed. The job execution thread checks and finds that there is no subsequent task for Q3, changes the status of storage pool P1 to idle, changes the status of drive D1 to idle, and changes the associated drive serial number to null, then unloads the current tape, and thread T3 exits.
[0133] Step 2.3, end the task, send an end signal through Ctrl+C, apply it in the signal function operation, stop all current tasks, and release the tape library resources.
[0134] The multi-drive concurrent backup method based on storage pool realizes the concurrent support of multiple drives by controlling the storage pool status. At the same time, since there is no crossover of tapes between storage pools, that is, a tape belongs to only one storage pool, and a storage pool is associated with at most one drive, this feature makes each process involved in the concurrency completely independent, making the operation simpler and easier to control.
[0135] By recording the tape read and write data information, file search can be directly obtained from the data record, and then the tape can be directly loaded and positioned to the target position to read the data, greatly improving the efficiency of file search and use. At the same time, the tape usage information is recorded. Before use, it is positioned and used according to the existing records, and the read and write information is recorded during use. After use, the previous use record can be restored to write from the original position next time, so that the new data covers the old data, thereby realizing the recovery and reuse of tape storage space.
[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A tape library multi-drive backup method based on a storage pool, characterized in that: The steps include: Step (1): Management of the tape library storage pool, specifically including the following two steps: Step (1.1): Scanning and recording tape library tape information; Step (1.2): Creation and management of tape library tape storage pool; Step (2): Concurrent backup of multiple drives based on a storage pool, specifically including the following two steps: Step (2.1): Initialize the tape library and read the storage pool information; Step (2.2): selection of storage pool and execution control of backup process; Step (2.3): After the backup is completed, the storage pool and tape library resources are released; The specific operations of step (1.1) are as follows: Step (1.1.1): Clear the currently recorded tape library, drive, tape slot and tape information; Step (1.1.2): Scan the tape library and record the information in the database, including the tape library name and the robot device path address; Step (1.1.3): Scan the tape drive and record the information into the database, including the drive device path address and serial number; Step (1.1.4): Scan the tape slot and record the tape information into the database, including the tape volume label and the tape slot location; The specific operations of step (1.2) are as follows: Step (1.2.1): Define a group of tapes as a storage pool and record the storage pool name, which is unique. Step (1.2.2): read each associated tape in the storage pool in turn. If the tape appears in the record of step (1.1.4), mark the tape status as online, otherwise mark it as offline; The specific steps of step (2.1) are as follows: Step (2.1.1): Scan the tape library and reset the drives to ensure that there are no tapes in all drives; Step (2.1.2): Record the status of all tape drives into the database, with the initial status being idle; Step (2.1.3): Record the storage pool status to the database, including the associated drive serial number, status, last used tape, and the initial status is empty; Step (2.1.4): Create a task waiting queue for each storage pool, the content of which is the backup strategy. The initial content is empty and recorded in the database; Step (2.1.5): Establish a global task manager to be responsible for the allocation and management of tape drives and storage pools. The task manager adopts serial mode; Step (2.1.6): Establish a global task receiver, which is responsible for cyclically receiving the backup strategy. The task receiver runs in an independent thread.
2. The tape library multi-drive backup method based on storage pool according to claim 1, characterized in that: The specific steps of step (2.2) are as follows: Step (2.2.1): The task receiver receives the backup strategy and stores the backup task information in the task waiting queue corresponding to the storage pool according to the storage pool specified by the backup strategy; Step (2.2.2): The task manager cyclically checks the task waiting queue of each storage pool. If there is a task, check the storage pool status. If the status is busy, check the status of the next storage pool. Otherwise, execute step 2.2.
3. Step (2.2.3): The task manager checks whether there is an idle tape drive. If so, it changes the current storage pool status and drive status to busy, and then starts a new task execution thread, which is executed asynchronously; Step (2.2.4): The task manager continues to loop step 2.2.2 until the application exits.
3. The tape library multi-drive backup method based on storage pool according to claim 2, characterized in that: The task execution thread in step (2.2.3) specifically includes the following steps: Step (2.2.3.1): According to the database record, the task execution thread selects the last used tape from the tapes associated with the current storage pool, and then checks the status of the tape; Step (2.2.3.2): If the tape is online, execute step (2.2.3.3). If the tape is offline, continue to select the next tape until an online tape that can be written to data is selected, and then update the last used tape information recorded in the storage pool; Step (2.2.3.3): Load the selected tape into the tape drive, and locate the tape according to the recorded tape read / write position; Step (2.2.3.4): Write data to the tape. During the writing process, record the location information before and after the file is written to the database. If the tape is full, execute step (2.2.3.1). Step (2.2.3.5): After writing is completed, if there is a data file writing failure, restore the location information before writing and delete the backup record. Otherwise, this backup task is successful. Step (2.2.3.6): Check the task waiting queue of the current storage pool. If there is a subsequent task, do not unload the tape and directly execute step (2.2.3.4) for the subsequent task. Otherwise, reset the current tape drive so that there is no tape in the tape drive, change the current drive status to idle, and change the current storage pool status to idle. Step (2.2.3.7): Exit this task execution thread.
4. The tape library multi-drive backup method based on storage pool according to claim 2, characterized in that: Step (2.3) The specific steps are as follows: Step (2.3.1): The task manager receives the application exit notification and stops executing the storage pool task waiting queue check; Step (2.3.2): After receiving the task end notification, the task manager automatically ends all task execution threads and resumes the tape reading and writing records; Step (2.3.3): The task manager resets all tapes to the tape slots and releases the tape drive; Step (2.3.4): Application exits.
Citation Information
Patent Citations
Backup method supporting multi-driver concurrent writing of tape library
CN108170377A
Virtual tape library system based on optical disk library and management method thereof
CN110321076A
