Logical volume management method and system, electronic equipment and storage medium
By pre-verifying and validating the target logical volume in the storage server, we ensure that the logical volume meets specific recycling conditions before it is migrated to the recycling bin, solving the problem of user misoperation and causing loss of important data, and realizing precise control and data security of the logical volume.
Patent Information
- Application Number
- CN202411319930.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the user's active operations are completely relied on to trigger the recycling operation of the logical volume, resulting in important data being placed in the recycling bin due to user misoperation, increasing the risk of loss of important data.
By verifying the storage status and function type of the target logical volume in the storage server, and verifying the effectiveness of the associated information, configuration status, and task status, ensure that the logical volume meets specific recycling conditions before it is moved to the recycling bin.
Accurate control of logical volumes is achieved, the risk of loss of important data is reduced, and the space utilization rate and data management efficiency of the recycling bin are improved.
Smart Images

Figure CN120010757A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a logical volume management method, system, electronic equipment and storage medium. Background Art
[0002] The volume recycle bin function is an important means of data recovery and reuse. In order to ensure data security and system stability, many storage servers are equipped with a recycle bin mechanism to allow users to restore data within a certain period of time after deleting the data. Therefore, how to effectively recycle logical volumes in the recycle bin to ensure data security and system stability is an important issue that needs to be solved in the industry.
[0003] In the related art, the logical volume recycling operation is completely triggered by the user's active operation, so when the user performs a deletion operation on any logical volume in the storage server, no matter what state or scenario the logical volume is in, it will be put into the recycling bin without distinction. As a result, some important data can easily be put into the recycling bin due to user's misoperation, greatly increasing the risk of important data loss.
[0004] Therefore, there is an urgent need for a logical volume management method, system, electronic device and storage medium to solve the above technical problems. Summary of the invention
[0005] The present invention provides a logical volume management method, system, electronic device and storage medium, which are used to solve the defect in the prior art that the logical volume recovery operation is completely dependent on the user's active operation, which greatly increases the risk of important data loss, and realizes precise control of the logical volume to be recovered to reduce the risk of important data loss.
[0006] The present invention provides a logical volume management method, comprising: Verify the storage status and function type of the target logical volume in the storage server; When it is determined that the storage state and the function type of the target logical volume have passed the verification, verifying the validity of the target logical volume according to the associated information, the configuration state and the task state of the target logical volume; When it is determined that the target logical volume passes the validity verification, the target logical volume is migrated to a recycle bin.
[0007] According to a logical volume management method provided by the present invention, the storage status and function type of the target logical volume in the storage server are verified, including: According to the storage status, determining whether the target logical volume is stored in the volume storage space of the storage server to obtain a first determination result; According to the storage status, determining whether the target logical volume is stored in the recycle bin to obtain a second determination result; According to the function type, determining whether the target logical volume is a network attached storage volume, and obtaining a third determination result; According to the function type, determining whether the target logical volume is a performance statistics volume, and obtaining a fourth determination result; the performance statistics volume is a logical volume used for performance statistics; According to the function type, determining whether the target logical volume is a flow acceleration volume, and obtaining a fifth determination result; the flow acceleration volume is a logical volume with flow acceleration; The storage status and function type of the target logical volume are verified according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result.
[0008] According to a logical volume management method provided by the present invention, the storage status and function type of the target logical volume are verified according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, including: If it is determined that the target logical volume satisfies any one of the error condition set according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, determining that the storage state and the function type of the target logical volume fail to pass the verification; If it is determined that the target logical volume does not satisfy all conditions in the error condition set according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, determining that the storage state and the function type of the target logical volume pass the verification; Among them, the error condition set includes that the target logical volume is not stored in the volume storage space, the target logical volume is stored in the recycle bin, the target logical volume is a network attached storage volume, the target logical volume is a performance statistics volume and the target logical volume is a traffic acceleration volume.
[0009] According to a logical volume management method provided by the present invention, the validity verification of the target logical volume is performed according to the associated information, configuration status and task status of the target logical volume, including: Performing a first-stage validity verification on the target logical volume according to the association information; In the case where it is determined that the target logical volume has passed the first stage of validity verification, performing a second stage of validity verification on the target logical volume according to the configuration state; In the case where it is determined that the target logical volume has passed the second stage of validity verification, performing a third stage of validity verification on the target logical volume according to the task status; In case it is determined that the target logical volume has passed the validity verification of the third stage, it is determined that the target logical volume has passed the validity verification.
[0010] According to a logical volume management method provided by the present invention, the first phase of validating the target logical volume according to the association information includes: According to the association information, determine whether the target logical volume has a host mapping and whether to join a volume group; In the case where it is determined that the target logical volume does not have a host mapping and is not added to a volume group, determining that the target logical volume passes the first stage of validity verification; In the case where it is determined that the target logical volume has a host mapping and / or is added to a volume group, it is determined that the target logical volume has not passed the first stage of validity verification.
[0011] According to a logical volume management method provided by the present invention, performing a second phase of validity verification on the target logical volume according to the configuration state includes: According to the configuration state, determining whether the target logical volume matches any logical volume in a target volume set, the target volume set including mirror volumes, volumes that are performing initialization operations, shadow volumes, source volumes, volumes in a remote replication relationship, active-active volumes, and volumes in a local replication relationship; In the case where it is determined that the target logical volume matches any logical volume in the target volume set, determining that the target logical volume fails the validity verification of the second stage; In the case where it is determined that the target logical volume does not match any logical volumes in the target volume set, it is determined that the target logical volume passes the second stage validity verification.
[0012] According to a logical volume management method provided by the present invention, the third stage of validating the target logical volume according to the task status includes: According to the task status, determining whether the task executed by the target logical volume matches any task in a first target task set, wherein the first target task set includes a migration task, a capacity expansion task, a capacity reduction task, and a volume destruction task; In the case where it is determined that the task executed by the target logical volume matches any task in the first target task set, determining that the target logical volume fails the validity verification of the third stage; In the case where it is determined that the task executed by the target logical volume does not match all the tasks in the first target task set, it is determined that the target logical volume passes the validity verification of the third stage.
[0013] According to a logical volume management method provided by the present invention, the method further includes: In case of receiving an operation request for the target logical volume, determining whether the target logical volume is migrated to the recycle bin; In the case where it is determined that the target logical volume is migrated to the recycle bin, obtaining a task type of a task to be executed according to the operation request; If it is determined according to the task type that the task to be executed is any task in the second target task set, then execution of the task to be executed on the target logical volume is stopped, and an error message is output; Among them, the second target task set includes multiple tasks including mapping tasks, migration tasks, destruction tasks, capacity expansion tasks, capacity reduction tasks, attribute modification tasks, local replication relationship creation tasks, remote replication relationship creation tasks, active-active volume creation tasks, and shadow volume creation tasks.
[0014] The present invention also provides a logical volume management system, comprising: A volume management module, used to verify the storage status and function type of the target logical volume in the storage server; A validity verification module, configured to verify the validity of the target logical volume according to the associated information, configuration status and task status of the target logical volume when it is determined that the storage status and function type of the target logical volume pass the verification; The migration module is used to migrate the target logical volume to a recycle bin when it is determined that the target logical volume passes the validity verification.
[0015] 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, any of the above-mentioned logical volume management methods is implemented.
[0016] 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 logical volume management method described in any one of the above is implemented.
[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned logical volume management methods.
[0018] The logical volume management method, system, electronic device and storage medium provided by the present invention introduce pre-verification of the storage status and function type of the target logical volume, combined with comprehensive validity verification of its associated information, configuration status and task status, to set different operation permissions for the logical volume, thereby limiting the refined control of logical volume deletion entering the recycle bin, so that the logical volume is migrated to the recycle bin only under the premise of ensuring that the logical volume meets specific recycling conditions, effectively avoiding the indiscriminate deletion of the logical volume due to user misoperation, significantly reducing the risk of important data loss, and ensuring the security of data and resource optimization in the storage server. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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.
[0020] Figure 1 This is one of the flow charts of the logical volume management method provided by the present invention.
[0021] Figure 2 This is the second flow chart of the logical volume management method provided by the present invention.
[0022] Figure 3 It is a structural schematic diagram of the logical volume management system provided by the present invention.
[0023] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0024] 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.
[0025] The logical volume of the centralized storage server is an important concept of virtualized storage management. It combines multiple physical disks or partitions into a single logical storage unit. The logical volume can be mapped to one or more virtual disks (Vdisks). Virtual disks allow users to create a virtual disk drive on a computer and use it as an actual physical disk drive. Logical volumes break through the capacity limitations of physical disks and provide a more flexible and scalable storage solution. Therefore, through logical volume management, system administrators can dynamically adjust storage capacity to meet the growing data storage needs.
[0026] The volume recycle bin function of the storage server is an important data protection mechanism and is widely used in storage systems. In the current storage server management field, the volume recycle bin function has been widely used in various data storage systems as an important means of data recovery and reuse. In order to ensure data security and system stability, many storage servers are equipped with a recycle bin mechanism, which allows users to restore data within a certain period of time after deleting data. Users can use this function to move the volume they want to delete to the recycle bin first. When users need to restore the data in the volume in the recycle bin or do not want to completely delete the volume, they can also restore the volume in the recycle bin and turn it into a normal volume. At the same time, users can set automatic cleanup policies as needed to regularly clear the volumes in the recycle bin to avoid occupying the server's memory space.
[0027] However, the traditional recycle bin function usually only provides a simple data temporary storage function, which completely relies on the user's active operation to trigger the logical volume recycling operation. It lacks an access control mechanism based on conditional judgment, so when the user performs a deletion operation on any logical volume in the storage server, the data will be indiscriminately placed in the recycle bin without considering the type, importance, sensitivity or other specific conditions of the data. When important data is mistakenly placed in the recycle bin and the user does not discover it in time, the volume in the recycle bin is cleared, the data will be permanently lost and cannot be recovered, which greatly increases the risk of losing important data and causes significant losses to users.
[0028] Therefore, in view of the shortcoming that the traditional recycle bin completely relies on the user's active operation to trigger the recycling operation of the logical volume, which is easy to cause the loss of important data, the present invention proposes a logical volume management method. The method realizes precise control of the volumes entering the recycle bin by presetting a series of conditional judgment logics, reduces the number of volumes that do not meet the conditions entering the recycle bin, reduces the risk of important data loss, and improves the space utilization and data management efficiency of the recycle bin, thereby avoiding the loss of important data and causing significant losses to customers.
[0029] Figure 1This is one of the flow diagrams of the logical volume management method provided by the present invention; the method can be applied to various scenarios, such as cache cleaning, log management, resource scheduling, storage system management, etc., which are not specifically limited in this embodiment. The execution subject of the method can be a storage server, which contains multi-level modules, including but not limited to a volume management module, a protocol management module, a configuration management module, and a storage pool management module, wherein the volume management module is used to perform precondition verification on the logical volume; the protocol management module, the configuration management module, and the storage pool management module are all used to verify the validity of the target logical volume.
[0030] Figure 2 FIG. 2 is a flow chart of the logical volume management method provided by the present invention; Figure 2 As shown, after the storage server obtains the instruction to delete the volume and add it to the recycle bin, it will pass the instruction to each level of modules in order to make conditional judgments about the recycle bin in each level of module. When the volume recycling check condition judgment under each module fails, the execution of the instruction will be immediately terminated and an error will be returned. Only when the volume recycling check condition judgment of all modules passes, will the process of moving the volume to the recycle bin begin, and the volume recycle bin attribute corresponding to the volume will be changed to true, indicating that the volume has been moved to the recycle bin. Thus, multi-level verification is performed based on multi-level modules, so that before the logical volume is moved to the recycle bin, it undergoes a series of conditional judgments to ensure that all logical volumes entering the recycle bin meet the conditions, and if the volume in the recycle bin has not been deleted, the volume can be restored and used again, thereby avoiding the accidental deletion of important data and reducing the risk of important data loss.
[0031] like Figure 1 As shown, the method includes step 110 , step 120 and step 130 .
[0032] Step 110: Verify the storage status and function type of the target logical volume in the storage server.
[0033] The target logical volume is a logical volume (hereinafter also referred to as a volume or Vdisk) in the storage server that needs to be migrated to the recycle bin.
[0034] Optionally, during the logical volume recycling process, a logical volume recycling request is first obtained, so as to parse the logical volume to be recycled to the recycling bin from the logical volume recycling request, thereby obtaining the target logical volume; the logical volume recycling request here can be user input entered by the user in the front-end interface, or information generated under certain conditions by other controllers or other devices inside the storage server, such as a timed triggered logical volume recycling request. The so-called user input can be information input through a command line interface, a graphical interface, a touch input, a drop-down selection input, a voice input, a gesture input, a visual input, a brain-computer input, etc., and this embodiment does not specifically limit this.
[0035] Then, the volume management module is called to perform the following operations to preliminarily verify whether the status of the volume meets the prerequisites for adding to the recycle bin: A special function interface is added in the volume management module to process requests to add to the recycle bin. This interface will receive the identification information of the target logical volume as an input parameter, associate and obtain the storage status and function type of the target logical volume, and combine the storage status and function type of the target logical volume to perform multiple verifications on the target logical volume to achieve the prerequisite verification of the target logical volume.
[0036] Here, the storage status is used to indicate whether the target logical volume exists in each storage space, such as whether it is in the volume storage space of the storage server, whether it is in the recycle space of the recycle bin, etc. This embodiment does not make any specific limitation on this.
[0037] Here, the function type is used to indicate whether the target logical volume has corresponding function configuration, including but not limited to network attached storage function, traffic acceleration function, and performance statistics function, which is not specifically limited in this embodiment.
[0038] Here, multiple verifications can be the precondition verification corresponding to the storage status and the precondition verification corresponding to the function type executed successively, or the precondition verification corresponding to the storage status and the precondition verification corresponding to the function type executed in parallel. The specific selection can be adaptively determined according to the computing resources and verification time requirements of the storage server. For example, for scenarios with sufficient computing resources and time sensitivity, parallel verification can be used; for scenarios with insufficient computing resources and low time sensitivity, serial verification can be used, thereby ensuring the rational use of computing resources in the storage server and the stability of the system.
[0039] Step 120: When it is determined that the storage status and function type of the target logical volume have passed the verification, the validity of the target logical volume is verified according to the associated information, configuration status and task status of the target logical volume.
[0040] Optionally, when it is verified through the volume management module that the target logical volume has passed the precondition verification (that is, the storage status and functional type of the target logical volume have passed the verification), the associated information, configuration status and task status of the target logical volume can be associated and obtained based on the identification information of the target logical volume, and the associated information, configuration status and task status of the target logical volume can be combined to perform multiple verifications on the target logical volume to realize the validity verification of the target logical volume, thereby further verifying whether the target logical volume meets the recycling conditions.
[0041] The association information here is used to indicate whether the target logical volume has an associated mapping, including but not limited to whether there is a host mapping and whether it is added to a volume group, which is not specifically limited in this embodiment.
[0042] The configuration status here is used to characterize the volume configuration of the target logical volume, including but not limited to whether it is configured as a mirror volume, a volume undergoing rapid initialization, a shadow volume, a source volume, a volume with a remote replication relationship, a dual-active volume, and a volume with a local replication relationship. This embodiment does not make specific limitations on this.
[0043] The task status here is used to characterize the type of task being executed by the target logical volume, including but not limited to whether a migration task is being executed, whether a capacity expansion / reduction task is being executed, and whether a volume destruction task is being executed. This embodiment does not specifically limit this.
[0044] Here, multiple verifications can be the validity verification corresponding to the associated information, the validity verification corresponding to the configuration status, and the validity verification corresponding to the task status executed successively (or serially), or the validity verification corresponding to the associated information, the validity verification corresponding to the configuration status, and the validity verification corresponding to the task status executed in parallel. The specific selection and determination can be adaptively made based on the computing resources of the storage server and the verification time limit requirements, thereby ensuring the rational use of the computing resources in the storage server and the stability of the system.
[0045] Step 130: When it is determined that the target logical volume passes the validity verification, the target logical volume is migrated to a recycle bin.
[0046] Optionally, when it is determined that the target logical volume passes the prerequisite verification and the validity verification, it indicates that the target logical volume meets the conditions for being moved to the recycle bin. At this time, a recycling attribute mark will be added to it according to the identification of the target logical volume to migrate the target logical volume to the recycle bin, waiting for the user to perform the next deletion or restoration operation.
[0047] The method provided in this embodiment sets different operation permissions for logical volumes by introducing pre-verification of the storage status and function type of the target logical volume, combined with comprehensive validity verification of its associated information, configuration status and task status, thereby limiting the refined control of logical volume deletion entering the recycle bin, so that the logical volume is migrated to the recycle bin only when it is ensured to meet specific recycling conditions, effectively avoiding indiscriminate deletion of logical volumes due to user misoperation, significantly reducing the risk of important data loss, and ensuring the security of data and resource optimization in the storage server.
[0048] In some embodiments, the precondition verification in step 110 (ie, verification of the storage status and function type of the target logical volume) may be implemented by the volume management module executing the following steps: According to the storage status, determining whether the target logical volume is stored in the volume storage space of the storage server to obtain a first determination result; According to the storage status, determining whether the target logical volume is stored in the recycle bin to obtain a second determination result; According to the function type, determining whether the target logical volume is a network attached storage volume, and obtaining a third determination result; According to the function type, determining whether the target logical volume is a performance statistics volume, and obtaining a fourth determination result; the performance statistics volume is a logical volume used for performance statistics; According to the function type, determining whether the target logical volume is a flow acceleration volume, and obtaining a fifth determination result; the flow acceleration volume is a logical volume with flow acceleration; The storage status and function type of the target logical volume are verified according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result.
[0049] Optionally, the volume management module may first perform the following determination steps: According to the storage status of the target logical volume, it is determined whether the target logical volume still exists in the volume storage space of the storage server, and a first judgment result is obtained to confirm whether the logical volume is still in a manageable state. If it is determined that the target logical volume no longer exists in the storage server, the volume management module will immediately report an error and terminate the subsequent recovery operation process to prevent resource waste or system errors caused by invalid operations.
[0050] In addition, according to the storage status of the target logical volume, it is determined whether the target logical volume has been moved to the recycle bin to obtain a second determination result. If it is determined that the logical volume is already in the recycle bin, it means that it has been marked as pending or deleted by the user or the system before. At this time, it is unnecessary to try to recycle it again, and it may even cause confusion in data recovery. Therefore, at this time, the volume management module will also report an error and end the recycling operation process.
[0051] In addition, the management module can also determine whether the target logical volume is a network attached storage volume according to the functional type of the target logical volume to obtain a third judgment result. If the target logical volume is identified as a network attached storage volume (or NAS volume), then considering that the NAS volume usually carries special functions such as network sharing and remote access, its deletion or recycling operation will avoid affecting the stability of network services and the accessibility of data. Therefore, at this time, the management module will report an error and end the recycling operation process.
[0052] In addition, the management module can also determine whether the target logical volume is a volume used for performance statistics according to the functional type of the target logical volume, so as to obtain a fourth judgment result. Since the performance statistics volume is usually used to collect and analyze the performance indicators of the storage system, it is an important basis for system monitoring and optimization. If such a logical volume is recycled by mistake, it may cause the loss of performance data or interruption of analysis. Therefore, if the target logical volume is a volume used for performance statistics, the management module will also report an error and end the recycling operation process.
[0053] In addition, the management module can also determine whether the target logical volume is a traffic acceleration volume according to the functional type of the target logical volume to obtain a fifth judgment result. Since the traffic acceleration volume improves the efficiency of data transmission through specific technical means, it is crucial for application scenarios that require high-performance data transmission. If these volumes are accidentally recycled, the performance of the application may be affected. Therefore, if the target logical volume is a volume used for performance statistics, the management module will also intercept such operations, report an error, and end the recycling operation process.
[0054] Subsequently, the volume management module can integrate the above five judgment results and systematically perform a comprehensive precondition verification on the target logical volume (that is, verification of the storage status and functional type of the target logical volume), thereby obtaining the precondition verification result of the target logical volume, that is, verification result of the storage status and functional type of the target logical volume).
[0055] In some embodiments, the step of systematically performing comprehensive precondition verification on the target logical volume based on the five judgment results further includes: If it is determined that the target logical volume satisfies any one of the error condition set according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, determining that the storage state and the function type of the target logical volume fail to pass the verification; If it is determined that the target logical volume does not satisfy all conditions in the error condition set according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, determining that the storage state and the function type of the target logical volume pass the verification; Among them, the error condition set includes that the target logical volume is not stored in the volume storage space, the target logical volume is stored in the recycle bin, the target logical volume is a network attached storage volume, the target logical volume is a performance statistics volume and the target logical volume is a traffic acceleration volume.
[0056] Optionally, if the target logical volume satisfies any condition in the error condition set based on the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, that is, the target logical volume does not exist in the storage space, is located in the recycle bin, is any of a Nas volume, a performance statistics volume, and a traffic acceleration volume, then it is determined that the storage status and function type of the target logical volume have not passed the verification (that is, the prerequisite verification has not passed), the management module will also intercept the recovery operation of the target logical volume, report an error, and end the recovery operation process.
[0057] If it is jointly determined based on the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result that the target logical volume does not meet all the conditions in the error condition set, that is, the target logical volume exists in the volume storage space, is not located in the recycle bin, and is a non-NAS volume, a non-performance statistics volume, and a non-traffic acceleration volume, then it is determined that the storage status and function type of the target logical volume pass the verification (that is, pass the precondition verification). At this time, the recycling request of the target logical volume is transmitted to the next-level module for verification, thereby effectively avoiding data loss or service interruption caused by user misoperation or improper configuration, and improving the security and reliability of storage management.
[0058] The method provided in this embodiment performs precondition verification by comprehensively evaluating the storage status of the target logical volume in the storage server (whether it is located in the volume storage space or the recycle bin) and its functional type (whether it is a network-attached storage volume, a performance statistics volume, or a traffic acceleration volume), thereby effectively ensuring the completeness of the conditions before subsequent operations are performed on the target logical volume. Through the set judgment logic, once the target logical volume meets any condition in the error condition set (i.e., not stored in the volume storage space, located in the recycle bin, or having a specific functional type such as network attachment, performance statistics, or traffic acceleration), it is determined that it has failed the verification, otherwise it has passed the verification, so as to ensure that storage resources are reasonably allocated and used through reasonable permission settings, thereby improving resource optimization and avoiding excessive occupation or waste of system resources due to improper operations of certain users. In addition, the operation of deleting the volume and entering the recycle bin can be restricted, thereby preventing important data from being accidentally deleted, thereby improving the accuracy of logical volume management and data security.
[0059] In some embodiments, the validity verification step in step 120 further includes: Performing a first-stage validity verification on the target logical volume according to the association information; In the case where it is determined that the target logical volume has passed the first stage of validity verification, performing a second stage of validity verification on the target logical volume according to the configuration state; In the case where it is determined that the target logical volume has passed the second stage of validity verification, performing a third stage of validity verification on the target logical volume according to the task status; In case it is determined that the target logical volume has passed the validity verification of the third stage, it is determined that the target logical volume has passed the validity verification.
[0060] Optionally, when it is determined through step 110 that the target logical volume passes the precondition verification, the protocol management module, the configuration management module, and the storage pool management module may be sequentially called to perform the following steps to implement validity verification of the target logical volume: First, call the protocol management module, obtain the corresponding associated information based on the identification information of the target logical volume, and perform the first-stage validity verification on the target logical volume based on the associated information; if the target logical volume fails the first-stage validity verification, an error is reported and the recovery operation process is stopped.
[0061] If the target logical volume passes the first phase of validity verification, the configuration management module is called to obtain the corresponding configuration status according to the identification information of the target logical volume, and the second phase of validity verification is performed on the target logical volume according to the configuration status. If the target logical volume fails the second phase of validity verification, an error is reported and the recovery operation process is stopped and ended.
[0062] If the target logical volume passes the validity verification of the second stage, the storage pool management module is called to obtain the corresponding task status based on the identification information of the target logical volume, and the target logical volume is subjected to the validity verification of the third stage based on the task status. If the target logical volume fails the validity verification of the third stage, an error is reported and the recovery operation process is stopped and ended.
[0063] If the target logical volume passes the validity verification of the first stage, the second stage, and the third stage, it is determined that the target logical volume passes the validity verification.
[0064] The method provided in this embodiment, through a step-by-step verification mechanism, first performs a first-stage validity verification based on associated information, then performs a second-stage verification based on the configuration status after confirming that the first-stage verification has passed, and then performs a third-stage verification based on the task status after the second-stage verification is successful, thereby ensuring the validity of the target logical volume in multiple key dimensions. Finally, only when all three stages have passed the verification, is it confirmed that the target logical volume has passed the validity verification as a whole, thereby improving the accuracy and reliability of logical volume operations, avoiding important data from being accidentally deleted, and further improving the accuracy of logical volume management and data security.
[0065] In some embodiments, the first stage of validity verification further includes: According to the association information, determine whether the target logical volume has a host mapping and whether to join a volume group; In the case where it is determined that the target logical volume does not have a host mapping and is not added to a volume group, determining that the target logical volume passes the first stage of validity verification; In the case where it is determined that the target logical volume has a host mapping and / or is added to a volume group, it is determined that the target logical volume has not passed the first stage of validity verification.
[0066] Optionally, the protocol management module may perform the following steps to implement the first phase of validity verification. If the first phase of validity verification passes, the second phase of validity verification will be performed: The protocol management module needs to check the association information of the target logical volume, including whether the logical volume has established a mapping relationship with the host system and whether it has been added to the volume group. These checks are the first stage of validity verification, and the purpose is to ensure that the logical volume can be safely recycled without being associated with other system components.
[0067] Among them, the host mapping judgment is used to verify whether the target logical volume has established a mapping relationship with the host. If it is found that the target logical volume already has a host mapping, an error message will be generated to inform the operator of the current usage status of the logical volume and end the volume recovery operation process, thereby preventing operations on the logical volume in use that may affect data integrity or cause service interruption.
[0068] For volume group judgment, it checks whether the target logical volume has been added to a volume group. If the target logical volume has been added to a volume group, then operating it alone may affect the stability of the entire volume group and the consistency of the data. Therefore, if it is detected that the logical volume has been added to the volume group, an error will also be reported and the volume recovery operation process will be terminated.
[0069] If the target logical volume does not exist in any host mapping and is not added to any volume group, it is determined that the target logical volume has passed the first stage of validity verification, thereby indicating that the target logical volume currently has no active dependencies and can be verified in the next stage to safely perform subsequent recovery operations.
[0070] If the logical volume has host mapping and / or has been added to the volume group, it is determined that the logical volume has not passed the validity verification of the first phase. At this time, in order to ensure data security, an error message can be generated and the volume recycling operation process is terminated.
[0071] The method provided in this embodiment effectively distinguishes between idle logical volumes that can be used for recycling and logical volumes that are currently in use (have host mapping or have been added to a volume group) by comprehensively judging whether the target logical volume has host mapping and whether it has been added to a volume group, thereby ensuring that the first stage of validity verification is passed only when the target logical volume has neither host mapping nor has been added to any volume group, providing an accurate basis for subsequent logical volume recycling operations and optimizing the recycling efficiency and accuracy of storage resources.
[0072] In some embodiments, the second stage of validity verification further includes: According to the configuration state, determining whether the target logical volume matches any logical volume in a target volume set, the target volume set including mirror volumes, volumes that are performing initialization operations, shadow volumes, source volumes, volumes in a remote replication relationship, active-active volumes, and volumes in a local replication relationship; In the case where it is determined that the target logical volume matches any logical volume in the target volume set, determining that the target logical volume fails the validity verification of the second stage; In the case where it is determined that the target logical volume does not match any logical volumes in the target volume set, it is determined that the target logical volume passes the second stage validity verification.
[0073] Optionally, after the target logical volume has passed the first phase of validity verification according to the verification of the protocol management module, the configuration management module is called to perform the following steps to perform the second phase of validity verification to determine whether the target logical volume to be moved into the recycle bin has established a relationship with other volumes, so as to avoid affecting the use of the related volumes after being cleared from the recycle bin: According to the configuration status, it is determined whether the target logical volume is at least one of a mirror volume, a volume being initialized, a shadow volume, a source volume, a volume in a remote replication relationship, a dual-active volume, and a volume in a local replication relationship.
[0074] If it is determined that the target logical volume is a mirrored volume, due to the data redundancy and disaster recovery of the mirrored volume, if it is migrated to the recycle bin, it will affect the consistency of the data and the effectiveness of the backup. Therefore, in order to ensure the security of the data, an error message can be generated at this time and the volume recovery operation process is terminated.
[0075] If it is determined that the target logical volume is a volume that is performing an initialization operation, then since fast initialization may involve fast copying of data or pre-configuration of the volume, if it is migrated to the Recycle Bin, it will cause data corruption. Therefore, in order to ensure data security, an error message can be generated at this time and the volume recycling operation process is terminated.
[0076] If it is determined that the target logical volume is a shadow volume or a source volume, since the shadow volume is usually used for data backup, and the source volume is the original data source of the shadow volume, if it is migrated to the recycle bin, it will affect the integrity of the backup and the consistency of the data. Therefore, in order to ensure the security of the data, an error message can be generated at this time and the volume recovery operation process is terminated.
[0077] When it is determined that the target logical volume is a volume with a remote replication relationship or a dual-active volume, if it is migrated to the recycle bin, it will affect data inconsistency. Therefore, in order to ensure data security, an error message can be generated at this time and the volume recycling operation process is terminated.
[0078] When it is determined that the target logical volume is a volume with a local replication relationship, if it is migrated to the recycle bin, the integrity of the replication chain will be affected. Therefore, in order to ensure data security, an error message can be generated at this time and the volume recycling operation process is terminated.
[0079] Therefore, when performing the second-stage validity verification, if the target logical volume matches any logical volume in the target volume set, it is determined that the logical volume has not passed the second-stage validity verification, and an error is reported and the volume recovery operation process is terminated to ensure that data security is not compromised due to the recovery of volumes that are undergoing critical operations or have special configurations.
[0080] On the contrary, if the target logical volume does not match any logical volumes in the target volume set, it is determined that the target logical volume has passed the second-stage validity verification, which means that the target logical volume has no ongoing critical operation or special configuration and can be safely operated subsequently.
[0081] The method provided in this embodiment can accurately identify and exclude logical volumes in special states by performing a second-stage validity verification on the target logical volume based on the configuration status during the logical volume recovery process, thereby ensuring that the target logical volume is determined to have passed the verification only when it does not belong to these special volume sets, thereby providing a reliable premise for subsequent recovery operations and effectively avoiding misoperation and data consistency risks.
[0082] In some embodiments, the validity verification step of the third stage further includes: According to the task status, determining whether the task executed by the target logical volume matches any task in a first target task set, wherein the first target task set includes a migration task, a capacity expansion task, a capacity reduction task, and a volume destruction task; In the case where it is determined that the task executed by the target logical volume matches any task in the first target task set, determining that the target logical volume fails the validity verification of the third stage; In the case where it is determined that the task executed by the target logical volume does not match all the tasks in the first target task set, it is determined that the target logical volume passes the validity verification of the third stage.
[0083] Optionally, after the target logical volume has passed the second phase of validity verification according to the verification of the configuration management module, the storage pool management module is called to perform the following steps to perform the third phase of validity verification to detect whether the volume has a migration task, etc., to avoid data loss: According to the task status, it is determined whether the task executed by the target logical volume is at least one of a migration task, a capacity expansion task, a capacity reduction task, and a volume destruction task.
[0084] When it is determined that the target logical volume is a migration task, since the migration task may include data replication, system update or hardware change, if it is migrated to the recycle bin, it will affect data security. Therefore, in order to ensure data security, an error message can be generated at this time and the volume recycling operation process is terminated.
[0085] When it is determined that the target logical volume is an expansion task or a reduction task, since the expansion task or the reduction task involves reconfiguring storage resources and adjusting the storage layout, if it is migrated to the recycling bin, it will affect the resource configuration of the storage server. Therefore, in order to ensure the validity of the resource configuration, an error message can be generated at this time and the volume recycling operation process is ended.
[0086] When it is determined that the target logical volume is a volume destruction task, in order to ensure data security, an error message may be generated and the volume recovery operation process may be terminated.
[0087] During the validity verification process of the third phase, if the target logical volume is performing migration, expansion, reduction or volume destruction tasks, these tasks usually involve the movement or modification of data, and any external intervention may cause data loss, damage or task failure. Therefore, in order to ensure data security, it is determined that the target logical volume has not passed the validity verification of the third phase, and an error is reported and the recovery operation process ends. If the task performed by the target logical volume does not match all the tasks in the first target task set, it is determined that the target logical volume has passed the validity verification of the third phase, which means that the target logical volume is not currently involved in any critical tasks and can safely perform subsequent recovery operations.
[0088] The method provided in this embodiment analyzes the task status of the target logical volume and compares it with the first target task set including key operations such as migration, expansion, reduction and volume destruction, effectively ensuring that only when the logical volume is not in the execution state of these sensitive tasks, it is allowed to pass the validity verification of the third stage and then participate in the recycling process. This mechanism significantly improves the security and data protection capabilities of the logical volume recycling operation and avoids potential risks caused by the recycling operation interfering with the ongoing key tasks.
[0089] In some embodiments, the method further comprises: In case of receiving an operation request for the target logical volume, determining whether the target logical volume is migrated to the recycle bin; In the case where it is determined that the target logical volume is migrated to the recycle bin, obtaining a task type of a task to be executed according to the operation request; If it is determined according to the task type that the task to be executed is any task in the second target task set, then execution of the task to be executed on the target logical volume is stopped, and an error message is output; Among them, the second target task set includes multiple tasks including mapping tasks, migration tasks, destruction tasks, capacity expansion tasks, capacity reduction tasks, attribute modification tasks, local replication relationship creation tasks, remote replication relationship creation tasks, active-active volume creation tasks, and shadow volume creation tasks.
[0090] Optionally, after a volume is added to the Recycle Bin, it has not actually been deleted and cannot be operated to avoid writing important data into the Recycle Bin. If a volume in the Recycle Bin is accidentally deleted, data loss may occur, or even a greater impact. Therefore, the following steps also need to be performed on the volume in the Recycle Bin to restrict permissions and avoid losses: When an operation request for the target logical volume is received, it is first determined whether the target logical volume is a volume in the Recycle Bin. If it is a volume in the Recycle Bin, the task type of the task to be executed is obtained according to the operation request. If the task type is any of the mapping tasks, migration tasks, destruction tasks, capacity expansion tasks, capacity reduction tasks, attribute modification tasks, local replication relationship creation tasks, remote replication relationship creation tasks, active-active volume creation tasks, and shadow volume creation tasks, then in order to avoid the user writing data to a volume in the Recycle Bin, resulting in data loss or operation failure, etc., an error will be reported and the relevant operations corresponding to the task to be executed on the target logical volume will be stopped, thereby ensuring the security of the volume Recycle Bin function.
[0091] The method provided in this embodiment performs a series of conditional judgments before the user puts the logical volume that he wants to delete into the recycle bin. Only the logical volume that meets all the conditions can be put into the recycle bin. At the same time, a series of permission restrictions are also imposed on the volumes in the recycle bin. By restricting the operation permissions on the volumes, it is possible to prevent users from abusing the recycle bin function, such as frequently deleting and restoring volumes, which may have a negative impact on system performance. In a production environment, stricter permission control is required to ensure the stability of the system, thereby avoiding the risk of data loss.
[0092] The logical volume management system provided by the present invention is described below. The logical volume management system described below and the logical volume management method described above can be referenced to each other.
[0093] Figure 3 Schematic diagram of the structure of the logical volume management system provided by the present invention; Figure 3 As shown, the system includes: The volume management module 310 is used to verify the storage status and function type of the target logical volume in the storage server; The validity verification module 320 is used to verify the validity of the target logical volume according to the associated information, configuration status and task status of the target logical volume when it is determined that the storage status and function type of the target logical volume pass the verification; The migration module 330 is used to migrate the target logical volume to a recycle bin when it is determined that the target logical volume passes the validity verification.
[0094] The system provided in this embodiment sets different operation permissions for logical volumes by introducing pre-verification of the storage status and function type of the target logical volume, combined with comprehensive validity verification of its associated information, configuration status and task status, thereby limiting the refined control of logical volume deletion entering the recycle bin, so that the logical volume is migrated to the recycle bin only when it is ensured to meet specific recycling conditions, effectively avoiding indiscriminate deletion of logical volumes due to user misoperation, significantly reducing the risk of important data loss, and ensuring the security of data and resource optimization in the storage server.
[0095] The system provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.
[0096] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the logical volume management method, which includes: verifying the storage status and function type of the target logical volume in the storage server; if it is determined that the storage status and function type of the target logical volume pass the verification, verifying the validity of the target logical volume according to the associated information, configuration status and task status of the target logical volume; if it is determined that the target logical volume passes the validity verification, migrating the target logical volume to the recycle bin.
[0097] In addition, the logic instructions in the above-mentioned memory 430 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 this 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.
[0098] On the other hand, the present invention also provides a computer program product, which 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 logical volume management method provided by the above-mentioned methods, which includes: verifying the storage status and function type of the target logical volume in the storage server; when it is determined that the storage status and function type of the target logical volume pass the verification, verifying the validity of the target logical volume based on the associated information, configuration status and task status of the target logical volume; when it is determined that the target logical volume passes the validity verification, migrating the target logical volume to a recycle bin.
[0099] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the logical volume management method provided by the above-mentioned methods, the method comprising: verifying the storage status and function type of the target logical volume in the storage server; when it is determined that the storage status and function type of the target logical volume have passed the verification, verifying the validity of the target logical volume based on the associated information, configuration status and task status of the target logical volume; when it is determined that the target logical volume has passed the validity verification, migrating the target logical volume to a recycle bin.
[0100] The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown 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 solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0101] 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.
[0102] 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 logical volume management method, characterized in that: include: Verify the storage status and function type of the target logical volume in the storage server; When it is determined that the storage state and the function type of the target logical volume have passed the verification, verifying the validity of the target logical volume according to the associated information, the configuration state and the task state of the target logical volume; When it is determined that the target logical volume passes the validity verification, the target logical volume is migrated to a recycle bin.
2. The logical volume management method according to claim 1, characterized in that: The verifying of the storage status and function type of the target logical volume in the storage server includes: According to the storage status, determining whether the target logical volume is stored in the volume storage space of the storage server to obtain a first determination result; According to the storage status, determining whether the target logical volume is stored in the recycle bin to obtain a second determination result; According to the function type, determining whether the target logical volume is a network attached storage volume, and obtaining a third determination result; According to the function type, determining whether the target logical volume is a performance statistics volume, and obtaining a fourth determination result; the performance statistics volume is a logical volume used for performance statistics; According to the function type, determining whether the target logical volume is a flow acceleration volume, and obtaining a fifth determination result; the flow acceleration volume is a logical volume with flow acceleration; The storage status and function type of the target logical volume are verified according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result.
3. The logical volume management method according to claim 2, characterized in that: The verifying the storage status and function type of the target logical volume according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result includes: If it is determined that the target logical volume satisfies any one of the error condition set according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, determining that the storage state and the function type of the target logical volume fail to pass the verification; If it is determined that the target logical volume does not satisfy all conditions in the error condition set according to the first judgment result, the second judgment result, the third judgment result, the fourth judgment result and the fifth judgment result, determining that the storage state and the function type of the target logical volume pass the verification; Among them, the error condition set includes that the target logical volume is not stored in the volume storage space, the target logical volume is stored in the recycle bin, the target logical volume is a network attached storage volume, the target logical volume is a performance statistics volume and the target logical volume is a traffic acceleration volume.
4. The logical volume management method according to any one of claims 1 to 3, characterized in that: The validating the target logical volume according to the associated information, configuration status and task status of the target logical volume includes: Performing a first-stage validity verification on the target logical volume according to the association information; In the case where it is determined that the target logical volume has passed the first stage of validity verification, performing a second stage of validity verification on the target logical volume according to the configuration state; In the case where it is determined that the target logical volume has passed the second stage of validity verification, performing a third stage of validity verification on the target logical volume according to the task status; In case it is determined that the target logical volume has passed the validity verification of the third stage, it is determined that the target logical volume has passed the validity verification.
5. The logical volume management method according to claim 4, characterized in that: The first stage of validating the target logical volume according to the association information includes: According to the association information, determine whether the target logical volume has a host mapping and whether to join a volume group; In the case where it is determined that the target logical volume does not have a host mapping and is not added to a volume group, determining that the target logical volume passes the first stage of validity verification; In the case where it is determined that the target logical volume has a host mapping and / or is added to a volume group, it is determined that the target logical volume has not passed the first stage of validity verification.
6. The logical volume management method according to claim 4, characterized in that: The performing a second phase of validity verification on the target logical volume according to the configuration state includes: According to the configuration state, determining whether the target logical volume matches any logical volume in a target volume set, the target volume set including mirror volumes, volumes that are performing initialization operations, shadow volumes, source volumes, volumes in a remote replication relationship, active-active volumes, and volumes in a local replication relationship; In the case where it is determined that the target logical volume matches any logical volume in the target volume set, determining that the target logical volume fails the validity verification of the second stage; In the case where it is determined that the target logical volume does not match any logical volumes in the target volume set, it is determined that the target logical volume passes the second stage validity verification.
7. The logical volume management method according to claim 4, characterized in that: The third stage of performing validity verification on the target logical volume according to the task status includes: According to the task status, determining whether the task executed by the target logical volume matches any task in a first target task set, wherein the first target task set includes a migration task, a capacity expansion task, a capacity reduction task, and a volume destruction task; In the case where it is determined that the task executed by the target logical volume matches any task in the first target task set, determining that the target logical volume fails the validity verification of the third stage; In the case where it is determined that the task executed by the target logical volume does not match all the tasks in the first target task set, it is determined that the target logical volume passes the validity verification of the third stage.
8. The logical volume management method according to any one of claims 1 to 3, characterized in that: The method further comprises: In case of receiving an operation request for the target logical volume, determining whether the target logical volume is migrated to the recycle bin; In the case where it is determined that the target logical volume is migrated to the recycle bin, obtaining a task type of a task to be executed according to the operation request; If it is determined according to the task type that the task to be executed is any task in the second target task set, then execution of the task to be executed on the target logical volume is stopped, and an error message is output; Among them, the second target task set includes multiple tasks including mapping tasks, migration tasks, destruction tasks, capacity expansion tasks, capacity reduction tasks, attribute modification tasks, local replication relationship creation tasks, remote replication relationship creation tasks, active-active volume creation tasks, and shadow volume creation tasks.
9. A logical volume management system, characterized in that: include: A volume management module, used to verify the storage status and function type of the target logical volume in the storage server; A validity verification module, configured to verify the validity of the target logical volume according to the associated information, configuration status and task status of the target logical volume when it is determined that the storage status and function type of the target logical volume pass the verification; The migration module is used to migrate the target logical volume to a recycle bin when it is determined that the target logical volume passes the validity verification.
10. 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 logical volume management method according to any one of claims 1 to 8 is implemented.
11. 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 logical volume management method according to any one of claims 1 to 8 is implemented.