Snapshot storage method, computing device and computer program product

By converting non-thin type disks to thin types and freeing up unused storage space for storage snapshots, the problem of wasted storage resources during virtual disk snapshots is solved and the utilization of storage resources is improved.

CN118939181APending Publication Date: 2024-11-12XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410832063.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When creating snapshots of virtual disks, non-thin type disks cause unused storage space that has been allocated and unused by the original disk, resulting in wasted storage resources.

Method used

Recycle storage space to improve resource utilization by converting disk types from non-thin type to thin type, freeing up unused storage space for storing snapshots.

Benefits of technology

Snapshots can be stored without additional storage space, reducing waste of storage resources and improving the utilization of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939181A_ABST
    Figure CN118939181A_ABST
Patent Text Reader

Abstract

The invention provides a snapshot storage method, computing equipment and a computer program product. In an embodiment, the method comprises: receiving a first request to create a snapshot for a first disk; the first disk is of a first disk type, and the first disk type is that a storage space for distributing a capacity configuration value is not simplified when the disk is created; in response to the first request, converting a first disk of a first disk type into a second disk of a second disk type to release an unused storage space in the first disk; the second disk type is a part of storage space for allocating a capacity configuration value when the disk is created, and the storage space is gradually allocated along with data writing until the capacity configuration value is simplified; and storing the snapshot of the first disk in the released storage space of the first disk. Therefore, according to the technical scheme provided by the embodiment of the invention, the allocated unused storage space of the disk can be released, the snapshot of the disk is stored, and the utilization rate of storage resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computing devices, and in particular to a snapshot storage method, computing device, and computer program product. Background Art

[0002] With the rapid development of computing technology, storage technology and network technology, computers are linked to each other through the network and, through virtualization technology, form large virtual resource pools to provide unified computing services to users.

[0003] In a virtual machine scenario, a virtual disk can be created, and available storage resources in a storage resource pool can be allocated to the virtual disk. When a snapshot disk is created for a virtual disk, the original disk will be set to read-only, and the computing node 104 will create a snapshot disk in the storage space of the original disk. Subsequent incremental snapshot data of the disk data will be saved in the snapshot disk, and the incremental snapshot data represents the difference between the current state of the disk and the state when the snapshot was last executed. When the virtual disk is a non-thin type disk, all storage space is pre-allocated when the disk is created. For the snapshot disk, in subsequent use, storage space will continue to be applied for, and the newly allocated storage space will be used for storage, which will cause the unused storage space allocated to the original disk to be unusable, thereby causing a great waste of storage resources. Summary of the invention

[0004] The embodiments of the present application provide a snapshot storage method, a computing device, and a computer program product. By changing the type of the disk, it is possible to release the unused storage space allocated to the disk, and use the released storage space of the disk to store the snapshot of the disk, without allocating additional storage space to store the snapshot of the disk, thereby improving the utilization rate of storage resources.

[0005] In a first aspect, an embodiment of the present application provides a snapshot storage method, including:

[0006] A first request for creating a snapshot for a first disk is received; the first disk is of a first disk type, and the first disk type is a storage space to which a capacity configuration value is allocated when the disk is created; in response to the first request, unused storage space in the first disk is released by converting the first disk of the first disk type into a second disk of a second disk type; the second disk type is a portion of the storage space to which the capacity configuration value is allocated when the disk is created, and storage space is gradually allocated as data is written until the capacity configuration value is reached; and the snapshot of the first disk is stored in the released storage space of the first disk.

[0007] In this solution, by changing the disk type, the unused storage space allocated by the disk can be released, and the disk snapshot can be stored in the released disk storage space without allocating additional storage space to store the disk snapshot, thereby improving the utilization of storage resources.

[0008] In one possible implementation, before receiving a first request to create a snapshot for a first disk, the method also includes: receiving a second request to create a first disk, the second request including a capacity configuration value of the first disk and a first disk type; creating a first disk of the first disk type, and allocating storage space of the capacity configuration value to the first disk from available storage resources in a storage resource pool.

[0009] In a possible implementation, storing the snapshot of the first disk in the released storage space of the first disk includes:

[0010] When the capacity required by the first disk for the snapshot to be stored and the capacity of the storage space used by the snapshot stored on the first disk are less than or equal to the capacity of the released storage space of the first disk, storage space is allocated from available storage resources in the storage resource pool based on the capacity required for the snapshot to be stored to store the snapshot.

[0011] In a possible implementation, before converting a first disk of a first disk type to a second disk of a second disk type, it also includes: determining that the space utilization of the first disk is less than or equal to a preset threshold; the space utilization indicates the status of the used storage space in the storage space allocated by the first disk.

[0012] In this solution, when the disk space utilization is low, the unused storage space allocated on the disk is released, thereby improving the utilization of storage resources.

[0013] In one possible implementation, converting a first disk of a first disk type into a second disk of a second disk type includes: creating a second disk of the second disk type, wherein data stored on the second disk is a copy of data stored in the first disk; releasing the correspondence between the first disk and a snapshot of the first disk, and establishing a correspondence between the second disk and a snapshot of the first disk; and deleting the first disk.

[0014] In a possible implementation, the method further includes:

[0015] A third request for deleting the snapshot of the first disk is received; in response to the third request, a second disk of the second disk type is converted into a third disk of the first disk type to reclaim the released storage space of the first disk; and the snapshot of the first disk is deleted.

[0016] In this solution, when deleting a disk snapshot, the released storage space of the disk is reclaimed, and the disk is restored, thereby facilitating subsequent use.

[0017] In a possible implementation, converting a second disk of a second disk type into a third disk of a first disk type includes:

[0018] Create a third disk of the first disk type, where the data stored in the third disk is a copy of the data stored in the first disk; cancel the corresponding relationship between the second disk and the snapshot of the first disk, and establish the corresponding relationship between the third disk and the snapshot of the first disk; delete the second disk.

[0019] In a possible implementation manner, before converting the second disk of the second disk type into a third disk of the first disk type, the method further includes:

[0020] It is determined that the capacity of the available storage space in the storage resource pool and the storage space used by the snapshot of the first disk is greater than or equal to the capacity of the released storage space of the first disk.

[0021] In some possible implementations, the method further includes:

[0022] When it is determined that the available storage space in the storage resource pool and the capacity of the storage space used by the snapshot of the first disk are less than the capacity of the released storage space of the first disk, deleting the snapshot of the first disk is prohibited.

[0023] In the second aspect, the embodiment of the present application provides a snapshot storage device, which includes several modules, each of which is used to execute each step in the snapshot storage method provided in the first aspect of the embodiment of the present application, and the division of the modules is not limited here. For the specific functions performed by each module of the snapshot storage device and the beneficial effects achieved, please refer to the functions of each step of the snapshot storage method provided in the first aspect of the embodiment of the present application, and no further description will be given here.

[0024] By way of example, the snapshot storage device includes:

[0025] A first receiving module is used to receive a first request for creating a snapshot for a first disk; the first disk is a first disk type, and the first disk type is a storage space that allocates a capacity configuration value when the disk is created;

[0026] A first response module is used to release unused storage space in the first disk by converting the first disk of the first disk type into a second disk of the second disk type in response to the first request; the second disk type is a portion of the storage space of the capacity configuration value allocated when the disk is created, and the storage space is gradually allocated as data is written until the capacity configuration value is reached;

[0027] The storage module is used to store the snapshot of the first disk in the released storage space of the first disk.

[0028] In this solution, the unused storage space allocated by the disk can be released, the snapshot of the disk can be stored, and the utilization rate of storage resources can be improved.

[0029] In a possible implementation, the device further includes:

[0030] The disk creation module is used to receive a second request to create a first disk, the second request includes a capacity configuration value of the first disk and a first disk type; create a first disk of the first disk type, and allocate storage space of the capacity configuration value to the first disk from available storage resources in a storage resource pool.

[0031] In one possible implementation, the storage module is used to allocate storage space for storing the snapshot to be stored from available storage resources in a storage resource pool based on the capacity required for the snapshot to be stored when the capacity required for the snapshot to be stored on the first disk and the capacity of the storage space used by the snapshot stored on the first disk are less than or equal to the capacity of the storage space of the released first disk.

[0032] In a possible implementation, the device further includes:

[0033] The space utilization determination module is used to determine whether the space utilization of the first disk is less than or equal to a preset threshold and execute the first response module; the space utilization indicates the situation of the used storage space in the storage space allocated by the first disk.

[0034] In this solution, when the disk space utilization is low, the unused storage space allocated on the disk is released, thereby improving the utilization of storage resources.

[0035] In one possible implementation, the first response module is used to create a second disk of a second disk type, in which data stored in the second disk is a copy of data stored in the first disk; to release the correspondence between the first disk and the snapshot of the first disk, and to establish a correspondence between the second disk and the snapshot of the first disk; and to delete the first disk.

[0036] In a possible implementation, the device further includes:

[0037] A second receiving module, configured to receive a third request for deleting the snapshot of the first disk;

[0038] a second response module, configured to reclaim the released storage space of the first disk by converting the second disk of the second disk type into a third disk of the first disk type in response to the third request;

[0039] The snapshot deletion module is used to delete the snapshot of the first disk.

[0040] In this solution, when deleting a disk snapshot, the released storage space of the disk is reclaimed, and the disk is restored, thereby facilitating subsequent use.

[0041] In a possible implementation, the second response module is used to create a third disk of the first disk type, where the data stored in the third disk is a copy of the data stored in the first disk; cancel the corresponding relationship between the second disk and the snapshot of the first disk, and establish the corresponding relationship between the third disk and the snapshot of the first disk; and delete the second disk.

[0042] In a possible implementation, the device also includes: a capacity judgment module, used to determine the capacity of the available storage space in the storage resource pool and the storage space used by the snapshot of the first disk, and execute the second response module when it is greater than or equal to the capacity of the released storage space of the first disk.

[0043] In some possible implementations, the apparatus further includes:

[0044] The alarm module is used to determine that when the available storage space in the storage resource pool and the capacity of the storage space used by the snapshot of the first disk are less than the capacity of the released storage space of the first disk, the deletion of the snapshot of the first disk is prohibited.

[0045] In a third aspect, an embodiment of the present application provides a snapshot storage device, comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method provided in the first aspect.

[0046] In a fourth aspect, an embodiment of the present application provides a snapshot storage device, characterized in that the device runs computer program instructions to execute the method provided in the first aspect. Exemplarily, the device may be a chip or a processor.

[0047] In one example, the device may include a processor, which may be coupled to a memory, read instructions in the memory and execute the method provided in the first aspect according to the instructions. The memory may be integrated in a chip or a processor, or may be independent of the chip or the processor.

[0048] In a fifth aspect, an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method provided in the first aspect.

[0049] In a sixth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed on a computer, the computer executes the method provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a system architecture diagram of a data management system provided by an embodiment of the present application;

[0051] Figure 2 yes Figure 1 A schematic diagram of the structure of the storage node 105;

[0052] Figure 3 It is a schematic diagram of a snapshot storage scenario of a non-thin disk in the related art;

[0053] Figure 4 It is a schematic diagram of a snapshot storage scenario of a non-thin disk provided in an embodiment of the present application;

[0054] Figure 5 It is a flowchart of a snapshot storage method provided in an embodiment of the present application;

[0055] Figure 6 It is a schematic diagram of converting a non-thin type disk into a thin type disk provided in an embodiment of the present application;

[0056] Figure 7 It is a flowchart of another snapshot storage method provided in an embodiment of the present application;

[0057] Figure 8 It is a schematic diagram of converting a thin disk to a non-thin disk provided in an embodiment of the present application;

[0058] Fig. 9 This is a schematic diagram of a snapshot storage scenario provided by an embodiment of the present application.

[0059] Fig.10 It is a structural diagram of a snapshot storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0061] In the description of the embodiments of the present application, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.

[0062] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "multiple" means two or more. For example, multiple systems refers to two or more systems, and multiple terminals refers to two or more terminals.

[0063] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0064] Below, some terms in this embodiment are explained. It should be noted that these explanations are for the convenience of understanding by those skilled in the art and do not constitute a limitation on the scope of protection claimed in this application.

[0065] Snapshot: A fully usable copy of a specified data set, which includes an image of the corresponding data at a certain point in time (the time when the copy starts). A snapshot can be a copy of the data set it represents, or a replica of the data set. A data set can be a data block, file, or object in storage, and can be an image or a web page in an application.

[0066] Thin Provisioning: It can create a virtual storage space that is larger than the actual physical storage, providing users with the ability to over-allocate storage. Only the virtual storage space that has written data can be actually allocated to the physical storage, and the virtual storage space that has not written data does not occupy physical storage resources.

[0067] Thin disk: For a virtual disk created using thin provisioning technology, the system allocates only part of the capacity of the disk configuration value for the first time. As data is written, it is gradually allocated until the total allocation reaches the disk configuration value. The unallocated capacity does not occupy actual physical storage space.

[0068] Non-thin disk: The system allocates the entire capacity of the disk configuration value for the first time, and the allocated space cannot be used by other disks.

[0069] Next, the data management system that may be applied to the snapshot storage method provided in the embodiment of the present application is introduced. Figure 1The following is an example diagram of the architecture of a data management system provided by an embodiment of the present application. The present application embodiment provides a data management method that can be applied to Figure 1 The system architecture diagram shown.

[0070] like Figure 1 As shown, the data management system includes a terminal 101 and a server cluster 102. The terminal device 101 can communicate with the server cluster 102 through a network. The network can be a wired network and / or a wireless network. It is understood that the network can use any known network communication protocol to achieve different communications, and the network communication protocol can be various wired and / or wireless communication protocols. The network can use any known network communication protocol to achieve different communications, and the network communication protocol can be various wired communication protocols.

[0071] Among them, the terminal 101 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. Exemplary embodiments of the terminal involved in this solution include, but are not limited to, electronic devices equipped with iOS, Android, Windows, Harmony OS, or other operating systems. The embodiment of this application does not specifically limit the type of electronic device.

[0072] The server cluster 102 may be implemented using an independent computing device or a server cluster composed of multiple computing devices. In some possible implementations, the computing device in the server cluster 102 may be a single-node server, such as a rack server, or a multi-node server, which may be a blade server, a high-density server, or a whole cabinet server.

[0073] In the embodiment of the present application, the server cluster 102 includes multiple nodes, which may be single-node servers, such as rack servers, or nodes in multi-node servers, which may be blade servers, high-density servers, or whole cabinet servers. The structure of each node is the same or similar, as can be seen in Figure 2 These nodes can be divided into management nodes 103 , computing nodes 104 and storage nodes 105 . Figure 1 The number of 4 storage nodes 105, 2 computing nodes 104 and 1 management node 103 schematically shown in the figure is only an example and does not constitute a specific limitation. The number of management nodes 103, computing nodes 104 and storage nodes 105 can be set according to actual conditions. It is worth noting that although the management nodes 103, computing nodes 104 and storage nodes 105 have the same structure type, the difference between the management nodes 103 and computing nodes 104 and the storage nodes 105 is that the storage nodes 105 have more disks.

[0074] The storage nodes 105 in the server cluster are interconnected, and the computing node 104 and each storage node 105 are networked. The networking method can be direct connection or connection through a switch ( Figure 1 After networking, the computing node 104 can communicate with each storage node 105, for example, data can be written into the storage node 105, or data can be read from the storage node 105. It is worth noting that the computing node 104 shares the storage node 105. It should be noted that the computing node 104 is only a possible naming method, and in some possible usage scenarios, it can also be called a host or an application server.

[0075] In addition, the storage nodes 105, computing nodes 104, and management nodes 103 in the server cluster are networked, and the networking method can be direct connection or connection through a switch ( Figure 1 After networking, the management node 103 can communicate with each computing node 104 and storage node 105, for example, it can obtain relevant data generated during the operation of the computing node 104 and the storage node 105.

[0076] Exemplarily, the storage node 105 may be a single-node server, such as a rack server, or a node in a multi-node server, and the multi-node server may be a blade server, a high-density server, or a whole cabinet server.

[0077] In some possible embodiments, Figure 2 As shown, the storage node 105 may include a power supply 121 and a mainboard 110 , wherein the power supply 121 is electrically connected to the mainboard 110 and is used to supply power to devices connected to the mainboard 110 .

[0078] Exemplarily, the devices connected to the mainboard 110 include a processor 111 , a memory 112 , a programmable logic device (PLD) 113 , a baseboard management controller (BMC) 114 , a PCIE slot 115 , a network card 122 , a disk 123 , and a fan 124 .

[0079] The processor 111 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor 111 is used to process operation requests from the terminal 101 or requests generated from within the computing node 104. The processor 201 may also be a controller with computing capabilities.

[0080] Among them, the memory 112 can be inserted into a memory slot to connect to the motherboard 110. The memory 112 can be a random access memory (RAM). By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM). Exemplarily, the memory 112 includes at least two types of memory, for example, the memory can be either a random access memory (RAM) or a read-only memory (ROM). For example, the RAM may include a dynamic random access memory (DRAM) or a storage class memory (SCM) and other memories.

[0081] The programmable logic device 113 may be a complex logic device (CPLD, which is a digital integrated circuit whose logic functions are constructed by users according to their own needs) or a field programmable gate array (FPGA).

[0082] Among them, the PCIE slot 115 is suitable for expanding at least one of a GPU card, a network card, a video capture card, an HBA (Host Bus Adapter) card, a RAID (redundant arrays of independent disks) card, and an SSD (solid state disk or solid state drive), and can also support the expansion of various adapter cards.

[0083] The network card 124 is used to communicate with the storage node 105 .

[0084] The disk 123 may be a hard disk drive (HDD) or a solid state drive (SSD). It should be understood that the disk 123 is merely an example of a non-volatile memory and does not constitute a specific limitation. In actual applications, a non-volatile memory may be selected in combination with actual conditions.

[0085] It should be noted that Figure 2 This is only an example of the storage node 105 and does not constitute a specific limitation. In practical applications, it may include Figure 2 More or fewer devices.

[0086] For example, the computing node 104 may be a single-node server, such as a rack server, or a computing node in a multi-node server, and the multi-node server may be a blade server, a high-density server, or a whole cabinet server. Figure 2 , the embodiments of this application will not be described in detail.

[0087] The structure of the management node 103 can be found in Figure 2 , the embodiments of this application will not be described in detail.

[0088] The terminal 101 can communicate with the management node 103 and the computing node 104 through a network. The network can be a wired network and / or a wireless network. It is understood that the network can use any known network communication protocol to achieve different communications, and the network communication protocol can be various wired and / or wireless communication protocols.

[0089] It is worth noting that the storage node 105 and the computing node 104 can be integrated into a node in a single-node server or a multi-node server, or can be separately configured from the computing node 104 .

[0090] In the scenario of the embodiment of the present application, the storage nodes 105 in the server cluster 102 can be combined into a large virtual storage resource pool through virtualization technology to provide unified services to users; the computing node 104 can create a virtual disk and allocate available storage resources in the storage resource pool to the virtual disk. In some possible virtualization scenarios, when a snapshot disk is created for a virtual disk, the original disk will be set to read-only, and the computing node 104 will create a snapshot disk in the storage space of the original disk. The subsequent incremental snapshot data of the data of the disk will be saved in the snapshot disk, that is, the incremental snapshot data represents the difference between the current state of the disk and the state when the snapshot was last executed.

[0091] like Figure 3 As shown, when the virtual disk is a non-thin disk, all storage space is pre-allocated when the disk is created. Before the user deletes the snapshot disk, the unused storage space allocated on the original disk will continue to occupy storage resources and cannot be released. For the snapshot disk, in subsequent use, storage space will continue to be applied for and the newly allocated storage space will be used for storage, which will cause the unused storage space allocated on the original disk to be unusable, thereby causing a great waste of storage resources.

[0092] exist Figure 3 In the scenario shown, after creating a snapshot disk for a non-thin disk, the user is prompted that the snapshot will continue to occupy new storage space and is asked to delete the snapshot as soon as possible. If the user does not delete the snapshot, storage resources will be wasted.

[0093] Based on this, an embodiment of the present application proposes a snapshot storage method.

[0094] like Figure 4 As shown, after creating a snapshot disk from a non-thin disk, the method converts the original disk into a thin disk to release the allocated but unused storage space; the released storage space is used by the snapshot disk to store snapshot data; when deleting the snapshot disk, the original disk is restored to the original allocation mode: a non-thin disk to reclaim the released storage space. By changing the type of the disk, the allocated but unused storage space of the disk can be released, and the storage space of the released disk can be used to store the snapshot of the disk, without allocating additional storage space to store the snapshot of the disk, thereby reducing the possibility of storage resource waste and improving the utilization of storage resources. This is only a brief description of the method, and the details of the method can be described below.

[0095] Next, in combination with the data management system provided above, a snapshot storage method provided in an embodiment of the present application is introduced in detail.

[0096] Figure 5 1 is a flow chart of a snapshot storage method provided in an embodiment of the present application. This embodiment can be applied to a computing node 104. Figure 5 As shown, the snapshot storage method provided in the embodiment of the present application includes at least the following steps:

[0097] Step 501, the management node 103 sends a second request to the computing node 104 to create a first disk, the second request includes the capacity configuration value of the first disk and the first disk type, the first disk type is the storage space of the capacity configuration value allocated when the disk is created.

[0098] The disk creation request includes the capacity configuration value of the disk, the characteristics of the disk such as the first disk type, and the first disk type is the storage space of the capacity configuration value allocated when the disk is created, which can be called a non-thin type. It should be noted that the first disk is a virtual disk, which generally needs to be created by the user. In a specific implementation, the terminal 101 can access the management node 103, create the first disk, and configure the capacity configuration value and the first disk type of the first disk, so that the management node 103 generates a second request to create the first disk.

[0099] Step 502: The computing node 104 creates a first disk of a first disk type, and allocates storage space of a capacity configuration value to the first disk from available storage resources in a storage resource pool.

[0100] In a specific implementation, the computing node 104 creates a first disk of the first disk type based on the disk creation request, and allocates storage space from the storage resource pool to the first disk that is adapted to the capacity configuration value of the first disk in the disk creation request.

[0101] In the scenario of the embodiment of the present application, the storage resource pool is a large virtual storage resource pool that can be composed of storage nodes 105 in the server cluster 102 through virtualization technology.

[0102] Step 503 : The management node 103 sends a first request for creating a snapshot for the first disk to the computing node 104 .

[0103] In a specific implementation, the terminal 101 may access the management node 103 to create a snapshot of the first disk, so that the management node 103 generates a first request for creating a snapshot of the first disk.

[0104] Step 504 : The computing node 104 receives a first request to create a snapshot for a first disk.

[0105] Step 505, computing node 104 responds to the first request by converting the first disk of the first disk type into the second disk of the second disk type to release unused storage space in the first disk; the second disk type is part of the storage space of the capacity configuration value allocated when the disk is created, and is gradually allocated as data is written until the capacity configuration value is reached.

[0106] In some possible implementations, before releasing the unused storage space allocated by the first disk, the computing node 104 needs to determine whether the space utilization rate of the first disk is low, such as less than or equal to a preset threshold value. In the case where the space utilization rate of the first disk is low, the unused storage space allocated by the first disk is released. The space utilization rate of the first disk indicates the situation of the used portion of the storage space allocated by the first disk. For example, the space utilization rate can be the ratio of the used storage space of the first disk to the capacity configuration value, or the ratio of the used storage space of the first disk to the unused storage space. In this implementation, in the case where the space utilization rate of the first disk is low, the unused storage space allocated by the disk is released, the amount of released storage resources is increased, and the possibility of storage resource alarms is reduced.

[0107] In an embodiment of the present application, after receiving a request to create a snapshot for the first disk, the computing node 104 releases the allocated unused storage space of the first disk for use by the snapshot of the first disk. The computing node 104 releases the allocated unused storage space of the disk in the following manner: converting the first disk of the first disk type into the second disk of the second disk type, and releasing the allocated unused storage space of the first disk. The second disk type is a partial storage space of the capacity configuration value allocated when the disk is created. As data is written, storage space is gradually allocated until the capacity configuration value is reached. This type can be called a streamlined type. In actual applications, the computing node 104 releases the allocated unused storage space of the first disk as available storage space in the storage resource pool.

[0108] like Figure 6 As shown, the computing node 104 converts the first disk of the first disk type into the second disk of the second disk type in the following manner: create a second disk of the second disk type, the second disk being a copy of the first disk, specifically, the data stored in the second disk is a copy of the data stored in the first disk, and the storage space of the second disk is the storage space used by the first disk; release the correspondence between the first disk and the snapshot of the first disk, and establish a correspondence between the second disk and the snapshot of the first disk; delete the first disk; it should be noted that after the first disk is deleted, the storage space previously allocated by the first disk is released, and since the second disk is a streamlined type disk, the second disk only occupies the storage space used by the data stored in the first disk, thereby achieving the purpose of releasing the unused storage space allocated by the first disk.

[0109] Step 506 : The computing node 104 stores the snapshot of the first disk in the released storage space of the first disk.

[0110] In the embodiment of the present application, after the computing node 104 receives the request to create a snapshot for the first disk, the computing node 104 releases the allocated unused storage space of the first disk for use by the snapshot of the first disk. It should be noted that after the computing node 104 receives the request to create a snapshot for the first disk, it will create a snapshot disk of the second disk type, and the snapshot disk is used to store the snapshot of the first disk. In the embodiment of the present application, when the snapshot disk stores the snapshot of the first disk, it is necessary to allocate storage space, and the storage space allocated to the snapshot disk is the storage space of the released first disk, so that the storage space of the released first disk is used for the snapshot of the first disk. In actual application, the storage space of the first disk released by the computing node 104 is used as the available storage space; the computing node 104 gradually allocates the available storage space in the storage resource pool for the snapshot of the first disk as the snapshot of the first disk increases, until the storage space used by the snapshot of the first disk exceeds the capacity of the storage space of the released first disk; subsequently, if it is necessary to continue to store the snapshot of the first disk, it is necessary to allocate additional storage space to store the snapshot of the first disk. In a specific implementation, when the capacity required for the snapshot to be stored on the first disk and the capacity of the storage space used by the snapshots stored on the first disk are less than or equal to the capacity of the storage space of the released first disk, the computing node 104 allocates storage space for the snapshot to be stored from the available storage resources in the storage resource pool based on the capacity required for the snapshot to be stored.

[0111] Among them, the snapshot can be an incremental snapshot, which is used to represent the difference backup between the current state of the disk and the state when the snapshot was last executed. For example, the first disk can store N data units, each data unit represents the smallest unit of data storage, such as a data block, an object or a file. The incremental snapshot of the first disk also includes N data units. For each of the N data units, when the data of the data unit has not changed, the data unit is empty, and when the data of the data unit has changed, the data unit is the latest data; in addition, the snapshot can also be a full snapshot, which is used to represent the current state of the disk; in actual applications, considering that the incremental snapshot occupies less storage resources, the incremental snapshot is generally selected. It should be noted that the snapshot disk and the second disk are different virtual disks. In the process of storing the snapshot of the first disk, the second disk is in a read-only state and no data operation is performed. The result after the data operation is recorded through the snapshot and stored in the snapshot disk. In a specific implementation, when the computing node 104 performs data operations on the data of the first disk, such as writing data or deleting data, it is necessary to create a snapshot of the first disk, where the snapshot is used to record changed data, such as newly written data or deleted data, and then store the snapshot of the first disk through the snapshot disk. When the snapshot disk stores the snapshot of the first disk, the released storage space of the first disk is allocated to the snapshot disk, and the snapshot of the first disk is stored in the storage space allocated to the snapshot disk, thereby making the released storage space of the first disk available for the snapshot of the first disk.

[0112] In this solution, by changing the type of disk, the unused storage space allocated to the disk can be released, and the released storage space of the disk can be used to store the snapshot of the disk, without allocating additional storage space to store the snapshot of the disk, thereby reducing the possibility of wasting storage resources and improving the utilization of storage resources.

[0113] It is worth noting that when the computing node 104 receives a request to create a snapshot of the first disk, releasing the allocated unused storage space of the first disk is only a possible example; in other possible scenarios, when the computing node 104 monitors that the available storage resources in the storage resource pool are less than or equal to a preset threshold, it can also release the allocated unused storage space of the first disk, which is equivalent to storing the snapshot of the first disk through the released allocated unused storage space of the first disk. In this implementation, when storage resources are insufficient, releasing the allocated unused storage resources of the disk can improve the utilization of storage resources.

[0114] Figure 7 A schematic diagram of a process flow of another snapshot storage method provided in an embodiment of the present application is shown.

[0115] like Figure 7 As shown, in Figure 5 On the basis of steps 501 to 505 shown in the figure, in the embodiment of the present application, at least the following steps are further included:

[0116] Step 701 : The management node 103 sends a third request for deleting a snapshot of a first disk to the computing node 104 .

[0117] In a specific implementation, the terminal 101 may access the management node 103 to delete the snapshot of the first disk, so that the management node 103 generates a third request for deleting the snapshot of the first disk.

[0118] Step 702: The computing node 104 receives a third request for deleting a snapshot of the first disk.

[0119] Step 703 : In response to the third request, the computing node 104 converts the second disk of the second disk type into a third disk of the first disk type to reclaim the released storage space of the first disk.

[0120] In some possible implementations, before responding to the third request, the computing node 104 first needs to determine whether the available storage space in the storage resource pool meets the recycling conditions. If the recycling conditions are met, it means that the storage resources of the released first disk are not occupied, and the storage resources can be recycled and the snapshot of the first disk can be deleted. If the recycling conditions are not met, it means that the storage resources of the released first disk are occupied, and resource recycling cannot be achieved, resulting in an error in the allocation of storage resources for the first disk. In order to ensure data security, the snapshot of the first disk cannot be deleted, and an alarm needs to be issued to prohibit the deletion of the snapshot of the first disk.

[0121] In an example, the reclaiming condition may be that the capacity of the available storage space in the storage resource pool is greater than or equal to the capacity of the released storage space of the first disk.

[0122] In another example, the recycling condition may be that the capacity of the available storage space in the storage resource pool and the capacity of the storage space used by the snapshot of the first disk are greater than or equal to the capacity of the storage space of the released first disk. In a specific implementation, the computing node 104 reclaims the allocated unused storage space of the first disk in the following manner: based on the capacity of the released storage space of the first disk, the capacity of the available storage space in the storage resource pool and the capacity of the storage space used by the snapshot of the first disk, it can be determined whether the recycling condition is met. If so, it means that resource recycling can be achieved and the snapshot of the first disk is deleted. If not, it means that resource recycling cannot be achieved and deletion of the snapshot of the first disk is prohibited. Exemplarily, when the capacity of the available storage space in the storage resource pool and the capacity of the storage space used by the snapshot of the first disk of the computing node 104 is less than the capacity of the released storage space of the first disk, deletion of the snapshot of the first disk is prohibited.

[0123] In the embodiment of the present application, the computing node 104 reclaims the unused storage space allocated by the first disk by converting the second disk of the second disk type into the third disk of the first disk type, thereby reclaiming the released storage space of the first disk. It should be noted that the data stored in the third disk is a copy of the data stored in the second disk, and the data stored in the second disk is a copy of the data stored in the first disk. In the process of storing the snapshot of the first disk, the snapshot of the first disk will not be stored in the second disk, and the data stored in the second disk will not change. Therefore, the data stored in the third disk is a copy of the data stored in the first disk, and it can be considered that the third disk is essentially the first disk.

[0124] like Figure 8 As shown, the computing node 104 converts the second disk of the second disk type into the third disk of the first disk type in the following manner: create a third disk of the first disk type, the data stored in the third disk is a copy of the data stored in the first disk; cancel the corresponding relationship between the second disk and the snapshot of the first disk, and establish the corresponding relationship between the third disk and the snapshot of the first disk; delete the second disk. It should be noted that the storage space allocated to the third disk is increased relative to the second disk. After deleting the second disk, the storage space of the second disk is released, thereby achieving the purpose of reclaiming the released storage space of the first disk.

[0125] In the embodiment of the present application, the computing node 104 allocates storage space to the third disk according to the capacity configuration value of the first disk.

[0126] In one example, computing node 104 may adopt a one-time allocation method to directly allocate storage space of the capacity configuration value to the third disk; illustratively, when the capacity of the available storage space of computing node 104 in the storage resource pool is greater than or equal to the capacity of the storage space of the released first disk, the storage space is allocated to the third disk according to the capacity configuration value, and the capacity of the storage space allocated to the third disk is equal to the capacity configuration value.

[0127] In one example, the computing node 104 can adopt a multiple allocation method, so that the capacity of the storage space allocated to the third disk is equal to the capacity configuration value; the multiple allocation method can wait for the storage resources that have been used in the storage resource pool to be released, so that the storage space is allocated to the third disk after the available storage resources in the storage resource pool increase, and reduce the probability that the storage space cannot be recovered due to insufficient available storage resources; in the scenario of multiple allocation, the capacity of the storage space allocated by the computing node 104 to the third disk for the first time is less than the capacity configuration value of the first disk, and greater than the capacity of the storage space used by the disk, so that the third disk includes the data stored in the first disk, for example, the capacity of the storage space allocated to the third disk is the sum of the capacity of the storage space used by the first disk and the capacity of the storage space occupied by the snapshot of the first disk. After deleting the snapshot of the first disk, the computing node 104 performs a second allocation, and allocates storage resources from the available storage resources in the storage resource pool according to the capacity configuration value of the first disk and the capacity of the storage space allocated to the third disk, so that the capacity of the storage space allocated to the third disk is equal to the capacity configuration value. It should be noted that after the computing node 104 deletes the snapshot of the first disk, the storage space previously occupied by the snapshot of the first disk is in an available state. At this time, the available storage space in the storage resource pool increases. The available storage space in the storage resource pool can be allocated to the third disk according to the difference between the capacity configuration value of the disk and the capacity of the storage space allocated to the third disk, so that the capacity of the storage space allocated to the third disk is equal to the capacity configuration value. For example, the capacity of the storage space allocated to the third disk for the first time is: the capacity of the storage space used by the first disk and the capacity of the storage space used by the snapshot of the first disk. At this time, the storage space used by the snapshot of the first disk can be released and allocated to the third disk.

[0128] Step 704: The computing node 104 deletes the snapshot of the first disk.

[0129] In the present application embodiment, Figure 8The snapshot of the first disk is deleted in the following manner: the data obtained by merging the snapshots of the first disk is stored in the third disk. It is worth noting that the snapshot merging of the first disk is used to delete old data and obtain the latest data; for example, the first disk can store N data units, each data unit represents the smallest unit of data storage, such as a data block, an object or a file. Each snapshot of the snapshot of the first disk also includes N data units. When the snapshots are merged, for each data unit, the latest data for the data unit stored in the snapshot of the first disk is retained, and the old data for the data unit is deleted.

[0130] In this solution, when deleting a snapshot, the released storage resources need to be reclaimed so that the disk can be restored to its previous settings, reducing the possibility of impact on the business.

[0131] Based on the snapshot storage method provided above, a specific application of the snapshot storage method is described. Fig. 9 A schematic diagram of a specific application of a snapshot storage method provided for the implementation of this application. Fig. 9 As shown, the server cluster 102 deploys a management platform, a snapshot system, a snapshot optimization system, and a released space management system; wherein,

[0132] The snapshot system is used to manage snapshot disks, such as creating and deleting snapshot disks. Snapshot disks are used to store disk snapshots and are thin-type disks.

[0133] The snapshot optimization system is used to perform space optimization on the storage space of the disk after the snapshot system creates a snapshot disk: when creating a snapshot disk, the unused storage space allocated to the disk is released; when deleting the snapshot disk, the storage space of the released disk is reclaimed.

[0134] The released space management system is used to manage the storage space of the disk released by the snapshot optimization system to prevent the released storage space from being occupied by other disks, resulting in the inability to return the released storage space to the disk when the snapshot disk is deleted.

[0135] The snapshot optimization system may include an optimization algorithm module, a disk detection module, and a task execution module.

[0136] Optimization algorithm module: Optimize the disk storage space after creating a snapshot disk: change the non-thin type of the disk to the thin type to release the unused storage space allocated to the disk for the snapshot disk. When deleting the snapshot disk, restore the non-thin type of the disk, reclaim the released disk storage space, and delete the snapshot disk. Obtain the disk space utilization rate through the disk detection module. If the space utilization rate is lower than or equal to the preset threshold, perform space optimization of the disk storage space after creating the snapshot disk. Perform the operations in the disk storage space optimization by calling the task execution module.

[0137] Disk detection module: detects the disk space utilization for the optimization algorithm module to call.

[0138] Task execution module: performs related operations in optimizing disk storage space, such as creating disk copies, copying data, etc.

[0139] The released space management system may include a space management module, a storage monitoring module and a storage alarm module.

[0140] Space management module: Receives registration of disk information of disks that perform storage space optimization, and manages the storage space released by the disk. The storage space of the released disk is logically reserved for the snapshot disk of the disk. On the one hand, the storage space released by the disk cannot be used to create other disks, but can be allocated to the snapshot disk for use; on the other hand, the space management module monitors the available storage space of the storage resource pool to which the disk belongs. When the sum of the available storage space and the storage space used by the snapshot disk is less than the storage space released by the disk, it means that the released storage space is occupied by other disks. At this time, the management purpose is achieved through storage alarms and prohibition of deletion of snapshot disks.

[0141] Storage monitoring module: monitors the available storage space of the storage resource pool to which the disk belongs, to prevent the storage space released by the disk from being occupied by other disks. As the storage space of the disk is released, its physical space can be occupied by newly added files or other thin disks during data growth. When the available storage space of the storage resource pool to which the disk belongs is insufficient, the pre-allocated storage space may not be reclaimed after the snapshot disk is deleted. Specifically, when the sum of the available storage space and the storage space used by the snapshot disk is less than the storage space released by the disk, it means that the released storage space is occupied by other disks, triggering a storage alarm.

[0142] Storage alarm module: When the storage space released by the disk is occupied, considering that the disk cannot reclaim the released storage space after deleting the snapshot, a storage alarm is reported and the snapshot deletion operation is prohibited.

[0143] Based on the server cluster 102 and Fig. 9 After triggering the creation of a snapshot disk of the thin type of the first disk (which is any disk in the snapshot system), the process of executing the storage space processing of the first disk is as follows:

[0144] 1. The management platform triggers the snapshot system to create a snapshot disk corresponding to the first disk.

[0145] 2. After the snapshot system creates the snapshot disk corresponding to the first disk, the snapshot optimization system performs the optimization of the storage space of the first disk, that is, releases the allocated but unused storage space of the first disk. The specific process is as follows:

[0146] a) The snapshot optimization system detects the space utilization of the first disk, such as the used storage space / total allocated storage space. When the space utilization is less than or equal to a preset threshold, a subsequent space optimization process of the storage space of the first disk is triggered, otherwise the optimization is terminated;

[0147] b) After the snapshot optimization system starts optimization, it first creates a second disk of the first disk. At this time, the first disk is in read-only mode, and the disk type of the created second disk is a thin type. The second disk is a copy of the first disk, and only the space corresponding to the used data of the first disk is allocated to store the data in the first disk;

[0148] c) The snapshot optimization system performs IO redirection on the snapshot disk, that is, changes the first disk corresponding to the snapshot disk to the second disk, specifically by canceling the corresponding relationship between the snapshot disk and the first disk, and establishing the corresponding relationship between the second disk and the snapshot disk;

[0149] d) The snapshot optimization system deletes the first disk, thereby releasing the allocated but unused storage space of the first disk.

[0150] 3. After the space optimization of the storage space of the first disk is completed, the snapshot optimization system registers the disk information of the first disk to the released space management system, and the released space management system monitors the usage of the released storage space of the first disk, specifically in the following manner:

[0151] a) The space release management system receives the registration request sent by the snapshot optimization system and starts monitoring the available storage space in the storage resource pool to which the first disk belongs;

[0152] b) As the data of other thin disks in the storage resource pool continues to grow, or new storage space is allocated in the storage resource pool for other files, the storage space of the released first disk may be occupied, that is, the sum of the available storage space in the storage resource pool and the storage space occupied by the snapshot disk of the first disk is less than the storage space of the released first disk. At this time, the released space management system needs to trigger a storage alarm;

[0153] c) After receiving the storage alarm, the management platform will prohibit the deletion of snapshot disks until sufficient storage space is available in the storage resource pool;

[0154] d) When the available storage space in the storage resource pool of the management platform can support the first disk to reclaim the pre-allocated storage space, that is, when the sum of the available storage space in the storage resource pool and the storage space occupied by the snapshot disk of the first disk is greater than the released storage space of the first disk, the storage alarm is cleared and the operation prohibiting the deletion of the snapshot disk is lifted.

[0155] 4. When deleting the snapshot disk, you need to restore the non-thin type of the first disk. The specific method is as follows:

[0156] a) The snapshot system calls the snapshot optimization system to perform the snapshot deletion pre-operation, that is, the disk thin feature recovery operation;

[0157] b) The snapshot optimization system calls the released space management system interface to determine whether the available storage space in the storage resource pool is sufficient, that is, whether the released space of the first disk is occupied. If so, a storage alarm is reported and the snapshot deletion fails;

[0158] c) After the verification is passed, the snapshot optimization system creates a third disk of the second disk. The disk type of the third disk is a non-thin type, that is, the allocation mode is consistent with that of the first disk before the snapshot is taken. The third disk is a copy of the second disk. Storage space is allocated to the third disk according to the capacity of the storage space of the first disk to store data in the first disk.

[0159] d) After the third disk is created, the snapshot optimization system performs snapshot redirection, that is, the second disk corresponding to the snapshot disk is changed to the third disk, specifically, the corresponding relationship between the snapshot disk and the second disk is cancelled, and the corresponding relationship between the third disk and the snapshot disk is established;

[0160] e) After the snapshot optimization system performs snapshot redirection, the second disk is deleted, and the non-thin type recovery of the first disk is completed.

[0161] 5. After restoring the first disk to the non-thin type, the snapshot system reclaims the released storage space from the available storage space in the storage resource pool, and then executes the snapshot disk deletion operation to complete the snapshot disk deletion task.

[0162] Based on the same concept as the embodiment of the method of the present application, the embodiment of the present application also provides a snapshot storage device. The snapshot storage device includes several modules, each of which is used to execute each step in the snapshot storage method provided in the embodiment of the present application, and the division of the modules is not limited here. The technicians in the relevant field can clearly understand that in practical applications, the various steps in the snapshot storage method provided in the embodiment of the present application can be assigned to different modules as needed, that is, the internal structure of the device is divided into different modules to complete all or part of the functions described above. Each module in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more modules can be integrated in one unit, and the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each module are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present application. The specific working process of the module in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0163] For example, the snapshot storage device is used to execute the snapshot storage method provided in the embodiment of the present application. Fig.10 Schematic diagram of the structure of the snapshot storage device provided in the embodiment of the present application. Fig.10 As shown, the snapshot storage device provided in the embodiment of the present application includes:

[0164] The first receiving module 1001 is used to receive a first request for creating a snapshot for a first disk; the first disk is a first disk type, and the first disk type is a storage space for which a capacity configuration value is allocated when the disk is created;

[0165] A first response module 1002 is used to release unused storage space in the first disk by converting a first disk of a first disk type into a second disk of a second disk type in response to the first request; the second disk type is a portion of the storage space of the capacity configuration value allocated when the disk is created, and the storage space is gradually allocated as data is written until the capacity configuration value is reached;

[0166] The storage module 1003 is configured to store the snapshot of the first disk in the released storage space of the first disk.

[0167] Based on the same concept as the embodiment of the method of the present application, the embodiment of the present application further provides a computing device. The computing device may be a computing node 104. The structure of the computing device can be seen in Figure 2 Storage node 105 in.

[0168] In a specific application, the hard disk 123 can store computer programs. When the computing node 104 is running, the CPU 111 can read the computer programs stored in the hard disk 123 into the memory, and read the computer programs from the memory to implement the steps in the above-mentioned snapshot storage method, for example Figure 5 The steps performed by the computing node 104 in , and Figure 7 Steps performed by computing node 104 in .

[0169] Exemplarily, the computer program may be divided into one or more modules / units, which may be a series of computer program instruction segments capable of completing specific functions, and the one or more modules / units are stored in the hard disk 123 and executed by the CPU 111 to complete the present application. For example, the computer program may be divided into a first receiving module 1001, a first responding module 1001, and a storage module 1001, and the specific functions of each module are described above.

[0170] In addition to the above methods, apparatuses and computing devices, embodiments of the present application may also provide a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to execute the steps in the snapshot storage method of various embodiments of the present application described in the above "Method" section of this specification. Wherein, the computer program product can be written in any combination of one or more programming languages ​​to perform computer program code for performing the operation of the embodiments of the present application, and the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming language. Wherein, the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer program code can be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device, partially on the remote computing device, or completely on the remote computing device or server.

[0171] In addition, the embodiment of the present application may also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions, when executed by the processor, cause the processor to perform the steps in the snapshot storage method according to various embodiments of the present disclosure described in the above "Method" section of this specification. The computer-readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0172] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0173] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0174] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0175] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0176] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0177] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

[0178] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims

1. A snapshot storage method, characterized in that: include: receiving a first request to create a snapshot for a first disk; The first disk is of a first disk type, and the first disk type is a storage space to which a capacity configuration value is allocated when the disk is created; In response to the first request, unused storage space in the first disk is released by converting a first disk of a first disk type into a second disk of a second disk type; the second disk type is a portion of the storage space of the capacity configuration value allocated when the disk is created, and storage space is gradually allocated as data is written until the capacity configuration value is reached; The snapshot of the first disk is stored in the released storage space of the first disk.

2. The method according to claim 1, characterized in that: Before receiving the first request for creating a snapshot for the first disk, the method further includes: receiving a second request to create a first disk, the second request including a capacity configuration value of the first disk and a first disk type; A first disk of the first disk type is created, and storage space of the capacity configuration value is allocated to the first disk from available storage resources in a storage resource pool.

3. The method according to claim 1 or 2, characterized in that: The step of storing the snapshot of the first disk in the released storage space of the first disk includes: When the capacity required by the first disk for the snapshot to be stored and the capacity of the storage space used by the snapshot stored on the first disk are less than or equal to the capacity of the released storage space of the first disk, storage space is allocated from available storage resources in the storage resource pool based on the capacity required by the snapshot to be stored to store the snapshot.

4. The method according to any one of claims 1 to 3, characterized in that: Before converting the first disk of the first disk type into the second disk of the second disk type, the method further includes: It is determined that the space utilization of the first disk is less than or equal to a preset threshold; the space utilization indicates the situation of the used storage space in the storage space allocated by the first disk.

5. The method according to any one of claims 1 to 4, characterized in that: The step of converting a first disk of a first disk type into a second disk of a second disk type comprises: Creating a second disk of a second disk type, wherein data stored in the second disk is a copy of the data stored in the first disk; canceling the correspondence between the first disk and the snapshot of the first disk, and establishing the correspondence between the second disk and the snapshot of the first disk; Delete the first disk.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: receiving a third request for deleting the snapshot of the first disk; In response to the third request, reclaiming the released storage space of the first disk by converting the second disk of the second disk type to a third disk of the first disk type; Delete the snapshot of the first disk.

7. The method according to claim 6, characterized in that The converting the second disk of the second disk type into a third disk of the first disk type comprises: Creating a third disk of the first disk type, wherein data stored in the third disk is a copy of the data stored in the first disk; canceling the corresponding relationship between the second disk and the snapshot of the first disk, and establishing the corresponding relationship between the third disk and the snapshot of the first disk; Remove the second disk.

8. The method according to claim 6 or 7, characterized in that: Before converting the second disk of the second disk type into a third disk of the first disk type, the method further includes: Determine that the capacity of the available storage space in the storage resource pool and the storage space used by the snapshot of the first disk is greater than or equal to the capacity of the released storage space of the first disk; When it is determined that the available storage space in the storage resource pool and the capacity of the storage space used by the snapshot of the first disk are less than the capacity of the released storage space of the first disk, deleting the snapshot of the first disk is prohibited.

9. A computing device, characterized in that comprising a processor and a memory; wherein, The memory is used to store programs; The processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the method described in any one of claims 1 to 8 is performed.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 8.