An optimization method, device and equipment for preventing full-flash stack NAS snapshot residue

CN114780294BActive Publication Date: 2024-10-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210468962.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2024-10-15
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In an all-flash stack environment, residual problems often occur in NAS snapshots, resulting in a waste of system resources and data inconsistency. The existing regular cleaning methods are crude and ineffective.

Method used

After receiving the stop snapshot command, it generates a copy of the snapshot volume and deletes the original snapshot volume, and triggers an alarm before the command is completed to ensure that the snapshot volume is completely deleted to avoid residue.

Benefits of technology

It effectively avoids NAS snapshot residue, saves system resources, improves system robustness and user experience, and ensures data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780294B_ABST
    Figure CN114780294B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of storage processing technology, and specifically provides an optimization method, device, and equipment to prevent full-flash stack NAS snapshot residues. The method includes the following steps: after receiving an instruction to stop snapshots, when generating snapshot volumes from NAS source storage volumes in the full-flash stack, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume; judging whether the instruction to stop snapshots is executed; if so, executing a delete instruction to directly delete the generated snapshot volume; if not, waiting for a set period to judge whether the instruction to stop snapshots is executed; if completed, executing the step: executing a delete instruction to directly delete the generated snapshot volume; if not completed, triggering an alarm message and reporting. By judging the actual change factors of successful execution, the residue of NAS snapshots is avoided and system resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage processing technology, and in particular to an optimization method, device and equipment for preventing full-flash stack NAS snapshot residues. Background Art

[0002] NAS (Network Attached Storage) provides a mechanism for managing file systems and multi-client shared access on the storage system side. At the same time, in order to increase the security of NAS stored data, NAS snapshots have also come into being, providing a consistent copy of the data stored in NAS at a certain point in time. Moreover, the NAS scheduled snapshot mechanism can generate NAS snapshots according to scheduled tasks and at manually specified time intervals or cycles, which greatly ensures data security.

[0003] Currently, with the emergence of the full-flash stack, NAS has also begun to create file systems based on thin pools (storage pools created in the full-flash stack environment). However, due to the immaturity of some current scheduled snapshot mechanisms and the differences between thin pools and ordinary pools, NAS snapshots often remain. That is, the snapshots visible to client users have been deleted and no longer exist, but in the actual running system, there are still snapshot volumes remaining, occupying resources and affecting system performance and client / server data consistency.

[0004] In the current storage system, in order to solve the problem of residual NAS snapshots in the all-flash stack, some snapshot volumes are regularly queried and cleaned up, and snapshot volumes with no snapshot relationship / or abnormal relationship are deleted; however, this method is undoubtedly very general and rough, and does not fundamentally solve the problem of residual NAS snapshots. At the same time, there will still be residual NAS snapshots in the time interval between two cleanups. Summary of the invention

[0005] In the current storage system, in order to solve the problem of residual NAS snapshots in the full-flash stack, some snapshot volumes are regularly queried and cleaned up, and snapshot volumes with no snapshot relationship / or abnormal relationship are deleted; however, this method is undoubtedly very general and rough, and does not fundamentally solve the problem of residual NAS snapshots. At the same time, there will still be residual NAS snapshots in the time interval between two cleanups. In order to solve the above problems, this article starts from the differences between full-flash stack and ordinary stack NAS snapshots, optimizes the deletion processing mechanism of full-flash stack NAS snapshots, and greatly solves the fundamental problem of residual NAS snapshots.

[0006] The specific scheme of the present invention is:

[0007] In a first aspect, the technical solution of the present invention provides an optimization method for preventing full-flash stack NAS snapshot residues, comprising the following steps:

[0008] After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0009] Determine whether the command to stop the snapshot has been executed;

[0010] If yes, execute the delete command to directly delete the generated snapshot volume;

[0011] If not, wait for the set period to determine whether the command to stop the snapshot is executed; if completed, execute the steps: execute the delete command to directly delete the generated snapshot volume; if not completed, trigger an alarm message and report it.

[0012] By changing the judgment condition for successful command execution from the successful delivery of the command to the actual changing factors for judging the successful execution, the residual NAS snapshots are fundamentally avoided, system resources are saved, the robustness of the system is increased, and the user experience is optimized.

[0013] Preferably, after the step of executing the deletion instruction to directly delete the generated snapshot volume and the step of executing the deletion instruction to directly delete the generated snapshot volume, the method further includes:

[0014] Determine whether snapshot deletion is a scheduled trigger task;

[0015] If yes, proceed to the next round of snapshot deletion;

[0016] If not, end the task.

[0017] Preferably, the step of determining whether the instruction to stop the snapshot has been executed includes:

[0018] Check whether the first copy volume still exists;

[0019] If it exists, the command to stop the snapshot has not been executed successfully, and the execution steps are: wait for the set period to determine whether the command to stop the snapshot has been executed;

[0020] If it does not exist, the stop snapshot command is executed successfully, and the execution step executes the delete command to directly delete the generated snapshot volume.

[0021] If it exists, it means that the next instruction cannot be executed, that is, the instruction to stop the snapshot has not been truly successful; if it does not exist, it means that the snapshot has been successfully stopped.

[0022] Preferably, after receiving the instruction to stop the snapshot, when generating a snapshot volume from the NAS source storage volume in the full-flash stack, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and before deleting the first copy volume, the step includes:

[0023] Check whether there is a snapshot copy volume in the deleted state on the server;

[0024] If so, set a trigger task to delete the snapshot;

[0025] If not, set the time interval to execute the steps: query the server whether there is a snapshot copy volume in the deletion state.

[0026] The volumes in the All-Flash Stack are all thin volumes in the thin pool. When a thin volume is deleted, the volume will continue to exist and its status will be deleting. The volume in this status is not visible on the client, but it can actually be found on the server backend of the system.

[0027] Preferably, the step of setting a trigger task to delete the snapshot includes:

[0028] Set a scheduled trigger task to send a snapshot stop command; or set a single trigger task to send a snapshot stop command.

[0029] Preferably, when the server has multiple nodes, the step of setting a trigger task to delete the snapshot includes:

[0030] Create a snapshot deletion task, search for the snapshot copy volumes to be deleted corresponding to all nodes, and send the deletion task to each node;

[0031] The trigger task is set to make each node perform the deletion operation on the snapshot copy volume to be deleted at the same time. After the data consistency operation of multiple nodes, in order to improve the efficiency, multiple nodes need to perform the deletion operation on the snapshot copy volume to be deleted at the same time.

[0032] Preferably, after the step of executing the deletion instruction to directly delete the generated snapshot volume, the step further includes:

[0033] After detecting that each node has completed the operation of deleting the snapshot volume, feedback information on the completion of the snapshot volume deletion is reported. The execution process of the instruction is monitored in real time to feedback the execution information.

[0034] Preferably, before the step of querying the server whether there is a snapshot copy volume in a deleted state, the step includes:

[0035] Before performing multi-node data synchronization, a snapshot is taken of the target data, and data synchronization is completed based on the snapshot; after the data synchronization is completed, the snapshot copy volume is deleted on the client.

[0036] In a second aspect, the technical solution of the present invention also provides an optimization device for preventing full-flash stack NAS snapshot residues, including an instruction receiving and processing module, a first judgment module, a deletion module and an alarm output module;

[0037] The instruction receiving and processing module is used for, after receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, copying the volume of the snapshot created by the internal mechanism of the snapshot to generate a second copy volume, and deleting the first copy volume at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0038] A first judging module is used to judge whether the instruction to stop the snapshot has been executed;

[0039] A deletion module, configured to execute a deletion instruction to directly delete the generated snapshot volume if the first judgment module determines that the execution of the stop snapshot instruction is completed;

[0040] The alarm output module is used to trigger and report the alarm information if the first judgment module determines that the stop snapshot instruction has not been executed.

[0041] By changing the judgment condition for successful command execution from the successful delivery of the command to the actual changing factors for judging the successful execution, the residual NAS snapshots are fundamentally avoided, system resources are saved, the robustness of the system is increased, and the user experience is optimized.

[0042] Preferably, the device further comprises a second judging module, wherein the second judging module judges whether the snapshot deletion is a timed triggering task.

[0043] Preferably, the first judgment module includes a query unit and a timing unit;

[0044] The query unit is used to query whether the first copy volume still exists; if it does, the instruction to stop the snapshot is not executed successfully, the timing unit is triggered to start timing, and when the timing reaches a set period, it is queried again whether the first copy volume still exists; if it does not exist, the instruction to stop the snapshot is executed successfully, and the information is output to the deletion module to directly delete the generated snapshot volume.

[0045] If it exists, it means that the next instruction cannot be executed, that is, the instruction to stop the snapshot has not been truly successful; if it does not exist, it means that the snapshot has been successfully stopped.

[0046] Preferably, before performing multi-node data synchronization, a snapshot is taken of the target data, and data synchronization is completed based on the snapshot; after data synchronization is completed, the snapshot copy volume is deleted on the client. The device also includes a status query module and a setting module;

[0047] A status query module is used to query whether there is a snapshot copy volume in a deleted state on the server;

[0048] The setting module is used to set a trigger task to delete the snapshot if the status query module finds that there is a snapshot copy volume in the deletion state on the server.

[0049] The volumes in the All-Flash Stack are all thin volumes in the thin pool. When a thin volume is deleted, the volume will continue to exist and its status will be deleting. The volume in this status is not visible on the client, but it can actually be found on the server backend of the system.

[0050] Preferably, the setting module is specifically used to set a timed trigger task to send a snapshot stop instruction; or to set a single trigger task to send a snapshot stop instruction.

[0051] Preferably, when the server is a plurality of nodes, the setting module includes a task creation unit and a task triggering unit;

[0052] A task creation unit is used to create a snapshot deletion task, search for the snapshot copy volumes to be deleted corresponding to all nodes, and send the deletion task to each node;

[0053] The task triggering unit is used to set a triggering task to make each node perform a deletion operation on the snapshot copy volume to be deleted at the same time. After multiple nodes perform data consistency operations, multiple nodes need to perform a deletion operation on the snapshot copy volume to be deleted at the same time in order to improve efficiency.

[0054] Preferably, the device further comprises a detection module, which is used to detect that each node has completed the operation of deleting the snapshot volume, and report feedback information of the completion of the snapshot volume deletion. The execution process of the instruction is monitored in real time to feedback the execution information.

[0055] In a third aspect, the technical solution of the present invention further provides a computer device, comprising: a memory and one or more processors;

[0056] A memory for storing one or more programs;

[0057] The one or more programs are executed by the one or more processors, so that the one or more processors are used to execute the optimization method for preventing residual full-flash stack NAS snapshots described in the first aspect.

[0058] From the above technical solution, it can be seen that the present invention has the following advantages: the present invention optimizes the deletion mechanism of the full-flash stack NAS snapshot. Different from the NAS snapshot of the common stack, the standard for judging the success of stopping the snapshot / deleting the snapshot is optimized from the successful execution of the command to detecting whether a copy of the snapshot volume still exists. In this way, the final state of stopping the snapshot / deleting the snapshot is obtained more accurately, which prevents the residual of the NAS snapshot and avoids the waste of system resources.

[0059] By changing the judgment condition for successful command execution from the successful delivery of the command to the actual changing factors for judging the successful execution, the residual NAS snapshots are fundamentally avoided, system resources are saved, the robustness of the system is increased, and the user experience is optimized.

[0060] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.

[0061] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0063] Figure 1 It is a schematic flow chart of a method of embodiment 1 of the present invention.

[0064] Figure 2 It is a schematic flow chart of a method of Embodiment 2 of the present invention.

[0065] Figure 3 It is a schematic block diagram of a device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0066] Currently, with the emergence of the full-flash stack, NAS has also begun to create file systems based on thin pools (storage pools created in the full-flash stack environment). However, due to the immaturity of some current scheduled snapshot mechanisms and the differences between thin pools and ordinary pools, NAS snapshots often remain. That is, the snapshots visible to client users have been deleted and no longer exist, but in the actual running system, there are still snapshot volumes remaining, occupying resources and affecting system performance and client / server data consistency.

[0067] In the current storage system, in order to solve the problem of residual NAS snapshots in the full-flash stack, some snapshot volumes are regularly queried and cleaned up, and snapshot volumes with no snapshot relationship / or abnormal relationship are deleted; however, this method is undoubtedly very general and rough, and does not fundamentally solve the problem of residual NAS snapshots. At the same time, there will still be residual NAS snapshots in the time interval between two cleanups. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0068] The root causes of residual snapshots in the full-flash stack NAS are: (1) All volumes in the full-flash stack are thin volumes in the thin pool. When a thin volume is deleted, the volume will continue to exist and the status is deleting. The volume in this status is not visible on the client, but it can actually be found in the system's server background. (2) When deleting a snapshot, there are two steps: first, stop the snapshot. In this process, when deleting the copy of the snapshot, due to step (1), the copy will be in the deleting status for a period of time. In order to ensure the availability of the snapshot, another copy will be temporarily added to the snapshot. When the copy in the deleting status is completely deleted, the temporarily added copy will also be deleted. After the command to stop the snapshot is executed, the copy of the snapshot is not actually deleted (it is actually in the deleting status). Then, when the snapshot is deleted, the deletion will fail because there is still a copy of the snapshot in the deleting status. If this snapshot deletion action is triggered by a background scheduled snapshot task, the user will not be aware of the deletion failure, which will eventually lead to more and more residual snapshot volumes, seriously wasting system resources.

[0069] like Figure 1 As shown, Embodiment 1 of the present invention provides an optimization method for preventing full-flash stack NAS snapshot residues, comprising the following steps:

[0070] Step 1: After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0071] Step 2: Determine whether the stop snapshot instruction has been executed; if so, execute step 3, otherwise execute step 4;

[0072] Step 3: Execute the delete command to directly delete the generated snapshot volume;

[0073] Step 4: Wait for the set period to determine whether the stop snapshot instruction has been executed; if so, execute step 3; otherwise, execute step 5;

[0074] Step 5: Trigger the alarm information and report it.

[0075] By changing the judgment condition for successful command execution from the successful delivery of the command to the actual changing factors for judging the successful execution, the residual NAS snapshots are fundamentally avoided, system resources are saved, the robustness of the system is increased, and the user experience is optimized.

[0076] like Figure 2 As shown, Embodiment 2 of the present invention provides an optimization method for preventing full-flash stack NAS snapshot residues, comprising the following steps:

[0077] Step 1: After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0078] Step 2: Determine whether the stop snapshot instruction has been executed; if so, execute step 3, otherwise execute step 4;

[0079] Step 3: Execute the delete command to directly delete the generated snapshot volume; proceed to step 6;

[0080] Step 4: Wait for the set period to determine whether the stop snapshot instruction has been executed; if so, execute step 3; otherwise, execute step 5;

[0081] Step 5: Trigger the alarm information and report it; go to step 6;

[0082] Step 6: Determine whether snapshot deletion is a scheduled trigger task;

[0083] If yes, go to step 7; if no, go to step 8;

[0084] Step 7: Continue to the next round of snapshot deletion;

[0085] Step 8: End the task.

[0086] Embodiment 3 of the present invention provides an optimization method for preventing full-flash stack NAS snapshot residues, comprising the following steps:

[0087] S1: After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0088] S2: Check whether the first copy volume still exists; if not, the command to stop the snapshot is executed successfully, and S3 is executed; otherwise, the command to stop the snapshot is not executed successfully, and S4 is executed;

[0089] S3: Execute the delete command to directly delete the generated snapshot volume; execute S6;

[0090] S4: Wait for a set period to determine whether the stop snapshot instruction has been executed; if so, execute S3; otherwise, execute S5;

[0091] S5: trigger alarm information and report it; execute S6;

[0092] S6: Determine whether snapshot deletion is a scheduled trigger task;

[0093] If yes, execute S7; if no, execute S8;

[0094] S7: then proceed to the next round of snapshot deletion action;

[0095] S8: End the mission.

[0096] If it exists, it means that the next instruction cannot be executed, that is, the instruction to stop the snapshot has not been truly successful; if it does not exist, it means that the snapshot has been successfully stopped.

[0097] It should be noted that after receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the snapshot volume created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the step of deleting the first copy volume includes:

[0098] Check whether there is a snapshot copy volume in the deleted state on the server;

[0099] If so, set a trigger task to delete the snapshot; wherein the step of setting a trigger task to delete the snapshot includes: setting a trigger task to send a snapshot stop instruction at a scheduled time; or setting a single trigger task to send a snapshot stop instruction.

[0100] If not, set the time interval to execute the steps: query the server whether there is a snapshot copy volume in the deletion state.

[0101] The volumes in the All-Flash Stack are all thin volumes in the thin pool. When a thin volume is deleted, the volume will continue to exist and its status will be deleting. The volume in this status is not visible on the client, but it can actually be found on the server backend of the system.

[0102] It should also be noted that when the server is a plurality of nodes, the step of setting a trigger task to delete the snapshot includes: creating a snapshot deletion task, searching for the snapshot copy volumes to be deleted corresponding to all nodes, and sending the deletion task to each node; setting a trigger task so that each node simultaneously performs a deletion operation on the snapshot copy volumes to be deleted. Due to the data consistency operation of multiple nodes, in order to improve efficiency, multiple nodes need to perform a deletion operation on the snapshot copy volumes to be deleted at the same time. After executing the deletion instruction to directly delete the generated snapshot volume, the step also includes: detecting that each node has completed the operation of deleting the snapshot volume, and reporting feedback information on the completion of the snapshot volume deletion. The execution instruction process is monitored in real time to feedback the execution information.

[0103] like Figure 3 As shown, Embodiment 4 of the present invention further provides an optimization device for preventing full-flash stack NAS snapshot residues, comprising an instruction receiving and processing module, a first judgment module, a deletion module and an alarm output module;

[0104] The instruction receiving and processing module is used for, after receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, copying the volume of the snapshot created by the internal mechanism of the snapshot to generate a second copy volume, and deleting the first copy volume at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0105] A first judging module is used to judge whether the instruction to stop the snapshot has been executed;

[0106] A deletion module, configured to execute a deletion instruction to directly delete the generated snapshot volume if the first judgment module determines that the execution of the stop snapshot instruction is completed;

[0107] The alarm output module is used to trigger and report the alarm information if the first judgment module determines that the stop snapshot instruction has not been executed.

[0108] By changing the judgment condition for successful command execution from the successful delivery of the command to the actual changing factors for judging the successful execution, the residual NAS snapshots are fundamentally avoided, system resources are saved, the robustness of the system is increased, and the user experience is optimized.

[0109] Embodiment 5 of the present invention further provides an optimization device for preventing full-flash stack NAS snapshot residues, comprising an instruction receiving and processing module, a first judgment module, a deletion module and an alarm output module;

[0110] The instruction receiving and processing module is used for, after receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, copying the volume of the snapshot created by the internal mechanism of the snapshot to generate a second copy volume, and deleting the first copy volume at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0111] A first judging module is used to judge whether the instruction to stop the snapshot has been executed;

[0112] A deletion module, configured to execute a deletion instruction to directly delete the generated snapshot volume if the first judgment module determines that the execution of the stop snapshot instruction is completed;

[0113] The alarm output module is used to trigger and report the alarm information if the first judgment module determines that the stop snapshot instruction has not been executed.

[0114] The device also includes a second judgment module, wherein the second judgment module judges whether the snapshot deletion is a timed trigger task.

[0115] The first judgment module includes a query unit and a timing unit;

[0116] The query unit is used to query whether the first copy volume still exists; if it does, the instruction to stop the snapshot is not executed successfully, the timing unit is triggered to start timing, and when the timing reaches a set period, it is queried again whether the first copy volume still exists; if it does not exist, the instruction to stop the snapshot is executed successfully, and the information is output to the deletion module to directly delete the generated snapshot volume.

[0117] If it exists, it means that the next instruction cannot be executed, that is, the instruction to stop the snapshot has not been truly successful; if it does not exist, it means that the snapshot has been successfully stopped.

[0118] Embodiment 6 of the present invention further provides an optimization device for preventing full-flash stack NAS snapshot residues, comprising an instruction receiving and processing module, a first judgment module, a deletion module and an alarm output module;

[0119] The instruction receiving and processing module is used for, after receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, copying the volume of the snapshot created by the internal mechanism of the snapshot to generate a second copy volume, and deleting the first copy volume at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume;

[0120] A first judging module is used to judge whether the instruction to stop the snapshot has been executed;

[0121] A deletion module, configured to execute a deletion instruction to directly delete the generated snapshot volume if the first judgment module determines that the execution of the stop snapshot instruction is completed;

[0122] The alarm output module is used to trigger and report the alarm information if the first judgment module determines that the stop snapshot instruction has not been executed.

[0123] The device also includes a second judgment module, wherein the second judgment module judges whether the snapshot deletion is a timed trigger task.

[0124] The first judgment module includes a query unit and a timing unit;

[0125] The query unit is used to query whether the first copy volume still exists; if it does, the instruction to stop the snapshot is not executed successfully, the timing unit is triggered to start timing, and when the timing reaches a set period, it is queried again whether the first copy volume still exists; if it does not exist, the instruction to stop the snapshot is executed successfully, and the information is output to the deletion module to directly delete the generated snapshot volume.

[0126] If it exists, it means that the next instruction cannot be executed, that is, the instruction to stop the snapshot has not been truly successful; if it does not exist, it means that the snapshot has been successfully stopped.

[0127] Before performing multi-node data synchronization, a snapshot is taken of the target data, and data synchronization is completed based on the snapshot; after data synchronization is completed, the snapshot copy volume is deleted on the client. The device also includes a status query module and a setting module;

[0128] A status query module is used to query whether there is a snapshot copy volume in a deleted state on the server;

[0129] The setting module is used to set a trigger task to delete the snapshot if the status query module finds that there is a snapshot copy volume in the deletion state on the server.

[0130] The volumes in the All-Flash Stack are all thin volumes in the thin pool. When a thin volume is deleted, the volume will continue to exist and its status will be deleting. The volume in this status is not visible on the client, but it can actually be found on the server backend of the system.

[0131] The setting module is specifically used to set a timed trigger task to send a snapshot stop instruction; or, to set a single trigger task to send a snapshot stop instruction. When the server is a plurality of nodes, the setting module includes a task creation unit and a task trigger unit; the task creation unit is used to create a snapshot deletion task, and search for the snapshot copy volumes to be deleted corresponding to all nodes, and send the deletion task to each node; the task trigger unit is used to set a trigger task so that each node simultaneously performs a deletion operation on the snapshot copy volume to be deleted. Due to the data consistency operation of multiple nodes, in order to improve efficiency, multiple nodes need to perform a deletion operation on the snapshot copy volume to be deleted at the same time. The device also includes a detection module, which is used to detect that each node has completed the operation of deleting the snapshot volume, and report feedback information on the completion of the snapshot volume deletion. The execution instruction process is monitored in real time to feedback the execution information.

[0132] The specific implementation process of the device in the above embodiment of the present invention is as follows:

[0133] Initialization phase: (1) The NAS source storage volume in the full-flash stack is A; (2) The snapshot volume of storage volume A is A1; (3) The copy of the snapshot volume created by the internal snapshot mechanism is A1'; (4) When the snapshot relationship is stopped / deleted, the temporary volume copy added to A1 is A1".

[0134] Deletion phase: (1) Delete the snapshot. First, stop the snapshot relationship. After receiving the instruction to stop the snapshot, create a copy A1" and delete A1' at the same time (in the deleting state). (2) Determine whether the instruction to stop the snapshot has been executed: check whether A1' still exists. If A1' still exists, it means that the next instruction cannot be executed, that is, the instruction to stop the snapshot has not been truly successful, and go to step (4). If A1' does not exist, it means that the snapshot has been successfully stopped, and you can continue to execute step (3). (3) After the snapshot relationship is successfully stopped, start executing the deletion instruction; directly delete the snapshot volume A1. (4) Set two waiting cycles T, which can be the interval time of the NAS scheduled snapshot. If the message of successful snapshot stop is not received within the two T cycles, return it to the customer. An alarm is generated on the client side: "The snapshot stop action was not successfully executed within the specified time. Please check and confirm and execute again." This allows the client to be aware of this problem and take timely measures to avoid the subsequent execution of subsequent instructions without the user's knowledge, resulting in subsequent residues. (5) If the initial snapshot deletion is triggered by a scheduled task, the next round of snapshot deletion will be continued; if not, the task will be terminated. By changing the judgment condition for successful command execution from the command's apparent success to the actual change factor for judging successful execution, the residue of NAS snapshots is fundamentally avoided. Since it is meaningless to continue the deletion process when a problem occurs in stopping the snapshot, it also wastes system resources. When a problem occurs in the middle of stopping the snapshot, an alarm is reported in a timely manner to remind the user and terminate the subsequent execution of instructions.

[0135] Embodiment 7 of the present invention also provides a computer device, which may include: a processor, a communication interface, a memory and a bus, wherein the processor, the communication interface and the memory communicate with each other via the bus. The bus can be used for information transmission between electronic devices and sensors.

[0136] The computer device may also include: an input device and an output device. The processor, memory, input device and output device in the computer device may be connected via a bus or other means. The memory in the computer device, as a computer-readable storage medium, may be used to store one or more programs, and the program may be a software program, a computer executable program and a module, such as the program instruction / module corresponding to the method provided in Example 1 of the present invention. The module is a module in the device in Example 4, including: an instruction receiving and processing module, a first judgment module, a deletion module and an alarm output module; the processor executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory, that is, to achieve the optimization of preventing the residual of full-flash stack NAS snapshots in the above method embodiment. The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the computer device, etc. The processor can call the logical instructions in the memory to execute the following method: Step 1: After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated as a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein, the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume; Step 2: Determine whether the instruction to stop the snapshot has been executed; if so, execute step 3, otherwise execute step 4; Step 3: Execute the deletion instruction to directly delete the generated snapshot volume; execute step 6; Step 4: Wait for a set period to determine whether the instruction to stop the snapshot has been executed; if so, execute step 3; otherwise, execute step 5; Step 5: Trigger an alarm message and report it; execute step 6; Step 6: Determine whether the snapshot deletion is a timed trigger task; if so, execute step 7; if not, execute step 8; Step 7: Continue with the next round of snapshot deletion action; Step 8: End the task.

[0137] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when 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, which is stored in a storage medium and includes several 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: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0138] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. An optimization method to prevent full-flash stack NAS snapshot residue, characterized in that: The steps include: After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume; Determine whether the command to stop the snapshot has been executed; If yes, execute the delete command to directly delete the generated snapshot volume; If not, wait for the set period to determine whether the command to stop the snapshot is executed; if completed, execute the following steps: execute the delete command to directly delete the generated snapshot volume; if not completed, trigger an alarm message and report it; The steps of determining whether the instruction to stop the snapshot has been executed include: Check whether the first copy volume still exists; If it exists, the command to stop the snapshot has not been executed successfully, and the execution steps are: wait for the set period to determine whether the command to stop the snapshot has been executed; If it does not exist, the command to stop the snapshot is executed successfully. Execute the deletion command to directly delete the generated snapshot volume.

2. The optimization method for preventing full-flash stack NAS snapshot residue according to claim 1, characterized in that: After the step of executing the deletion instruction to directly delete the generated snapshot volume and the step of executing the deletion instruction to directly delete the generated snapshot volume, the following steps are further included: Determine whether snapshot deletion is a scheduled trigger task; If yes, proceed to the next round of snapshot deletion; If not, end the task.

3. The optimization method for preventing full-flash stack NAS snapshot residue according to claim 2 is characterized in that: After receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, the volume of the snapshot created by the internal mechanism of the snapshot is copied to generate a second copy volume, and the first copy volume is deleted at the same time, including the following steps: Check whether there is a snapshot copy volume in the deleted state on the server; If so, set a trigger task to delete the snapshot; If not, set the time interval to execute the steps: query the server whether there is a snapshot copy volume in the deletion state.

4. The optimization method for preventing full-flash stack NAS snapshot residue according to claim 3 is characterized in that: The steps to set up a trigger task for snapshot deletion include: Set a scheduled trigger task to send a snapshot stop command; or set a single trigger task to send a snapshot stop command.

5. The optimization method for preventing full-flash stack NAS snapshot residue according to claim 4 is characterized in that: When the server has multiple nodes, the steps to set a trigger task to delete snapshots include: Create a snapshot deletion task, search for the snapshot copy volumes to be deleted corresponding to all nodes, and send the deletion task to each node; A trigger task is set to enable each node to simultaneously perform a deletion operation on the snapshot copy volume to be deleted.

6. The optimization method for preventing full-flash stack NAS snapshot residue according to claim 5, characterized in that: After executing the delete command to directly delete the generated snapshot volume, the following steps are also included: After detecting that each node has completed the operation of deleting the snapshot volume, feedback information of the completion of the snapshot volume deletion is reported.

7. The optimization method for preventing full-flash stack NAS snapshot residue according to claim 6, characterized in that: The steps for querying whether there is a snapshot copy volume in the deleted state on the server include: Before performing multi-node data synchronization, a snapshot is taken of the target data, and data synchronization is completed based on the snapshot; after the data synchronization is completed, the snapshot copy volume is deleted on the client.

8. An optimization device for preventing full-flash stack NAS snapshot residues, characterized in that: It includes an instruction receiving and processing module, a first judging module, a deleting module and an alarm output module; The instruction receiving and processing module is used for, after receiving the instruction to stop the snapshot, when the NAS source storage volume in the full-flash stack is generated into a snapshot volume, copying the volume of the snapshot created by the internal mechanism of the snapshot to generate a second copy volume, and deleting the first copy volume at the same time; wherein the volume of the snapshot created by the internal mechanism of the snapshot is the first copy volume; A first judging module is used to judge whether the instruction to stop the snapshot has been executed; A deletion module, configured to execute a deletion instruction to directly delete the generated snapshot volume if the first judgment module determines that the execution of the stop snapshot instruction is completed; An alarm output module is used to trigger and report an alarm message if the first judgment module determines that the stop snapshot instruction has not been executed; The first judgment module includes a query unit and a timing unit; The query unit is used to query whether the first copy volume still exists; if it does, the instruction to stop the snapshot is not executed successfully, the timing unit is triggered to start timing, and when the timing reaches a set period, it is queried again whether the first copy volume still exists; if it does not exist, the instruction to stop the snapshot is executed successfully, and the information is output to the deletion module to directly delete the generated snapshot volume.

9. A computer device, characterized in that: comprising a memory and one or more processors; A memory for storing one or more programs; The one or more programs are executed by the one or more processors, so that the one or more processors are used to execute the optimization method for preventing full-flash stack NAS snapshot residues according to any one of claims 1 to 7.