Backup link resetting method, device, storage medium and electronic device
By monitoring and analyzing the attribute information of the drive logical link, the faulty node is automatically located and reset, the problem of abnormal tape drive logical link abnormality during data backup is solved, and the availability and efficiency of backup services are improved.
Patent Information
- Application Number
- CN202210690261.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-06-17
AI Technical Summary
During the data backup process, when an abnormality occurs in the logical link of the tape drive, the specific cause of the failure cannot be located, and the reset cannot be carried out in time, resulting in a reduction in the availability of backup services.
By monitoring the attribute information of the tape drive logical link, judge the link status and locate the fault nodes, and establish a list of fault links. Reset operation according to the number of consecutive stops of the preset conditions to ensure automatic reset of the drive logic link.
Automatic fault location and reset of the tape drive logical link is realized, which improves the availability and efficiency of backup services and reduces the need for manual intervention.
Smart Images

Figure CN115061854B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology or other related fields, and specifically, to a method, device, storage medium and electronic device for resetting a backup link. Background Art
[0002] In the field of data backup, tape libraries and tape drive systems are commonly used backup media. Data backup is achieved by controlling the backup media through a backup system. For example, the backup system may be Veritas Netbackup, referred to as NBU.
[0003] It should be noted that in the case of a huge volume of overall backup business, tape drives are frequently used for daily backup, and the tape drives of the tape library have many mechanical interfaces, and frequent operations will cause temporary failures. Since NBU mainly focuses on the software level of backup, its relationship with the tape library is only to call the logical link of the tape drive. There is no relevant interface to query the actual usage of the tape library, and the specific cause of the tape link abnormality cannot be determined. When a batch of tape libraries fail, NBU will use the management method of stopping the tape drive link device to ensure the subsequent process of the backup business. At the same time, NBU does not have the ability to automatically reset the tape drive link. Under the scale of business requirements involving thousands of physical tape drives and tens of thousands of logical tape links, nearly 100 logical tape links are stopped every day, resulting in a decrease in the available tape links of each backup media server. In order to ensure the available tape link resources, it is necessary to log in manually, check the link stop status of the tape drive in turn, and reset and start, which is a huge workload.
[0004] With regard to the problem in the related art that during the data backup process, when an abnormality occurs in the tape drive logical link, the specific cause of the fault cannot be located, and the tape drive logical link cannot be reset in time, no effective solution has been proposed yet. Summary of the invention
[0005] The present application provides a method, device, storage medium and electronic device for resetting a backup link to solve the problem in the related art that during the data backup process, when an abnormality occurs in the logical link of a tape drive, the specific cause of the fault cannot be located and the logical link of the tape drive cannot be reset in time.
[0006] According to one aspect of the present application, a method for resetting a backup link is provided. The method comprises: monitoring all tape drive logical links according to a first time period, and obtaining attribute information of each tape drive logical link, wherein the tape drive logical link at least includes the following nodes: a master server, a media server, a tape library, a tape drive, and a tape, and the attribute information at least includes a link state and an identifier of each node; when the attribute information indicates that the link state of the tape drive logical link is a stopped state, determining whether each node of the stopped tape drive logical link has a fault, and when any node of the stopped tape drive logical link has a fault, adding the stopped tape drive logical link to a list of faulty links; obtaining the number of consecutive stops of each tape drive logical link according to a second time period, obtaining target tape drive logical links outside the list of faulty links from all tape drive logical links, and resetting the target tape drive logical links whose number of consecutive stops meets a preset condition, wherein the second time period is greater than the first time period.
[0007] Optionally, when the attribute information indicates that the link status of the tape drive logical link is in a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: obtaining the tape drive in the stopped tape drive logical link, obtaining the target tape drive, and obtaining all tape drive logical links associated with the target tape drive; when the proportion of the link status of all tape drive logical links associated with the target tape drive being in a started state is lower than a first preset proportion, determining that the target tape drive has a fault.
[0008] Optionally, when the attribute information indicates that the link status of the tape drive logical link is in a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: obtaining the media server in the stopped tape drive logical link, obtaining the target media server, and obtaining all tape drive logical links associated with the target media server; when the proportion of the link status of all tape drive logical links associated with the target media server being in a started state is lower than a second preset proportion, determining that the target media server has a fault.
[0009] Optionally, when the attribute information indicates that the link status of the tape drive logical link is in a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: obtaining the tape library in the stopped tape drive logical link, obtaining the target tape library, and obtaining all tape drive logical links associated with the target tape library; when the proportion of the link status of all tape drive logical links associated with the target tape library being in a started state is lower than a third preset proportion, determining that the target tape library has a fault.
[0010] Optionally, resetting the target tape drive logical link whose consecutive stop times meet preset conditions includes: when the target tape drive logical link has a consecutive stop time less than a first preset time, adding the target tape drive logical link to a list to be reset; when the target tape drive logical link has a consecutive stop time greater than or equal to the first preset time and less than or equal to the second preset time, issuing a first alarm prompt message and adding the target tape drive logical link to a list to be reset; and resetting the tape drive logical link in the list to be reset.
[0011] Optionally, after obtaining the number of consecutive stops of each tape drive logical link according to a second time period and obtaining the target tape drive logical link outside the faulty link list from all tape drive logical links, the method also includes: issuing a second alarm prompt message when the number of consecutive stops of the target tape drive logical link is greater than a second preset number.
[0012] Optionally, before determining whether each node of the stopped tape drive logical link has a fault, the method further includes: determining whether the tape drive in the stopped tape drive logical link is in a blacklist, wherein the blacklist stores tape drives in a maintenance phase; if the tape drive in the stopped tape drive logical link is not in the blacklist, executing the step of determining whether each node of the stopped tape drive logical link has a fault.
[0013] Optionally, when the attribute information indicates that the link status of the tape drive logical link is in a stopped state, before determining whether each node of the stopped tape drive logical link has a fault, the method further includes: obtaining the link status from the attribute information of each tape drive logical link; when the link status is in an abnormal state or a lost state, issuing a third alarm prompt information; when the link status is in a stopped state, executing the step of determining whether each node of the stopped tape drive logical link has a fault when the attribute information indicates that the link status of the tape drive logical link is in a stopped state.
[0014] Optionally, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, after determining whether each node of the stopped tape drive logical link has a fault, the method further includes: when any node of the stopped tape drive logical link has a fault, determining the type of the faulty node, adding the faulty node to a list of faulty nodes of the corresponding type, and issuing a fourth alarm prompt message.
[0015] According to another aspect of the present application, a device for resetting a backup link is provided. The device includes: a monitoring unit, which is used to monitor all tape drive logical links according to a first time period and obtain attribute information of each tape drive logical link, wherein the tape drive logical link at least includes the following nodes: a master server, a media server, a tape library, a tape drive, and a tape, and the attribute information at least includes a link state and an identifier of each node; a first judgment unit, which is used to judge whether each node of the stopped tape drive logical link has a fault when the attribute information indicates that the link state of the tape drive logical link is a stopped state, and if any node of the stopped tape drive logical link has a fault, add the stopped tape drive logical link to a list of faulty links; a reset unit, which is used to obtain the number of consecutive stops of each tape drive logical link according to a second time period, obtain target tape drive logical links outside the list of faulty links from all tape drive logical links, and reset the target tape drive logical links whose number of consecutive stops meets a preset condition, wherein the second time period is greater than the first time period.
[0016] According to another aspect of an embodiment of the present invention, a computer storage medium is provided. The computer storage medium includes a stored program. When the program is executed, the device where the computer storage medium is located is controlled to execute a method for resetting a backup link.
[0017] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein a method for resetting a backup link is executed when the computer-readable instructions are executed.
[0018] Through the present application, the following steps are adopted: monitoring all tape drive logical links according to the first time period, and obtaining the attribute information of each tape drive logical link, wherein the tape drive logical link at least includes the following nodes: the master server, the media server, the tape library, the tape drive and the tape, and the attribute information at least includes the link state and the identification of each node; when the attribute information indicates that the link state of the tape drive logical link is the stopped state, judging whether each node of the stopped tape drive logical link has a fault, and when any node of the stopped tape drive logical link has a fault, adding the stopped tape drive logical link to the fault link list; obtaining the number of consecutive stops of each tape drive logical link according to the second time period, and obtaining the target tape drive logical link outside the fault link list from all tape drive logical links, and resetting the target tape drive logical link whose number of consecutive stops meets the preset conditions, wherein the second time period is greater than the first time period, solving the problem in the related art that in the process of data backup, when the tape drive logical link is abnormal, the specific fault cause cannot be located, and the tape drive logical link cannot be reset in time. Thus, the effect of D is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a flowchart of a method for resetting a backup link provided in an embodiment of the present application;
[0021] Figure 2 is a flowchart of an optional backup link resetting method provided according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a backup link reset device provided according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0028] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0029] Media server: mainly realizes the reading and writing of backup media, accepts backup data, and writes it to storage devices such as tapes, hard disks, and optical disks. When restoring data, it reads data from the backup media and sends it to the backup client.
[0030] Tape library: It is composed of multiple drives, multiple slots, and robotic arms, and the robotic arms can automatically remove and load tapes.
[0031] Tape drive: generally refers to a single-drive product, usually consisting of a tape drive and a tape. It is an economical, reliable, large-capacity, and fast backup device.
[0032] Magnetic tape: It is a strip material with a magnetic layer used to record sound, images, numbers or other signals. It is the largest and most widely used magnetic recording material.
[0033] According to an embodiment of the present application, a method for resetting a backup link is provided.
[0034] Figure 1FIG. 1 is a flowchart of a method for resetting a backup link according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0035] Step S102, monitor all tape drive logical links according to the first time period, and obtain attribute information of each tape drive logical link, wherein the tape drive logical link includes at least the following nodes: a master server, a media server, a tape library, a tape drive, and a tape, and the attribute information includes at least the link status and the identification of each node.
[0036] Specifically, all tape drive logical links are monitored by backup management software. For example, the backup management software may be NBU (Veritas Netbackup). NBU monitors all tape drive logical links according to a first time period. The first time period may be 1 hour. The status of all tape drive logical links is traversed every hour.
[0037] It should be noted that NBU backup is mainly a three-layer structure. The master server is responsible for controlling the backup domain, the backup is implemented by the backup media server, and the client is the backup source. These three layers form a centralized backup cluster. In the case of excessive backup demand, due to capacity limitations, it is divided into multiple backup domains according to backup needs and characteristics, and there are multiple master servers. When NBU implements backup through the backup media server, it can be backed up through the tape drive in the tape library. The tape drive is mainly connected to the media server through the FC optical fiber link. When the backup task needs to be executed, the backup data stream is uploaded from the front-end client network to the backup media server and written to the tape through the FC optical fiber link.
[0038] It should also be noted that there is a one-to-one correspondence between tape drives and backup domains. However, in order to make full use of tape drives, a tape drive can be assigned to multiple media servers and connected to multiple media servers. Each connection is a tape drive logical link. Each tape drive logical link includes multiple nodes. When the link is started, the backup media server can call the subsequent tape drive. When the link stops, it only affects the mechanism server's call to the tape drive. For example, if a master server manages three media servers, each media server is connected to a tape library, each tape library contains 10 tape drives, and each tape drive can install 10 tapes, there are a total of 300 tape drive logical links.
[0039] Furthermore, NBU monitors the tape drive logical link and obtains the attribute information of the tape drive logical link at the same time. This can be obtained through the NBU command line and the NBU API. After executing the command, the returned attribute information is collected, mainly the following attributes: tape drive logical link name, backup domain, tape drive information, tape library information, backup media server and link status, and the collected attribute information is written into the database of the backup management software system.
[0040] It should be noted that the tape drive information can be the WWN (Word Wide Name) of the tape drive. The WWN is the unique identifier of the fiber optic card of the physical tape drive. The tape drive and the tape library to which it belongs can be known through the WWN, so that the unique tape drive logical link and its related attributes can be obtained, that is, the link status, the backup domain to which it belongs, the underlying physical tape drive, the tape library and the media server to which it belongs.
[0041] The link status can be started, stopped, abnormal, and lost. Start means that it can be used normally, and stop means that it cannot be used. Abnormal means that there is an abnormality in the link. Any node corresponding to the logical link may have a problem, causing the logical link corresponding to the node to be abnormal and unusable. Lost means that the physical tape drive cannot be found in the backup management software, and the logical link cannot be found, which is mainly caused by abnormal client operating system.
[0042] Step S104, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, determine whether each node of the stopped tape drive logical link has a fault, and when any node of the stopped tape drive logical link has a fault, add the stopped tape drive logical link to the faulty link list.
[0043] It should be noted that "stop" means that the system is unusable. It may be that the NBU system stops due to a passive exception, or it may be that it stops manually. Therefore, it is necessary to determine whether there are faults in each node of the tape drive logical link. If there are faults, add the tape drive logical link to the faulty link list.
[0044] Step S106, obtaining the number of consecutive stops of each tape drive logical link according to the second time period, and obtaining the target tape drive logical links outside the faulty link list from all tape drive logical links, and resetting the target tape drive logical links whose consecutive stop times meet the preset conditions, wherein the second time period is greater than the first time period.
[0045] Specifically, the second time period is greater than the first time period. When the first time period is 1 hour, the second time period can be 24 hours. The preset condition is used to characterize the condition of a small number of consecutive stops. If the number of consecutive stops of the tape drive logical link is small in the last 24 hours, and the tape drive logical link is not in the faulty link list, it means that the probability of failure at various points of the tape drive logical link is small, and the tape drive logical link is reset, avoiding the use of a management method of stopping the tape drive link device to ensure the subsequent process of the backup business, resulting in the problem of fewer and fewer available tape drive logical link resources.
[0046] The method for resetting the backup link provided by the embodiment of the present application monitors all the tape drive logical links according to the first time period and obtains the attribute information of each tape drive logical link, wherein the tape drive logical link at least includes the following nodes: the master server, the media server, the tape library, the tape drive and the tape, and the attribute information at least includes the link state and the identification of each node; when the attribute information indicates that the link state of the tape drive logical link is the stopped state, it is determined whether each node of the stopped tape drive logical link has a fault, and when any node of the stopped tape drive logical link has a fault, the stopped tape drive logical link is added to the fault link list; the number of consecutive stops of each tape drive logical link is obtained according to the second time period, and the target tape drive logical link outside the fault link list is obtained from all tape drive logical links, and the target tape drive logical link whose number of consecutive stops meets the preset condition is reset, wherein the second time period is greater than the first time period, which solves the problem in the related art that in the process of data backup, when the tape drive logical link is abnormal, the specific fault cause cannot be located, and the tape drive logical link cannot be reset in time. Thus, the effect of D is achieved.
[0047] In addition to locating faults at each node of the link, the historical start and stop conditions of the entire link may also be analyzed during resetting. Optionally, in the method for resetting a backup link provided in an embodiment of the present application, resetting a target tape drive logical link whose number of consecutive stops meets a preset condition includes: when the number of consecutive stops of the target tape drive logical link is less than a first preset number, adding the target tape drive logical link to a list to be reset; when the number of consecutive stops of the target tape drive logical link is greater than or equal to the first preset number and less than or equal to the second preset number, issuing a first alarm prompt message and adding the target tape drive logical link to a list to be reset; and resetting the tape drive logical link in the list to be reset.
[0048] For example, the second time period can be 24 hours, the first preset number can be 3 times, and the second preset number can be 5 times. According to the records of the system database in the last 24 hours, the startup status and abnormal status of each tape drive logical link are analyzed to obtain the number of consecutive stops of each tape drive logical link in the last 24 hours. When the number of consecutive stops of the tape drive logical link in the latest record in 24 hours is not greater than or equal to 3 times, it means that the probability of an abnormality in the tape drive logical link is very small, and the record is added to the list to be reset. If it exceeds 3 times and is less than or equal to 5 times, it means that the probability of an abnormality in the tape drive logical link is small. In order to avoid the shutdown causing too few available resources for the tape drive logical link, an alarm is notified, and the record is added to the list to be reset.
[0049] Furthermore, a reset operation is performed on the logical links in the to-be-reset list, which can be implemented specifically by calling an NBU API.
[0050] If the tape drive logical link stops continuously for multiple times, it means that the probability of the tape drive logical link failure is relatively high. Optionally, in the backup link reset method provided in the embodiment of the present application, after obtaining the number of consecutive stops of each tape drive logical link according to the second time period and obtaining the target tape drive logical link outside the faulty link list from all tape drive logical links, the method also includes: when the number of consecutive stops of the target tape drive logical link is greater than the second preset number, issuing a second alarm prompt message.
[0051] For example, the second time period can be 24 hours, the first preset number of times can be 3 times, and the second preset number of times can be 5 times. According to the records of the system database in the last 24 hours, the startup status and abnormal status of each tape drive logical link are analyzed, and the number of consecutive stops of each tape drive logical link in the last 24 hours is obtained. When the number of consecutive stops of the tape drive logical link in the latest record in 24 hours exceeds 5 times, it means that the probability of failure of the tape drive logical link is relatively high, then the alarm is directly notified, and manual intervention is subsequently performed to analyze and resolve the fault, thereby avoiding the problem that the tape drive logical link fault is not resolved in time, resulting in the long-term occupation of the tape drive logical link resources.
[0052] In order to avoid resetting the tape drive under maintenance, optionally, in the method for resetting the backup link provided in the embodiment of the present application, before determining whether each node of the stopped tape drive logical link has a fault, the method also includes: determining whether the tape drive in the stopped tape drive logical link is in a blacklist, wherein the blacklist stores tape drives in a maintenance phase; and if the tape drive in the stopped tape drive logical link is not in the blacklist, executing the step of determining whether each node of the stopped tape drive logical link has a fault.
[0053] Specifically, some tape drives need to be maintained and cannot be serviced. Therefore, the tape drives in the stopped tape drive logical link may be in a maintenance stage. The tape drives in the maintenance stage are set in a blacklist, and the blacklist is saved in the system database. The tape drives that are not involved in fault analysis and reset operations are managed through blacklist management. Before the reset operation, the tape drive link to which the tape drives in the blacklist belong is excluded, thereby avoiding the operation of resetting the tape drives in the maintenance stage and improving the reset efficiency.
[0054] There are multiple link states of the tape drive logical link. Optionally, in the backup link resetting method provided in the embodiment of the present application, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, before determining whether each node of the stopped tape drive logical link has a fault, the method further includes: obtaining the link state from the attribute information of each tape drive logical link; when the link state is in an abnormal state or a lost state, issuing a third alarm prompt information; when the link state is in a stopped state, executing the step of determining whether each node of the stopped tape drive logical link has a fault when the attribute information indicates that the link state of the tape drive logical link is in a stopped state.
[0055] Specifically, the data of the most recent cycle is obtained, that is, a list of the most recent logical links in sequence, where each link is a record, and the latest record is checked. The tape drive logical links whose link status is abnormal or lost in the latest record are first screened, and an alarm is issued and the system administrator is notified to analyze and confirm the specific problem. Then the tape drive logical links whose link status is stopped in the latest record are screened, and then the analysis phase is entered. If the link status of the tape drive logical link is started, this check is skipped and no processing is performed. This embodiment lays a data foundation for resetting the tape drive logical link by screening the tape drive logical link whose link status is stopped.
[0056] In order to classify and process faulty nodes, optionally, in the backup link resetting method provided in the embodiment of the present application, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, after determining whether each node of the stopped tape drive logical link has a fault, the method also includes: when any node of the stopped tape drive logical link has a fault, determining the type of the faulty node, adding the faulty node to a list of faulty nodes of the corresponding type, and issuing a fourth alarm prompt message.
[0057] Specifically, the nodes of the tape drive logical link include at least a main server, a media server, a tape library, a tape drive and a tape. The types of faulty nodes also include multiple types: main server failure, media server failure, tape library failure, tape drive failure and tape failure. After analyzing the specific faulty node of the stopped tape drive logical link, the faulty node is added to the faulty node list according to the type of the faulty node, laying a data foundation for the classified processing of the faulty nodes, thereby improving the efficiency of fault processing of the tape drive logical link.
[0058] The reason for the tape drive logical link to stop may be caused by a failure of the tape drive. Optionally, in the backup link resetting method provided in an embodiment of the present application, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, judging whether each node of the stopped tape drive logical link has a fault includes: obtaining the tape drive in the stopped tape drive logical link, obtaining the target tape drive, and obtaining all tape drive logical links associated with the target tape drive; when the proportion of the link state of all tape drive logical links associated with the target tape drive in the startup state is lower than a first preset proportion, determining that the target tape drive has a fault.
[0059] Specifically, data is aggregated for the latest inspection record, and the physical tape drive is used as the target. The tape drive logical links are grouped and calculated according to the link status information to obtain the number of tape drive logical links associated with the tape drive, the number of tape drive logical links in the startup state, and the number of tape drive logical links in the failure state. The ratio of the startup state to the tape drive logical links associated with the tape drive is calculated and compared with the first preset ratio.
[0060] For example, the first preset ratio may be 20%. When the startup ratio of the tape drive logical link associated with the tape drive is lower than 20%, it is confirmed that the tape drive is faulty and added to the faulty tape drive list, and added to the queue to be alarmed. After the record rotation of all tape drives is completed, there may be the same tape drive in the queue to be alarmed. The tape drives in the queue to be alarmed are deduplicated and unique values are obtained, and the tape drive status is set to stop in turn, and an alarm is notified, and manual intervention is subsequently performed. When the startup ratio of the tape drive logical link associated with the tape drive is greater than or equal to 20%, it is preliminarily confirmed that the tape drive is not faulty, and the next cycle of cyclic inspection is entered.
[0061] Through this embodiment, whether the tape drive has a fault is determined based on the link status of all tape drive logical links associated with the tape drive, and the method for locating the tape drive fault is simple and efficient.
[0062] The reason for the stop of the tape drive logical link may be caused by a failure of the media server. Optionally, in the backup link resetting method provided in an embodiment of the present application, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, judging whether each node of the stopped tape drive logical link has a fault includes: obtaining the media server in the stopped tape drive logical link, obtaining the target media server, and obtaining all tape drive logical links associated with the target media server; when the proportion of the link state of all tape drive logical links associated with the target media server in the startup state is lower than a second preset proportion, determining that the target media server has a fault.
[0063] Specifically, data is aggregated for the latest inspection record, and the media server is taken as the target. The tape drive logical links are grouped and calculated according to the link status information to obtain the number of tape drive logical links associated with the media server, the number of tape drive logical links in the startup state, and the number of tape drive logical links in the failure state. The ratio of the startup state to the tape drive logical links associated with the media server is calculated and compared with the first preset ratio.
[0064] For example, the second preset ratio can be 20%. When the startup ratio of the tape drive logical link associated with the media server is lower than 20%, it is confirmed that the media server has a fault, and when it is added to the faulty media server list, it is added to the queue to be alarmed. After the record training of all media servers is completed, the media servers in the queue to be alarmed may have the same media server. The media servers in the queue to be alarmed are deduplicated and unique values are obtained. The media server status is set to stop in turn, and an alarm is notified, and manual intervention is subsequently performed. When the startup ratio of the tape drive logical link associated with the media server is greater than or equal to 20%, it is preliminarily confirmed that the media server does not have a fault, and the next cycle of cyclic inspection is entered.
[0065] Through this embodiment, whether the media server has a fault is determined according to the link status of all tape drive logical links associated with the media server, and the method for locating the media server fault is simple and efficient.
[0066] The reason for the stop of the tape drive logical link may be caused by a failure of the tape library. Optionally, in the method for resetting the backup link provided in an embodiment of the present application, when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: obtaining the tape library in the stopped tape drive logical link, obtaining the target tape library, and obtaining all tape drive logical links associated with the target tape library; when the proportion of the link state of all tape drive logical links associated with the target tape library in the startup state is lower than a third preset proportion, determining that a fault exists in the target tape library.
[0067] Specifically, data is aggregated for the latest inspection record, and the tape library is taken as the target. The tape drive logical links are grouped and calculated according to the link status information to obtain the number of tape drive logical links associated with the tape library, the number of tape drive logical links in the startup state, and the number of tape drive logical links in the failure state. The ratio of the startup state to the tape drive logical links associated with the tape library is calculated and compared with the first preset ratio.
[0068] For example, the third preset ratio can be 20%. When the startup ratio of the tape drive logical link associated with the tape library is lower than 20%, it is confirmed that the tape library has a fault, and when it is added to the faulty tape library list, it is added to the queue to be alarmed. After the record rotation of all tape libraries is completed, there may be the same tape library in the queue to be alarmed. The tape library in the queue to be alarmed is deduplicated to obtain a unique value, and the tape library state is set to stop in turn, and an alarm is notified, and manual intervention is subsequently performed. When the startup ratio of the tape drive logical link associated with the tape library is greater than or equal to 20%, it is preliminarily confirmed that the tape library does not have a fault, and the next cycle of cyclic inspection is entered.
[0069] Through this embodiment, whether the tape library has a fault is determined according to the link status of all tape drive logical links associated with the tape library, and the method for locating the tape library fault is simple and efficient.
[0070] It should be noted that the above embodiment analyzes fault data from the dimensions of tape drives, tape libraries, media servers, etc., automatically locates the cause of link failures, and provides an instant alarm notification function so that operation and maintenance personnel can find faults or hidden dangers as soon as possible. At the same time, by monitoring the historical execution status of the tape drive logical link, the recovery and reset function and the alarm notification function are implemented accordingly in combination with the analysis of the abnormal logical link.
[0071] Figure 2 FIG. 1 is a flow chart of an optional method for resetting a backup link according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0072] Regular monitoring of tape drive logical links: Specifically, you can obtain tape drive logical link information through the NBU command line. You can obtain all tape drive logical link information once an hour and store it in the system database. The following information is mainly collected: tape drive logical link name, backup domain, tape drive information, tape library information, backup media server, and link status, which can specifically include start, stop, abnormality, and loss.
[0073] At the same time, the blacklist in the system database is also obtained. It should be noted that some tape drives need maintenance and cannot be serviced. At this time, they need to be set in the blacklist. The relevant list is saved in the system database to implement blacklist management. When analyzing and resetting the tape link, exclude the physical tape drives in the blacklist.
[0074] Furthermore, the current status of the tape drive logical links outside the blacklist is compared with the historical status in turn to locate the fault of the tape drive logical link. Specifically, the system prioritizes the latest records with abnormal or lost status based on the data of the most recent cycle (a list of the most recent logical links, hereinafter referred to as the most recent list, where each link is a record and the latest record is checked), and directly alarms and notifies the system administrator, waiting for subsequent manual intervention to confirm whether there is a specific problem. If the status is started, skip this inspection cycle and do not process it. If the status is stopped, enter the analysis phase.
[0075] First, confirm whether the tape drive is abnormal: gather data from the latest inspection record, perform group calculations based on the tape drive and status information, and obtain the number of physical tape drives, startup status, and failure status. When the startup ratio of the physical tape drive is less than 20%, it is confirmed that the tape drive is faulty, and it is added to the faulty tape drive list and the queue to be alarmed. After all records are trained, the tape drives in the queue to be alarmed are uniquely valued, and the tape drive status is set to stop in turn, and the alarm is notified. Subsequent manual intervention is required. If the recorded tape drive is not in the problem tape drive, the next cycle is entered.
[0076] Secondly, confirm whether the same media server is abnormal: aggregate the data of the latest inspection record, perform group calculation according to the media server and status information, and obtain the media server upper link, the number of startup status, and the number of failed status. When the startup ratio of the logical link of the media server is less than 20%, it is confirmed that the media server has a fault, and it is added to the list of problem media servers and the queue to be alarmed. After all records are trained, the media server in the queue to be alarmed is uniquely valued, and the logical link status of the media server is set to stop in turn, and the alarm is notified, and manual intervention is subsequently carried out. If the media server to which the record belongs is not in the list of problem media servers, enter the next cycle.
[0077] Then, confirm whether the tape library is abnormal: gather data from the latest inspection record, perform group calculations based on the tape library and status information, and obtain the number of links, startup status, and failure status of the tape library. When the startup ratio of the tape library logical link is less than 20%, it is confirmed that the tape library has a fault. Directly notify the alarm, and then manually intervene. If the recorded tape library has no fault, enter the next cycle.
[0078] Furthermore, confirm whether the logical link of the tape drive has reported an error recently: According to the recorded logical link and the records of the system database in the last 24 hours, group and calculate according to the logical link, startup status, and abnormal status. Obtain the number of consecutive stops of each logical link in the last 24 hours. By rotating the latest list and comparing each latest record, when the number of consecutive stops of the logical link in the latest record in 24 hours exceeds 3 times and is less than or equal to 5 times, an alarm will be notified and the record will be added to the list to be reset. When the number exceeds 5 times, an alarm will be notified directly, and manual intervention will be carried out later. When the number is not greater than or equal to 3 times, the record will be added to the list to be reset.
[0079] Finally, check the logical links and reset them: After completing the rotation of the most recent list, reset the logical links in the reset list by automatically calling the NBU API.
[0080] This embodiment monitors the tape logical link through the system loop, collects the status of the tape logical link, the affiliated tape library, the tape drive, and the media backup server, writes it into the database, and analyzes the historical status of each tape logical link in the database. According to whether the tape drive logical link is abnormal or not, it is classified, and the normal tape drive logical link is reset, and the actual fault logical link is alarmed, notifying the system administrator to manually intervene and handle it, and providing a historical fault analysis report, thereby effectively reducing false alarms, and allowing the logical link to provide continuous service and reduce labor consumption.
[0081] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0082] The embodiment of the present application also provides a backup link reset device. It should be noted that the backup link reset device of the embodiment of the present application can be used to execute the backup link reset method provided in the embodiment of the present application. The following introduces the backup link reset device provided in the embodiment of the present application.
[0083] Figure 3 Schematic diagram of a device for resetting a backup link according to an embodiment of the present application. Figure 3 As shown, the device includes: a monitoring unit 301, a first judgment unit 302 and a reset unit 303.
[0084] Specifically, the monitoring unit 301 is used to monitor all tape drive logical links according to the first time period and obtain the attribute information of each tape drive logical link, wherein the tape drive logical link includes at least the following nodes: a master server, a media server, a tape library, a tape drive and a tape, and the attribute information includes at least the link status and the identification of each node.
[0085] The first judgment unit 302 is used to judge whether there are faults in each node of the stopped tape drive logical link when the attribute information indicates that the link state of the tape drive logical link is a stopped state, and to add the stopped tape drive logical link to the faulty link list when there is a fault in any node of the stopped tape drive logical link.
[0086] The reset unit 303 is used to obtain the number of consecutive stops of each tape drive logical link according to a second time period, and obtain the target tape drive logical link outside the faulty link list from all tape drive logical links, and reset the target tape drive logical link whose number of consecutive stops meets the preset conditions, wherein the second time period is greater than the first time period.
[0087] The backup link resetting device provided in the embodiment of the present application is used to monitor all tape drive logical links according to a first time period through a monitoring unit 301, and obtain attribute information of each tape drive logical link, wherein the tape drive logical link includes at least the following nodes: a master server, a media server, a tape library, a tape drive, and a tape, and the attribute information includes at least a link state and an identifier of each node; a first judgment unit 302 is used to judge whether there is a fault in each node of the stopped tape drive logical link when the attribute information indicates that the link state of the tape drive logical link is a stopped state, and to judge whether there is a fault in any node of the stopped tape drive logical link. In the event of a failure, the stopped tape drive logical link is added to the fault link list; the reset unit 303 is used to obtain the number of consecutive stops of each tape drive logical link according to the second time period, and obtain the target tape drive logical link outside the fault link list from all tape drive logical links, and reset the target tape drive logical link whose consecutive stop times meet the preset conditions, wherein the second time period is greater than the first time period, which solves the problem in the related technology that in the process of data backup, when an abnormality occurs in the tape drive logical link, the specific cause of the failure cannot be located and the tape drive logical link cannot be reset in time, thereby achieving the effect of D.
[0088] Optionally, in the reset device of the backup link provided in the embodiment of the present application, the first judgment unit 302 includes: a first acquisition module, used to acquire the tape drive in the stopped tape drive logical link, obtain the target tape drive, and acquire all tape drive logical links associated with the target tape drive; a first determination module, used to determine that there is a fault in the target tape drive when the proportion of link status of all tape drive logical links associated with the target tape drive in the startup state is lower than a first preset proportion.
[0089] Optionally, in the backup link resetting device provided in the embodiment of the present application, the first judgment unit 302 includes: a second acquisition module, used to acquire the media server in the stopped tape drive logical link, obtain the target media server, and acquire all tape drive logical links associated with the target media server; a second determination module, used to determine that there is a fault in the target media server when the proportion of link status of all tape drive logical links associated with the target media server in the startup state is lower than a second preset proportion.
[0090] Optionally, in the reset device of the backup link provided in the embodiment of the present application, the first judgment unit 302 includes: a third acquisition module, used to acquire the tape library in the stopped tape drive logical link, obtain the target tape library, and acquire all tape drive logical links associated with the target tape library; a third determination module, used to determine that there is a fault in the target tape library when the proportion of link status of all tape drive logical links associated with the target tape library in the startup state is lower than a third preset proportion.
[0091] Optionally, in the reset device of the backup link provided in the embodiment of the present application, the reset unit 303 includes: a first adding module, used to add the target tape drive logical link to the list to be reset when the number of consecutive stops of the target tape drive logical link is less than a first preset number; a second adding module, used to issue a first alarm prompt message and add the target tape drive logical link to the list to be reset when the number of consecutive stops of the target tape drive logical link is greater than or equal to the first preset number and less than or equal to the second preset number; a reset module, used to reset the tape drive logical link in the list to be reset.
[0092] Optionally, in the backup link reset device provided in the embodiment of the present application, the device also includes: a first alarm unit, which is used to obtain the number of consecutive stops of each tape drive logical link according to a second time period, and after obtaining the target tape drive logical link outside the faulty link list from all tape drive logical links, when the number of consecutive stops of the target tape drive logical link is greater than a second preset number, issue a second alarm prompt message.
[0093] Optionally, in the reset device for the backup link provided in the embodiment of the present application, the device also includes: a second judgment unit, used to judge whether the tape drive in the stopped tape drive logical link is in the blacklist before judging whether the various nodes of the stopped tape drive logical link are faulty, wherein the blacklist stores tape drives in the maintenance stage; a first execution unit, used to execute the step of judging whether the various nodes of the stopped tape drive logical link are faulty when the tape drive in the stopped tape drive logical link is not in the blacklist.
[0094] Optionally, in the backup link reset device provided in the embodiment of the present application, the device also includes: an acquisition unit, which is used to acquire the link status from the attribute information of each tape drive logical link before judging whether each node of the stopped tape drive logical link has a fault when the attribute information indicates that the link status of the tape drive logical link is in a stopped state; a second alarm unit, which is used to issue a third alarm prompt information when the link status is in an abnormal state or a lost state; and a second execution unit, which is used to execute the step of judging whether each node of the stopped tape drive logical link has a fault when the attribute information indicates that the link status of the tape drive logical link is in a stopped state.
[0095] Optionally, in the reset device of the backup link provided in the embodiment of the present application, the device also includes: a third judgment unit, which is used to judge whether there are faults in each node of the stopped tape drive logical link when the attribute information indicates that the link state of the tape drive logical link is a stopped state. If there is a fault in any node of the stopped tape drive logical link, the unit determines the type of the faulty node, adds the faulty node to the list of faulty nodes of the corresponding type, and issues a fourth alarm prompt message.
[0096] The above-mentioned backup link resetting device includes a processor and a memory. The above-mentioned monitoring unit 301, the first judgment unit 302 and the resetting unit 303 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0097] The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters are adjusted to solve the problem in the related technology that in the process of data backup, when the tape drive logical link is abnormal, the specific cause of the fault cannot be located, and the tape drive logical link cannot be reset in time.
[0098] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0099] An embodiment of the present application further provides a computer storage medium, the computer storage medium including a stored program, wherein when the program is executed, the device where the computer storage medium is located is controlled to execute a method for resetting a backup link.
[0100] The present application also provides an electronic device, such as Figure 4 As shown, the electronic device 401 includes a processor and a memory; the memory stores computer-readable instructions, and the processor is used to run the computer-readable instructions, wherein the computer-readable instructions execute a method for resetting a backup link when they are run. The electronic device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0101] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0102] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0103] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0107] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0109] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for resetting a backup link, characterized in that: include: Monitoring all tape drive logical links according to a first time period, and acquiring attribute information of each tape drive logical link, wherein the tape drive logical link at least includes the following nodes: a master server, a media server, a tape library, a tape drive, and a tape, and the attribute information at least includes a link state and an identifier of each node; In the case where the attribute information indicates that the link state of the tape drive logical link is a stopped state, determining whether each node of the stopped tape drive logical link has a fault, and in the case where any node of the stopped tape drive logical link has a fault, adding the stopped tape drive logical link to a faulty link list; The number of consecutive stops of each tape drive logical link is obtained according to a second time period, and the target tape drive logical links outside the faulty link list are obtained from all the tape drive logical links, and the target tape drive logical links whose consecutive stops meet a preset condition are reset, wherein the second time period is greater than the first time period.
2. The method according to claim 1, characterized in that: In the case where the attribute information indicates that the link state of the tape drive logical link is a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: Acquire the tape drive in the stopped tape drive logical link, obtain the target tape drive, and acquire all tape drive logical links associated with the target tape drive; When the proportion of the link states of all tape drive logical links associated with the target tape drive being in the startup state is lower than a first preset proportion, it is determined that the target tape drive has a fault.
3. The method according to claim 1, characterized in that In the case where the attribute information indicates that the link state of the tape drive logical link is a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: Acquire the media server in the stopped tape drive logical link, obtain the target media server, and acquire all tape drive logical links associated with the target media server; When the proportion of the link states of all tape drive logical links associated with the target media server being in the startup state is lower than a second preset proportion, it is determined that the target media server has a fault.
4. The method according to claim 1, characterized in that: In the case where the attribute information indicates that the link state of the tape drive logical link is a stopped state, determining whether each node of the stopped tape drive logical link has a fault includes: Acquire the tape library in the stopped tape drive logical link, obtain the target tape library, and acquire all tape drive logical links associated with the target tape library; When the proportion of the link states of all tape drive logical links associated with the target tape library being in the startup state is lower than a third preset proportion, it is determined that a fault exists in the target tape library.
5. The method according to claim 1, characterized in that Resetting the target tape drive logical link whose number of consecutive stops meets a preset condition comprises: When the number of consecutive stops of the target tape drive logical link is less than a first preset number, adding the target tape drive logical link to a to-be-reset list; When the number of consecutive stops of the target tape drive logical link is greater than or equal to the first preset number and less than or equal to the second preset number, a first alarm prompt message is issued, and the target tape drive logical link is added to a list to be reset; Reset the tape drive logical links in the to-be-reset list.
6. The method according to claim 5, characterized in that After obtaining the number of consecutive stop times of each of the tape drive logical links according to the second time period and obtaining the target tape drive logical links outside the fault link list from all the tape drive logical links, the method further includes: When the number of consecutive stoppages of the target tape drive logical link is greater than the second preset number, a second alarm prompt message is issued.
7. The method according to claim 1, characterized in that Before determining whether each node of the stopped tape drive logical link has a fault, the method further comprises: Determine whether the tape drive in the stopped tape drive logical link is in a blacklist, wherein the blacklist stores tape drives in a maintenance phase; In the case that the tape drive in the stopped tape drive logical link is not in the blacklist, the step of determining whether each node of the stopped tape drive logical link has a fault is performed.
8. The method according to claim 1, characterized in that In the case where the attribute information indicates that the link state of the tape drive logical link is a stopped state, before determining whether each node of the stopped tape drive logical link has a fault, the method further includes: Acquire the link status from the attribute information of each of the tape drive logical links; When the link status is abnormal or lost, issuing a third alarm prompt message; When the link state is the stopped state, the step of determining whether each node of the stopped tape drive logical link has a fault is performed when the attribute information indicates that the link state of the tape drive logical link is the stopped state.
9. The method according to claim 1, characterized in that: In the case where the attribute information indicates that the link state of the tape drive logical link is a stopped state, after determining whether each node of the stopped tape drive logical link has a fault, the method further includes: In the case that any node of the stopped tape drive logical link is faulty, the type of the faulty node is determined, the faulty node is added to a list of faulty nodes of the corresponding type, and a fourth alarm prompt message is issued.
10. A device for resetting a backup link, characterized in that: include: A monitoring unit, configured to monitor all tape drive logical links according to a first time period, and obtain attribute information of each tape drive logical link, wherein the tape drive logical link includes at least the following nodes: a master server, a media server, a tape library, a tape drive, and a tape, and the attribute information includes at least a link state and an identifier of each node; A first judgment unit is used for judging whether each node of the stopped tape drive logical link is faulty when the attribute information indicates that the link state of the tape drive logical link is in a stopped state, and adding the stopped tape drive logical link to a faulty link list when any node of the stopped tape drive logical link is faulty; A reset unit is used to obtain the number of consecutive stops of each tape drive logical link according to a second time period, and obtain the target tape drive logical link outside the faulty link list from all the tape drive logical links, and reset the target tape drive logical link whose number of consecutive stops meets a preset condition, wherein the second time period is greater than the first time period.
11. A computer storage medium, characterized in that: The computer storage medium includes a stored program, wherein when the program is executed, the device where the computer storage medium is located is controlled to execute the backup link resetting method according to any one of claims 1 to 9.
12. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, execute the backup link resetting method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Tape library data backup and filing method
CN103605587A
Service fault management method and device, electronic equipment and storage medium
CN113485862A