Storage gateway resource recovery method
By using the pooled controller to divide and migrate the status of the storage gateway's cloud disk list, the problems of speed and business continuity in the storage gateway resource recovery process are solved, and efficient resource recovery and business assurance are achieved.
Patent Information
- Application Number
- CN202510824717.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-19
Smart Images

Figure CN120602503A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a storage gateway resource recovery method. Background Art
[0002] When a client accesses cloud disk storage resources, a storage gateway is usually used as the intermediate destination to convert the communication protocol between the client and the cloud disk to reduce client resource loss.
[0003] In related technologies, as cloud disk service load fluctuates, storage gateways often need to be expanded or reduced in capacity. For example, as cloud disk service load increases, new storage gateways are needed, while as cloud disk service load decreases, storage gateways need to be reduced. Therefore, how to quickly reclaim storage gateway storage resources is a pressing technical issue. Summary of the Invention
[0004] Based on this, it is necessary to provide a storage gateway resource recovery method that can quickly recover the storage resources of the storage gateway in response to the above technical problems.
[0005] In a first aspect, the present application provides a storage gateway resource recovery method, which is applied to a pooled controller in a storage gateway resource pool, where the storage gateway resource pool includes multiple storage gateways; the method includes:
[0006] In response to a resource recycling request for a target storage gateway, obtaining a list of cloud disks in the target storage gateway;
[0007] According to the client status of each cloud disk in the cloud disk list, the cloud disk list is divided into a first cloud disk list and a second cloud disk list; the client status corresponding to the first cloud disk list is alive; the client status corresponding to the second cloud disk list is not alive;
[0008] Deleting the second cloud disk list from the target storage gateway; and sending the first cloud disk list to the corresponding target client to instruct the target client to migrate the cloud disk access path of the first cloud disk list;
[0009] When the cloud disk list in the target storage gateway is empty, the storage resources of the target storage gateway are reclaimed.
[0010] In a second aspect, the present application provides a storage gateway resource recovery method, which is applied to a target client; the method comprises:
[0011] Receive a first cloud disk list sent by a pooling controller in a storage gateway resource pool; the first cloud disk list is obtained by the pooling controller in response to a resource recycling request for a target storage gateway, obtaining a cloud disk list in a target storage gateway, and dividing the cloud disk list according to the client status of each cloud disk in the cloud disk list;
[0012] According to the first cloud disk list, the cloud disk access paths in the first cloud disk list are migrated.
[0013] In a third aspect, the present application further provides a storage gateway resource recovery device, comprising:
[0014] A list acquisition module is used to obtain a cloud disk list in the target storage gateway in response to a resource recovery request for the target storage gateway;
[0015] The cloud disk division module is used to divide the cloud disk list into a first cloud disk list and a second cloud disk list according to the client status of each cloud disk in the cloud disk list; the client status corresponding to the first cloud disk list is alive; the client status corresponding to the second cloud disk list is not alive;
[0016] A migration instruction module is used to delete the second cloud disk list from the target storage gateway; and send the first cloud disk list to the corresponding target client to instruct the target client to migrate the cloud disk access path of the first cloud disk list;
[0017] The gateway recycling module is used to recycle the storage resources of the target storage gateway when the cloud disk list in the target storage gateway is empty.
[0018] In a fourth aspect, the present application further provides a storage gateway resource recovery device, comprising:
[0019] A list receiving module is configured to receive a first cloud disk list sent by a pooling controller in a storage gateway resource pool; the first cloud disk list is obtained by the pooling controller in response to a resource recycling request for a target storage gateway, obtaining a cloud disk list in a target storage gateway, and dividing the cloud disk list according to the client status of each cloud disk in the cloud disk list;
[0020] The path migration module is used to migrate the cloud disk access paths in the first cloud disk list according to the first cloud disk list.
[0021] In a fifth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the embodiments of the first or second aspect are implemented.
[0022] In a sixth aspect, the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any embodiment of the first or second aspect are implemented.
[0023] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the embodiments of the first or second aspect.
[0024] The above-mentioned storage gateway resource recovery method is applied to a pooled controller in a storage gateway resource pool. The storage gateway resource pool includes multiple storage gateways. In response to a resource recovery request for a target storage gateway, the pooled controller first obtains a cloud disk list in the target storage gateway, and then divides the cloud disk list into a first cloud disk list and a second cloud disk list according to the client status of each cloud disk in the cloud disk list; wherein the client status corresponding to the first cloud disk list is a survival state; the client status corresponding to the second cloud disk list is a non-survival state; then, the second cloud disk list is deleted from the target storage gateway; and the first cloud disk list is sent to the corresponding target client to instruct the target client to migrate the cloud disk access path of the first cloud disk list; when the cloud disk list in the target storage gateway is empty, the storage resources of the target storage gateway are recovered. In this method, when resources are recovered for the target storage gateway, different migration strategies are executed for the cloud disk list in the target storage gateway according to the client status corresponding to each cloud disk in the target storage gateway. Furthermore, for clients that are not alive, the cloud disk list corresponding to such clients, that is, the second cloud disk list, is directly deleted from the target storage gateway. This process does not require the participation of the client and can quickly improve the migration speed of the cloud disk access path of the second cloud disk list. For target clients that are alive, the corresponding cloud disk list is sent to the target client, instructing the target client to migrate the cloud disk access path. The target client and the pooled controller work together to achieve the migration of the cloud disk access path of the first cloud disk list, reducing the processing burden of the pooled controller and improving the migration efficiency of the first cloud disk access path. Finally, when the cloud disk list in the target storage gateway is empty, that is, when the second cloud disk list has been deleted and the cloud disk access path of the first cloud disk list has been migrated, the storage resources of the target storage gateway are recycled to ensure that the client's cloud business is not interrupted. In summary, the above-mentioned storage gateway resource recovery method can quickly realize the resource recovery of the storage gateway on the basis of ensuring that the cloud business is not interrupted. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1A schematic diagram of a communication link between a client and a storage cloud disk in one embodiment;
[0027] Figure 2 This is an application scenario diagram of a storage gateway resource recovery method in one embodiment;
[0028] Figure 3 A schematic diagram of a first flow chart of a storage gateway resource recovery method according to an embodiment;
[0029] Figure 4 A schematic diagram of an interaction in which a pooling controller maintains a client status list in one embodiment;
[0030] Figure 5 This is a first flow chart of a cloud disk access path migration step in one embodiment;
[0031] Figure 6 A schematic diagram of a process for creating a backup storage gateway link in one embodiment;
[0032] Figure 7 A schematic diagram of a process for creating a path request and responding to a request in one embodiment;
[0033] Figure 8 A schematic diagram of a flow chart of steps for determining a backup storage gateway in one embodiment;
[0034] Figure 9 This is a flowchart of a step for monitoring the number of remaining cloud disks in one embodiment;
[0035] Figure 10 A second flow chart of a storage gateway resource recovery method according to an embodiment;
[0036] Figure 11 Schematic diagram of a third flow chart of a storage gateway resource recovery method in one embodiment;
[0037] Figure 12 A second flow chart of a cloud disk access path migration step in one embodiment;
[0038] Figure 13 Schematic diagram of a fourth process of a storage gateway resource recovery method according to an embodiment;
[0039] Figure 14 The figure is a flowchart of a method for mounting a target cloud disk in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0041] Before describing the technical solutions provided in the embodiments of the present application, the technical terms in the embodiments of the present application are described as follows:
[0042] SPDK (The Storage Performance Development Kit): Storage Performance Development Kit refers to a storage development kit that provides a series of high-performance, scalable, user-mode tools and libraries.
[0043] NVMeOF (NVMe over Fabric): A storage protocol that allows direct access over a network.
[0044] Storage Gateway: NVMeOF destination device, used to create NVMeOF destination connection objects.
[0045] In the field of cloud computing storage, NVMe over Fabric technology is used to achieve network-based access between hosts and remote storage devices. SPDK implements this technology in user mode and achieves high-speed access to storage cloud hard drives based on its own mechanism, providing an effective solution for storage performance in the cloud computing field.
[0046] When using NVMe over Fabric to connect to remote storage resources, the NVMeOF destination as the middle layer is generally carried by an independent storage gateway node (hereinafter referred to as storage gateway) to reduce the consumption of the client's central processing unit (CPU) and memory resources. Figure 1 As shown, Figure 1 This is a schematic diagram of the communication link between the client and the remote storage device (such as a storage cloud disk). Figure 1 In the example, the client 102 communicates with the storage cloud disk 106 through the storage gateway. The number of storage gateways can be one or two. Figure 1 In the figure, two storage gateways are used as an example. Client 102 establishes a connection with storage cloud disk 106 through the first storage gateway, forming a primary link. Client 102 establishes a connection with storage cloud disk 106 through the second storage gateway, forming a backup link. Typically, client 102 accesses storage cloud disk 106 through the primary link. If the primary link is interrupted, client 102 accesses storage cloud disk 106 through the backup link to ensure continuity of client 102's cloud disk access service.
[0047] As the number of cloud disks increases, to prevent the storage gateway from becoming a bottleneck in cloud disk performance, you can use a storage gateway resource pool to manage the storage gateway and run the primary and backup links for clients to access the same cloud disk on different storage gateways to enhance the reliability of cloud disk access services.
[0048] See Figure 2 , Figure 2 This is an application scenario diagram of the storage gateway resource recovery method provided in an embodiment of the present application. Figure 2 In the storage gateway resource pool, the client mounts the storage cloud disk in the storage cluster through the storage gateway in the storage gateway resource pool to perform the corresponding business. The storage gateway resource pool includes multiple storage gateways. Figure 2 Take k storage gateways as an example. Each storage gateway in the storage gateway resource pool corresponds to a pooled controller, which is used to manage the storage gateways in the storage gateway resource pool. In addition, the storage cluster includes multiple storage cloud disks for clients to mount. Figure 2 Take n storage cloud disks as an example.
[0049] In real-world scenarios, when the service capacity of a storage gateway resource pool decreases or a storage gateway requires maintenance, excess storage gateway resources need to be reclaimed to reduce resource waste. Therefore, migrating the cloud disk access path on the reclaimed storage gateway without impacting the client's online cloud disk services, thereby quickly reclaiming storage gateway resources, is a pressing technical challenge.
[0050] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0051] In an exemplary embodiment, Figure 3 As shown, a storage gateway resource recovery method is provided. The method is described by taking the application of the method to a pooled controller in a storage gateway resource pool as an example. The storage gateway resource pool includes multiple storage gateways, including the following steps:
[0052] S301 , in response to a resource recovery request for a target storage gateway, obtaining a cloud disk list in the target storage gateway.
[0053] Among them, the storage gateway is the intermediate node for the client to access the remote cloud disk. It is used to convert the client's protocol request into an interface recognizable by cloud storage, achieve compatibility with heterogeneous protocols, and reduce the consumption of client processing resources and memory resources.
[0054] When the business carrying capacity in the storage gateway resource pool decreases, or the number of network disks mounted on each storage gateway in the storage gateway resource pool is lower than the preset threshold, a resource recycling request for the target storage gateway is triggered. The resource recycling request carries the gateway identification information of the target storage gateway, such as the number of the target storage gateway in the storage gateway resource pool, the location information of the target storage gateway, etc.
[0055] In actual triggering scenarios, the resource recovery request can be triggered by the operation and maintenance personnel when they monitor that the business carrying capacity in the storage gateway resource pool is reduced, or it can be automatically triggered by the pooling controller when it monitors that the number of mounted network disks of the target storage gateway is lower than the preset threshold. It can also be triggered by the operation and maintenance personnel when they monitor that the number of mounted network disks of the target storage gateway is lower than the preset threshold.
[0056] In response to a resource recovery request for a target storage gateway, the gateway identifier of the target storage gateway is obtained. Then, the target storage gateway is quickly located from the storage gateway resource pool according to the gateway identifier, and a cloud disk list stored in the target storage gateway is read, which includes cloud disk identifiers of multiple cloud disks.
[0057] It should be noted that in the embodiment of the present application, the target storage gateway stores multiple cloud disk identifiers, indicating that the target storage gateway has a connection relationship with each cloud disk represented in the cloud disk list. In this case, resource recycling of the target storage gateway means migrating the services on the link between the target storage gateway and each cloud disk.
[0058] S302, dividing the cloud disk list into a first cloud disk list and a second cloud disk list according to the client status of each cloud disk in the cloud disk list; the client status corresponding to the first cloud disk list is alive; the client status corresponding to the second cloud disk list is not alive.
[0059] The pooling controller dynamically maintains a client survival status table, which records the clients in the survival state. Figure 4 , Figure 4 Schematic diagram of m clients reporting status information to the pooling controller. Figure 4 In the process, each client sends its own heartbeat keep-alive information to the pooling controller at regular intervals. The pooling controller records the client identifiers in the survival state based on the received heartbeat keep-alive information, thereby dynamically maintaining the client survival status table.
[0060] Based on this, the pooling controller queries the third-party database for the clients to which each cloud disk belongs in the cloud disk list. The pooling controller then determines the client status of each cloud disk based on its own client storage status table. The pooling controller then selects the cloud disk lists corresponding to clients in the active state from the cloud disk list as the first cloud disk list, and selects the cloud disk lists corresponding to clients in the inactive state as the second cloud disk list. The second cloud disk list is the list of cloud disks other than the first cloud disk list.
[0061] S303: Delete the second cloud disk list from the target storage gateway; and send the first cloud disk list to the corresponding target client to instruct the target client to migrate the cloud disk access path of the first cloud disk list.
[0062] For the first cloud disk list, since the client status of each cloud disk in the first cloud disk list is alive, it means that the target client corresponding to the first cloud disk list is still accessing the cloud disk through the target storage gateway. In this case, it is necessary to migrate the cloud disk access path of the first cloud disk list on the target storage gateway before reclaiming the resources of the target storage gateway.
[0063] Based on this, in an embodiment of the present application, the first cloud disk list is sent to the corresponding target client to instruct the target client to migrate the access path of the cloud disks in the first cloud disk list to another storage gateway, where the other storage gateway is a storage gateway different from the target storage gateway in the storage gateway resource pool. It should be noted that the target client corresponding to the first cloud disk list can be one or more.
[0064] If there is only one target client corresponding to the first cloud disk list, the first cloud disk list will be sent to the target client; if there are multiple target clients corresponding to the first cloud disk list, the first cloud disk list will be divided into multiple sub-lists matching the number of target clients according to the category of the target clients, and each sub-list will be sent to the corresponding target client.
[0065] For example, if the first cloud disk list includes cloud disk 1, cloud disk 2, cloud disk 3 and cloud disk 4, and cloud disk 1 and cloud disk 2 correspond to target client A, and cloud disk 3 and cloud disk 4 correspond to target client B, then when target client A and target client B are both in survival state, the pooling controller sends a sub-cloud disk list including cloud disk 1 and cloud disk 2 to target client A, and sends a sub-cloud disk list including cloud disk 3 and cloud disk 4 to target client B.
[0066] For the second cloud disk list, since the client status of each cloud disk in the second cloud disk list is non-survival, it means that the client will no longer access the business through the target storage gateway. Naturally, there is no need to migrate the cloud disk access path of the second cloud disk list, and the second cloud disk list is directly deleted from the target storage gateway.
[0067] S304: When the cloud disk list in the target storage gateway is empty, the storage resources of the target storage gateway are recycled.
[0068] The pooling controller monitors the number of remaining cloud disks in the cloud disk list of the target storage gateway in real time. If the number of remaining cloud disks is 0, which means the cloud disk list is empty, the storage resources of the target storage gateway are reclaimed, for example, the storage resources of the target storage gateway are cleared and the target storage gateway is shut down.
[0069] In an embodiment of the present application, when the target storage gateway is subjected to resource recovery, different migration strategies are implemented for the cloud disk list in the target storage gateway according to the client status corresponding to each cloud disk in the target storage gateway. Furthermore, for clients that are not alive, the cloud disk list corresponding to such clients, that is, the second cloud disk list, is directly deleted from the target storage gateway. This process does not require the participation of the client and can quickly improve the migration speed of the cloud disk access path of the second cloud disk list. For target clients that are alive, the corresponding cloud disk list is sent to the target client, instructing the target client to migrate the cloud disk access path. The target client and the pooled controller work together to achieve the migration of the cloud disk access path of the first cloud disk list, thereby reducing the processing burden of the pooled controller and improving the migration efficiency of the first cloud disk access path. Finally, when the cloud disk list in the target storage gateway is empty, that is, when the second cloud disk list has been deleted and the cloud disk access path of the first cloud disk list has been migrated, the storage resources of the target storage gateway are recovered to ensure that the client's cloud business is not interrupted. In summary, the above storage gateway resource recovery method can quickly realize storage gateway resource recovery while ensuring uninterrupted cloud services.
[0070] As can be seen from the above embodiments, the target client corresponding to the first cloud disk list can be one or more. Next, a possible implementation method of the pooling controller instructing the target client to perform path migration in the scenario where the first cloud disk list corresponds to multiple different target clients is described. In an exemplary embodiment, Figure 5 As shown, the first cloud disk list includes identifiers of multiple cloud disks to be migrated, and each cloud disk to be migrated corresponds to a target client; sending the first cloud disk list to the corresponding target client includes:
[0071] S501 : For any target client, in response to a cloud disk migration check request sent by the target client, a list of cloud disks to be migrated that matches the target client is determined from a first cloud disk list.
[0072] The cloud disk migration check request carries the client identifier of the target client, the first cloud disk list includes identifiers of multiple cloud disks, and the third-party database includes an access mapping relationship between the target client and the cloud disk.
[0073] The target client can send a cloud disk migration check request to the pooling controller at a preset time interval. The cloud disk migration check request is used to instruct the pooling controller to query whether the target client's cloud disk access interface exists in the to-be-reclaimed gateway in the storage gateway resource pool.
[0074] The pooling controller responds to the cloud disk migration check request sent by the target client, obtains the client identifier of the target client, and determines the cloud disk to be migrated that matches the client identifier of the target client from the first cloud disk list based on the access mapping relationship between the target client and the cloud disk, and summarizes the identifiers of the cloud disks to be migrated to obtain a list of cloud disks to be migrated.
[0075] S502: Send a list of cloud disks to be migrated to a target client. The list of cloud disks to be migrated is used by the target client to migrate access paths of the cloud disks in the list of cloud disks to be migrated.
[0076] Continuing with the example of the first cloud disk list including cloud disk 1, cloud disk 2, cloud disk 3 and cloud disk 4, and cloud disk 1 and cloud disk 2 corresponding to target client A, and cloud disk 3 and cloud disk 4 corresponding to target client B, the pooling controller responds to the cloud disk migration check request sent by target client A, takes cloud disk 1 and cloud disk 2 as the list of cloud disks to be migrated that matches target client A, and summarizes the cloud disk identifiers of cloud disk 1 and cloud disk 2 to obtain the list of cloud disks to be migrated, and sends it to target client A to instruct target client A to migrate the business of accessing cloud disk 1 through the target storage gateway to other storage gateways, and migrate the business of accessing cloud disk 2 through the target storage gateway to other storage gateways.
[0077] In an embodiment of the present application, for any target client, in response to a cloud disk migration check request sent by the target client, a list of cloud disks to be migrated that matches the target client is determined from the first cloud disk list, and the list of cloud disks to be migrated is sent to the target client. This is equivalent to assigning the cloud disk access path migration task for the first cloud disk list in the target storage gateway to different target clients for execution. In this way, through the coordination between the pooled controller and different target storage gateways, the first cloud disk information of the target storage gateway is gradually migrated in batches. Moreover, in a scenario where the cloud disk service is not interrupted, the pooled controller supports the parallel migration of cloud disks of different target clients, which greatly improves the migration efficiency and reduces the time consumed in the storage gateway resource recovery.
[0078] The above embodiment describes the steps for implementing the pooling controller to send a list of cloud disks to be migrated to the target client. When the target client receives the list of cloud disks to be migrated, the cloud disk access path of each cloud disk to be migrated is migrated one by one.
[0079] For any cloud disk to be migrated, if there are two cloud disk access paths between the target client and the cloud disk to be migrated, it means that in addition to accessing the cloud disk through the first link corresponding to the target storage gateway, the target client can also access the cloud disk to be migrated through the second link belonging to other storage gateways. At this time, the target client can directly migrate the business on the first link to the second link.
[0080] In another scenario, if the target client and the cloud disk to be migrated have only one cloud disk access path, meaning that access between the target client and the cloud disk to be migrated is only possible through the first link corresponding to the target storage gateway, then before the target client migrates the first link, it is necessary to instruct the pooling controller to create a new link to be migrated. The following describes the implementation process of the pooling controller creating the link to be migrated.
[0081] In an exemplary embodiment, Figure 6 As shown, the first cloud disk list includes identifiers of multiple cloud disks to be migrated, and each cloud disk to be migrated corresponds to a target client; the method further includes:
[0082] S601: For any target client, receive an access path migration request for a cloud disk to be migrated sent by the target client, determine a backup storage gateway from a storage gateway resource pool, and instruct the backup storage gateway to create a cloud disk access interface.
[0083] In response to the access path migration request for the cloud disk to be migrated sent by the target client, the backup storage gateway is determined based on the idleness of each storage gateway in the storage gateway resource pool, such as the resource proportion value, and the cloud disk identifier to be migrated carried in the path migration request is sent to the backup storage gateway, instructing the backup storage gateway to create a cloud disk access interface for the cloud disk to be migrated.
[0084] Optionally, obtain the storage gateway exclusion list of the target client, delete the storage gateways in the storage gateway exclusion list from the storage gateway resource pool, obtain the remaining storage gateways, and then determine the storage gateway that matches the path identifier and has the least number of currently mounted cloud disks from the remaining storage gateways based on the path identifier carried in the access path migration request to obtain the backup storage gateway.
[0085] S602, send the cloud disk access interface identifier of the backup storage gateway to the target client to instruct the target client to establish a link to be migrated with the cloud disk to be migrated through the backup storage gateway, and migrate the business on the current link to the link to be migrated; the current link is the link established by the target client and the cloud disk to be migrated through the target storage gateway.
[0086] When monitoring that the backup storage gateway has completed the creation of the cloud disk access interface, the cloud disk access interface identifier of the backup storage gateway is sent to the target client to instruct the target client to establish a link to be migrated with the cloud disk to be migrated through the backup storage gateway, and migrate the business on the link established between the target client and the cloud disk to be migrated through the target storage gateway to the link to be migrated.
[0087] In an embodiment of the present application, for any target client, an access path migration request for the cloud disk to be migrated sent by the target client is received, a backup storage gateway is determined from the storage gateway resource pool, and then, when the backup storage gateway creates a cloud disk access interface, the target client is instructed to connect to the network disk to be migrated through the backup storage gateway, which is equivalent to creating a backup path for the target client and the cloud disk to be migrated, so as to facilitate the target client to perform business migration of the current link, thereby ensuring that the cloud access business of the target client and the cloud disk to be migrated is continuous and uninterrupted.
[0088] When the migration of the cloud disk access path for the cloud disk to be migrated on the target storage gateway is completed, the target client sends a path creation request to the pooling controller to instruct the pooling controller to delete the old link for the cloud disk to be migrated on the target storage gateway and select a new storage gateway different from the target storage gateway to create a new access link for the cloud disk to be migrated. In an exemplary embodiment, Figure 7 As shown, the method further includes:
[0089] S701 : In response to a path creation request sent by a target client, delete a link established between the target client and the cloud disk to be migrated via a target storage gateway.
[0090] The path creation request carries the cloud disk ID of the cloud disk to be migrated. Based on the cloud disk access ID of the cloud disk to be migrated, the ID of the cloud disk to be migrated is deleted from the cloud disk list of the target storage gateway, and the target storage gateway is instructed to delete the cloud disk access interface created for the cloud disk to be migrated.
[0091] S702: Determine a new storage gateway from the storage gateway resource pool and instruct the new storage gateway to create a cloud disk access interface.
[0092] Optionally, first obtain a storage gateway exclusion list of the target client from a third-party database, where the storage gateway exclusion list includes the gateway identifier of the storage gateway to which the target client fails to connect. Then, remove the storage gateways in the storage gateway exclusion list from the storage gateway resource pool to obtain the remaining storage gateways. Then, remove the target storage gateway from the remaining storage gateways to obtain candidate storage gateways. Finally, randomly select a storage gateway from the candidate storage gateways as the new storage gateway.
[0093] In another implementation scenario, the target storage gateway can be removed from the storage gateway resource pool, and then the storage gateway with the smallest number of mounted cloud disks can be determined from the storage gateway resource pool after the target storage gateway is removed as the new storage gateway.
[0094] After determining the new storage gateway, an interface creation request is sent to the new storage gateway. The interface creation request carries the cloud disk identifier and link identifier of the cloud disk to be migrated, which is used to instruct the new storage gateway to create a cloud disk access interface for the cloud disk to be migrated. The link identifier carried in the interface creation request is consistent with the link identifier of the deleted link. If the deleted link identifier is the primary link identifier, the link identifier carried in the interface creation request is also the primary link identifier; if the deleted link identifier is the backup link identifier, the link identifier carried in the interface creation request is also the backup link identifier.
[0095] S703: Send the cloud disk access interface identifier of the new storage gateway to the target client to instruct the target client to establish a new link with the cloud disk to be migrated through the new storage gateway.
[0096] When the backup storage gateway is detected to have created the cloud disk access interface, the cloud disk access interface identifier of the new storage gateway is sent to the target client to instruct the target client to establish a new link with the cloud disk to be migrated through the new storage gateway.
[0097] Among them, the new link established through the new storage gateway is consistent with the link identifier of the aforementioned deleted target storage gateway, that is, if the link established between the target client and the cloud disk to be migrated through the target storage gateway is the main link, then the link established through the new storage gateway is also the main link for the target client to access the cloud disk to be migrated; if the link established between the target client and the cloud disk to be migrated through the target storage gateway is the backup link, then the link established through the new storage gateway is also the backup link for the target client to access the cloud disk to be migrated.
[0098] In an embodiment of the present application, in response to a path creation request sent by a target client, the link established between the target client and the cloud disk to be migrated through the target storage gateway is deleted, and a new link between the target client and the cloud disk to be migrated is established using a new storage gateway. In this way, in addition to being able to access the cloud disk to be migrated through the link after migration, the target client and the cloud disk to be migrated can also be accessed through the newly established link, thereby ensuring the stability and reliability of the target client's access to the cloud disk to be migrated.
[0099] In an exemplary embodiment, Figure 8 As shown, a possible implementation method of the aforementioned step S702 "determining a new storage gateway from the storage gateway resource pool" is provided, including:
[0100] S801, obtaining a storage gateway exclusion list of a target client, and the current number of cloud disk mounts and path identifiers of each storage gateway in a storage gateway resource pool.
[0101] Obtain the target client's storage gateway exclusion list from a third-party database. The storage gateway exclusion list includes the identifiers of storage gateways to which the target client has historically failed to connect. Also, obtain the current number of cloud disks mounted on each storage gateway from the third-party database, including the number of cloud disks mounted on each storage gateway as the primary link and the number of cloud disks mounted on each storage gateway as the backup link.
[0102] The path creation request sent by the target client is parsed to obtain a path identifier carried in the path creation request, where the path identifier is a primary link identifier or a backup link identifier.
[0103] S802: Remove storage gateways in the storage gateway exclusion list from the storage gateway resource pool.
[0104] Remove the target storage gateway, the storage gateway after path migration, and the gateways in the storage gateway exclusion list from the storage gateway resource pool to obtain the remaining storage gateways.
[0105] S803: Determine, from the remaining storage gateways in the storage gateway resource pool, a storage gateway that matches the path identifier and has the least number of currently mounted cloud disks, and obtain a new storage gateway.
[0106] Then, based on the number of cloud disk mounts that match the path identifier in each storage gateway, the remaining storage gateways are sorted to obtain the storage gateway that matches the path identifier and has the least number of cloud disk mounts, which is the new storage gateway.
[0107] In an embodiment of the present application, a new storage gateway is determined from the storage gateway resource pool based on the storage gateway exclusion list of the target client, the current number of cloud disk mounts and path identifiers of each storage gateway in the storage gateway resource pool, which is equivalent to comprehensively considering the connectivity between the target client and the storage gateway, the carrying capacity of the storage gateway and the balance of the storage gateway resource pool to improve the rationality of the new storage gateway.
[0108] In the storage gateway resource pool, for any storage gateway, both cloud disk access path migration and cloud disk access path creation are supported. Based on this, in order to further improve the resource recovery efficiency of the target storage gateway, it is necessary to restrict the mounting function of the target storage gateway. In an exemplary embodiment, the method further includes:
[0109] In response to the resource recycling request for the target storage gateway, a stop response mark of the target storage gateway is added; the stop response mark is used to instruct the target storage gateway to stop receiving cloud disk mounting requests.
[0110] It should be emphasized that adding the stop response mark of the target storage gateway is executed before the cloud disk list of the target storage gateway is divided, which is equivalent to, in an embodiment of the present application, before migrating the cloud disk access path of the target storage gateway, no longer instructing the target storage gateway to receive cloud disk mount requests, so as to ensure that the storage resources of the target storage gateway are always on a downward trend until they are empty.
[0111] In an embodiment of the present application, in response to a resource recovery request for a target storage gateway, the target storage gateway stops receiving cloud disk mount requests, thereby preventing the target storage gateway from adding new cloud disk access paths while migrating cloud disk access paths, thereby ensuring that the cloud disk access paths of the target storage gateway are continuously reduced, thereby speeding up the clearing speed of the cloud disk list of the target storage gateway and improving resource recovery efficiency.
[0112] The above embodiments describe the resource recovery method for a target storage gateway. It should be noted that a storage gateway resource pool may include multiple storage gateways, and there may be more than one target storage gateway to be recovered. In this case, in the embodiments of the present application, the pooled controller concurrently monitors each storage gateway in the storage gateway resource pool and concurrently executes the resource recovery process for each storage gateway to be recovered.
[0113] In an exemplary embodiment, Figure 9 As shown, the storage gateway resource pool includes multiple storage gateways to be reclaimed; the method also includes:
[0114] S901: For any storage gateway to be reclaimed, monitor the number of remaining cloud disks of the storage gateway to be reclaimed.
[0115] For any storage gateway to be recycled, the storage gateway to be recycled updates the number of its remaining cloud disks in real time in the third-party database. The pooling controller reads the number of remaining cloud disks of the storage gateway to be recycled from the third-party database in real time and determines whether the number of remaining cloud disks of the storage gateway to be recycled is 0.
[0116] S902: If the number of remaining cloud disks of the storage gateway to be reclaimed is empty, the storage resources of the storage gateway to be reclaimed are reclaimed.
[0117] If the number of remaining cloud disks in the storage gateway to be recycled is empty, it means that there is no cloud disk access path in the storage gateway to be recycled, that is, the recycling conditions are met. In this case, the storage resources of the storage gateway to be recycled are cleared and the storage gateway to be recycled is shut down.
[0118] In an embodiment of the present application, for any storage gateway to be recycled in the storage gateway resource pool, when the number of remaining cloud disks of the storage gateway to be recycled is empty, the storage resources of the storage gateway to be recycled are recycled in a timely manner.
[0119] In an exemplary embodiment, a storage gateway resource recovery method is provided with a pooling controller as an execution body, such as Figure 10 As shown, the following steps are included:
[0120] S1001: In response to a resource recycling request for a target storage gateway, add a stop response mark of the target storage gateway.
[0121] The stop response flag is used to instruct the target storage gateway to stop receiving cloud disk mount requests.
[0122] S1002: Divide the cloud disk list into a first cloud disk list and a second cloud disk list according to the client status of each cloud disk in the cloud disk list.
[0123] The client status corresponding to the first cloud disk list is alive; the client status corresponding to the second cloud disk list is not alive.
[0124] S1003: Delete the second cloud disk list from the target storage gateway.
[0125] Send an information deletion instruction to the target storage gateway to instruct the target storage gateway to delete the second cloud disk list.
[0126] S1004 : In response to the cloud disk migration check request sent by the target client, the first cloud disk list is sent to the corresponding target client to instruct the target client to migrate the cloud disk access path in the first cloud disk list.
[0127] In actual application scenarios, when the first cloud disk list includes identifiers of multiple cloud disks to be migrated and each cloud disk to be migrated corresponds to a target client, in response to a cloud disk migration check request sent by any target client, a cloud disk list to be migrated that matches the target client is determined from the first cloud disk list to instruct the target client to migrate the cloud disk access path of the cloud disk list to be migrated.
[0128] S1005: Receive an access path migration request for the cloud disk to be migrated sent by the target client, determine a backup storage gateway from the storage gateway resource pool, and instruct the backup storage gateway to create a cloud disk access interface.
[0129] S1006: Send the cloud disk access interface identifier of the backup storage gateway to the target client.
[0130] This step is used to instruct the target client and the cloud disk to be migrated to establish a link to be migrated through the backup storage gateway, and migrate the services on the current link to the link to be migrated; the current link is the link established between the target client and the cloud disk to be migrated through the target storage gateway.
[0131] It should be noted that steps S1005-S1006 are the interaction steps between the pooling controller and the target client during the path migration process, when there is only one communication link between the target client and the cloud disk. If there are two links between the target client and the cloud disk, the target client can directly perform path migration without executing steps S1005-S1006.
[0132] S1007: In response to the path creation request sent by the target client, delete the link established between the target client and the cloud disk to be migrated through the target storage gateway.
[0133] The path creation request is sent to the pooling controller after the target client path migration is completed.
[0134] S1008: Obtain the storage gateway exclusion list of the target client, the current cloud disk mount quantity and path identifier of each storage gateway in the storage gateway resource pool.
[0135] S1009: Remove the storage gateways in the storage gateway exclusion list from the storage gateway resource pool.
[0136] S1010: Determine, from the remaining storage gateways in the storage gateway resource pool, a storage gateway that matches the path identifier and has the least number of currently mounted cloud disks, and obtain a new storage gateway.
[0137] S1011: Send a cloud disk access interface identifier of a new storage gateway to a target client to instruct the target client to establish a new link with the cloud disk to be migrated through the new storage gateway.
[0138] S1012: When the cloud disk list in the target storage gateway is empty, the storage resources of the target storage gateway are recycled.
[0139] In an embodiment of the present application, when the target storage gateway is subjected to resource recovery, different migration strategies are implemented for the cloud disk list in the target storage gateway according to the client status corresponding to each cloud disk in the target storage gateway. Furthermore, for clients that are not alive, the cloud disk list corresponding to such clients, that is, the second cloud disk list, is directly deleted from the target storage gateway. This process does not require the participation of the client and can quickly improve the migration speed of the cloud disk access path of the second cloud disk list. For target clients that are alive, the corresponding cloud disk list is sent to the target client, instructing the target client to migrate the cloud disk access path. The target client and the pooled controller work together to achieve the migration of the cloud disk access path of the first cloud disk list, thereby reducing the processing burden of the pooled controller and improving the migration efficiency of the first cloud disk access path. Finally, when the cloud disk list in the target storage gateway is empty, that is, when the second cloud disk list has been deleted and the cloud disk access path of the first cloud disk list has been migrated, the storage resources of the target storage gateway are recovered to ensure that the client's cloud business is not interrupted. In summary, the above storage gateway resource recovery method can quickly realize storage gateway resource recovery while ensuring uninterrupted cloud services.
[0140] The above is an explanation of the embodiment related to the pooling controller as the execution subject. Based on this, the embodiment of the present application also provides an embodiment corresponding to the above process with the client as the execution subject.
[0141] In an exemplary embodiment, Figure 11 As shown, a storage gateway resource recovery method is provided, which is described by taking the method applied to a target client as an example, and includes the following steps:
[0142] S1101, receiving a first cloud disk list sent by a pooling controller in a storage gateway resource pool.
[0143] The first cloud disk list is obtained by the pooling controller in response to a resource recovery request for the target storage gateway, obtaining the cloud disk list in the target storage gateway, and dividing the cloud disk list according to the client status to which each cloud disk in the cloud disk list belongs.
[0144] The target client refers to the client to which the first cloud disk list belongs. In the embodiment of the present application, the target client can regularly send a cloud disk migration check request to the pooling controller at a preset time interval and receive the first cloud disk list sent by the pooling controller.
[0145] It should be noted that, in response to a resource reclaim request for the target storage gateway, the pooling controller divides the cloud disk list into a first cloud disk list and a second cloud disk list based on the client status of each cloud disk in the cloud disk list. For the second cloud disk list, the pooling controller can directly delete the second cloud disk list from the target storage gateway.
[0146] S1102: Migrate the cloud disk access paths in the first cloud disk list according to the first cloud disk list.
[0147] According to the first cloud disk list, the cloud disk access path of each cloud disk path in the first cloud disk list is migrated, and each time a cloud disk access path is migrated, the cloud disk identifier corresponding to the migrated cloud disk access path is deleted from the first cloud disk list once, and the first cloud disk list is updated once.
[0148] In an embodiment of the present application, the target client migrates the cloud disk access path of the first cloud disk list according to the first cloud disk list sent by the pooled controller in the storage gateway resource pool. The first cloud disk list is obtained by the pooled controller in response to a resource recovery request for the target storage gateway, obtaining the cloud disk list in the target storage gateway, and dividing the cloud disk list according to the client status to which each cloud disk in the cloud disk list belongs. In this method, when the target storage gateway is reclaimed for resources, the pooled controller sends the corresponding first cloud disk list to the target client in the surviving state according to the client status corresponding to each cloud disk in the target storage gateway. The target client quickly executes the migration of the cloud disk access path based on the received first cloud disk list. In this way, the target client and the pooled controller work together to realize the migration of the cloud disk access path of the first cloud disk list, reduce the processing burden of the pooled controller, and improve the migration efficiency of the second cloud disk access path.
[0149] In an exemplary embodiment, the first cloud disk list corresponds to a target client, and the implementation method of path-by-path migration of the target client is described. Figure 12 As shown, according to the first cloud disk list, migrating the cloud disk access path of the first cloud disk list includes:
[0150] S1201: For any cloud disk in the first cloud disk list, if there is a first link and a second link between the target client and the cloud disk, migrate the business on the first link to the second link; the first link is the link established between the target client and the cloud disk through the target storage gateway.
[0151] The second link is a link established between the target client and the cloud disk through other storage gateways in the storage gateway resource pool. The other storage gateways are different from the target storage gateway.
[0152] For any cloud disk in the first cloud disk list, a first link and a second link exist between the target client and the cloud disk. This means that in addition to accessing the cloud disk through the first link corresponding to the target storage gateway, the target client can also access the cloud disk through the second link belonging to another storage gateway. In this case, the services on the first link can be directly migrated to the second link.
[0153] S1202: If a first link exists between the target client and the cloud disk, a path migration request is sent to the pooling controller to instruct the pooling controller to create a third link and migrate the services of the first link to the third link.
[0154] There is only the first link between the target client and the cloud disk, that is, the target client and the cloud disk can only be accessed through the first link corresponding to the target storage gateway, and path migration is impossible. In this case, a path migration request is first sent to the pooling controller, instructing the pooling controller to select the backup storage gateway, and then instructing the backup storage gateway to create a cloud access interface; then, the cloud access interface identifier returned by the pooling controller is received, and based on the cloud access interface, a connection is established between the backup storage gateway and the cloud disk to create a third link; finally, the services of the first link are migrated to the third link.
[0155] In an embodiment of the present application, for any cloud disk in the first cloud disk list, a corresponding path business migration strategy is determined based on the number of links between the target client and the cloud disk to ensure that the business on the first link established between the target client and the cloud disk through the target storage gateway is successfully migrated.
[0156] After completing the migration of services on the first link between the target client and the cloud disk, the target client sends a path creation request to the pooling controller, instructing it to delete the first link, determine a new storage gateway from the storage gateway resource pool, and instruct the new storage gateway to create a cloud disk access interface. The target client then establishes a new link with the cloud disk through the new storage gateway based on the new cloud disk access interface identifier sent by the pooling controller. This allows the target client to access the cloud disk through both the newly established link and the post-migration link, ensuring the stability and reliability of the target client's access to the cloud disk.
[0157] Furthermore, in the case where there are two links between the target client and the cloud disk, the primary link and the backup link are further distinguished in the two links, and the service access between the target client and the cloud disk is ensured to be performed on the primary link. In an exemplary embodiment, the method further includes:
[0158] For any cloud disk in the first cloud disk list, if the current cloud disk access path between the target client and the cloud disk is a backup link, the service of the current cloud disk access path is migrated to the primary link between the target client and the cloud disk.
[0159] For any cloud disk in the first cloud disk list, the current cloud disk access path between the target client and the cloud disk is a backup link, which means that the link established between the target client and the cloud disk through the target storage gateway is the primary link, that is, the deleted link is the primary link, the link after migration is the backup link, and the newly created link is the primary link. In this case, the business of the current cloud disk access path will be migrated to the newly created link, that is, the primary link between the target client and the cloud disk.
[0160] The current cloud disk access path between the target client and the cloud disk is the primary link, which means that the link established between the target client and the cloud disk through the target storage gateway is the backup link. In other words, the deleted link is the backup link, and the link after migration is the primary link. The newly created link is the backup link, and the target client continues to use the primary link after migration to access the cloud disk.
[0161] In an embodiment of the present application, for any cloud disk in the first cloud disk list, if the current cloud disk access path between the target client and the cloud disk is a backup link, the business of the current cloud disk access path is migrated to the main link between the target client and the cloud disk, so that the target client and the cloud disk communicate through the main link first, simplifying the traffic management logic, while avoiding excessive consumption of the backup link, and reducing the operation and maintenance cost of the storage gateway resource pool.
[0162] In an exemplary embodiment, a storage gateway resource recovery method is provided with a target client as the execution subject, such as Figure 13 As shown, the following steps are included:
[0163] S1301: Send a cloud disk migration check request to the pooling controller.
[0164] S1302: Receive a first cloud disk list sent by the pooling controller.
[0165] S1303: For any cloud disk in the first cloud disk list, if a first link and a second link exist between the target client and the cloud disk, migrate the service on the first link to the second link.
[0166] The first link is a link established between the target client and the cloud disk through the target storage gateway.
[0167] S1304: For any cloud disk in the first cloud disk list, if a first link exists between the target client and the cloud disk, a path migration request is sent to the pooling controller to instruct the pooling controller to create a third link.
[0168] S1305: Migrate the service of the first link to the third link.
[0169] S1306: Send a path creation request to the pooling controller.
[0170] The path creation request is used to instruct the pooling controller to delete the link established between the target client and the cloud disk to be migrated through the target storage gateway, determine a new storage gateway from the storage gateway resource pool, and instruct the new storage gateway to create a cloud disk access interface.
[0171] S1307: Receive the cloud disk access interface identifier of the new storage gateway to instruct the target client to establish a new link with the cloud disk to be migrated through the new storage gateway.
[0172] S1308: If the current cloud disk access path between the target client and the cloud disk is a backup link, the service of the current cloud disk access path is migrated to the primary link between the target client and the cloud disk.
[0173] In an embodiment of the present application, when reclaiming resources for the target storage gateway, the pooled controller sends the corresponding first cloud disk list to the target client in the surviving state according to the client status corresponding to each cloud disk in the target storage gateway. The target client quickly performs the migration of the cloud disk access path based on the received first cloud disk list. In this way, the target client and the pooled controller work together to realize the migration of the cloud disk access path of the first cloud disk list, reduce the processing burden of the pooled controller, and improve the migration efficiency of the second cloud disk access path. In addition, for any cloud disk in the first cloud disk list, if the current cloud disk access path between the target client and the cloud disk is a backup link, the business of the current cloud disk access path is migrated to the main link between the target client and the cloud disk, so that the target client and the cloud disk communicate first through the main link, simplifying the traffic management logic, while avoiding excessive consumption of the backup link, and reducing the operation and maintenance cost of the storage gateway resource pool.
[0174] In an exemplary embodiment, the target client is used as the execution subject, such as Figure 14 As shown, a storage gateway resource recovery method is provided, comprising the following steps:
[0175] S1401: In response to a mount request for a target cloud disk, generate a primary link identifier of the target cloud disk.
[0176] S1402: Send a primary path creation request to the pooling controller to instruct the pooling controller to determine a first storage gateway corresponding to the primary link identifier from the storage gateway resource pool.
[0177] S1403: Determine whether the target client and the target cloud disk are successfully connected through the first storage gateway.
[0178] S1404: If yes, generate a backup link identifier for the target cloud disk.
[0179] S1405: If not, write the first storage gateway into the storage gateway exclusion list of the target client.
[0180] S1406: Send a backup path creation request to the pooling controller to instruct the pooling controller to determine a second storage gateway corresponding to the backup link identifier from the storage gateway resource pool.
[0181] S1407: Determine whether the target client and the target cloud disk are successfully connected through the second storage gateway.
[0182] S1408: If yes, generate a successful response for mounting the target cloud disk.
[0183] S1409: If not, write the second storage gateway into the storage gateway exclusion list of the target client.
[0184] In an embodiment of the present application, in response to a mount request for a target cloud disk, two different storage gateways are used to establish two links between the target client and the target cloud disk to ensure the reliability of the target client's access to the target cloud disk service.
[0185] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0186] Based on the same inventive concept, embodiments of the present application also provide a storage gateway resource recovery device for implementing the aforementioned storage gateway resource recovery method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more storage gateway resource recovery device embodiments provided below can be found in the above-mentioned limitations of the storage gateway resource recovery method and will not be repeated here.
[0187] In an exemplary embodiment, a storage gateway resource recovery device is provided, comprising: a list acquisition module, a cloud disk partitioning module, a migration instruction module, and a gateway recovery module, wherein:
[0188] A list acquisition module is used to obtain a cloud disk list in the target storage gateway in response to a resource recovery request for the target storage gateway;
[0189] The cloud disk division module is used to divide the cloud disk list into a first cloud disk list and a second cloud disk list according to the client status of each cloud disk in the cloud disk list; the client status corresponding to the first cloud disk list is alive; the client status corresponding to the second cloud disk list is not alive;
[0190] A migration instruction module is used to delete the second cloud disk list from the target storage gateway; and send the first cloud disk list to the corresponding target client to instruct the target client to migrate the cloud disk access path of the first cloud disk list;
[0191] The gateway recycling module is used to recycle the storage resources of the target storage gateway when the cloud disk list in the target storage gateway is empty.
[0192] In an exemplary embodiment, the first cloud disk list includes identifiers of multiple cloud disks to be migrated, and each cloud disk to be migrated corresponds to a target client; the migration instruction module includes: a list determination unit and a list sending unit, wherein:
[0193] a list determining unit, configured to, for any target client, determine, in response to a cloud disk migration check request sent by the target client, a list of cloud disks to be migrated that matches the target client from the first cloud disk list;
[0194] The list sending unit is used to send a list of cloud disks to be migrated to a target client. The list of cloud disks to be migrated is used by the target client to migrate the cloud disk access paths in the list of cloud disks to be migrated.
[0195] In an exemplary embodiment, the first cloud disk list includes identifiers of multiple cloud disks to be migrated, and each cloud disk to be migrated corresponds to a target client; the storage gateway resource recovery device includes: a first gateway determination module and a first identifier sending module, wherein:
[0196] The first gateway determination module is configured to receive, for any target client, an access path migration request for a cloud disk to be migrated sent by the target client, determine a backup storage gateway from a storage gateway resource pool, and instruct the backup storage gateway to create a cloud disk access interface;
[0197] The first identification sending module is used to send the cloud disk access interface identifier of the backup storage gateway to the target client to instruct the target client to establish a link to be migrated with the cloud disk to be migrated through the backup storage gateway, and migrate the business on the current link to the link to be migrated; the current link is the link established by the target client and the cloud disk to be migrated through the target storage gateway.
[0198] In an exemplary embodiment, a storage gateway resource recovery device includes: a creation request response module, a second gateway determination module, and a second identification sending module, wherein:
[0199] A creation request response module is used to respond to the path creation request sent by the target client and delete the link established between the target client and the cloud disk to be migrated through the target storage gateway;
[0200] A second gateway determination module is configured to determine a new storage gateway from the storage gateway resource pool and instruct the new storage gateway to create a cloud disk access interface;
[0201] The second identifier sending module is used to send the cloud disk access interface identifier of the new storage gateway to the target client to instruct the target client to establish a new link with the cloud disk to be migrated through the new storage gateway.
[0202] In an exemplary embodiment, the second gateway determination module is also used to obtain the storage gateway exclusion list of the target client, the current number of cloud disk mounts and path identifiers of each storage gateway in the storage gateway resource pool; remove the storage gateways in the storage gateway exclusion list from the storage gateway resource pool; determine the storage gateway that matches the path identifier and has the least current number of cloud disk mounts from the remaining storage gateways in the storage gateway resource pool, and obtain a new storage gateway.
[0203] In an exemplary embodiment, a storage gateway resource recovery device includes: an identification adding module for adding a stop response mark of the target storage gateway in response to a resource recovery request for the target storage gateway; the stop response mark is used to instruct the target storage gateway to stop receiving cloud disk mounting requests.
[0204] In an exemplary embodiment, a storage gateway resource pool includes multiple storage gateways to be reclaimed; a storage gateway resource reclaiming device includes: a cloud disk quantity monitoring module and a resource reclaiming module, wherein:
[0205] A cloud disk quantity monitoring module is used to monitor the number of remaining cloud disks of any storage gateway to be recycled;
[0206] The resource recycling module is used to recycle the storage resources of the storage gateway to be recycled if the number of remaining cloud disks of the storage gateway to be recycled is empty.
[0207] In an exemplary embodiment, a storage gateway resource recovery device is provided, comprising: a list receiving module and a path migration module, wherein:
[0208] A list receiving module is configured to receive a first cloud disk list sent by a pooling controller in a storage gateway resource pool; the first cloud disk list is obtained by the pooling controller in response to a resource recycling request for a target storage gateway, obtaining a cloud disk list in a target storage gateway, and dividing the cloud disk list according to the client status of each cloud disk in the cloud disk list;
[0209] The path migration module is used to migrate the cloud disk access paths in the first cloud disk list according to the first cloud disk list.
[0210] In an exemplary embodiment, the path migration module includes: a first migration unit and a second migration unit, wherein:
[0211] A first migration unit is configured to, for any cloud disk in the first cloud disk list, migrate services on the first link to the second link if a first link and a second link exist between the target client and the cloud disk; the first link being a link established between the target client and the cloud disk via the target storage gateway;
[0212] The second migration unit is configured to send a path migration request to the pooling controller if a first link exists between the target client and the cloud disk, so as to instruct the pooling controller to create a third link and migrate the service of the first link to the third link.
[0213] In an exemplary embodiment, a storage gateway resource recovery device includes: a third migration unit, which is used to migrate the business of the current cloud disk access path to the main link between the target client and the cloud disk for any cloud disk in the first cloud disk list if the current cloud disk access path between the target client and the cloud disk is a backup link.
[0214] Each module in the storage gateway resource recovery device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0215] In an exemplary embodiment, a computer device is provided, which may be a pooling controller or a client. The computer device includes a processor, a memory, an input / output (I / O) interface, and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store gateway resource recovery data. The I / O interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a storage gateway resource recovery method.
[0216] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0217] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0218] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0219] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0220] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0221] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A storage gateway resource recovery method, characterized in that: A pooling controller applied to a storage gateway resource pool, wherein the storage gateway resource pool includes multiple storage gateways; the method includes: In response to a resource recovery request for a target storage gateway, obtaining a cloud disk list in the target storage gateway; According to the client status of each cloud disk in the cloud disk list, the cloud disk list is divided into a first cloud disk list and a second cloud disk list; the client status corresponding to the first cloud disk list is alive; and the client status corresponding to the second cloud disk list is not alive; Deleting the second cloud disk list from the target storage gateway; and sending the first cloud disk list to the corresponding target client to instruct the target client to migrate the cloud disk access path of the first cloud disk list; When the cloud disk list in the target storage gateway is empty, the storage resources of the target storage gateway are recycled.
2. The method according to claim 1, characterized in that The first cloud disk list includes identifiers of multiple cloud disks to be migrated, and each cloud disk to be migrated corresponds to a target client; and sending the first cloud disk list to the corresponding target client includes: For any target client, in response to a cloud disk migration check request sent by the target client, determining a list of cloud disks to be migrated that matches the target client from the first cloud disk list; The list of cloud disks to be migrated is sent to the target client, where the list of cloud disks to be migrated is used by the target client to migrate the cloud disk access paths in the list of cloud disks to be migrated.
3. The method according to claim 1 or 2, characterized in that The first cloud disk list includes identifiers of multiple cloud disks to be migrated, and each cloud disk to be migrated corresponds to a target client; the method further includes: For any target client, receiving an access path migration request for the cloud disk to be migrated sent by the target client, determining a backup storage gateway from the storage gateway resource pool, and instructing the backup storage gateway to create a cloud disk access interface; Send the cloud disk access interface identifier of the backup storage gateway to the target client to instruct the target client to establish a link to be migrated with the cloud disk to be migrated through the backup storage gateway, and migrate the business on the current link to the link to be migrated; the current link is the link established between the target client and the cloud disk to be migrated through the target storage gateway.
4. The method according to claim 3, characterized in that The method further comprises: In response to the path creation request sent by the target client, deleting the link established between the target client and the cloud disk to be migrated through the target storage gateway; Determine a new storage gateway from the storage gateway resource pool, and instruct the new storage gateway to create a cloud disk access interface; The cloud disk access interface identifier of the new storage gateway is sent to the target client to instruct the target client to establish a new link with the cloud disk to be migrated through the new storage gateway.
5. The method according to claim 4, characterized in that The determining a new storage gateway from the storage gateway resource pool includes: Obtain the storage gateway exclusion list of the target client, the current cloud disk mount quantity and path identifier of each storage gateway in the storage gateway resource pool; Eliminate the storage gateways in the storage gateway exclusion list from the storage gateway resource pool; Determine, from the remaining storage gateways in the storage gateway resource pool, a storage gateway that matches the path identifier and has the least number of currently mounted cloud disks, and obtain the new storage gateway.
6. The method according to claim 1 or 2, characterized in that The method further comprises: In response to the resource recycling request for the target storage gateway, a stop response mark of the target storage gateway is added; the stop response mark is used to instruct the target storage gateway to stop receiving cloud disk mounting requests.
7. The method according to claim 1 or 2, characterized in that The storage gateway resource pool includes a plurality of storage gateways to be reclaimed; the method further includes: For any storage gateway to be recycled, monitor the number of remaining cloud disks of the storage gateway to be recycled; If the number of remaining cloud disks of the storage gateway to be recycled is empty, the storage resources of the storage gateway to be recycled are recycled.
8. A storage gateway resource recovery method, characterized in that: Applied to a target client; the method comprises: Receive a first cloud disk list sent by a pooling controller in a storage gateway resource pool; the first cloud disk list is obtained by the pooling controller in response to a resource recycling request for a target storage gateway, obtaining a cloud disk list in the target storage gateway, and dividing the cloud disk list according to the client status of each cloud disk in the cloud disk list; According to the first cloud disk list, the cloud disk access paths in the first cloud disk list are migrated.
9. The method according to claim 8, characterized in that The migrating the cloud disk access paths in the first cloud disk list according to the first cloud disk list includes: For any cloud disk in the first cloud disk list, if a first link and a second link exist between the target client and the cloud disk, the business on the first link is migrated to the second link; the first link is the link established between the target client and the cloud disk through the target storage gateway; If the first link exists between the target client and the cloud disk, a path migration request is sent to the pooling controller to instruct the pooling controller to create a third link and migrate the service of the first link to the third link.
10. The method according to claim 8, characterized in that The method further comprises: For any cloud disk in the first cloud disk list, if the current cloud disk access path between the target client and the cloud disk is a backup link, the business of the current cloud disk access path is migrated to the primary link between the target client and the cloud disk.
Citation Information
Patent Citations
Capacity expansion control method and device for storage resources and electronic equipment
CN112799596A
Load balancing method and device, readable storage medium and electronic equipment
CN116248687A
Distributed disaster recovery system cloud disk live migration method based on gateway node load
CN116527677A
Data migration method and device, computer equipment and readable storage medium
CN118034588A
Cloud host migration method and device, electronic equipment and storage medium
CN119172202A