Method and system for pooling, partitioning, and sharing network storage resources
First Claim
1. A method for sharing a storage resource by a distributed storage controller in a server cluster system, comprising:
- allocating a plurality of storage partitions;
generating global partition information recording a correspondence between an allocated read-write control module and each storage partition;
receiving a storage request message;
determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated;
determining an ID of the at least one data block according to the ID of the user volume and the LBA of the at least one data block;
querying metadata according to the ID of the at least one data block;
storing the metadata of the target storage partition associated with the storage request message, wherein the metadata records a correspondence between the target storage partition associated with the storage request message and the ID of the at least one data block;
determining the target storage partition associated with the storage request message;
determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and
sending the storage request message to the allocated read-write control module.
0 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the present invention provide a method and a system for sharing a storage resource, where storage resources of a hard disk and a storage array are divided into multiple storage partitions and the multiple storage partitions form a shared storage resource pool, a read-write control module is allocated to each storage partition, and global partition information is generated to record a correspondence between each storage partition in the shared storage resource pool and the read-write control module. The embodiments of the present invention implement fast and simple integration of heterogeneous storage resources, and therefore can efficiently use various storage resources, save cost, and avoid a resource waste.
23 Citations
8 Claims
-
1. A method for sharing a storage resource by a distributed storage controller in a server cluster system, comprising:
-
allocating a plurality of storage partitions; generating global partition information recording a correspondence between an allocated read-write control module and each storage partition; receiving a storage request message; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining an ID of the at least one data block according to the ID of the user volume and the LBA of the at least one data block; querying metadata according to the ID of the at least one data block; storing the metadata of the target storage partition associated with the storage request message, wherein the metadata records a correspondence between the target storage partition associated with the storage request message and the ID of the at least one data block; determining the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module.
-
-
2. A method for sharing a storage resource by a distributed storage controller in a server cluster system, comprising:
-
allocating a plurality of storage partitions; generating global partition information recording a correspondence between an allocated read-write control module and each storage partition; receiving a storage request message comprising a user volume creation command carrying a size of the user volume; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module; wherein the determining an ID of a user volume and the determining the target storage partition comprise; determining according to the size of the user volume, a size of an initial storage resource allocated to the user volume; determining the LBA of the at least one data block according to the size of the initial storage resource; and determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message.
-
-
3. A method for sharing a storage resource by a distributed storage controller in a server cluster system, comprising:
-
allocating a plurality of storage partitions; generating global partition information recording a correspondence between an allocated read-write control module and each storage partition; receiving a storage request message comprising a data write operation request carrying a file name; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module; wherein the determining an ID of a user volume and the determining the target storage partition comprise; determining the ID of the user volume according to the file name; dividing to-be-written data into multiple to-be-written data blocks; allocating an LBA to each to-be-written data block; and determining according to the ID of the user volume, and the LBA of said each to-be-written data block, a target storage partition associated with said each to-be-written data block.
-
-
4. A method for sharing a storage resource by a distributed storage controller in a server cluster system, comprising:
-
allocating a plurality of storage partitions; generating global partition information recording a correspondence between an allocated read-write control module and each storage partition; receiving a storage request message comprising a data read operation request carrying a file name and an offset of to-be-read data blocks; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module; wherein the determining an ID of a user volume and the determining the target storage partition comprise; determining the ID of the user volume according to the file name; determining a LBA of the to-be-read data blocks according to the offset of the to-be-read data blocks; and determining according to the ID of the user volume and the LBA of the to-be-read data blocks, the target storage partition associated with the storage request message.
-
-
5. A distributed storage controller of server cluster system, comprising;
-
a plurality of read-write control modules allocated to each of a corresponding plurality of storage partitions, wherein each read-write control module is assigned to one of the corresponding plurality of storage partitions; memory or storage that includes global partition information recording a correspondence between each of the allocated read-write control modules and each corresponding storage partition of the plurality of storage partitions; computer instructions stored in either the storage or the memory that, when executed by a processor, prompts the distributed storage controller to perform the steps of; receiving a storage request message; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining an ID of the at least one data block according to the ID of the user volume and the LBA of the at least one data block; storing metadata of the target storage partition associated with the storage request message, wherein the metadata records a correspondence between the target storage partition associated with the storage request message and the ID of the at least one data block; querying the metadata according to the ID of the at least one data block; determining the target storage partition associated with the storage request message; determining according to the global partition information, a read-write control module that corresponds to the target storage partition associated with the storage request message; and sending the storage request message to the determined read-write control module.
-
-
6. A distributed storage controller of server cluster system, comprising;
-
a plurality of read-write control modules allocated to each of a corresponding plurality of storage partitions, wherein each read-write control module is assigned to one of the corresponding plurality of storage partitions; memory or storage that includes global partition information recording a correspondence between each of the allocated read-write control modules and each corresponding storage partition of the plurality of storage partitions; computer instructions stored in either the storage or the memory that, when executed by a processor, prompts the distributed storage controller to perform the steps of; receiving a storage request message comprising a user volume creation command carrying a size of the user volume; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module;
wherein the distributed storage controller is configured to;determine a size of an initial storage resource allocated to the user volume according to the size of the user volume; determine the LBA of the at least one data block according to the size of the initial storage resource; and determine according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message.
-
-
7. A distributed storage controller of server cluster system, comprising;
-
a plurality of read-write control modules allocated to each of a corresponding plurality of storage partitions, wherein each read-write control module is assigned to one of the corresponding plurality of storage partitions; memory or storage that includes global partition information recording a correspondence between each of the allocated read-write control modules and each corresponding storage partition of the plurality of storage partitions; computer instructions stored in either the storage or the memory that, when executed by a processor, prompts the distributed storage controller to perform the steps of; receiving a storage request message comprising a data write operation request carrying a file name; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module; wherein the distributed storage controller is configured to; determine the ID of the user volume according to the file name; divide to-be-written data into multiple to-be-written data blocks; allocate an LBA to each to-be-written data block; and determine according to the ID of the user volume, and the LBA of said each to-be-written data block, a target storage partition associated with said each to-be-written data block.
-
-
8. A distributed storage controller of server cluster system, comprising;
-
a plurality of read-write control modules allocated to each of a corresponding plurality of storage partitions, wherein each read-write control module is assigned to one of the corresponding plurality of storage partitions; memory or storage that includes global partition information recording a correspondence between each of the allocated read-write control modules and each corresponding storage partition of the plurality of storage partitions; computer instructions stored in either the storage or the memory that, when executed by a processor, prompts the distributed storage controller to perform the steps of; receiving a storage request message comprising a data read operation request carrying a file name and an offset of to-be-read data blocks; determining an ID of a user volume in which data to be operated according to the storage request message is located and a logical block address (LBA) of at least one data block of the data to be operated; determining according to the ID of the user volume and the LBA of the at least one data block, the target storage partition associated with the storage request message; determining that the allocated read-write control module corresponds to the target storage partition associated with the storage request message according to the global partition information; and sending the storage request message to the allocated read-write control module; wherein the distributed storage controller is configured to; determine the ID of the user volume according to the file name; determine a LBA of the to-be-read data blocks according to the offset of the to-be-read data blocks; and determine according to the ID of the user volume and the LBA of the to-be-read data blocks, the target storage partition associated with the storage request message.
-
Specification