Method, device and equipment for preventing mistaken deletion of storage logical volume and medium

By receiving anti-error deletion function in the storage system, the logical volume status is realized, and the logical volume is intelligent and automated to prevent false deletion, solving the problem of false deletion of logical volumes and improving the security of data centers and cloud storage environments .

CN119002823AActive Publication Date: 2024-11-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411216969.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-22
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

In data centers and cloud storage environments, the misdeletion of logical volumes is a common operational error, resulting in loss of important data or system failures. Basic security measures in the existing technology are difficult to effectively prevent misdeletion.

Method used

Provide a method to store logical volumes to prevent error deletion. By receiving anti-error deletion function enable commands, the preset protection time is extracted, and the logical volume status is monitored. If the logical volume is within the protection time, the deletion operation is prohibited and the prompt information is returned; If it is not in the protection time, deletion is allowed. Combined with input and output logs and access records, the active status is monitored in real time, and the protection time is automatically extended to prevent accidental deletion.

Benefits of technology

It realizes an intelligent and automated anti-error deletion method, effectively preventing logical volumes from being accidentally deleted within a specified time, avoiding data loss and system failure, and improving the management security of the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002823A_ABST
    Figure CN119002823A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data storage, and discloses a storage logical volume mistaken deletion prevention method and device, equipment and a medium, and the method comprises the following steps: receiving a mistaken deletion prevention function starting instruction; in response to the mistaken deletion prevention function starting instruction, extracting preset protection time; the state of the logical volume is monitored, and when it is monitored that the logical volume is in the active state, whether the logical volume is in the protection time or not is judged; if the logical volume is within the protection time, the operation of deleting the logical volume is forbidden, and corresponding prompt information is returned; and if the logical volume is not in the protection time, allowing the operation of deleting the logical volume. In this way, an intelligent and automatic mistaken deletion prevention mode is achieved, the logical volume can be effectively prevented from being mistakenly deleted within the specified time, then data loss and system faults caused by mistaken deletion operation are avoided, possible mistaken deletion operation is found and processed in time, and the safety of logical volume management in a storage system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a method, device, equipment and medium for preventing accidental deletion of a storage logical volume. Background Art

[0002] In data centers and cloud storage environments, logical volumes are the basic units of data storage, and their management and protection are crucial. Accidentally deleting logical volumes is a common operational error that may lead to loss or damage of important data, causing immeasurable losses to business operations.

[0003] In the relevant technical solutions, there are some basic security measures in the storage system, such as permission control and confirmation prompts, but in actual operation, logical volumes may still be accidentally deleted due to human errors, software defects or malicious attacks.

[0004] Therefore, how to develop a more intelligent and automated method for preventing accidental deletion of storage logical volumes is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and medium for preventing accidental deletion of storage logical volumes, which can realize an intelligent and automated method for preventing accidental deletion, effectively prevent logical volumes from being accidentally deleted within a specified time, avoid data loss and system failure caused by accidental deletion operations, and improve management security.

[0006] In order to solve the above technical problems, the present invention provides a method for preventing accidental deletion of a storage logical volume, the method comprising:

[0007] Receive the instruction to enable the function of preventing accidental deletion;

[0008] In response to the instruction to start the anti-accidental deletion function, extracting a preset protection time;

[0009] Monitoring the state of the logical volume, and when the logical volume is monitored to be in an active state, determining whether the logical volume is within the protection time;

[0010] If the logical volume is within the protection time, the operation of deleting the logical volume is prohibited, and a corresponding prompt message is returned;

[0011] If the logical volume is not within the protection time, the operation of deleting the logical volume is allowed.

[0012] In a first aspect, in the storage logical volume accidental deletion prevention method provided by the present invention, monitoring the state of the logical volume includes:

[0013] Read the input and output logs and access record information of the storage device;

[0014] According to the read input and output logs and access record information, real-time or periodic monitoring of the state of the logical volume;

[0015] When it is monitored that the logical volume has a read / write operation or data change, the logical volume is marked as active.

[0016] On the other hand, in the above storage logical volume anti-accidental deletion method provided by the present invention, when the protection time is a set time period, a label of the protection time is added to the logical volume, and the start time and end time of the set time period are recorded;

[0017] When the protection time is a set time length, the timing starts when the logical volume enters an active state, and during the set time length, the operation of deleting the logical volume is prohibited.

[0018] On the other hand, in the above storage logical volume accidental deletion prevention method provided by the present invention, if the logical volume is not within the protection time, the operation of allowing the logical volume to be deleted includes:

[0019] When the protection time is a set time period, if the logical volume is not within the protection time, determining that the logical volume is after the end time of the set time period;

[0020] At this time, if the logical volume is still in an active state, determining whether the active time of the logical volume in a unit time exceeds a set time threshold;

[0021] If the active time of the logical volume in a unit time exceeds the set time threshold, the end time of the set time period is automatically extended;

[0022] If the active time of the logical volume within a unit time does not exceed the set time threshold, the operation of deleting the logical volume is allowed;

[0023] or, determining whether the input and output traffic of the logical volume in a unit time exceeds a set traffic threshold;

[0024] If the input and output traffic of the logical volume within a unit time exceeds the set traffic threshold, the end time of the set time period is automatically extended;

[0025] If the input and output traffic of the logical volume within a unit time does not exceed the set traffic threshold, the operation of deleting the logical volume is allowed;

[0026] Correspondingly, when the protection time is a set time length, upon receiving a deletion operation request, it is determined whether the logical volume is active for the set time length before the current moment;

[0027] If there is an active state, the operation of deleting the logical volume is prohibited, and a corresponding prompt message is returned;

[0028] If there is no active state, the operation of deleting the logical volume is allowed.

[0029] On the other hand, in the storage logical volume accidental deletion prevention method provided by the present invention, judging whether the logical volume is within the protection time includes:

[0030] Traversing the active state of the logical volume, reading and counting the latest access time of the logical volume;

[0031] Determine whether the latest access time exceeds the protection time;

[0032] If yes, it is determined that the logical volume is not within the protection time;

[0033] If not, it is determined that the logical volume is within the protection time.

[0034] On the other hand, in the above storage logical volume accidental deletion prevention method provided by the present invention, while prohibiting the operation of deleting the logical volume, it also includes:

[0035] The logical volume is prohibited from releasing the host mapping relationship, the active host is prohibited from being deleted, the active host is prohibited from deleting the mapped port, and the active host is prohibited from deleting the input and output group to which it belongs.

[0036] On the other hand, in the storage logical volume accidental deletion prevention method provided by the present invention, receiving an instruction to enable the accidental deletion prevention function includes:

[0037] Receive an instruction to enable the anti-accidental deletion function from a visual management interface or a command line interface;

[0038] The method further comprises:

[0039] Receive an instruction to turn off the anti-accidental deletion function from a visual management interface or a command line interface;

[0040] The step of monitoring the status of the logical volume is stopped.

[0041] In order to solve the above technical problems, the present invention also provides a storage logical volume anti-accidental deletion device, the device comprising:

[0042] An instruction receiving module, used for receiving an instruction to enable the function of preventing accidental deletion;

[0043] A protection time extraction module, used for extracting a preset protection time in response to the anti-accidental deletion function activation instruction;

[0044] Volume status monitoring module, used to monitor the status of logical volumes;

[0045] A time judgment module, used for judging whether the logical volume is within the protection time when the logical volume is monitored to be in an active state;

[0046] The deletion operation restriction module is used to prohibit the operation of deleting the logical volume if the logical volume is within the protection time and return corresponding prompt information; if the logical volume is not within the protection time, the operation of deleting the logical volume is allowed.

[0047] In order to solve the above technical problems, the present invention further provides a storage logical volume accidental deletion prevention device, the device comprising:

[0048] Memory for storing computer programs;

[0049] The processor is used to implement the steps of the above-mentioned storage logical volume accidental deletion prevention method when executing the computer program.

[0050] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned storage logical volume anti-accidental deletion method are implemented.

[0051] It can be seen from the above technical scheme that the present invention provides a method for preventing accidental deletion of a storage logical volume, the method comprising: receiving an instruction to enable the anti-accidental deletion function; extracting a pre-set protection time in response to the instruction to enable the anti-accidental deletion function; monitoring the state of the logical volume, and when monitoring that the logical volume is in an active state, determining whether the logical volume is within the protection time; if the logical volume is within the protection time, prohibiting the operation of deleting the logical volume, and returning a corresponding prompt message; if the logical volume is not within the protection time, allowing the operation of deleting the logical volume.

[0052] The beneficial effect of the present invention lies in that the above-mentioned storage logical volume anti-accidental deletion method provided by the present invention, after receiving the anti-accidental deletion function activation instruction, turns on the anti-accidental deletion function, extracts the pre-set protection time, and prohibits deleting the logical volume within the protection time by monitoring the active state of the logical volume, and returns corresponding prompt information, thereby realizing an intelligent and automatic anti-accidental deletion method, which can effectively prevent the logical volume from being accidentally deleted within the specified time, thereby avoiding data loss and system failure caused by accidental deletion operations, timely discovering and processing possible accidental deletion operations, and improving the security of logical volume management in the storage system.

[0053] In addition, the present invention also provides a corresponding storage logical volume anti-accidental deletion device, a storage logical volume anti-accidental deletion device and a computer-readable storage medium for the storage logical volume anti-accidental deletion method, which have the same or corresponding technical features as the above-mentioned storage logical volume anti-accidental deletion method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A flow chart of a method for preventing accidental deletion of a storage logical volume provided by an embodiment of the present invention;

[0056] Figure 2 A schematic diagram of the structure of a storage logical volume anti-accidental deletion device provided by an embodiment of the present invention;

[0057] Figure 3 A schematic diagram of the structure of a storage logical volume accidental deletion prevention device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0058] 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.

[0059] The core of the present invention is to provide a method, device, equipment and medium for preventing accidental deletion of storage logical volumes, so as to solve the technical problem of accidental deletion of logical volumes.

[0060] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 1 A flow chart of a method for preventing accidental deletion of a storage logical volume provided by an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0061] S101, receiving an instruction to enable an anti-accidental deletion function.

[0062] S102: In response to an instruction to enable the anti-accidental-deletion function, extract a preset protection time.

[0063] It should be noted that the anti-accidental deletion function activation instruction of the present invention can be directed to different types of logical volumes. Different types of logical volumes may include ordinary volumes, compressed volumes, thin volumes, active-active volumes, local replication volumes, remote replication volumes, etc. The anti-accidental deletion function activation instruction may include the type of logical volume and a pre-set protection time. Different types of logical volumes have different anti-accidental deletion policies, which may determine whether the anti-accidental deletion function of the type of logical volume is activated, and configure the corresponding protection time. In this way, different types of volumes can be effectively prevented from being deleted by mistake, and flexibility is provided.

[0064] The above protection time can be pre-set by the administrator or user, and the protection time can be a fixed time length, such as 24 hours, 48 ​​hours, etc., or a fixed time period, such as from 8:00 to 20:00 on a certain day, from 0:00 on the 1st to 24:00 on the 5th, etc. In this way, the protection time can be configured more finely according to the actual situation, adapting to various application scenarios and having a wide range of applications.

[0065] S103: Monitor the status of the logical volume.

[0066] In implementation, the present invention can integrate the volume status monitoring module into the storage management system, and the system uses the volume status monitoring module to monitor the status of the logical volume, including checking whether the logical volume is in an active state. The active state of the logical volume refers to the state in which the logical volume has been activated and can be accessed, allowing the system administrator to operate the logical volume as needed, which is the basis for realizing flexible management and dynamic adjustment of storage resources.

[0067] S104: When the logical volume is monitored to be in an active state, determine whether the logical volume is within the protection time.

[0068] If the logical volume is within the protection time, execute step S105; if the logical volume is not within the protection time, execute step S106.

[0069] S105: prohibiting the operation of deleting the logical volume, and returning corresponding prompt information.

[0070] In implementation, when an active logical volume is within the protection time, for example, the active logical volume is within a set time length, or within a set time period, the deletion operation can be prohibited and the corresponding prompt information will be returned. This effectively prevents the logical volume from being accidentally deleted within the protection time, and reminds the system administrator that the logical volume is at risk of being deleted externally during the protection time, so that the administrator can promptly discover and handle possible misoperations, further improving the security of data storage.

[0071] S106: Allow the operation of deleting the logical volume.

[0072] In implementation, when the active logical volume is not within the protection time, for example, the active logical volume has exceeded a set time length, or is not within a set time period, it may be allowed to be deleted.

[0073] In the above-mentioned storage logical volume anti-accidental deletion method provided by the embodiment of the present invention, after receiving the anti-accidental deletion function activation instruction, the anti-accidental deletion function is activated, the pre-set protection time is extracted, and the deletion of the logical volume is prohibited within the protection time by monitoring the active state of the logical volume, and the corresponding prompt information is returned. In this way, an intelligent and automatic anti-accidental deletion method is implemented, which can effectively prevent the logical volume from being accidentally deleted within the specified time, thereby avoiding data loss and system failure caused by accidental deletion operations, timely discovering and processing possible accidental deletion operations, and improving the security of logical volume management in the storage system.

[0074] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-accidental deletion method provided in an embodiment of the present invention, step S103 monitors the status of the logical volume, which may specifically include: reading the input and output logs and access record information of the storage device; monitoring the status of the logical volume in real time or periodically based on the read input and output logs and access record information; and marking the logical volume as active when it is monitored that there are read and write operations or data changes on the logical volume.

[0075] In implementation, the present invention can read the input / output (IO) log and access record information of the storage device in real time, and through the input / output log and access record information, the state of the logical volume can be monitored in real time or periodically, including the read and write operations, access frequency, data changes, etc. of the logical volume. When the logical volume is monitored to have read and write operations or data changes, the logical volume can be marked as active.

[0076] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-accidental deletion method provided in an embodiment of the present invention, when the protection time is a set time period, a protection time label is added to the logical volume, and the start time and end time of the set time period are recorded; when the protection time is a set time length, when the logical volume enters an active state, the timing starts, and during the set time length, the operation of deleting the logical volume is prohibited.

[0077] In implementation, the set time period has a start time and an end time. When the protection time is a set time period, it means that the protection time has a start time and an end time. The present invention can add a protection time label to the logical volume according to the management setting, so as to accurately determine whether the active logical volume is within the protection time. As long as the active logical volume is within the set time period, the operation of deleting the logical volume is prohibited. When the protection time is a set time length, the timing of the set time length can be started when the logical volume enters the active state. After the set time length, such as 24 hours or 48 hours, the operation of deleting the logical volume is prohibited.

[0078] Furthermore, in the specific implementation, in the above storage logical volume accidental deletion prevention method provided by the embodiment of the present invention, if the logical volume is not within the protection time, the operation of allowing the logical volume to be deleted in step S106 may specifically include:

[0079] When the protection time is a set time period, if the logical volume is not within the protection time, determine the time after the end time of the set time period when the logical volume is located; at this time, if the logical volume is still in an active state, determine whether the active time of the logical volume per unit time exceeds the set time threshold; if the active time of the logical volume per unit time exceeds the set time threshold, automatically extend the end time of the set time period; if the active time of the logical volume per unit time does not exceed the set time threshold, allow the operation of deleting the logical volume; or, determine whether the input and output traffic of the logical volume per unit time exceeds the set traffic threshold; if the input and output traffic of the logical volume per unit time exceeds the set traffic threshold, automatically extend the end time of the set time period; if the input and output traffic of the logical volume per unit time does not exceed the set traffic threshold, allow the operation of deleting the logical volume.

[0080] Correspondingly, when the protection time is a set time length, when a deletion operation request is received, it is determined whether the logical volume has an active state for the set time length before the current moment; if there is an active state, the operation of deleting the logical volume is prohibited, and a corresponding prompt message is returned; if there is no active state, the operation of deleting the logical volume is allowed.

[0081] In implementation, when the protection time is a set time period, the threshold judgment method can be selected. When the threshold judgment is selected, it can be judged whether the volume activity level within a unit time reaches the threshold, such as the volume activity time within a unit time, the volume input and output traffic within a unit time (that is, the access traffic of the host end to the logical volume in the storage system), etc. If the set threshold is reached (if the default threshold in the program is not set), you can choose to automatically extend the end time. This way of automatically adjusting the protection time makes the anti-accidental deletion method more flexible and convenient.

[0082] When the protection time is a set time length, for example, the protection time is 12 hours, the protection time starts to be calculated when the logical volume enters the active state. After 12 hours, the logical volume is not in the protection time, and the operation of deleting the logical volume is allowed regardless of whether it is in the active state. However, if a deletion operation request is received, the present invention can only consider whether there is an active state within 12 hours before executing the volume deletion operation. If it is active, the deletion operation is not allowed, otherwise the deletion operation is allowed.

[0083] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-accidental deletion method provided in an embodiment of the present invention, step S104 determines whether the logical volume is within the protection time, which may specifically include: traversing the active state of the logical volume, reading and counting the latest access time of the logical volume; determining whether the latest access time exceeds the protection time; if so, determining that the logical volume is not within the protection time; if not, determining that the logical volume is within the protection time.

[0084] In implementation, after the anti-accidental deletion function is turned on, the storage system can automatically read and count the latest access time of the logical volume from the background, and save the data. According to the comparison result of the latest access time and the protection time, it is determined whether the logical volume is in the protection time, which can further ensure the accuracy of accidental deletion. The latest access time of the logical volume counted by the present invention can include the latest access time of the specified volume, the latest access time of the host mapped volume, the latest access time of the mapped volume in the input and output group, the latest access time of the mapped volume in the volume group, and the latest access time of the mapped volume in the host group.

[0085] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-accidental deletion method provided in an embodiment of the present invention, while prohibiting the operation of deleting the logical volume, it can also include: prohibiting the logical volume from releasing the host mapping relationship, prohibiting the deletion of active hosts, prohibiting active hosts from deleting mapped ports, and prohibiting active hosts from deleting their belonging input and output groups.

[0086] In implementation, in addition to providing deletion protection for protected logical volumes, the present invention can also provide deletion protection for the storage-related modules involved, including preventing active volumes from being released from host mapping relationships, preventing active hosts from being accidentally deleted, preventing active hosts from deleting mapped ports, preventing active hosts from deleting their assigned input and output groups, and preventing related host combined volume groups from being accidentally deleted.

[0087] Furthermore, in a specific implementation, in the storage logical volume anti-accidental deletion method provided in an embodiment of the present invention, receiving an anti-accidental deletion function activation instruction may specifically include: receiving an anti-accidental deletion function activation instruction of a visual management interface or a command line interface (CLI).

[0088] Similarly, the method may also include: receiving an instruction to turn off the error-free deletion prevention function from a visual management interface or a command line interface; and stopping monitoring the status of the logical volume.

[0089] In implementation, in order to facilitate administrators to set and view the active status, protection time and other information of the logical volume, the system provides a visual management interface or command line interface. Administrators can easily set the protection time for the logical volume, view the active status of the logical volume, turn on or off the volume anti-accidental deletion function, etc. through the management interface or command line interface, and achieve personalized customization. They can set global configuration or customized configuration. The code logic level is implemented through environment variables, which improves management efficiency and reduces the difficulty and complexity of operation. The command line interface allows users to input the anti-accidental deletion function on command or the anti-accidental deletion function off command through the keyboard, and the computer executes the command after receiving it.

[0090] In the above embodiments, the storage logical volume anti-accidental deletion method is described in detail, and the present invention also provides a storage logical volume anti-accidental deletion device and a storage logical volume anti-accidental deletion device corresponding to the embodiments. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0091] Figure 2 The structure diagram of the storage logical volume anti-accidental deletion device provided by the embodiment of the present invention is as follows. This embodiment is based on the perspective of functional modules, such as Figure 2 As shown, the device comprises:

[0092] An instruction receiving module 10 is used to receive an instruction to enable the anti-accidental deletion function;

[0093] A protection time extraction module 11, configured to extract a preset protection time in response to an instruction to enable the anti-accidental deletion function;

[0094] The volume status monitoring module 12 is used to monitor the status of the logical volume;

[0095] The time judgment module 13 is used to judge whether the logical volume is within the protection time when the logical volume is monitored to be in the active state;

[0096] The deletion operation restriction module 14 is used to prohibit the operation of deleting the logical volume if the logical volume is within the protection time and return corresponding prompt information; if the logical volume is not within the protection time, the operation of deleting the logical volume is allowed.

[0097] In the above-mentioned storage logical volume anti-accidental deletion device provided in the embodiment of the present invention, the above-mentioned five modules can interact with each other, and after receiving the anti-accidental deletion function activation instruction, the anti-accidental deletion function can be activated, and the pre-set protection time can be extracted. By monitoring the active state of the logical volume, the deletion of the logical volume is prohibited within the protection time, and the corresponding prompt information is returned. In this way, an intelligent and automatic anti-accidental deletion method is implemented, which can effectively prevent the logical volume from being accidentally deleted within the specified time, thereby avoiding data loss and system failure caused by accidental deletion operations, timely discovering and processing possible accidental deletion operations, and improving the security of logical volume management in the storage system.

[0098] Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part refer to the description of the embodiments of the method part, and are not repeated here. And it has the same beneficial effects as the above-mentioned storage logical volume accidental deletion prevention method.

[0099] Furthermore, in a specific implementation, in the storage logical volume anti-accidental deletion device provided in an embodiment of the present invention, the instruction receiving module 10 can be specifically used to receive an anti-accidental deletion function activation instruction in a visual management interface or a command line interface.

[0100] Correspondingly, the instruction receiving module 10 can also be used to receive the instruction to turn off the anti-accidental deletion function in the visual management interface or command line interface. After the instruction receiving module 10 receives the instruction to turn off the anti-accidental deletion function, the volume status monitoring module 12 can stop monitoring the status of the logical volume.

[0101] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-erroneous deletion device provided in an embodiment of the present invention, the volume status monitoring module 12 can be specifically used to read the input and output logs and access record information of the storage device; based on the read input and output logs and access record information, the status of the logical volume is monitored in real time or periodically; when it is monitored that the logical volume has read and written operations or data changes, the logical volume is marked as active.

[0102] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-accidental deletion device provided in an embodiment of the present invention, the protection time can be a set time period or a set time length; when the protection time is a set time period, a protection time label is added to the logical volume, and the start time and end time of the set time period are recorded; when the protection time is a set time length, the timing starts when the logical volume enters an active state, and the operation of deleting the logical volume is prohibited during the set time length.

[0103] Furthermore, in a specific implementation, in the above-mentioned storage logical volume anti-accidental deletion device provided in an embodiment of the present invention, the time judgment module 13 can be specifically used to traverse the active state of the logical volume, read and count the latest access time of the logical volume; judge whether the latest access time exceeds the protection time; if so, judge that the logical volume is not within the protection time; if not, judge that the logical volume is within the protection time.

[0104] Furthermore, in a specific implementation, in the storage logical volume accidental deletion prevention device provided in the embodiment of the present invention, the deletion operation restriction module 14 may specifically include:

[0105] The first restriction unit is used for, when the protection time is a set time period, if the logical volume is not within the protection time, determining the time after the end time of the set time period when the logical volume is; at this time, if the logical volume is still in an active state, determining whether the active time of the logical volume in a unit time exceeds a set time threshold; if the active time of the logical volume in a unit time exceeds the set time threshold, automatically extending the end time of the set time period; if the active time of the logical volume in a unit time does not exceed the set time threshold, allowing the operation of deleting the logical volume; or, determining whether the input and output traffic of the logical volume in a unit time exceeds a set traffic threshold; if the input and output traffic of the logical volume in a unit time exceeds the set traffic threshold, automatically extending the end time of the set time period; if the input and output traffic of the logical volume in a unit time does not exceed the set traffic threshold, allowing the operation of deleting the logical volume.

[0106] The second restriction unit is used to determine whether the logical volume has been in an active state for a set time length before the current moment upon receiving a deletion operation request when the protection time is a set time length; if so, the operation of deleting the logical volume is prohibited and a corresponding prompt message is returned; if not, the operation of deleting the logical volume is allowed.

[0107] Furthermore, in a specific implementation, in the storage logical volume accidental deletion prevention device provided in the embodiment of the present invention, the deletion operation restriction module 14 may further include:

[0108] The third restriction unit is used to prohibit the logical volume from releasing the host mapping relationship, prohibit deleting the active host, prohibit the active host from deleting the mapped port, and prohibit the active host from deleting the input and output group to which it belongs.

[0109] Figure 3 The schematic diagram of the structure of the storage logical volume anti-accidental deletion device provided by the embodiment of the present invention. This embodiment is based on the hardware perspective, such as Figure 3 As shown in the figure, the storage logical volume accidental deletion protection device includes:

[0110] A memory 20, used for storing computer programs;

[0111] The processor 21 is used to implement the steps of the storage logical volume accidental deletion prevention method mentioned in the above embodiment when executing the computer program.

[0112] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0113] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the storage logical volume anti-accidental deletion method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the data involved in the above-mentioned storage logical volume anti-accidental deletion method, etc.

[0114] In some embodiments, the storage logical volume accidental deletion prevention device may further include a display screen 22, an input and output interface 23, a communication interface 24, a power supply 25, and a communication bus 26. Those skilled in the art will appreciate that Figure 3The structure shown in the figure does not constitute a limitation on the storage logic volume anti-accidental deletion device, and may include more or fewer components than shown in the figure. The storage logic volume anti-accidental deletion device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the storage logic volume anti-accidental deletion method mentioned above, and the effect is the same as above.

[0115] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0116] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code. The computer-readable storage medium provided by the present invention can implement the above-mentioned storage logical volume anti-accidental deletion method, and the effect is the same as above.

[0117] Finally, the present invention also provides an embodiment corresponding to a computer program product. The computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps described in the above-mentioned storage logical volume anti-accidental deletion method embodiment are implemented. The computer program product provided by the present invention can implement the above-mentioned storage logical volume anti-accidental deletion method, and the effect is the same as above.

[0118] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0119] The above is a detailed introduction to the storage logical volume anti-accidental deletion method, device, equipment and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A method for preventing accidental deletion of a storage logical volume, characterized in that: The method comprises: Receive the instruction to enable the function of preventing accidental deletion; In response to the instruction to start the anti-accidental deletion function, extracting a preset protection time; Monitoring the state of the logical volume, and when the logical volume is monitored to be in an active state, determining whether the logical volume is within the protection time; If the logical volume is within the protection time, the operation of deleting the logical volume is prohibited, and a corresponding prompt message is returned; If the logical volume is not within the protection time, the operation of deleting the logical volume is allowed.

2. The storage logical volume anti-accidental deletion method according to claim 1, characterized in that: Monitor the status of logical volumes, including: Read the input and output logs and access record information of the storage device; According to the read input and output logs and access record information, real-time or periodic monitoring of the state of the logical volume; When it is monitored that the logical volume has a read / write operation or data change, the logical volume is marked as active.

3. The storage logical volume anti-accidental deletion method according to claim 1, characterized in that: When the protection time is a set time period, a label of the protection time is added to the logical volume, and the start time and end time of the set time period are recorded; When the protection time is a set time length, the timing starts when the logical volume enters an active state, and during the set time length, the operation of deleting the logical volume is prohibited.

4. The storage logical volume accidental deletion prevention method according to claim 3, characterized in that: If the logical volume is not within the protection time, the operation of deleting the logical volume is allowed, including: When the protection time is a set time period, if the logical volume is not within the protection time, determining that the logical volume is after the end time of the set time period; At this time, if the logical volume is still in an active state, determining whether the active time of the logical volume in a unit time exceeds a set time threshold; If the active time of the logical volume in a unit time exceeds the set time threshold, the end time of the set time period is automatically extended; If the active time of the logical volume within a unit time does not exceed the set time threshold, the operation of deleting the logical volume is allowed; or, determining whether the input and output traffic of the logical volume in a unit time exceeds a set traffic threshold; If the input and output traffic of the logical volume within a unit time exceeds the set traffic threshold, the end time of the set time period is automatically extended; If the input and output traffic of the logical volume within a unit time does not exceed the set traffic threshold, the operation of deleting the logical volume is allowed; Correspondingly, when the protection time is a set time length, upon receiving a deletion operation request, it is determined whether the logical volume is active for the set time length before the current moment; If there is an active state, the operation of deleting the logical volume is prohibited, and a corresponding prompt message is returned; If there is no active state, the operation of deleting the logical volume is allowed.

5. The storage logical volume accidental deletion prevention method according to claim 1, characterized in that: Determining whether the logical volume is within the protection time includes: Traversing the active state of the logical volume, reading and counting the latest access time of the logical volume; Determine whether the latest access time exceeds the protection time; If yes, it is determined that the logical volume is not within the protection time; If not, it is determined that the logical volume is within the protection time.

6. The storage logical volume accidental deletion prevention method according to claim 1, characterized in that: While prohibiting the operation of deleting the logical volume, it also includes: The logical volume is prohibited from releasing the host mapping relationship, the active host is prohibited from being deleted, the active host is prohibited from deleting the mapped port, and the active host is prohibited from deleting the input and output group to which it belongs.

7. The storage logical volume accidental deletion prevention method according to claim 1, characterized in that: Receive the command to enable the anti-accidental deletion function, including: Receive an instruction to enable the anti-accidental deletion function from a visual management interface or a command line interface; The method further comprises: Receive an instruction to turn off the anti-accidental deletion function from a visual management interface or a command line interface; The step of monitoring the status of the logical volume is stopped.

8. A storage logical volume accidental deletion prevention device, characterized in that: The device comprises: An instruction receiving module, used for receiving an instruction to enable the function of preventing accidental deletion; A protection time extraction module, used for extracting a preset protection time in response to the anti-accidental deletion function activation instruction; Volume status monitoring module, used to monitor the status of logical volumes; A time judgment module, used for judging whether the logical volume is within the protection time when the logical volume is monitored to be in an active state; The deletion operation restriction module is used to prohibit the operation of deleting the logical volume if the logical volume is within the protection time and return corresponding prompt information; if the logical volume is not within the protection time, the operation of deleting the logical volume is allowed.

9. A storage logical volume accidental deletion prevention device, characterized in that: The device comprises: Memory for storing computer programs; A processor is used to implement the steps of the storage logical volume accidental deletion prevention method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for preventing accidental deletion of a storage logical volume are implemented as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Logical volume deleting method and device

    CN109491598A

  • Distributed cluster logical volume data management method, system, equipment and medium

    CN114443224A

  • Data recovery method and device, computer equipment and storage medium

    CN117573424A

  • System and method for improving the efficiency, comfort, and / or reliability in Operating Systems, such as for example Windows

    US20080177994A1

  • Deletion of volumes in data storage systems

    US20220035556A1