Bucket cross-pool access method and device for distributed storage system

By setting up isolated storage pools and cross-pool policies in the distributed storage system and automatically selecting cross-pool buckets, the data migration problem during storage pool expansion is solved, non-impact expansion and fault isolation are achieved, and business layer configuration is simplified.

CN116319839BActive Publication Date: 2025-09-09SHANGHAI XIAOYUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310109691.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2025-09-09
Estimated Expiration
2043-02-13

AI Technical Summary

Technical Problem

Existing distributed storage systems require data migration when expanding storage pools, which affects business continuity. In addition, the access method between storage pools increases the complexity of business layer configuration.

Method used

By setting up multiple isolated storage pools in the distributed storage system, each hard disk belongs to only one storage pool, setting a cross-pool strategy to select candidate storage pools, and automatically selecting cross-pool buckets when the storage limit is reached, establishing a memory bucket mapping table, and realizing cross-pool access.

Benefits of technology

It simplifies business layer configuration, supports storage pool expansion without data migration, implements fault domain isolation, and ensures business continuity and transparent data reading and writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116319839B_ABST
    Figure CN116319839B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for cross-pool bucket access in a distributed storage system. The method comprises: reading the cross-pool bucket configuration, selecting an appropriate storage pool based on the configured cross-pool policy, automatically creating buckets that meet the requirements in the selected storage pool, and finally reading and writing data in the corresponding buckets. Using the method provided by the present invention, users only need to use a single bucket for data reading and writing, and file storage is automatically distributed across different storage pools. Reading and writing are performed between these different storage pools, making the entire process transparent and imperceptible. Subsequent expansion of newly created storage pools does not require migrating any existing data, ensuring that expansion has no impact on existing services. Furthermore, node or hard drive failures only affect the corresponding storage pool and have no impact on other storage pools, thus achieving fault domain isolation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a bucket cross-pool access method and device for a distributed storage system. Background Art

[0002] As the basic unit of persistent data storage, storage pools are often expanded in existing distributed storage systems, often accompanied by data migration. During business system deployment, a single storage pool cannot allocate an unlimited number of hard drives. This means that as data volume grows, the system will inevitably need to expand. This expansion process will involve data migration, which can impact business operations.

[0003] For fault isolation or other hardware isolation reasons, systems typically have multiple storage pools. The existing storage access method typically creates buckets in a storage pool, and the business layer uses buckets from each storage pool. The business layer then plans the specific access relationships. This traditional approach increases the complexity of business layer configuration. Summary of the Invention

[0004] The object of the present invention is to provide a method and device for accessing buckets across pools in a distributed storage system.

[0005] To solve the above problems, the present invention provides a method for accessing buckets across pools in a distributed storage system, comprising:

[0006] Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool.

[0007] Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit.

[0008] regularly checking the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy;

[0009] Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool.

[0010] If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table;

[0011] If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0012] Furthermore, in the above method, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy includes:

[0013] Querying the storage capacity of all storage pools in the candidate spanning storage pool set;

[0014] Each time, a storage pool with the lowest current storage capacity is selected from the candidate spanning storage pool set as the spanning storage pool.

[0015] Furthermore, in the above method, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy includes:

[0016] Arrange all storage pools in the candidate spanning storage pool set in sequence into a ring storage pool queue connected end to end;

[0017] According to the circular polling method, one storage pool is selected from the circular storage pool queue in sequence each time as the spanning storage pool.

[0018] Furthermore, in the above method, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy includes:

[0019] Arrange all the storage pools in the candidate spanning storage pool set in sequence according to the preset weights of the storage pools, forming a virtual storage pool queue connected end to end, wherein the number of occurrences of each storage pool in the virtual storage pool queue corresponds to the preset weight of the storage pool;

[0020] In a circular polling manner, one storage pool is selected from the virtual storage pool queue as a spanning storage pool in sequence each time.

[0021] Furthermore, in the above method, after storing the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket in the memory bucket mapping table, the method further includes:

[0022] Obtaining a write request, the write request including: writing a file name and writing a memory address;

[0023] Obtaining a unique ID of the file from the metadata management node based on the written file name;

[0024] According to the unique ID of the file and the written memory address, the corresponding original bucket is parsed;

[0025] Determine whether the cross-pool bucket corresponding to the original bucket is found from the memory bucket mapping table,

[0026] If the cross-pool bucket corresponding to the original bucket is found, the hard disk corresponding to the cross-pool bucket where the file is written is obtained based on the unique ID of the file and the cross-pool bucket, and the file is written to the hard disk corresponding to the cross-pool bucket;

[0027] If the cross-pool bucket corresponding to the original bucket is not found, the hard disk corresponding to the original bucket is obtained according to the unique ID of the file and the original bucket, and the file is written to the hard disk corresponding to the original bucket.

[0028] Furthermore, in the above method, after writing the file to the hard disk corresponding to the cross-pool bucket or the original bucket, the method further includes:

[0029] Determine whether the file is successfully written to the hard disk. If successful, store the cross-pool bucket or original bucket actually written corresponding to the unique ID of the file in the metadata management node.

[0030] Furthermore, in the above method, after determining whether the file is successfully written to the hard disk, and if successful, storing the cross-pool bucket corresponding to the unique ID of the file in the metadata management node, the method further includes:

[0031] Obtain a read request, the read request including: reading a file name and a memory address to be read;

[0032] Based on the read file name and the memory address to be read, obtain the unique ID of the file and the cross-pool bucket or original bucket actually written from the metadata management node;

[0033] Based on the unique ID of the obtained file and the cross-pool bucket or original bucket actually written, read the data from the corresponding hard disk location.

[0034] According to another aspect of the present invention, there is further provided a bucket cross-pool access device for a distributed storage system, characterized by comprising:

[0035] The first device is configured to set up multiple storage pools, wherein hard disks on different nodes are organized into a storage pool, each hard disk belongs to only one storage pool, and different storage pools are completely isolated from each other and do not share storage space; a storage pool contains multiple buckets, and each bucket belongs to only one storage pool;

[0036] The second device is used to select a storage pool and put it into the candidate spanning storage pool set; set the storage limit of each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit;

[0037] a third device, configured to periodically check the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, select a storage pool from the set of candidate spanning storage pools as the spanning storage pool according to a preset spanning pool policy;

[0038] The fourth device is used to determine whether there is a selected cross-pool bucket in the selected buckets across the storage pool. If there is a selected cross-pool bucket, the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket is stored in the memory bucket mapping table; if there is no selected cross-pool bucket, after selecting a bucket from the selected buckets across the storage pool as the cross-pool bucket, the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0039] According to another aspect of the present invention, a computer-readable storage medium is further provided, on which computer-executable instructions are stored, wherein when the computer-executable instructions are executed by a processor, the processor is caused to:

[0040] Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool.

[0041] Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit.

[0042] regularly checking the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy;

[0043] Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool.

[0044] If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table;

[0045] If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0046] According to another aspect of the present invention, there is further provided a computer device, comprising:

[0047] processor; and

[0048] a memory arranged to store computer-executable instructions which, when executed, cause the processor to:

[0049] Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool.

[0050] Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit.

[0051] regularly checking the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy;

[0052] Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool.

[0053] If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table;

[0054] If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0055] Compared to existing technologies, the present invention includes: reading bucket cross-pool configurations, selecting an appropriate storage pool based on the configured cross-pool policy, automatically creating buckets that meet the requirements within the selected storage pool, and finally reading and writing data within the corresponding buckets. Using the method provided by the present invention, users only need to use a single bucket for data reading and writing, and file storage is automatically distributed across different storage pools. Reading and writing are performed transparently and imperceptibly across these different storage pools. Subsequent expansion of newly created storage pools does not require migrating any existing data, ensuring that expansion has no impact on existing services. Furthermore, node or hard drive failures only affect the corresponding storage pool and have no impact on other storage pools, thus achieving fault domain isolation.

[0056] The present invention is designed with an independent cross-pool bucket selection device, which is executed regularly in the background and selects cross-pool buckets that meet the requirements according to the configured selection strategy; the mapping relationship between the selected cross-pool bucket candidate_bucket and the source bucket source_bucket is stored in the memory map<source_bucket,candidate_bucket> ,Subsequent write requests,query the buckets that need to be crossed from the map, and use the query results for subsequent write operations;,the cross-pool bucket selection process is as follows Figure 2 shown.

[0057] Using the method provided by the present invention, users only need to use one bucket to access all stored data; when expanding capacity, they only need to create a new storage pool and then configure the new pool to the bucket extension set. Subsequent businesses automatically use the new pool space for data reading and writing, and no existing data needs to be migrated after expansion; the storage pools that have been configured in the bucket extension set are completely independent and do not affect each other, thereby playing a role in fault isolation or hardware isolation.

[0058] The present invention can simplify the business layer configuration, support business scenarios using only one bucket, support the expansion of new storage pools, and automatically write business without the need for data migration; each storage pool is completely independent and does not affect each other, thus playing a role in fault isolation. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a storage topology diagram of a bucket cross-pool access method of a distributed storage system according to an embodiment of the present invention;

[0060] Figure 2 This is a flow chart of selecting a bucket according to an embodiment of the present invention;

[0061] Figure 3 is a write flow chart of an embodiment of the present invention;

[0062] Figure 4 4 is a reading flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0064] like Figure 1 and 2 As shown, the present invention provides a bucket cross-pool access method for a distributed storage system, comprising:

[0065] Step S1: Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool.

[0066] Here, a storage pool, as a logical unit for disk management, consists of a series of homogeneous disks. Multiple storage pools are set up, organizing the disks on different nodes into storage pools. Each disk can reside in only one storage pool. Different storage pools are completely isolated from each other and do not share storage space. The capacity of a storage pool can be dynamically expanded. Buckets, as logical units for data management, have the same number of replicas and a unified namespace within each bucket. A storage pool can contain multiple buckets, each of which is physically assigned to a specific storage pool. All read and write operations involve data belonging to a specific bucket.

[0067] Step S2: Select a storage pool and put it into the candidate spanning storage pool set; set the storage limit of each storage pool; set the time interval for checking whether the storage pool has reached the storage limit;

[0068] Here, a new thread can be created, and the following steps S2 to S6 can be executed in the new thread;

[0069] You can set a set of storage pools that are allowed to span: the set of candidate spanning storage pools will only allow you to select storage pools within this set of candidate spanning storage pools.

[0070] You can set the storage pool crossover level, which is the storage limit for each storage pool. You can also set a check cycle for each storage pool, which regularly checks at specified intervals to see if the capacity of each storage pool has reached the storage limit. When a storage pool's water level reaches the crossover level, a matching storage pool is selected from the candidate crossover storage pool set as the crossover storage pool.

[0071] Step S3: regularly checking the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval; if the storage capacity of a storage pool reaches the storage limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy;

[0072] Step S4: Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool.

[0073] Step S5: If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table;

[0074] Step S6: If there is no selected cross-pool bucket, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0075] Here, it is necessary to query whether a cross-pool bucket with a special name tag has been created in the selected candidate span storage pool. If not, a cross-pool bucket with a special name tag needs to be created; then, the correspondence between the original bucket and the newly selected cross-pool bucket is added to the memory mapping table map.

[0076] The topology of the storage system designed by the present invention is as follows Figure 1 As shown in the figure, a storage system may include: a storage network, a metadata management node, a storage pool, buckets, storage nodes, and hard disks on the nodes.

[0077] The hard disks in a storage system node can operate independently, or multiple hard disks can be organized into redundant arrays, such as RAID 5 and RAID 6. The method provided by the present invention is applicable to all disk organization schemes. This embodiment uses the independent disk operation as an example to illustrate the operation process.

[0078] The present invention includes: reading bucket cross-pool configurations, selecting an appropriate storage pool based on the configured cross-pool policy, automatically creating buckets that meet the requirements within the selected storage pool, and finally reading and writing data within the corresponding buckets. Using the method provided by the present invention, users only need to use a single bucket for data reading and writing, and file storage is automatically distributed across different storage pools. Reading and writing are performed transparently and imperceptibly across these different storage pools. Subsequent expansion of newly created storage pools does not require migrating any existing data, ensuring that expansion has no impact on existing services. Furthermore, node or hard drive failures only affect the corresponding storage pool and have no impact on other storage pools, effectively isolating fault domains.

[0079] The present invention is designed with an independent cross-pool bucket selection device, which is executed regularly in the background and selects cross-pool buckets that meet the requirements according to the configured selection strategy; the mapping relationship between the selected cross-pool bucket candidate_bucket and the source bucket source_bucket is stored in the memory map<source_bucket,candidate_bucket> ,Subsequent write requests,query the buckets that need to be crossed from the map, and use the query results for subsequent write operations;,the cross-pool bucket selection process is as follows Figure 2 shown.

[0080] Using the method provided by the present invention, users only need to use one bucket to access all stored data; when expanding capacity, they only need to create a new storage pool and then configure the new pool to the bucket extension set. Subsequent businesses automatically use the new pool space for data reading and writing, and no existing data needs to be migrated after expansion; the storage pools that have been configured in the bucket extension set are completely independent and do not affect each other, thereby playing a role in fault isolation or hardware isolation.

[0081] The present invention can simplify the business layer configuration, support business scenarios using only one bucket, support the expansion of new storage pools, and automatically write business without the need for data migration; each storage pool is completely independent and does not affect each other, thus playing a role in fault isolation.

[0082] In one embodiment of the method for accessing buckets across pools in a distributed storage system of the present invention, step S3, selecting a storage pool from the candidate spanning storage pool set as a spanning storage pool according to a preset spanning pool strategy, includes:

[0083] Step S311, querying the storage capacity of all storage pools in the candidate spanning storage pool set;

[0084] Step S312 : Selecting a storage pool with the lowest current storage capacity from the candidate spanning storage pool set as the spanning storage pool each time.

[0085] Here, the cross-pool strategy may be, for example, to cross in order of water level: query the storage capacity, i.e., water level, of all storage pools in the candidate cross-pool storage pool set, and select the storage pool with the lowest storage capacity, i.e., water level, from the candidate cross-pool storage pool set.

[0086] Assume that the candidate spanning storage pool set is {p1, p2, p3}, and the storage upper limit, i.e., the spanning pool water level, is 95%. According to this spanning order by water level, the spanning pool result is that when the usage capacity of p1 reaches 95%, p2 is selected, and when the p2 water level reaches 95%, p3 is selected.

[0087] In one embodiment of the method for accessing buckets across pools in a distributed storage system of the present invention, step S3, selecting a storage pool from the candidate spanning storage pool set as a spanning storage pool according to a preset spanning pool strategy, includes:

[0088] Step S321, arranging all storage pools in the candidate spanning storage pool set in order into a ring storage pool queue connected end to end;

[0089] Step S322 : selecting one storage pool from the circular storage pool queue as a spanning storage pool in sequence each time according to a circular polling method.

[0090] Here, the pool-spanning strategy can be a round-robin approach: A candidate spanning storage pool is randomly selected in alphabetical order upon initial startup, and subsequently selected in a round-robin fashion. Once the candidate spanning storage pools reach the end of the round-robin approach, selection restarts from the beginning. Assuming a spanning pool set {p1, p2, p3}, according to the pool-spanning strategy, the resulting spanning might be p1->p2->p3->p1->p2->p3... , with the storage pool selecting from the candidate spanning storage pools in a round-robin fashion.

[0091] In one embodiment of the method for accessing buckets across pools in a distributed storage system of the present invention, step S3, selecting a storage pool from the candidate spanning storage pool set as a spanning storage pool according to a preset spanning pool strategy, includes:

[0092] Step S331, arranging all the storage pools in the candidate spanning storage pool set in sequence into a virtual storage pool queue connected end to end according to the preset weights of all the storage pools in the candidate spanning storage pool set, wherein the number of occurrences of each storage pool in the virtual storage pool queue corresponds to the preset weight of the storage pool;

[0093] Step S332 : selecting one storage pool from the virtual storage pool queue as a spanning storage pool in sequence each time according to a circular polling method.

[0094] Here, the cross-pool strategy can be to cross by setting the weight of the storage pool: a virtual storage pool queue of the corresponding number of storage pools is generated according to the set storage pool weight. During the first startup, a storage pool can be randomly selected from the virtual storage pool queue, and subsequently, a storage pool can be selected from the virtual storage pool queue in a circular manner.

[0095] For example, assuming the cross-pool set is {p1:0.2,p2:0.3,p3:0.5}, according to this configuration policy, the virtual storage pool queue distribution may be {p1,p2,p3,p1,p2,p3,p2,p3,p3,p3...}. The cross-pool performance may be p1->p2->p3->p1->p2->p3->p2->p3->p3->p3..., and the storage pool is selected according to the set weight. Among them, p1 is selected 2 times according to the weight, p2 is selected 3 times according to the weight, and p3 is selected 5 times according to the weight.

[0096] like Figure 3 As shown, in an embodiment of the cross-pool bucket access method of a distributed storage system of the present invention, after step S5 or step S6 stores the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket in the memory bucket mapping table, the method further includes:

[0097] Step S71, obtaining a write request, wherein the write request includes: writing a file name and writing a memory address;

[0098] Here, the application can initiate a write request to the storage system, wherein the input parameters of the write request include the write file name and the write memory address;

[0099] Step S72, obtaining a unique ID of the file from the metadata management node based on the written file name;

[0100] Here, after receiving the write request, the storage system obtains the unique ID of the file from the metadata management node based on the parameters of the file name;

[0101] Step S73: parse the file to obtain the corresponding original bucket based on its unique ID and the memory address where it was written.

[0102] Here, the file name parameter is parsed to the original bucket name;

[0103] Step S74: determine whether the cross-pool bucket corresponding to the original bucket is found from the memory bucket mapping table.

[0104] Here, you can search the cross-pool bucket (i.e., the bucket to be written) based on the original bucket in the memory bucket mapping table;

[0105] Step S75: If the cross-pool bucket corresponding to the original bucket is found, then the hard disk corresponding to the cross-pool bucket where the file is written is obtained based on the unique ID of the file and the cross-pool bucket, and the file is written to the hard disk corresponding to the cross-pool bucket;

[0106] Here, if a cross-pool bucket corresponding to the original bucket is found, and the cross-pool bucket in the mapping table is different from the corresponding original bucket, the cross-pool bucket is used; otherwise, the original bucket is used; subsequently, the file can be written based on the unique ID of the file and the cross-pool bucket;

[0107] Step S76: If the cross-pool bucket corresponding to the original bucket is not found, the hard disk corresponding to the original bucket is obtained based on the unique ID of the file and the original bucket, and the file is written to the hard disk corresponding to the original bucket.

[0108] Here, for a file write request, first obtain the lifetime unique ID corresponding to the file from the metadata management node; then generate the original bucket according to the file request path; if the storage pool space allocation reaches the storage upper limit, that is, the set water level, and the storage pool to which the original bucket belongs specifies the storage pool to be crossed, then select a bucket to be written from the buckets of other candidate crossing pools, that is, the cross-pool bucket, for the file, and write data to the selected cross-pool bucket; finally, update the bucket where the file is actually written in the metadata management node; the writing process enters Figure 3 shown.

[0109] like Figure 3As shown, in an embodiment of the method for accessing buckets across pools in a distributed storage system of the present invention, after step S75 or step S76 writes the file to the hard disk corresponding to the cross-pool bucket or the original bucket, the method further includes:

[0110] Step S77, determine whether the file is successfully written to the hard disk. If successful, store the cross-pool bucket or original bucket actually written corresponding to the unique ID of the file in the metadata management node.

[0111] Here, if the write is successful, the written bucket is stored in the metadata management node; otherwise, a write failure is returned.

[0112] like Figure 4 As shown, in an embodiment of the cross-pool bucket access method of a distributed storage system of the present invention, step S77 determines whether the file is successfully written to the hard disk. If successful, after storing the cross-pool bucket corresponding to the unique ID of the file in the metadata management node, the method further includes:

[0113] Step S78: Obtain a read request, wherein the read request includes: reading a file name and a memory address to be read;

[0114] Here, the application can initiate a read request to the storage system, with the input parameters including the read file name, the memory address to be read, and the memory size.

[0115] Step S72: Based on the read file name and the memory address to be read, obtain the unique ID of the file and the cross-pool bucket or original bucket actually written from the metadata management node;

[0116] Here, after receiving the read request, the storage system obtains the bucket where the file is actually written and the ID number corresponding to the file from the metadata management node based on the file name parameter;

[0117] Step S73: Based on the obtained unique ID of the file and the cross-pool bucket or original bucket actually written, read the data from the corresponding hard disk location.

[0118] Here, according to the bucket and file ID, the corresponding data is found from the corresponding disk of the node, and the data is read out and returned.

[0119] Specifically, for a file read request, first obtain the file's lifetime unique ID and the bucket where the file is actually written from the metadata management node; then read the data from the system based on the actual written bucket and file ID number obtained; the reading process is as follows: Figure 4 shown.

[0120] According to another aspect of the present invention, there is further provided a bucket cross-pool access device for a distributed storage system, characterized by comprising:

[0121] The first device is configured to set up multiple storage pools, wherein hard disks on different nodes are organized into a storage pool, each hard disk belongs to only one storage pool, and different storage pools are completely isolated from each other and do not share storage space; a storage pool contains multiple buckets, and each bucket belongs to only one storage pool;

[0122] The second device is used to select a storage pool and put it into the candidate spanning storage pool set; set the storage limit of each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit;

[0123] a third device, configured to periodically check the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, select a storage pool from the set of candidate spanning storage pools as the spanning storage pool according to a preset spanning pool policy;

[0124] The fourth device is used to determine whether there is a selected cross-pool bucket in the selected buckets across the storage pool. If there is a selected cross-pool bucket, the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket is stored in the memory bucket mapping table; if there is no selected cross-pool bucket, after selecting a bucket from the selected buckets across the storage pool as the cross-pool bucket, the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0125] According to another aspect of the present invention, a computer-readable storage medium is further provided, on which computer-executable instructions are stored, wherein when the computer-executable instructions are executed by a processor, the processor is caused to:

[0126] Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool.

[0127] Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit.

[0128] regularly checking the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy;

[0129] Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool.

[0130] If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table;

[0131] If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0132] According to another aspect of the present invention, there is further provided a computer device, comprising:

[0133] processor; and

[0134] a memory arranged to store computer-executable instructions which, when executed, cause the processor to:

[0135] Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool.

[0136] Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit.

[0137] regularly checking the storage capacity of each storage pool other than the candidate spanning storage pool at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy;

[0138] Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool.

[0139] If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table;

[0140] If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

[0141] The various embodiments in this 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 referenced to each other.

[0142] 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 above description has generally described the components and steps of each example according to their functions. 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 beyond the scope of the present invention.

[0143] Obviously, those skilled in the art may make various changes and modifications to the invention without departing from the spirit and scope of the invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for accessing buckets across pools in a distributed storage system, characterized in that: include: Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool. Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit. regularly checking the storage capacity of each storage pool outside the candidate spanning storage pool set at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy; Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool. If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table; If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

2. The bucket cross-pool access method of the distributed storage system according to claim 1, characterized in that: Selecting a storage pool as a spanning storage pool from the candidate spanning storage pool set according to a preset spanning pool policy includes: Querying the storage capacity of all storage pools in the candidate spanning storage pool set; Each time, a storage pool with the lowest current storage capacity is selected from the candidate spanning storage pool set as the spanning storage pool.

3. The bucket cross-pool access method of the distributed storage system according to claim 1, characterized in that: Selecting a storage pool as a spanning storage pool from the candidate spanning storage pool set according to a preset spanning pool policy includes: Arrange all storage pools in the candidate spanning storage pool set in sequence into a ring storage pool queue connected end to end; According to the circular polling method, one storage pool is selected from the circular storage pool queue in sequence each time as the spanning storage pool.

4. The method for accessing buckets across pools in a distributed storage system according to claim 1, wherein: Selecting a storage pool as a spanning storage pool from the candidate spanning storage pool set according to a preset spanning pool policy includes: Arrange all the storage pools in the candidate spanning storage pool set in sequence according to the preset weights of the storage pools, forming a virtual storage pool queue connected end to end, wherein the number of occurrences of each storage pool in the virtual storage pool queue corresponds to the preset weight of the storage pool; In a circular polling manner, one storage pool is selected from the virtual storage pool queue as a spanning storage pool in sequence each time.

5. The method for accessing buckets across pools in a distributed storage system according to claim 1, wherein: After storing the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket in the memory bucket mapping table, it also includes: Obtaining a write request, the write request including: writing a file name and writing a memory address; Obtaining a unique ID of the file from the metadata management node based on the written file name; According to the unique ID of the file and the written memory address, the corresponding original bucket is parsed; Determine whether the cross-pool bucket corresponding to the original bucket is found from the memory bucket mapping table, If the cross-pool bucket corresponding to the original bucket is found, the hard disk corresponding to the cross-pool bucket where the file is written is obtained based on the unique ID of the file and the cross-pool bucket, and the file is written to the hard disk corresponding to the cross-pool bucket; If the cross-pool bucket corresponding to the original bucket is not found, the hard disk corresponding to the original bucket is obtained according to the unique ID of the file and the original bucket, and the file is written to the hard disk corresponding to the original bucket.

6. The method for accessing buckets across pools in a distributed storage system according to claim 5, wherein: After writing the file to the hard disk corresponding to the cross-pool bucket or the original bucket, the following steps are also included: Determine whether the file is successfully written to the hard disk. If successful, store the cross-pool bucket or original bucket actually written corresponding to the unique ID of the file in the metadata management node.

7. The method for accessing buckets across pools in a distributed storage system according to claim 6, wherein: Determine whether the file is successfully written to the hard disk. If successful, store the cross-pool bucket corresponding to the unique ID of the file in the metadata management node, and further include: Obtain a read request, the read request including: reading a file name and a memory address to be read; Based on the read file name and the memory address to be read, obtain the unique ID of the file and the cross-pool bucket or original bucket actually written from the metadata management node; Based on the unique ID of the obtained file and the cross-pool bucket or original bucket actually written, read the data from the corresponding hard disk location.

8. A bucket cross-pool access device for a distributed storage system, characterized in that: include: The first device is configured to set up multiple storage pools, wherein hard disks on different nodes are organized into a storage pool, each hard disk belongs to only one storage pool, and different storage pools are completely isolated from each other and do not share storage space; a storage pool contains multiple buckets, and each bucket belongs to only one storage pool; The second device is used to select a storage pool and put it into the candidate spanning storage pool set; set the storage limit of each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit; a third device, configured to periodically check the storage capacity of each storage pool outside the candidate spanning storage pool set at the time interval, and if the storage capacity of a storage pool reaches a storage upper limit, select a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy; The fourth device is used to determine whether there is a selected cross-pool bucket in the selected buckets across the storage pool. If there is a selected cross-pool bucket, the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket is stored in the memory bucket mapping table; if there is no selected cross-pool bucket, after selecting a bucket from the selected buckets across the storage pool as the cross-pool bucket, the correspondence between the original bucket of the storage pool that has reached the storage upper limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

9. A computer-readable storage medium having computer-executable instructions stored thereon, wherein: The computer executable instructions, when executed by a processor, cause the processor to: Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool. Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit. regularly checking the storage capacity of each storage pool outside the candidate spanning storage pool set at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy; Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool. If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table; If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

10. A computer device, wherein: include: processor; as well as a memory arranged to store computer-executable instructions which, when executed, cause the processor to: Set up multiple storage pools. Disks on different nodes are organized into one storage pool. Each disk belongs to only one storage pool. Different storage pools are completely isolated and do not share storage space. A storage pool contains multiple buckets, and each bucket belongs to only one storage pool. Select storage pools and place them in the candidate spanning storage pool set; set the storage limit for each storage pool; and set the time interval for checking whether the storage pool has reached the storage limit. regularly checking the storage capacity of each storage pool outside the candidate spanning storage pool set at the time interval, and if the storage capacity of a storage pool reaches the storage upper limit, selecting a storage pool from the candidate spanning storage pool set as the spanning storage pool according to a preset spanning pool policy; Determine whether there is a selected cross-pool bucket in the selected bucket across the storage pool. If a cross-pool bucket is selected, the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table; If no cross-pool bucket is selected, a bucket is selected from the selected buckets across the storage pool as the cross-pool bucket, and the correspondence between the original bucket of the storage pool that has reached the storage limit and the selected cross-pool bucket is stored in the memory bucket mapping table.

Citation Information

Patent Citations

  • File storage method and equipment

    CN111352590A

  • Object storage method and device and medium

    CN114968114A