Method and system for creating thick backup logic storage unit, electronic equipment and medium
By processing read and write requests in a distributed cluster system and using created data objects on local or other host devices to respond to requests, the problem of limited data read and write functions during the creation of thick-provisioned logical storage units is solved and normal data processing is achieved. Read and write functions.
Patent Information
- Application Number
- CN202410705706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-10
AI Technical Summary
During the creation process of thick-provisioned logical storage units, the data read and write functions are affected by the pre-allocated storage space, resulting in a low creation rate and the inability to achieve normal data read and write functions.
By receiving the creation task assigned by the management platform in the distributed cluster system, creating the target data object locally according to the creation task, and processing the read and write requests during the data object creation process. If the read and write data object hits the local or other host device and If the creation is completed, use it to respond to the request; if the creation is not completed, stop the creation of the current data object and create a read-write data object to respond to the request.
During the creation process of thick provisioning logical storage units, the normal read and write functions of data are ensured, and the problem of limited read and write functions caused by storage space pre-allocation during the creation process is avoided.
Smart Images

Figure CN118626009A
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a method for creating a thick-provisioned logical storage unit, and also to a device for creating a thick-provisioned logical storage unit, a distributed cluster system, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In a distributed storage system, it is a common usage to integrate the storage resources of multiple physical hosts and provide a logical storage device (LUN, Logical Unit Number). The client can access the storage device through relevant protocols, which is no different from the usage of local physical disks. Generally, LUN types are divided into thin-provisioned LUN and thick-provisioned LUN. Thin-provisioned LUN has a fast creation speed, does not allocate actual storage space, and has efficient space utilization; during the creation process of thick-provisioned LUN, the corresponding storage space needs to be pre-allocated, resulting in a low creation rate, but it has better performance after creation, and there is no risk of over-allocation of space, so it is relatively more widely used. Among them, since space is pre-allocated during the creation process of thick-provisioned LUN, this process takes a certain amount of time. During this period, the data reading and writing of the LUN will be affected, and normal data reading and writing functions cannot be realized.
[0003] Therefore, how to ensure the normal data reading and writing function of the thick provisioned logical storage unit during its creation process is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0004] The purpose of the present application is to provide a method for creating a thick-provisioned logical storage unit, which can ensure the normal data reading and writing functions of the thick-provisioned logical storage unit during the creation process of the thick-provisioned logical storage unit; another purpose of the present application is to provide a device for creating a thick-provisioned logical storage unit, a distributed cluster system, an electronic device, a computer-readable storage medium and a computer program product, all of which have the above-mentioned beneficial effects.
[0005] In a first aspect, the present application provides a method for creating a thick provisioned logical storage unit, which is applied to any host device in a distributed cluster system, wherein the host device is connected to a management platform of the distributed cluster system, and the method comprises:
[0006] Receive a creation task assigned by the management platform; the creation task is used to create a target data object, the target data object is one or more of all data objects, and each of the data objects is obtained by dividing the logical storage unit to be created by the management platform;
[0007] Creating the target data object locally according to the creation task;
[0008] When a read / write request is received during the creation of the target data object, determining a read / write data object corresponding to the read / write request;
[0009] If the read / write data object hits the local and has been created, respond to the read / write request using the read / write data object;
[0010] If the read / write data object hits other host devices and has been created, the read / write data object is restored from the other host devices to the local device, and the restored read / write data object is used to respond to the read / write request;
[0011] If the read-write data object has not been created, the creation of the current data object is stopped, and the read-write data object is created, so as to respond to the read-write request using the created read-write data object.
[0012] Optionally, when a read / write request is received during the target data object creation process, after determining the read / write data object corresponding to the read / write request, the method further includes:
[0013] Determining whether the read-write data object is in a recovery state;
[0014] If the read-write data object is in the recovery state, entering a waiting state to obtain a recovery result, and determining a hit state and a creation state of the read-write data object according to the recovery result;
[0015] If the read-write data object is not in the recovery state, determining a hit state and a creation state of the read-write data object;
[0016] The hit status includes hitting the local device and hitting other host devices; the creation status includes completed creation and incomplete creation.
[0017] Optionally, before receiving the creation task assigned by the management platform, the method further includes:
[0018] Receiving a data structure creation request sent by the management platform; wherein the data structure creation request is generated by the management platform according to the logical storage unit to be created and sent to each of the host devices;
[0019] Determine the storage resource of the to-be-created logical storage unit according to the data structure creation request;
[0020] Determine whether local storage resources meet the storage resources;
[0021] If the local storage resource does not satisfy the storage resource, the data structure creation request is ignored, and prompt information is fed back to the management platform;
[0022] If the local storage resource satisfies the storage resource, creating a data structure of the to-be-created logical storage unit locally;
[0023] Summarizing the attribute information of the data structure; wherein the attribute information includes a combination of one or more of the type information, size information, state information, and identification information of the logical storage unit to be created;
[0024] The attribute information is recorded in a distributed database of the distributed cluster system.
[0025] Optionally, the locally creating the target data object according to the creation task includes:
[0026] Determine the space occupied by each of the target data objects;
[0027] For each of the target data objects, a target disk space of a corresponding occupied space size is divided in the local disk;
[0028] The target disk space is reset to zero, and an association relationship between the target disk space and the target data object is established to achieve creation of the target data object.
[0029] Optionally, the method further comprises:
[0030] When receiving the fault prompt information, determining the fault type according to the fault prompt information; the fault type includes disk fault and host fault;
[0031] When the fault type is the disk fault, triggering a data object recovery request to recover the read-write data object from other host devices; when the read-write data object recovery fails, selecting a new local disk to recreate the read-write data object;
[0032] When the fault type is the host fault, a fault notification is fed back to the management platform, so that the management platform controls all the host devices to interrupt their own creation tasks, and restart the creation tasks after executing the data object recovery request.
[0033] In a second aspect, the present application provides another method for creating a thick provisioned logical storage unit, which is applied to a management platform in a distributed cluster system, wherein each host device in the distributed cluster system is connected to the management platform, and the method comprises:
[0034] Determine a logical storage unit to be created according to a creation request;
[0035] Dividing the logical storage unit to be created to obtain multiple data objects;
[0036] Allocating data objects to each of the host devices according to storage resources of all the host devices to generate creation tasks corresponding to each of the host devices;
[0037] Sending each of the creation tasks to a corresponding host device, so that the host device locally creates the assigned target data object according to the creation task;
[0038] Among them, when the host device receives a read-write request during the process of creating the target data object, the read-write data object corresponding to the read-write request is determined; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from the other host device to the local, and the read-write data object is used to respond to the read-write request; if the read-write data object has not been created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request with the created read-write data object.
[0039] Optionally, after dividing the to-be-created logical storage unit to obtain a plurality of data objects, the method further includes:
[0040] Adding identification information to each of the data objects;
[0041] Correspondingly, allocating data objects to each of the host devices according to the storage resources of all the host devices to generate a creation task corresponding to each of the host devices includes:
[0042] Acquire storage resources of each of the host devices and total storage resources of all the host devices;
[0043] Determine the resource proportion of each of the host devices according to the total storage resources and each of the storage resources;
[0044] Determine the number of target data objects allocated to each host device according to the total number of data objects and the proportion of each resource;
[0045] A creation task corresponding to each of the host devices is generated according to each of the allocated quantities and the identification information of each of the data objects.
[0046] In a third aspect, the present application further discloses a device for creating a thick provisioned logical storage unit, which is applied to any host device in a distributed cluster system, wherein the host device is connected to a management platform of the distributed cluster system, and the device comprises:
[0047] A receiving module, used for receiving a creation task assigned by the management platform; the creation task is used for creating a target data object, the target data object is one or more of all data objects, each of which is obtained by the management platform dividing the logical storage unit to be created;
[0048] A creation module, used to create the target data object locally according to the creation task;
[0049] A first determination module, configured to determine the read / write data object corresponding to the read / write request when a read / write request is received during the creation of the target data object;
[0050] A first response module, configured to respond to the read / write request using the read / write data object if the read / write data object hits the local and has been created;
[0051] A second response module, configured to restore the read-write data object from the other host device to the local device if the read-write data object hits the other host device and has been created, and respond to the read-write request using the restored read-write data object;
[0052] The third response module is used to stop creating the current data object and create the read-write data object if the read-write data object has not been created, so as to respond to the read-write request using the created read-write data object.
[0053] In a fourth aspect, the present application further discloses another device for creating a thick provisioned logical storage unit, which is applied to a management platform in a distributed cluster system, wherein each host device in the distributed cluster system is connected to the management platform, and the device comprises:
[0054] A second determining module, used to determine a logical storage unit to be created according to a creation request;
[0055] A partitioning module, used for partitioning the logical storage unit to be created to obtain a plurality of data objects;
[0056] an allocation module, configured to allocate data objects to each of the host devices according to storage resources of all the host devices, so as to generate a creation task corresponding to each of the host devices;
[0057] A sending module, used for sending each creation task to a corresponding host device, so that the host device creates the assigned target data object locally according to the creation task;
[0058] Among them, when the host device receives a read-write request during the process of creating the target data object, the read-write data object corresponding to the read-write request is determined; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from the other host device to the local, and the read-write data object is used to respond to the read-write request; if the read-write data object has not been created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request with the created read-write data object.
[0059] In a fifth aspect, the present application further discloses a distributed cluster system, including a management platform and a plurality of host devices, each of the host devices being connected to the management platform;
[0060] The management platform is used to determine the logical storage unit to be created according to the creation request; divide the logical storage unit to be created to obtain multiple data objects; allocate the data objects to each of the host devices according to the storage resources of all the host devices to generate a creation task corresponding to each of the host devices; and issue each of the creation tasks to the corresponding host device;
[0061] Any of the host devices is used to create the assigned target data object locally according to the creation task; when a read-write request is received during the creation process of the target data object, determine the read-write data object corresponding to the read-write request; if the read-write data object hits the local and has been created, use the read-write data object to respond to the read-write request; if the read-write data object hits other host devices and has been created, restore the read-write data object from the other host device to the local, and use the restored read-write data object to respond to the read-write request; if the read-write data object has not been created, stop creating the current data object, and create the read-write data object, so as to use the created read-write data object to respond to the read-write request.
[0062] In a sixth aspect, the present application further discloses an electronic device, comprising:
[0063] Memory for storing computer programs;
[0064] A processor is used to implement the steps of any one of the methods for creating a thick provisioned logical storage unit as described above when executing the computer program.
[0065] In a seventh aspect, the present application further discloses a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods for creating a thick provisioned logical storage unit as described above are implemented.
[0066] In an eighth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any one of the methods for creating a thick provisioned logical storage unit as described above.
[0067] The present application provides a method for creating a thick-provisioned logical storage unit, which is applied to any host device in a distributed cluster system, wherein the host device is connected to a management platform of the distributed cluster system, and the method comprises: receiving a creation task assigned by the management platform; the creation task is used to create a target data object, wherein the target data object is one or more of all data objects, and each of the data objects is obtained by dividing the logical storage unit to be created by the management platform; the target data object is created locally according to the creation task; when a read-write request is received during the creation of the target data object, the read-write data object corresponding to the read-write request is determined; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from the other host devices to the local, and the restored read-write data object is used to respond to the read-write request; if the read-write data object is not created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request using the created read-write data object.
[0068] By applying the technical solution provided by the present application, the creation of thick-provisioned logical storage units is realized in multiple host devices in units of data objects. During the creation process, if a read / write request for a thick-provisioned logical storage unit is received, the hit read / write data object can be determined first, and the read / write request can be responded to in combination with its hit status and creation status. If the hit is local and the creation is completed, the read / write data object can be directly used to respond to the read / write request; if the hit is other host devices and the creation is completed, the read / write data object can be restored from other host devices to the local to respond to the read / write request; if the creation is not completed, the creation of the current data object is stopped and a read / write data object is created to respond to the read / write request. It can be seen that the present technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, its normal data reading and writing function is guaranteed.
[0069] In one embodiment of the present application, a fault emergency handling mechanism is added during the creation process of the thick-provisioned logical storage unit. The distributed cluster system can monitor faults of all host devices, determine the fault type and the host device where the fault occurs, and notify them, so that the host device can perform fault emergency handling in different ways according to its own fault type, thereby effectively avoiding the adverse effects of fault problems on read and write requests, and further ensuring normal data read and write functions during the creation process of the thick-provisioned logical storage unit.
[0070] The thick-provisioned logical storage unit creation device, distributed cluster system, electronic device, computer-readable storage medium and computer program product provided in this application also have the above-mentioned technical effects, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.
[0072] Figure 1 A schematic diagram of the structure of a distributed cluster system provided in this application;
[0073] Figure 2 A schematic diagram of a process for creating a thick provisioned logical storage unit provided in the present application;
[0074] Figure 3 A flowchart of another method for creating a thick provisioned logical storage unit provided by the present application;
[0075] Figure 4 A schematic diagram of a flow chart of another method for creating a thick provisioned logical storage unit provided by the present application;
[0076] Figure 5 A schematic diagram of the structure of a device for creating a thick provisioned logical storage unit provided in the present application;
[0077] Figure 6 A schematic diagram of the structure of another device for creating a thick provisioned logical storage unit provided by the present application;
[0078] Figure 7 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0079] The core of the present application is to provide a method for creating a thick-provisioned logical storage unit, which can ensure the normal data reading and writing functions of the thick-provisioned logical storage unit during the creation process of the thick-provisioned logical storage unit; another core of the present application is to provide a device for creating a thick-provisioned logical storage unit, a distributed cluster system, an electronic device, a computer-readable storage medium and a computer program product, all of which have the above-mentioned beneficial effects.
[0080] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0081] Please refer to Figure 1 , Figure 1 This is a structural diagram of a distributed cluster system provided by the present application, which includes a management platform and multiple host devices, each of which is connected to the management platform. The method for creating a thick provisioned logical storage unit provided by the present application is implemented based on the distributed cluster system, specifically, the creation of a thick provisioned logical storage unit is implemented in each host device through the management platform.
[0082] An embodiment of the present application provides a method for creating a thick provisioned logical storage unit.
[0083] Please refer to Figure 2 , Figure 2 A schematic diagram of a process flow of a method for creating a thick provisioned logical storage unit provided in the present application, wherein the method for creating a thick provisioned logical storage unit is applied to Figure 1 Any host device shown may include the following S101 to S107.
[0084] S101: receiving a creation task assigned by a management platform; the creation task is used to create a target data object, which is one or more of all data objects, and each data object is obtained by dividing the logical storage unit to be created by the management platform.
[0085] This step is intended to receive a creation task, which is issued by the management platform and is used to create the target data object assigned to the current host device by the management platform. Specifically, when the management platform receives a request to create a thick-provisioned logical storage unit, it can divide the data objects of the thick-provisioned logical storage unit to be created, obtain multiple data objects, and then allocate all data objects in combination with the storage resources of each host device, generate a creation task corresponding to each host device, and issue it to the corresponding host device. Each host device is used to create one or more data objects (i.e., the target data object received by itself), and all host devices can be combined to create a thick-provisioned logical storage unit.
[0086] S102: Creating a target data object locally according to the creation task.
[0087] This step is intended to achieve the creation of the target data object. For each host device, after receiving the creation task and determining the target data object to be created, it can execute the creation task to create the target data object locally. It is conceivable that when the target data object includes multiple data objects, the host device can create each data object in turn.
[0088] In one embodiment of the present application, the above-mentioned locally creating the target data object according to the creation task may include:
[0089] Determine the size of the space occupied by each target data object;
[0090] For each target data object, a target disk space of a corresponding occupied space size is divided in the local disk;
[0091] The target disk space is reset to zero, and an association relationship between the target disk space and the target data object is established to achieve the creation of the target data object.
[0092] The embodiment of the present application provides an implementation method for locally creating a target data object according to a creation task. It is understandable that the corresponding storage space needs to be pre-allocated for the thick-provisioned logical storage unit during its creation process. Therefore, the size of the space occupied by each target data object can be determined first, so as to allocate the disk space of the corresponding size of space occupied from the local disk to each target data object. Here, in order to avoid confusion between other storage resources in the host device and the storage resources of the thick-provisioned logical storage unit, the disk space allocated to the target data object (i.e., the above-mentioned target disk space) can be set to zero, and its association with the corresponding target data object can be created, so as to achieve the creation of the target data object.
[0093] S103: When a read / write request is received during the process of creating a target data object, a read / write data object corresponding to the read / write request is determined.
[0094] This step aims to determine the read / write data object, which is the data object hit by the current read / write request, that is, the data object that the current read / write request needs to read / write. Specifically, in the process of creating the target data object, the host device does not reject the read / write request and can respond to it normally. For this, it is necessary to first determine the read / write data object corresponding to the read / write request so as to use the read / write data object to respond to the read / write request.
[0095] As described above, each host device in the distributed cluster system may need to create one or more data objects, and the data objects created by each host device are different. Then, in the process of creating a thick-provisioned logical storage unit, if a read-write request is received, the read-write data object corresponding to the read-write request may have been created or not yet created, and may be created by the current host device or by other host devices. In this regard, the read-write request response can be implemented according to the hit status and creation status of the read-write data object. Among them, the hit status includes hitting the current host device (the above-mentioned local) and hitting other host devices, and the creation status includes creation completed and incomplete creation.
[0096] S104: If the read / write data object hits the local and has been created, the read / write data object is used to respond to the read / write request.
[0097] This step aims to achieve the read-write request response when the read-write data object hits the local and has been created. Since the read-write data object has been created locally, the read-write data object can be directly used to respond to the read-write request, that is, write data to the read-write data object or read data from the read-write data object.
[0098] S105: If the read-write data object hits other host devices and has been created, the read-write data object is restored from other host devices to the local device, and the restored read-write data object is used to respond to the read-write request.
[0099] This step is intended to achieve the response to the read / write request when the read / write data object hits other host devices and has been created. Since the read / write data object has been created on other host devices, but the read / write request is received by the current host device, the read / write data object can be first restored (specifically, it can be a migration operation) from the host device to the current host device (local), and then the restored read / write data object can be used to respond to the read / write request, that is, write data to the restored read / write data object or read data from the restored read / write data object.
[0100] S106: If the read-write data object has not been created, stop creating the current data object, and create a read-write data object, so as to respond to the read-write request using the created read-write data object.
[0101] This step is intended to implement the response to the read / write request when the read / write data object has not been created. Since the read / write object has not been created, whether it hits the current host device or other host devices, it means that both are creating other data objects. Since the read / write request is received by the current host device, the current host device can first interrupt the data object currently being created and start creating the read / write data object, and then respond to the read / write request using the created read / write data object, that is, write data to the created read / write data object or read data from the created read / write data object.
[0102] It can be seen that the method for creating a thick-provisioned logical storage unit provided in the embodiment of the present application realizes the creation of a thick-provisioned logical storage unit in multiple host devices in units of data objects. During its creation process, if a read-write request for a thick-provisioned logical storage unit is received, the hit read-write data object can be determined first, and the read-write request can be responded to in combination with its hit status and creation status. If the local is hit and the creation is completed, the read-write data object can be directly used to respond to the read-write request; if other host devices are hit and the creation is completed, the read-write data object can be restored from other host devices to the local to respond to the read-write request; if the creation is not completed, the creation of the current data object is stopped and a read-write data object is created to respond to the read-write request. It can be seen that the technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, it ensures its normal data reading and writing function.
[0103] Based on the above embodiments:
[0104] In one embodiment of the present application, when a read / write request is received during the target data object creation process, after determining the read / write data object corresponding to the read / write request, the following may also be included:
[0105] Determine whether the read-write data object is in recovery state;
[0106] If the read-write data object is in the recovery state, the waiting state is entered to obtain the recovery result, and the hit state and creation state of the read-write data object are determined according to the recovery result;
[0107] If the read-write data object is not in a recovery state, determining a hit state and a creation state of the read-write data object;
[0108] Among them, the hit status includes hitting the local and hitting other host devices; the creation status includes completed creation and incomplete creation.
[0109] In an embodiment of the present application, before responding to a read-write request based on the hit status and creation status of the read-write request object, it can be determined whether the read-write data object is in a recovery state, that is, whether it is being migrated by any terminal device. If it is in a recovery state, it will be impossible to obtain the hit status and creation status of the read-write request object and respond to the read-write request. It is necessary to wait until the read-write data object is recovered and then obtain the hit status and creation status of the read-write request object based on the recovery result and respond to the read-write request. Of course, if it is not in a recovery state, the hit status and creation status of the read-write request object can be directly obtained and the read-write request response can be made.
[0110] In one embodiment of the present application, before receiving the creation task assigned by the management platform, the following steps may also be included:
[0111] Receiving a data structure creation request sent by the management platform; wherein the data structure creation request is generated by the management platform according to the logical storage unit to be created and sent to each host device;
[0112] Determine the storage resource of the logical storage unit to be created according to the data structure creation request;
[0113] Determine whether local storage resources meet storage resources;
[0114] If the local storage resources do not meet the storage resources, the data structure creation request is ignored and a prompt message is fed back to the management platform;
[0115] If the local storage resources meet the storage resources, a data structure of the logical storage unit to be created is created locally;
[0116] Summarize the attribute information of the data structure; wherein the attribute information includes a combination of one or more of type information, size information, state information, and identification information of the logical storage unit to be created;
[0117] The attribute information is recorded in the distributed database of the distributed cluster system.
[0118] It is understandable that, for each host device, before creating the assigned target data object, it is necessary to first create the data structure of the thick-provisioned logical storage unit to be created, and count and record its related attribute information, so as to facilitate the subsequent creation of the data object. Specifically, after receiving the request to create the thick-provisioned logical storage unit, the management platform can send a data structure creation request to each host device. This process belongs to the synchronous stage of creating the thick-provisioned logical storage unit. Each host device can create the data structure and count and record its attribute information according to the data structure creation request, and the subsequent creation process of each host device for the assigned target data object belongs to the asynchronous stage of creating the thick-provisioned logical storage unit.
[0119] In the implementation process, for each host device, in order to ensure the successful creation of the data structure of the logical storage unit to be created, the local storage resources can be identified and judged first to determine whether the local storage resources meet the storage resources required for creating the data structure. If the local storage resources do not meet the requirements, the data structure can be not created locally and the management platform can be informed that the current service provides the service of creating thick-provisioned logical storage units; if the local storage resources meet the corresponding conditions, the data structure creation operation can be executed, and its attribute information can be counted and recorded in the distributed database. Among them, the attribute information can include but is not limited to the type information, size information, status information, identification information, etc. of the logical storage unit to be created.
[0120] In one embodiment of the present application, the method for creating a thick provisioned logical storage unit may further include:
[0121] When receiving fault prompt information, determine the fault type according to the fault prompt information; the fault type includes disk fault and host fault;
[0122] When the fault type is a disk fault, a data object recovery request is triggered to recover the read-write data object from other host devices; when the read-write data object recovery fails, a new local disk is selected to recreate the read-write data object;
[0123] When the fault type is a host fault, a fault notification is fed back to the management platform so that the management platform controls all host devices to interrupt their own creation tasks and restart the creation tasks after executing the data object recovery request.
[0124] The method for creating a thick provisioned logical storage unit provided in the embodiment of the present application can further implement emergency response to faults. Specifically, the distributed cluster system can monitor faults of all host devices through the management platform, determine the fault type and the host device where the fault occurs and the fault type, and send fault prompt information to the host device where the fault occurs, so that the host device can perform emergency response to the fault according to the fault type.
[0125] Specifically, the failure types include disk failures and host failures. For disk failures, a data object recovery request can be automatically triggered to first perform a recovery operation on the read and write data objects. When the recovery operation fails, a new local disk (normal local disk) is reselected to create the read and write data objects. Otherwise, if the recovery operation is successful, no other processing is required, and the read and write request responses can be continued. For host failures, the management platform can directly control the interruption of the creation tasks in all current host devices, and perform data object recovery operations in the entire distributed cluster system. After all data objects are restored to the correct location, the creation tasks in each host device are restarted.
[0126] It can be seen that in the embodiment of the present application, a fault emergency processing mechanism is added during the creation process of the thick-provisioned logical storage unit. The distributed cluster system can monitor faults of all host devices, determine the fault type and the host device where the fault occurs, and notify them, so that the host device can perform fault emergency processing in different ways according to its own fault type, thereby effectively avoiding the adverse effects of fault problems on read and write requests, and further ensuring normal data read and write functions during the creation process of the thick-provisioned logical storage unit.
[0127] In one embodiment of the present application, after receiving the fault prompt information and before determining the fault type according to the fault prompt information, the following may also be included:
[0128] Determine the fault quantity based on the fault prompt information;
[0129] Count the number of copies of the read-write data object locally; the number of copies corresponds to the number of times the current host device recovers the read-write data object;
[0130] When the number of faults is lower than the number of replicas, the step of determining the fault type according to the fault prompt information is executed;
[0131] When the number of failures is not less than the number of replicas, an alarm is output.
[0132] The method for creating a thick-provisioned logical storage unit provided in the embodiment of the present application allows the number of faults that do not exceed the tolerance of the host device to occur in the process of creating the thick-provisioned logical storage unit to ensure its normal read and write functions. Among them, the tolerance of the host device is determined by the number of copies of the current read-write data object, and the number of copies corresponds to the number of times the current host device recovers the read-write data object. Obviously, each time a recovery operation is performed on the read-write data object, a copy of the read-write data object will be created locally (created after migrating from other host devices to the local). Therefore, when the number of faults is not less than the number of copies of the current read-write data object, the current host device will not be able to use enough copies of the read-write data object for emergency handling of faults, so it can output a corresponding alarm prompt to remind the user to handle the exception in time. On the contrary, if the number of faults is less than the number of copies of the current read-write data object, the current host device can use enough copies of the read-write data object for emergency handling of faults, so it can continue with the subsequent process.
[0133] It can be seen that in the embodiment of the present application, in the process of creating a thick provisioned logical storage unit, the number of failures that does not exceed the tolerance of the host device is allowed to occur, which can effectively ensure its normal reading and writing functions.
[0134] The embodiment of the present application provides another method for creating a thick provisioned logical storage unit.
[0135] Please refer to Figure 3 , Figure 3 A schematic diagram of a process flow of another method for creating a thick provisioned logical storage unit provided by the present application, wherein the method for creating a thick provisioned logical storage unit is applied to Figure 1 The management platform shown may include the following S201 to S204.
[0136] S201: Determine a logical storage unit to be created according to a creation request.
[0137] S202: Divide the logical storage unit to be created to obtain multiple data objects.
[0138] S203: Allocate data objects to each host device according to storage resources of all host devices to generate creation tasks corresponding to each host device.
[0139] S204: Sending each creation task to a corresponding host device, so that the host device creates the assigned target data object locally according to the creation task;
[0140] Among them, when the host device receives a read-write request during the process of creating a target data object, it determines the read-write data object corresponding to the read-write request; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from other host devices to the local, and the read-write data object is used to respond to the read-write request; if the read-write data object is not created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request using the created read-write data object.
[0141] Specifically, when the management platform receives a request to create a thick provisioned logical storage unit, it can divide the data objects of the thick provisioned logical storage unit to be created, obtain multiple data objects, and then allocate all data objects in combination with the storage resources of each host device, generate a creation task corresponding to each host device, and send it to the corresponding host device. Each host device is used to create one or more data objects (i.e., the above-mentioned target data objects), and all host devices can be combined to achieve the creation of thick provisioned logical storage units.
[0142] Furthermore, for each host device, after receiving the creation task and determining the target data object to be created, it can execute the creation task to create the target data object locally. In the process of creating the target data object, the host device does not reject the read-write request and can respond to it normally. To this end, it is necessary to first determine the read-write data object corresponding to the read-write request so as to use the read-write data object to respond to the read-write request. Specifically, the read-write request response can be implemented according to the hit status and creation status of the read-write data object: if the read-write data object hits the local and is created, the read-write data object can be directly used to respond to the read-write request; if the read-write data object hits other host devices and is created, it can be restored from other host devices to the local to respond to the read-write request; if the read-write data object is not created, stop creating the current data object and create the read-write data object to respond to the read-write request.
[0143] It can be seen that the method for creating a thick-provisioned logical storage unit provided in the embodiment of the present application realizes the creation of a thick-provisioned logical storage unit in multiple host devices in units of data objects. During its creation process, if a read-write request for a thick-provisioned logical storage unit is received, the hit read-write data object can be determined first, and the read-write request can be responded to in combination with its hit status and creation status. If the local is hit and the creation is completed, the read-write data object can be directly used to respond to the read-write request; if other host devices are hit and the creation is completed, the read-write data object can be restored from other host devices to the local to respond to the read-write request; if the creation is not completed, the creation of the current data object is stopped and a read-write data object is created to respond to the read-write request. It can be seen that the technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, it ensures its normal data reading and writing function.
[0144] Based on the above embodiments:
[0145] In one embodiment of the present application, after dividing the to-be-created logical storage unit to obtain a plurality of data objects, the method may further include: adding identification information to each data object;
[0146] Accordingly, the above-mentioned allocating data objects to each host device according to the storage resources of all host devices to generate a creation task corresponding to each host device may include:
[0147] Obtain the storage resources of each host device and the total storage resources of all host devices;
[0148] Determine the resource proportion of each host device based on the total storage resources and each storage resource;
[0149] Determine the number of target data objects to be allocated in each host device according to the total number of data objects and the proportion of each resource;
[0150] A creation task corresponding to each host device is generated according to each allocation quantity and identification information of each data object.
[0151] The embodiment of the present application provides a method for generating a creation task corresponding to each host device. As described above, during the creation process of the thick provisioned logical storage unit, it is necessary to pre-allocate the corresponding storage space for it. In order to ensure the compatibility between the host device and the allocated target storage object, the allocation of the target data object can be implemented according to the storage resources of each host device to generate and issue the corresponding creation task.
[0152] During the implementation process, the resource ratio calculation can be performed based on the storage resources of each host device and the total storage resources of the entire distributed cluster system to determine the resource ratio of each host device, so that all data objects can be allocated according to the resource ratio; in addition, in order to ensure the accuracy of data object creation and avoid repeated creation of the same data object, after the logical storage unit to be created is divided to obtain multiple data objects, identification information can be added to each data object. In this way, the allocation of data objects can be realized by combining the identification information of each data object at the same time, thereby realizing the generation of creation tasks.
[0153] Based on the above embodiments, an embodiment of the present application provides another method for creating a thick provisioned logical storage unit.
[0154] 1. The system management platform receives a request to create a thick-provisioned logical storage unit, assembles task information and broadcasts it to each host device in the system. During the task synchronization phase, each host device performs a self-check of storage resources based on the task information, creates a data structure corresponding to the thick-provisioned logical storage unit in the local memory, and records the type, size, identification, status and other attribute information of the thick-provisioned logical storage unit to the distributed database. After the synchronization phase is completed, the result is returned to the management platform. At this time, the thick-provisioned logical storage unit can provide normal read and write services to the outside world and enter the asynchronous phase. In the asynchronous phase, the thick-provisioned logical storage unit is divided into multiple data objects based on a certain data size. Each data object uses an id as a unique identifier. According to the storage capacity information of each host device, the data objects are allocated in proportion, and the corresponding creation tasks are generated and sent to each host device.
[0155] 2. The creation and data read and write access of thick provisioned logical storage units are controlled in units of data objects. The created data objects can be directly read and written, which optimizes the problem that the entire thick provisioned logical storage unit cannot be read or written during the creation period; for data objects that have not been created, the recovery or creation of data objects will be prioritized when read and write requests are accessed to ensure that the read and write functions are normal and uninterrupted. For the specific processing flow, refer to Figure 4 As shown, Figure 4 A schematic diagram of a process flow of another method for creating a thick provisioned logical storage unit provided in the present application, wherein the specific implementation process is as follows:
[0156] When the management platform receives a data read or write request, it can divide the logical storage unit offset indicated in the data read or write request by the size of the data object and perform a modulo calculation to obtain the data object id and its internal offset to be read or written. On this basis, first check whether the data object is being restored, and further check whether the restoration is complete. If it is complete, the restoration result needs to be recorded, otherwise it is necessary to wait for the restoration to be completed; if it has not been restored, the data object structure in the local memory can be queried with the id as the index, and the corresponding disk can be submitted for processing as the target of the read or write request. Of course, if the corresponding data object structure cannot be found, it means that the data object has not been created locally; further, check whether the logical storage unit has been created. If the logical storage unit has been created, if the data object does not exist locally, it means that the data object needs to be migrated from other host devices to the local. At this time, submit a recovery request to retrieve the data from the remote host device. The standby read data object can be restored to the local; if the logical storage unit is not created, the data object cannot be created directly. It is necessary to check whether the data object has been restored and whether the data object does not exist in the remote host device. When both conditions are met, it can be considered that the data object has not been accessed by the read or write request and has not been created. At this time, the data object can be created and the read and write requests can be responded to. The read request response is to fill the read data length with all zeros and return it. The write request response needs to allocate the corresponding space on the disk and set it to zero before writing the data. If any of the above conditions is not met, a recovery request should be submitted to try to obtain the latest data object from the remote host device for read and write request responses.
[0157] Among them, whether it is a recovery request or a read-write request, when the number for the same data object is not unique, it can be added to the corresponding linked list in the order of receipt, such as the data recovery linked list and the data read-write linked list. Each time a recovery request or read-write request is completed, it can be removed from the corresponding linked list.
[0158] 3. Emergency handling in fault scenarios: During the creation of thick provisioned logical storage units, faults that do not exceed the tolerance for the number of data object copies are allowed to occur. The implementation steps include:
[0159] (1) For disk failures, when processing data read and write requests, a request is sent to the disk corresponding to the data object structure. The disk failure will be identified through the results returned by the system read and write call interface. At this time, a data object recovery request can be submitted first to recover the data object. If the data object cannot be found from the remote host device, a normal disk can be reselected to create the data object and the disk information of its data object structure in the distributed database can be updated to complete the read and write requests on the new disk.
[0160] (2) For host failures, such as when the host device is offline, the storage location of some data objects in the system will change. For example, if the data object changes from host A to host B, if host B creates the data object according to the new data distribution, although it has written some data before, host B may create a new data object, resulting in the loss of previously written data. Therefore, after the data object distribution changes, the data object creation task should be stopped immediately. At this time, all existing data objects in the distributed cluster should be restored to the correct location first. After the restoration is complete, query the data objects that have not been created, recalculate the data object distribution according to the latest number of host devices and capacity ratio, and restart the data object creation task to create the unfinished data objects.
[0161] It can be seen that the method for creating a thick-provisioned logical storage unit provided in the embodiment of the present application realizes the creation of a thick-provisioned logical storage unit in multiple host devices in units of data objects. During its creation process, if a read-write request for a thick-provisioned logical storage unit is received, the hit read-write data object can be determined first, and the read-write request can be responded to in combination with its hit status and creation status. If the local is hit and the creation is completed, the read-write data object can be directly used to respond to the read-write request; if other host devices are hit and the creation is completed, the read-write data object can be restored from other host devices to the local to respond to the read-write request; if the creation is not completed, the creation of the current data object is stopped and a read-write data object is created to respond to the read-write request. It can be seen that the technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, it ensures its normal data reading and writing function.
[0162] An embodiment of the present application provides a distributed cluster system.
[0163] like Figure 1 As shown, Figure 1 A schematic diagram of the structure of a distributed cluster system provided in the present application, wherein the distributed cluster system may include a management platform and multiple host devices, each of which is connected to the management platform;
[0164] The management platform is used to determine the logical storage unit to be created according to the creation request; divide the logical storage unit to be created to obtain multiple data objects; allocate the data objects to each host device according to the storage resources of all host devices to generate a creation task corresponding to each host device; and send each creation task to the corresponding host device;
[0165] Any host device is used to create the assigned target data object locally according to the creation task; when a read-write request is received during the target data object creation process, the read-write data object corresponding to the read-write request is determined; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from the other host devices to the local, and the read-write data object is used to respond to the read-write request; if the read-write data object is not created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request using the created read-write data object.
[0166] It can be seen that the distributed cluster system provided by the embodiment of the present application realizes the creation of thick-provisioned logical storage units in multiple host devices in units of data objects. During the creation process, if a read-write request for a thick-provisioned logical storage unit is received, the hit read-write data object can be determined first, and the read-write request can be responded to in combination with its hit status and creation status. If the local is hit and the creation is completed, the read-write data object can be directly used to respond to the read-write request; if other host devices are hit and the creation is completed, the read-write data object can be restored from other host devices to the local to respond to the read-write request; if the creation is not completed, the creation of the current data object is stopped and a read-write data object is created to respond to the read-write request. It can be seen that the technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, it ensures its normal data reading and writing function.
[0167] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0168] An embodiment of the present application provides a device for creating a thick provisioned logical storage unit.
[0169] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of a device for creating a thick-provisioned logical storage unit provided in the present application. The device for creating a thick-provisioned logical storage unit may include:
[0170] The receiving module 101 is used to receive a creation task assigned by the management platform; the creation task is used to create a target data object, which is one or more of all data objects, and each data object is obtained by dividing the logical storage unit to be created by the management platform;
[0171] A creation module 102, used to create a target data object locally according to a creation task;
[0172] A first determination module 103, configured to determine the read / write data object corresponding to the read / write request when receiving the read / write request during the target data object creation process;
[0173] A first response module 104, configured to respond to the read / write request using the read / write data object if the read / write data object hits the local and has been created;
[0174] The second response module 105 is used to restore the read-write data object from the other host device to the local device if the read-write data object hits other host devices and has been created, and respond to the read-write request using the restored read-write data object;
[0175] The third response module 106 is used to stop creating the current data object and create a read-write data object if the read-write data object has not been created, so as to respond to the read-write request using the created read-write data object.
[0176] It can be seen that the device for creating thick-provisioned logical storage units provided in the embodiment of the present application realizes the creation of thick-provisioned logical storage units in multiple host devices in units of data objects. During the creation process, if a read-write request for a thick-provisioned logical storage unit is received, the hit read-write data object can be first determined, and the read-write request can be responded to in combination with its hit status and creation status. If the local is hit and the creation is completed, the read-write data object can be directly used to respond to the read-write request; if other host devices are hit and the creation is completed, the read-write data object can be restored from other host devices to the local to respond to the read-write request; if the creation is not completed, the creation of the current data object is stopped and a read-write data object is created to respond to the read-write request. It can be seen that the technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, it ensures its normal data reading and writing function.
[0177] In one embodiment of the present application, the creation device of the thick-provisioned logical storage unit may also include a judgment module, which is used to determine whether the read-write data object is in a recovery state after determining the read-write data object corresponding to the read-write request when a read-write request is received during the target data object creation process; if the read-write data object is in a recovery state, enter a waiting state to obtain a recovery result, and determine a hit state and a creation state of the read-write data object based on the recovery result; if the read-write data object is not in a recovery state, determine the hit state and the creation state of the read-write data object; wherein the hit state includes hitting the local and hitting other host devices; the creation state includes completed creation and incomplete creation.
[0178] In one embodiment of the present application, the creation device of the thick-provisioned logical storage unit may also include a data structure creation module, which is used to receive a data structure creation request issued by the management platform before receiving the creation task assigned by the management platform; wherein the data structure creation request is generated by the management platform according to the logical storage unit to be created and issued to each host device; the storage resources of the logical storage unit to be created are determined according to the data structure creation request; whether the local storage resources meet the storage resources is determined; if the local storage resources do not meet the storage resources, the data structure creation request is ignored, and a prompt information is fed back to the management platform; if the local storage resources meet the storage resources, the data structure of the logical storage unit to be created is created locally; the attribute information of the data structure is summarized; wherein the attribute information includes a combination of one or more of the type information, size information, status information, and identification information of the logical storage unit to be created; and the attribute information is recorded in a distributed database of the distributed cluster system.
[0179] In one embodiment of the present application, the above-mentioned creation module 102 can be specifically used to determine the occupied space size of each target data object; for each target data object, a target disk space of a corresponding occupied space size is divided in the local disk; the target disk space is set to zero, and an association relationship between the target disk space and the target data object is established to realize the creation of the target data object.
[0180] In one embodiment of the present application, the creation device of the thick-provisioned logical storage unit may also include a fault handling module, which is used to determine the fault type according to the fault prompt information when fault prompt information is received; the fault types include disk type faults and host type faults; when the fault type is a disk type fault, trigger a data object recovery request to recover the read-write data object from other host devices; when the read-write data object recovery fails, select a new local disk to re-create the read-write data object; when the fault type is a host type fault, feedback the fault notification to the management platform, so that the management platform controls all host devices to interrupt their own creation tasks, and restart the creation tasks after executing the data object recovery request.
[0181] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0182] An embodiment of the present application provides another device for creating a thick provisioned logical storage unit.
[0183] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of another device for creating a thick-provisioned logical storage unit provided by the present application. The device for creating a thick-provisioned logical storage unit may include:
[0184] A second determining module 201, configured to determine a logical storage unit to be created according to a creation request;
[0185] A partitioning module 202, used to partition the logical storage unit to be created to obtain multiple data objects;
[0186] The allocation module 203 is used to allocate data objects to each host device according to the storage resources of all host devices to generate a creation task corresponding to each host device;
[0187] The sending module 204 is used to send each creation task to the corresponding host device, so that the host device creates the assigned target data object locally according to the creation task;
[0188] Among them, when the host device receives a read-write request during the process of creating a target data object, it determines the read-write data object corresponding to the read-write request; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from other host devices to the local, and the read-write data object is used to respond to the read-write request; if the read-write data object is not created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request using the created read-write data object.
[0189] It can be seen that the device for creating thick-provisioned logical storage units provided in the embodiment of the present application realizes the creation of thick-provisioned logical storage units in multiple host devices in units of data objects. During the creation process, if a read-write request for a thick-provisioned logical storage unit is received, the hit read-write data object can be first determined, and the read-write request can be responded to in combination with its hit status and creation status. If the local is hit and the creation is completed, the read-write data object can be directly used to respond to the read-write request; if other host devices are hit and the creation is completed, the read-write data object can be restored from other host devices to the local to respond to the read-write request; if the creation is not completed, the creation of the current data object is stopped and a read-write data object is created to respond to the read-write request. It can be seen that the technical solution performs normal data reading and writing on the thick-provisioned logical storage unit during its creation process, that is, it ensures its normal data reading and writing function.
[0190] In one embodiment of the present application, the thick provisioned logical storage unit creation device may further include an adding module, which is used to add identification information to each data object after dividing the logical storage unit to be created to obtain multiple data objects;
[0191] Accordingly, the above-mentioned allocation module 203 can be specifically used to obtain the storage resources of each host device and the total storage resources of all host devices; determine the resource ratio of each host device based on the total storage resources and each storage resource; determine the allocated number of target data objects allocated to each host device based on the total number of data objects and each resource ratio; generate a creation task corresponding to each host device based on each allocated number and the identification information of each data object.
[0192] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0193] An embodiment of the present application provides an electronic device.
[0194] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:
[0195] A memory 11, used for storing computer programs;
[0196] The processor 10 can implement the steps of any one of the above-mentioned methods for creating a thick provisioned logical storage unit when executing a computer program.
[0197] like Figure 7 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.
[0198] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
[0199] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of a method for creating a thick provisioned logical storage unit.
[0200] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:
[0201] Receive a creation task assigned by the management platform; the creation task is used to create a target data object, the target data object is one or more of all data objects, and each data object is obtained by dividing the logical storage unit to be created by the management platform;
[0202] Create the target data object locally according to the creation task;
[0203] When a read / write request is received during the target data object creation process, determining a read / write data object corresponding to the read / write request;
[0204] If the read / write data object hits the local and has been created, the read / write data object is used to respond to the read / write request;
[0205] If the read / write data object hits other host devices and has been created, the read / write data object is restored from other host devices to the local device, and the restored read / write data object is used to respond to the read / write request;
[0206] If the read-write data object is not created, the creation of the current data object is stopped, and a read-write data object is created to respond to the read-write request using the created read-write data object.
[0207] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0208] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0209] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.
[0210] Of course, it should be noted that Figure 7 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 7 More or fewer components than shown, or combinations of certain components.
[0211] An embodiment of the present application provides a computer-readable storage medium.
[0212] A computer program is stored on a computer-readable storage medium provided in an embodiment of the present application. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods for creating a thick provisioned logical storage unit can be implemented.
[0213] Among them, the computer-readable storage medium can be any available medium that can be stored in a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.
[0214] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0215] An embodiment of the present application provides a computer program product.
[0216] The computer program product provided in the embodiments of the present application includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of any one of the above-mentioned methods for creating a thick provisioned logical storage unit can be implemented.
[0217] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.
[0218] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0219] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.
[0220] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0221] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0222] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0223] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A method for creating a thick provisioned logical storage unit, characterized in that: Applied to any host device in a distributed cluster system, the host device is connected to a management platform of the distributed cluster system, and the method includes: Receive a creation task assigned by the management platform; the creation task is used to create a target data object, the target data object is one or more of all data objects, and each of the data objects is obtained by dividing the logical storage unit to be created by the management platform; Creating the target data object locally according to the creation task; When a read / write request is received during the creation of the target data object, determining a read / write data object corresponding to the read / write request; If the read / write data object hits the local and has been created, respond to the read / write request using the read / write data object; If the read / write data object hits other host devices and has been created, the read / write data object is restored from the other host devices to the local device, and the restored read / write data object is used to respond to the read / write request; If the read-write data object has not been created, the creation of the current data object is stopped, and the read-write data object is created, so as to respond to the read-write request using the created read-write data object.
2. The method for creating a thick provisioned logical storage unit according to claim 1, characterized in that: When a read / write request is received during the target data object creation process, after determining the read / write data object corresponding to the read / write request, the method further includes: Determining whether the read-write data object is in a recovery state; If the read-write data object is in the recovery state, entering a waiting state to obtain a recovery result, and determining a hit state and a creation state of the read-write data object according to the recovery result; If the read-write data object is not in the recovery state, determining a hit state and a creation state of the read-write data object; The hit status includes hitting the local device and hitting other host devices; the creation status includes completed creation and incomplete creation.
3. The method for creating a thick provisioned logical storage unit according to claim 1, characterized in that: Before receiving the creation task assigned by the management platform, the method further includes: Receiving a data structure creation request sent by the management platform; wherein the data structure creation request is generated by the management platform according to the logical storage unit to be created and sent to each of the host devices; Determine the storage resource of the to-be-created logical storage unit according to the data structure creation request; Determine whether local storage resources meet the storage resources; If the local storage resource does not satisfy the storage resource, the data structure creation request is ignored, and prompt information is fed back to the management platform; If the local storage resource satisfies the storage resource, creating a data structure of the to-be-created logical storage unit locally; Summarizing the attribute information of the data structure; wherein the attribute information includes a combination of one or more of the type information, size information, state information, and identification information of the logical storage unit to be created; The attribute information is recorded in a distributed database of the distributed cluster system.
4. The method for creating a thick provisioned logical storage unit according to claim 1, characterized in that: The locally creating the target data object according to the creation task includes: Determine the space occupied by each of the target data objects; For each of the target data objects, a target disk space of a corresponding occupied space size is divided in the local disk; The target disk space is reset to zero, and an association relationship between the target disk space and the target data object is established to achieve creation of the target data object.
5. The method for creating a thick provisioned logical storage unit according to any one of claims 1 to 4, characterized in that: Also includes: When receiving fault prompt information, determining the fault type according to the fault prompt information; The failure types include disk failures and host failures; When the fault type is the disk fault, triggering a data object recovery request to recover the read-write data object from other host devices; when the read-write data object recovery fails, selecting a new local disk to recreate the read-write data object; When the fault type is the host fault, a fault notification is fed back to the management platform, so that the management platform controls all the host devices to interrupt their own creation tasks, and restart the creation tasks after executing the data object recovery request.
6. A method for creating a thick provisioned logical storage unit, characterized in that: A management platform applied to a distributed cluster system, wherein each host device in the distributed cluster system is connected to the management platform, and the method comprises: Determine a logical storage unit to be created according to a creation request; Dividing the logical storage unit to be created to obtain multiple data objects; Allocating data objects to each of the host devices according to storage resources of all the host devices to generate creation tasks corresponding to each of the host devices; Sending each of the creation tasks to a corresponding host device, so that the host device locally creates the assigned target data object according to the creation task; Among them, when the host device receives a read-write request during the process of creating the target data object, the read-write data object corresponding to the read-write request is determined; if the read-write data object hits the local and has been created, the read-write data object is used to respond to the read-write request; if the read-write data object hits other host devices and has been created, the read-write data object is restored from the other host device to the local, and the read-write data object is used to respond to the read-write request; if the read-write data object has not been created, the creation of the current data object is stopped, and the read-write data object is created to respond to the read-write request with the created read-write data object.
7. The method for creating a thick provisioned logical storage unit according to claim 6, characterized in that: After dividing the logical storage unit to be created to obtain a plurality of data objects, the method further includes: Adding identification information to each of the data objects; Correspondingly, allocating data objects to each of the host devices according to the storage resources of all the host devices to generate a creation task corresponding to each of the host devices includes: Acquire storage resources of each of the host devices and total storage resources of all the host devices; Determine the resource proportion of each of the host devices according to the total storage resources and each of the storage resources; Determine the number of target data objects allocated to each host device according to the total number of data objects and the proportion of each resource; A creation task corresponding to each of the host devices is generated according to each of the allocated quantities and the identification information of each of the data objects.
8. A distributed cluster system for creating thick provisioned logical storage units, characterized in that: It includes a management platform and multiple host devices, each of which is connected to the management platform; The management platform is used to determine the logical storage unit to be created according to the creation request; Dividing the to-be-created logical storage unit to obtain a plurality of data objects; allocating the data objects to each of the host devices according to the storage resources of all the host devices to generate a creation task corresponding to each of the host devices; Sending each of the creation tasks to the corresponding host device; Any of the host devices is used to create the assigned target data object locally according to the creation task; when a read-write request is received during the creation process of the target data object, determine the read-write data object corresponding to the read-write request; if the read-write data object hits the local and has been created, use the read-write data object to respond to the read-write request; if the read-write data object hits other host devices and has been created, restore the read-write data object from the other host device to the local, and use the restored read-write data object to respond to the read-write request; if the read-write data object has not been created, stop creating the current data object, and create the read-write data object, so as to use the created read-write data object to respond to the read-write request.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for creating a thick provisioned logical storage unit as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for creating a thick provisioned logical storage unit according to any one of claims 1 to 7 are implemented.
