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

By obtaining the comparison of the latest access time of the storage volume and the preset interval protection time, controlling the operation and processing of the storage system, the problem of preventing accidental deletion of the storage system volume is solved, and the stability and data security of the system are improved.

CN119127079AActive Publication Date: 2024-12-13INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411215506.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-13
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

When existing storage systems accidentally delete or unmap operations, they can easily lead to business disconnection and affect normal operation. How to better avoid the storage system volumes being accidentally deleted has become an urgent problem to be solved.

Method used

By obtaining the latest access time of the storage volume, calculating the relationship between the time difference value and the preset interval protection time, controlling the processing of the target operation. If the time difference value is greater than the protection time, the operation is allowed. If it is less than or equal, it will block or request confirmation to avoid Perform a delete or unmap operation when the volume is active.

Benefits of technology

Effectively prevent users from accidentally deleting or demapping when the volume is still in use, avoiding data loss or service interruption, enhancing system stability, and reducing system failures caused by improper operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127079A_ABST
    Figure CN119127079A_ABST
Patent Text Reader

Abstract

The invention provides a storage system volume mistaken deletion prevention method and device, electronic equipment and a storage medium, and relates to the technical field of data processing.The method comprises the steps that under the condition that a target operation of a user on a target storage volume in a storage system is received, the latest access time of each storage volume is obtained; wherein the target operation comprises at least one of the following operations: a target storage volume de-mapping operation, a target storage volume deletion operation, an operation of removing a target storage volume from a target storage volume group containing the target storage volume, a host group de-mapping operation corresponding to the target storage volume group, and a deletion operation of a host corresponding to the target storage volume. The target storage volume corresponds to a port deletion operation of the host, and the host unit removes the operation of the host corresponding to the target storage volume; and obtaining a time difference value between the latest access time of the target storage volume and the current timestamp, and controlling the processing of the target operation based on the size relationship between the time difference value and the preset interval protection time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The storage system in the related art adopts a multi-controller cluster architecture. Even if some controllers fail, the system can continue to provide services. Hosts can run independently or in clusters, integrating resources through software. Users usually create logical unit numbers (LUNs) in the storage system and map them to hosts. Advanced users also create volume groups and map them to host clusters. Hosts can be physical or virtual entities, supporting multi-host or port configurations.

[0003] In the related art, most storage systems support volume-host mapping, volume group-host group mapping. If a user mistakenly deletes an object or releases the mapping, it will cause business disconnection and affect the normal operation of the business.

[0004] Therefore, how to better prevent accidental deletion of storage system volumes has become an urgent problem to be solved in the industry. Summary of the invention

[0005] The present invention provides a storage system volume anti-accidental deletion method, device, electronic device and storage medium, which are used to solve the problem of how to better avoid storage system volume anti-accidental deletion in the prior art.

[0006] The present invention provides a method for preventing accidental deletion of a storage system volume, comprising: In case of receiving a target operation of a target storage volume in the storage system by a user, obtaining the latest access time of each storage volume; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group including the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The time difference between the latest access time of the target storage volume and the current timestamp is obtained, and based on the size relationship between the time difference and the preset interval protection time, the processing of the target operation is controlled.

[0007] According to a storage system volume accidental deletion prevention method provided by the present invention, when a target operation is a deletion port operation of a host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the port to be deleted is not the last port of the host corresponding to the target storage volume, the port is allowed to be deleted; In the case that the deleted port is the last port of the host corresponding to the target storage volume, comparing the time difference with the preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and the target storage volume is mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to delete the port; When the target storage volume is online or the target storage volume is not mapped to other hosts, deleting the port is not allowed.

[0008] According to a storage system volume accidental deletion prevention method provided by the present invention, when the target operation is an operation of unmapping the target storage volume, deleting the target storage volume, or removing the target storage volume from the target storage volume group of the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: If the time difference is less than or equal to the preset interval protection time, the target operation is not performed; In a case where the time difference is greater than the preset interval protection time, the target operation is allowed to be executed.

[0009] According to a storage system volume accidental deletion prevention method provided by the present invention, when the target operation is a deletion operation of the host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, deleting the host corresponding to the target storage volume; When the target storage volume is online or the target storage volume is not mapped to other hosts, deletion of the host corresponding to the target storage volume is not allowed.

[0010] According to a storage system volume accidental deletion prevention method provided by the present invention, when the target operation is an operation of a host group to remove a host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the host corresponding to the target storage volume is not the last host in the host group, allowing the host corresponding to the target storage volume to be removed; When the host corresponding to the target storage volume is the last host in the host group, comparing the time difference with a preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, continue to traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to remove the host corresponding to the target storage volume for the host group; When the target storage volume is online or the target storage volume is not mapped to other hosts, it is not allowed to remove the host corresponding to the target storage volume from the host group.

[0011] According to a storage system volume accidental deletion prevention method provided by the present invention, when the target operation is an operation of unmapping a host group corresponding to the target storage volume group, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the time difference is less than or equal to the preset interval protection time, it is not allowed to unmap the host group corresponding to the target storage volume group; When the time difference is greater than the preset interval protection time, comparing the time difference with the preset interval protection time; When the time difference is less than or equal to the preset interval protection time, the host group corresponding to the target storage volume group is not allowed to be unmapped; In the case where the time difference is greater than the preset interval protection time, traverse other storage volumes mapped by the host corresponding to the target storage volume, and compare the size relationship between the time difference of other storage volumes and the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if the time differences corresponding to all other storage volumes are greater than the preset interval protection time, the host group corresponding to the target storage volume group is unmapped.

[0012] According to a storage system volume accidental deletion prevention method provided by the present invention, when receiving a target operation of a user on a target storage volume in a storage system, the latest access time of each storage volume is obtained, including: After the preset time is reached, the timer traverses each storage volume and obtains the working status of each storage volume; According to the current time period and the preset time length, the latest access time of each storage volume in a busy working state is updated.

[0013] The present invention also provides a storage system volume accidental deletion prevention device, comprising: The acquisition module is used to acquire the latest access time of each storage volume when receiving a target operation of the user on the target storage volume in the storage system; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group containing the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The control module is used to obtain the time difference between the latest access time of the target storage volume and the current timestamp, and control the processing of the target operation based on the size relationship between the time difference and the preset interval protection time.

[0014] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is a deletion port operation of the host corresponding to the target storage volume, the device is further used to: In the case where the port to be deleted is not the last port of the host corresponding to the target storage volume, the port is allowed to be deleted; In the case that the deleted port is the last port of the host corresponding to the target storage volume, comparing the time difference with the preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and the target storage volume is mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to delete the port; When the target storage volume is online or the target storage volume is not mapped to other hosts, deleting the port is not allowed.

[0015] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is an operation of unmapping the target storage volume, an operation of deleting the target storage volume, or an operation of removing the target storage volume from the target storage volume group, the device is further used to: If the time difference is less than or equal to the preset interval protection time, the target operation is not performed; In a case where the time difference is greater than the preset interval protection time, the target operation is allowed to be executed.

[0016] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is a deletion operation of the target storage volume corresponding to the host, the device is further used to: In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, deleting the host corresponding to the target storage volume; When the target storage volume is online or the target storage volume is not mapped to other hosts, deletion of the host corresponding to the target storage volume is not allowed.

[0017] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is an operation of a host group removing a host corresponding to the target storage volume, the device is further used to: In the case where the host corresponding to the target storage volume is not the last host in the host group, allowing the host corresponding to the target storage volume to be removed; When the host corresponding to the target storage volume is the last host in the host group, comparing the time difference with a preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, continue to traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to remove the host corresponding to the target storage volume for the host group; When the target storage volume is online or the target storage volume is not mapped to other hosts, it is not allowed to remove the host corresponding to the target storage volume from the host group.

[0018] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is an operation of unmapping a host group corresponding to the target storage volume group, the device is further used to: In the case where the time difference is less than or equal to the preset interval protection time, it is not allowed to unmap the host group corresponding to the target storage volume group; When the time difference is greater than the preset interval protection time, comparing the time difference with the preset interval protection time; When the time difference is less than or equal to the preset interval protection time, the host group corresponding to the target storage volume group is not allowed to be unmapped; In the case where the time difference is greater than the preset interval protection time, traverse other storage volumes mapped by the host corresponding to the target storage volume, and compare the size relationship between the time difference of other storage volumes and the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if the time differences corresponding to all other storage volumes are greater than the preset interval protection time, the host group corresponding to the target storage volume group is unmapped.

[0019] According to a storage system volume accidental deletion prevention device provided by the present invention, the device is also used for: After the preset time is reached, the timer traverses each storage volume and obtains the working status of each storage volume; According to the current time period and the preset time length, the latest access time of each storage volume in a busy working state is updated.

[0020] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for preventing accidental deletion of a storage system volume as described above is implemented.

[0021] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the storage system volume accidental deletion prevention method as described in any one of the above is implemented.

[0022] The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for preventing accidental deletion of a storage system volume.

[0023] The storage system volume anti-accidental deletion method, device, electronic device and storage medium provided by the present invention, if the time difference is greater than the protection time interval, it indicates that the volume has not been accessed within the set time, and the security of executing the target operation is relatively high. If the time difference is less than or equal to the protection time interval, it indicates that the volume may still be in use, and executing the target operation may affect the integrity or availability of the data. The system will block the operation or request user confirmation. By comparing the access time and the protection time interval, the system can effectively prevent the user from accidentally deleting or unmapping the volume when it is still in use, thereby avoiding data loss or service interruption. And by avoiding the execution of deletion or unmapping operations when the volume is active, the system stability is enhanced, and system failures caused by improper operation are reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are 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.

[0025] Figure 1 A schematic diagram of a storage system volume accidental deletion prevention method flow provided in an embodiment of the present application; Figure 2 One of the processing flow diagrams provided in the embodiment of the present application; Figure 3 The second processing flow diagram provided for the embodiment of the present application; Figure 4The third processing flow diagram provided for the embodiment of the present application; Figure 5 A fourth processing flow diagram provided for an embodiment of the present application; Figure 6 The fifth processing flow diagram provided for the embodiment of the present application; Figure 7 The sixth processing flow diagram provided for the embodiment of the present application; Figure 8 The seventh processing flow diagram provided for the embodiment of the present application; Fig. 9 The eighth processing flow diagram provided for the embodiment of the present application; Fig.10 A storage system volume accidental deletion prevention device provided in an embodiment of the present application; Fig.11 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.

[0027] Figure 1 A flowchart of a method for preventing accidental deletion of a storage system volume provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, including: Step 110, upon receiving a target operation of a target storage volume in the storage system from a user, obtaining the latest access time of each storage volume; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group including the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; In an embodiment of the present application, the system first identifies the type of operation requested by the user, which operations may include unmapping and deleting a volume, removing a volume from a volume group, unmapping a volume group from a host group, deleting a host, deleting a host port, and removing a host from a host group.

[0028] More specifically, volume unmapping refers to canceling the mapping relationship between a volume and a host or a host group.

[0029] Deleting a volume means completely deleting a volume from a storage system; removing a volume from a volume group means removing a specific volume from the volume group.

[0030] Unmapping a volume group from a host group may refer to canceling a mapping relationship between the volume group and the host group; and deleting a host may refer to deleting a configuration of the host from the storage system.

[0031] Host port deletion may refer to deleting network ports of a host, which are used to communicate with a storage system. Removal of a host from a host group may refer to removing a specific host from a host group.

[0032] More specifically, for each storage volume, the system obtains its latest access time. This timestamp records the exact moment when the volume was last accessed by an I / O operation.

[0033] Step 120: Obtain a time difference between the latest access time of the target storage volume and a current timestamp, and control the processing of the target operation based on a size relationship between the time difference and a preset interval protection time.

[0034] In the embodiment of the present application, the system calculates the time difference from the last access time of the volume to the current time. This time difference is used to evaluate the activity status of the volume.

[0035] The system compares the calculated time difference with the user-preset guard interval, which is a threshold that defines how long a volume is considered active and therefore no delete or unmap operations should be performed during this time.

[0036] Based on the comparison between the time difference and the protection time interval, the system decides whether to perform the target operation: If the time difference is greater than the protection time interval, it indicates that the volume has not been accessed within the set time and it is safe to perform the target operation.

[0037] If the time difference is less than or equal to the protection interval, it indicates that the volume may still be in use and performing the target operation may affect the integrity or availability of the data. The system will block the operation or request user confirmation.

[0038] In the embodiment of the present application, if the time difference is greater than the protection time interval, it indicates that the volume has not been accessed within the set time, and the security of executing the target operation is relatively high. If the time difference is less than or equal to the protection time interval, it indicates that the volume may still be in use, and executing the target operation may affect the integrity or availability of the data. The system will block the operation or request user confirmation. By comparing the access time and the protection time interval, the system can effectively prevent users from accidentally deleting or unmapping the volume when it is still in use, thereby avoiding data loss or service interruption. And by avoiding the execution of deletion or unmapping operations when the volume is active, the system stability is enhanced, and system failures caused by improper operation are reduced.

[0039] Optionally, when the target operation is a port deletion operation of a host corresponding to the target storage volume, controlling the processing of the target operation based on a size relationship between the time difference and a preset interval protection time includes: In the case where the port to be deleted is not the last port of the host corresponding to the target storage volume, the port is allowed to be deleted; In the case that the deleted port is the last port of the host corresponding to the target storage volume, comparing the time difference with the preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and the target storage volume is mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to delete the port; When the target storage volume is online or the target storage volume is not mapped to other hosts, deleting the port is not allowed.

[0040] Figure 2 One of the processing flow diagrams provided in the embodiment of the present application is as follows: Figure 2 As shown, including: Execute the host port deletion operation; If the port to be deleted is not the last port of the host corresponding to the target storage volume, the system will allow the port to be deleted because it will not affect the host's access to other ports. If the port to be deleted is the last port of the host, the system will enter a more stringent check process. First, the system will compare the time difference between the volume's latest access time and the current time and the preset protection time interval.

[0041] Therefore, it is possible to determine whether the port is the last port of the host, or to delete all remaining ports of the host at the same time. If not, deletion is allowed; otherwise, proceed to the next step.

[0042] Calculate whether the difference between the current timestamp and the latest access time of the volume mapped by the current host is greater than the set protection interval.

[0043] If the time difference is less than or equal to the protection interval, it indicates that the volume may still be in use, and the system further checks the status of the host.

[0044] If it is greater than the protection interval, continue to traverse other mapped volumes; otherwise, determine whether the host is offline and whether the volume is mapped to other hosts. This is to ensure that deleting the port does not affect the access to the volume.

[0045] If these two conditions are not met, the host port is not allowed to be deleted, otherwise other volumes and storage volumes mapped are traversed, and the time difference of these volumes is compared with the protection time interval.

[0046] During the traversal, if all other storage volumes are offline and they are mapped to other hosts, this indicates that removing the port does not affect access to those volumes.

[0047] If the above conditions are met, that is, all other storage volumes are offline and mapped to other hosts, the system will allow the target port to be deleted.

[0048] If the target volume is online, or not mapped to another host, this indicates that deleting the port may affect access to the volume, and the system will not allow the port to be deleted.

[0049] In the embodiment of the present application, the system can ensure that even if the host port is deleted, access to the storage volume will not be accidentally interrupted, thereby maintaining the stability of the storage system and the security of the data. At the same time, this also provides users with a flexible mechanism to adapt to different business needs and operation scenarios.

[0050] Optionally, when the target operation is an operation of unmapping the target storage volume, an operation of deleting the target storage volume, or an operation of removing the target storage volume from the target storage volume group of the target storage volume, based on a size relationship between the time difference and a preset interval protection time, controlling the processing of the target operation includes: If the time difference is less than or equal to the preset interval protection time, the target operation is not performed; In a case where the time difference is greater than the preset interval protection time, the target operation is allowed to be executed.

[0051] Figure 3The second processing flow diagram provided in the embodiment of the present application is as follows: Figure 3 As shown, including: A user or system requests to unmap a storage volume from the host or host group to which it is currently mapped.

[0052] The system will calculate the difference between the current timestamp (i.e. the current precise time) and the time when the volume was last accessed (the latest access time). The system will compare the calculated time difference with the protection interval set by the user: If the time difference is greater than the protection interval, it means that the volume has not been accessed within the set time, so it can be safely unmapped, the operation will be allowed to execute, and the command will be executed successfully. If the time difference is less than or equal to the protection interval, it means that the volume may still be in use, and unmapping may cause data access problems, so unmapping is not allowed and the operation will return failure.

[0053] Through this process, the storage system can ensure that the unmapping operation is allowed only when the volume is inactive, thereby protecting the data security of the storage volume and the stability of the system. At the same time, it also provides users with a mechanism to prevent potential problems caused by misoperation.

[0054] Figure 4 The third processing flow diagram provided for the embodiment of the present application is as follows: Figure 4 As shown, including: Executing a volume deletion operation may refer to a user or system sending a request to completely delete a storage volume from the storage system.

[0055] If volume deletion protection is turned on, the system calculates the difference between the current timestamp (that is, the current precise point in time) and the last access time of the volume.

[0056] The system compares the calculated time difference with the protection interval set by the user: If the time difference is greater than the protection interval, it means that the safety threshold has been exceeded since the volume was last accessed, so the volume is considered no longer active and can be safely deleted. At this point, the volume deletion operation will be allowed to execute and the command will be executed successfully.

[0057] If the time difference is less than or equal to the protection interval, it means that the volume may still be in use or still within the protection period, and deleting the volume may cause data loss or service interruption. Therefore, the deletion operation is not allowed and the system returns a failure prompt.

[0058] If the volume is deleted successfully, the volume will be completely removed from the storage system and all data will be lost. If the volume is deleted unsuccessfully, the user needs to take appropriate measures based on the failure prompt, which may require waiting longer or checking whether there are any active I / O operations in progress.

[0059] Through this process, the storage system can provide a method to control volume deletion operations while ensuring data security. This mechanism helps prevent data loss due to misoperation, while allowing storage space to be safely cleaned up when the volume is no longer needed.

[0060] Figure 5 The fourth processing flow diagram provided in the embodiment of the present application is as follows: Figure 5 As shown, including: The target storage volume group of the target storage volume removes the target storage volume operation specifically means that a user initiates an operation request, the purpose of which is to remove a specific storage volume from the volume group.

[0061] If volume deletion protection is turned on, the system calculates the difference between the current timestamp (the current precise time) and the time when the volume was last accessed.

[0062] The system compares the calculated time difference with the protection interval set by the user: If the time difference is greater than the protection interval: This indicates that the volume has not been accessed within the set protection time, so the system will allow the volume group to remove the volume. If the operation is successful, the volume will be removed from the volume group.

[0063] If the time difference is less than or equal to the protection interval: This indicates that the volume may still be in use or still within the protection period, and removing the volume may cause data loss or access interruption. Therefore, the system will not allow the removal operation to be performed and the operation will return failure.

[0064] If the volume is successfully removed from the volume group, the user will receive feedback that the operation was successful. If the operation fails, the user will receive a failure prompt and may need to take further actions based on the prompt information, such as waiting longer or checking the usage status of the volume. This effectively ensures the safety and accuracy when performing volume group management operations and prevents potential data risks caused by misoperation.

[0065] Optionally, when the target operation is a deletion operation of the host corresponding to the target storage volume, controlling the processing of the target operation based on a size relationship between the time difference and a preset interval protection time includes: In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, deleting the host corresponding to the target storage volume; When the target storage volume is online or the target storage volume is not mapped to other hosts, deletion of the host corresponding to the target storage volume is not allowed.

[0066] Figure 6 The fifth processing flow diagram provided in the embodiment of the present application is as follows: Figure 6 As shown, in the embodiment of the present application, the target operation is to delete the host corresponding to the target storage volume, which usually means completely removing the configuration and association of the host from the storage system.

[0067] Before performing a deletion operation, the system checks whether the volume deletion protection mechanism is enabled to prevent data loss or service interruption. The system calculates the time difference between the current timestamp and the last access time of the target storage volume.

[0068] If the time difference is less than or equal to the preset protection interval, it indicates that the volume may still be in use, and the system will enter a further check process. The system determines whether the host corresponding to the target storage volume has gone offline and whether the volume is still mapped to other hosts.

[0069] If the target storage volume is offline and mapped to another host, the system will traverse all other storage volumes mapped by the host and compare the time difference of these volumes with the protection interval.

[0070] After traversing all other storage volumes, if all volumes are offline and mapped to other hosts, it means that deleting the host will not affect the access to other volumes. At this time, the system will allow the host corresponding to the target storage volume to be deleted.

[0071] If the target storage volume is online, or not mapped to another host, this indicates that removing the host may affect volume access or data security. In this case, the system will not allow the host to be removed.

[0072] If deletion is allowed, the host will be removed from the storage system and all configurations and mappings related to it will be cleared. If deletion is not allowed, the system will return a failure prompt and the user needs to take appropriate measures based on the prompt, which may include waiting for a longer time or re-evaluating the necessity of the deletion operation.

[0073] In the embodiment of the present application, the storage system can provide a method for controlling host deletion operations while ensuring data security and system stability. This mechanism helps prevent data loss or service interruption caused by misoperation, while allowing storage resources to be safely cleaned up when the host no longer needs them.

[0074] Optionally, when the target operation is an operation of the host group removing the host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the host corresponding to the target storage volume is not the last host in the host group, allowing the host corresponding to the target storage volume to be removed; When the host corresponding to the target storage volume is the last host in the host group, comparing the time difference with a preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, continue to traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to remove the host corresponding to the target storage volume for the host group; When the target storage volume is online or the target storage volume is not mapped to other hosts, it is not allowed to remove the host corresponding to the target storage volume from the host group.

[0075] Figure 7 The sixth processing flow diagram provided for the embodiment of the present application is as follows: Figure 7 As shown, the removal operation of a host in a host group may refer to a user or system requesting to remove a host corresponding to a target storage volume from the host group.

[0076] If the host is not the last host in the host group, the system will allow the host to be removed directly. If the host is the last host in the host group, the system will enter a more stringent check process.

[0077] The system calculates the time difference between the current timestamp and the last access time of the target storage volume, and compares it with the preset protection time interval. If the time difference is less than or equal to the protection time interval.

[0078] The system will further determine whether the host is offline and whether the target storage volume is mapped to another host.

[0079] If the target storage volume is offline and mapped to another host, the system will traverse all other storage volumes mapped by the host and compare the time difference of these volumes with the protection time interval.

[0080] After traversing all other storage volumes, if all other storage volumes are offline and all other storage volumes are mapped to other hosts, the system will allow the host corresponding to the target storage volume to be removed from the host group.

[0081] If the target storage volume is still online or the target storage volume is not mapped to another host, the system will not allow you to remove the host from the host group.

[0082] If the removal is allowed, the host will be removed from the host group and its associated configuration and mappings will be adjusted as necessary.

[0083] If removal is not allowed, the system will return a failure prompt and the user will need to take appropriate measures based on the prompt, which may include waiting longer or re-evaluating the necessity of the removal operation.

[0084] In the embodiment of the present application, it is ensured that in the host group management, the host removal operation is both safe and meets business requirements, and data access interruption or data loss caused by misoperation or improper operation is prevented.

[0085] Optionally, when the target operation is an operation of unmapping a host group corresponding to the target storage volume group, controlling the processing of the target operation based on a size relationship between the time difference and a preset interval protection time includes: In the case where the time difference is less than or equal to the preset interval protection time, it is not allowed to unmap the host group corresponding to the target storage volume group; When the time difference is greater than the preset interval protection time, comparing the time difference with the preset interval protection time; When the time difference is less than or equal to the preset interval protection time, the host group corresponding to the target storage volume group is not allowed to be unmapped; In the case where the time difference is greater than the preset interval protection time, traverse other storage volumes mapped by the host corresponding to the target storage volume, and compare the size relationship between the time difference of other storage volumes and the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if the time differences corresponding to all other storage volumes are greater than the preset interval protection time, the host group corresponding to the target storage volume group is unmapped.

[0086] Figure 8 The seventh processing flow diagram provided for the embodiment of the present application is as follows: Figure 8 As shown, the system calculates the time difference between the current timestamp and the last access time of the target storage volume.

[0087] If the time difference is less than or equal to the preset protection interval, it indicates that the volume may still be in use, so unmapping is not allowed to prevent potential data access interruption or loss. If the time difference is greater than the preset protection interval, it indicates that the volume has not been accessed within the set protection time and can be safely considered for unmapping.

[0088] When the time difference allows unmapping, the system further checks all other storage volumes mapped by the target storage volume to the host: Traverse these storage volumes and calculate the relationship between their time differences and protection time intervals respectively.

[0089] After traversing all other storage volumes, if the time difference of all storage volumes is greater than the preset protection interval, it means that all these volumes have not been accessed during the protection time, so the mapping relationship between the target storage volume group and the host group can be safely released.

[0090] If the unmapping operation is allowed, the mapping relationship between the storage volume group and the host group will be officially released. If the unmapping operation is not allowed, the system will retain the existing mapping relationship and may notify the user why the operation failed. This can effectively ensure the safety and accuracy when unmapping the storage volume group and the host group, prevent data loss or service interruption caused by misoperation, and allow storage resources to be safely reconfigured when it is confirmed that the volume is no longer active.

[0091] Optionally, when receiving a target operation of a user on a target storage volume in the storage system, obtaining the latest access time of each storage volume includes: After the preset time is reached, the timer traverses each storage volume and obtains the working status of each storage volume; According to the current time period and the preset time length, the latest access time of each storage volume in a busy working state is updated.

[0092] Fig. 9 The eighth processing flow diagram provided in the embodiment of the present application is as follows: Fig. 9 As shown, it includes: the system sets a timer, and when the preset time period is met, the timer will trigger and start the traversal check of each storage volume in the storage system.

[0093] When the timer is triggered, the system checks the working status of each storage volume to determine whether they are busy, that is, whether there are any I / O operations in progress.

[0094] If a storage volume is in a busy state, the system will update the latest access time of the volume according to the current time period. This operation is to record the time point when the volume was last active. If the volume is not in a busy state, the access time may not be updated because the access time is updated only when the volume is accessed.

[0095] In this way, the system can track the access patterns and frequency of each storage volume, which is very important for implementing some advanced functions, such as automated storage optimization, data lifecycle management, etc.

[0096] The preset duration is a key parameter that determines how often the timer is triggered. A shorter time period can provide more granular access time records, but may increase the computational burden of the system; a longer time period may reduce the computational burden, but the accuracy of the access time will be reduced.

[0097] This time management mechanism supports users to perform various operations on storage volumes, such as volume unmapping and volume deletion, ensuring that the system can accurately determine the usage status and security of the volume before performing these operations.

[0098] In the embodiment of the present application, the storage system can efficiently manage the access time of the storage volume, providing guarantee for the security of data and the stability of the system. At the same time, it also provides the storage administrator with insight into the usage of storage resources.

[0099] The storage system volume anti-accidental deletion device provided by the present invention is described below. The storage system volume anti-accidental deletion device described below and the storage system volume anti-accidental deletion method described above can be referenced to each other.

[0100] Fig.10 The storage system volume accidental deletion prevention device provided in the embodiment of the present application is as follows: Fig.10 As shown, including: The acquisition module 1010 is used to acquire the latest access time of each storage volume when receiving a target operation of a user on a target storage volume in the storage system; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group containing the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The control module 1020 is used to obtain the time difference between the latest access time of the target storage volume and the current timestamp, and control the processing of the target operation based on the size relationship between the time difference and the preset interval protection time.

[0101] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is a deletion port operation of the host corresponding to the target storage volume, the device is further used to: In the case where the port to be deleted is not the last port of the host corresponding to the target storage volume, the port is allowed to be deleted; In the case that the deleted port is the last port of the host corresponding to the target storage volume, comparing the time difference with the preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and the target storage volume is mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to delete the port; When the target storage volume is online or the target storage volume is not mapped to other hosts, deleting the port is not allowed.

[0102] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is an operation of unmapping the target storage volume, an operation of deleting the target storage volume, or an operation of removing the target storage volume from the target storage volume group, the device is further used to: If the time difference is less than or equal to the preset interval protection time, the target operation is not performed; In a case where the time difference is greater than the preset interval protection time, the target operation is allowed to be executed.

[0103] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is a deletion operation of the target storage volume corresponding to the host, the device is further used to: In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, deleting the host corresponding to the target storage volume; When the target storage volume is online or the target storage volume is not mapped to other hosts, deletion of the host corresponding to the target storage volume is not allowed.

[0104] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is an operation of a host group removing a host corresponding to the target storage volume, the device is further used to: In the case where the host corresponding to the target storage volume is not the last host in the host group, allowing the host corresponding to the target storage volume to be removed; When the host corresponding to the target storage volume is the last host in the host group, comparing the time difference with a preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, continue to traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to remove the host corresponding to the target storage volume for the host group; When the target storage volume is online or the target storage volume is not mapped to other hosts, it is not allowed to remove the host corresponding to the target storage volume from the host group.

[0105] According to a storage system volume accidental deletion prevention device provided by the present invention, when the target operation is an operation of unmapping a host group corresponding to the target storage volume group, the device is further used to: In the case where the time difference is less than or equal to the preset interval protection time, it is not allowed to unmap the host group corresponding to the target storage volume group; When the time difference is greater than the preset interval protection time, comparing the time difference with the preset interval protection time; When the time difference is less than or equal to the preset interval protection time, the host group corresponding to the target storage volume group is not allowed to be unmapped; In the case where the time difference is greater than the preset interval protection time, traverse other storage volumes mapped by the host corresponding to the target storage volume, and compare the size relationship between the time difference of other storage volumes and the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if the time differences corresponding to all other storage volumes are greater than the preset interval protection time, the host group corresponding to the target storage volume group is unmapped.

[0106] According to a storage system volume accidental deletion prevention device provided by the present invention, the device is also used for: After the preset time is reached, the timer traverses each storage volume and obtains the working status of each storage volume; According to the current time period and the preset time length, the latest access time of each storage volume in a busy working state is updated.

[0107] In the embodiment of the present application, if the time difference is greater than the protection time interval, it indicates that the volume has not been accessed within the set time, and the security of executing the target operation is relatively high. If the time difference is less than or equal to the protection time interval, it indicates that the volume may still be in use, and executing the target operation may affect the integrity or availability of the data. The system will block the operation or request user confirmation. By comparing the access time and the protection time interval, the system can effectively prevent users from accidentally deleting or unmapping the volume when it is still in use, thereby avoiding data loss or service interruption. And by avoiding the execution of deletion or unmapping operations when the volume is active, the system stability is enhanced, and system failures caused by improper operation are reduced.

[0108] Fig.11 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Fig.11As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. The processor 1110 may call the logic instructions in the memory 1130 to execute the storage system volume accidental deletion prevention method, the method comprising: upon receiving a target operation of a user on a target storage volume in the storage system, obtaining the latest access time of each storage volume; wherein the target operation comprises at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group containing the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The time difference between the latest access time of the target storage volume and the current timestamp is obtained, and based on the size relationship between the time difference and the preset interval protection time, the processing of the target operation is controlled.

[0109] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform 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, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0110] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the storage system volume accidental deletion prevention method provided by the above methods, the method comprising: in the case of receiving a target operation of a user on a target storage volume in a storage system, obtaining the latest access time of each storage volume; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group including the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The time difference between the latest access time of the target storage volume and the current timestamp is obtained, and based on the size relationship between the time difference and the preset interval protection time, the processing of the target operation is controlled.

[0111] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the storage system volume accidental deletion prevention method provided by the above methods, the method comprising: upon receiving a target operation of a user on a target storage volume in a storage system, obtaining the latest access time of each storage volume; wherein the target operation comprises at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group containing the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The time difference between the latest access time of the target storage volume and the current timestamp is obtained, and based on the size relationship between the time difference and the preset interval protection time, the processing of the target operation is controlled.

[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for preventing accidental deletion of a storage system volume, characterized in that: include: In case of receiving a target operation of a target storage volume in the storage system by a user, obtaining the latest access time of each storage volume; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group including the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The time difference between the latest access time of the target storage volume and the current timestamp is obtained, and based on the size relationship between the time difference and the preset interval protection time, the processing of the target operation is controlled.

2. The storage system volume accidental deletion prevention method according to claim 1, characterized in that: When the target operation is a port deletion operation of the host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the port to be deleted is not the last port of the host corresponding to the target storage volume, the port is allowed to be deleted; In the case that the deleted port is the last port of the host corresponding to the target storage volume, comparing the time difference with the preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and the target storage volume is mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to delete the port; When the target storage volume is online or the target storage volume is not mapped to other hosts, deleting the port is not allowed.

3. The storage system volume accidental deletion prevention method according to claim 1, characterized in that: When the target operation is an operation of unmapping the target storage volume, an operation of deleting the target storage volume, or an operation of removing the target storage volume from the target storage volume group of the target storage volume, controlling the processing of the target operation based on the size relationship between the time difference value and the preset interval protection time includes: If the time difference is less than or equal to the preset interval protection time, the target operation is not performed; In a case where the time difference is greater than the preset interval protection time, the target operation is allowed to be executed.

4. The storage system volume accidental deletion prevention method according to claim 1, characterized in that: When the target operation is a deletion operation of the host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, deleting the host corresponding to the target storage volume; When the target storage volume is online or the target storage volume is not mapped to other hosts, deletion of the host corresponding to the target storage volume is not allowed.

5. The storage system volume accidental deletion prevention method according to claim 1, characterized in that: When the target operation is an operation of the host group removing the host corresponding to the target storage volume, based on the size relationship between the time difference and the preset interval protection time, controlling the processing of the target operation includes: In the case where the host corresponding to the target storage volume is not the last host in the host group, allowing the host corresponding to the target storage volume to be removed; When the host corresponding to the target storage volume is the last host in the host group, comparing the time difference with a preset interval protection time; In the case where the time difference is less than or equal to the preset interval protection time, determining whether the host corresponding to the target storage volume is offline, and whether the target storage volume is mapped to other hosts; When the target storage volume is offline and mapped to other hosts, continue to traverse other storage volumes mapped to the host corresponding to the target storage volume, and compare the time difference of other storage volumes with the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if all other storage volumes are offline and the other storage volumes are mapped to other hosts, it is allowed to remove the host corresponding to the target storage volume for the host group; In the case where the target storage volume is online or the target storage volume is not mapped to other hosts, it is not allowed to remove the host corresponding to the target storage volume for the host group.

6. The storage system volume accidental deletion prevention method according to claim 1, characterized in that: When the target operation is an operation of unmapping a host group corresponding to the target storage volume group, based on a size relationship between the time difference and a preset interval protection time, controlling the processing of the target operation includes: In the case where the time difference is less than or equal to the preset interval protection time, it is not allowed to unmap the host group corresponding to the target storage volume group; When the time difference is greater than the preset interval protection time, comparing the time difference with the preset interval protection time; When the time difference is less than or equal to the preset interval protection time, the host group corresponding to the target storage volume group is not allowed to be unmapped; In the case where the time difference is greater than the preset interval protection time, traverse other storage volumes mapped by the host corresponding to the target storage volume, and compare the size relationship between the time difference of other storage volumes and the preset interval protection time; After traversing all other storage volumes mapped to the host corresponding to the target storage volume, if the time differences corresponding to all other storage volumes are greater than the preset interval protection time, the host group corresponding to the target storage volume group is unmapped.

7. The storage system volume accidental deletion prevention method according to claim 1, characterized in that: When receiving a target operation of a target storage volume in the storage system, the latest access time of each storage volume is obtained, including: After the preset time is reached, the timer traverses each storage volume and obtains the working status of each storage volume; According to the current time period and the preset time length, the latest access time of each storage volume in a busy working state is updated.

8. A storage system volume accidental deletion prevention device, characterized in that: include: The acquisition module is used to acquire the latest access time of each storage volume when receiving a target operation of the user on the target storage volume in the storage system; wherein the target operation includes at least one of the following: an operation of unmapping the target storage volume, an operation of deleting the target storage volume, an operation of removing the target storage volume from a target storage volume group containing the target storage volume, an operation of unmapping a host group corresponding to the target storage volume group, an operation of deleting a host corresponding to the target storage volume, an operation of deleting a port of a host corresponding to the target storage volume, and an operation of removing a host corresponding to the target storage volume from a host group; The control module is used to obtain the time difference between the latest access time of the target storage volume and the current timestamp, and control the processing of the target operation based on the size relationship between the time difference and the preset interval protection time.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the storage system volume accidental deletion prevention method as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the storage system volume accidental deletion prevention method as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data volume security mapping management method for storage system

    CN107562656A

  • Logical volume deleting method and device

    CN109491598A

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

    CN114443224A