Method and apparatus for managing storage medium
By generating and defining media types and differentiating the uses of storage media, the problem of uneven distribution of storage tasks in the storage cluster is solved, storage efficiency is improved, and problems of insufficient storage space and performance mismatch are avoided.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2022-07-13
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, there is insufficient differentiation between the actual media types of different storage media in storage clusters, which leads to a decrease in storage efficiency. In particular, in heterogeneous and homogeneous clusters, the uneven distribution of storage tasks results in insufficient space or performance mismatch of some storage media.
By generating a defined storage medium type, differentiating the same type of storage medium according to its purpose, and assigning corresponding storage tasks to the metadata node, the problem of mismatched storage medium purposes is solved, and storage efficiency is improved.
This enables targeted allocation of storage tasks based on the intended use of the storage medium, avoiding problems such as insufficient storage space and performance mismatch, and improving the overall efficiency of the storage cluster.
Smart Images

Figure CN115309325B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of data storage technology, and in particular to a method and apparatus for managing storage media. Background Technology
[0002] With the development of computer technology and the diversification of user needs, more and more types of storage media are being used in storage clusters, and different storage media can be used for different purposes. For example, SSD (Solid State Disk / Solid State Drive) can be used to store large amounts of small data, or as a transit warehouse to transfer data to other storage media.
[0003] However, in related technologies, storage media are usually distinguished based on their actual media type. This means that storage media of the same actual media type cannot be further distinguished, which leads to a decrease in storage efficiency of storage clusters in some complex data storage scenarios. Summary of the Invention
[0004] In view of this, this specification provides a method and apparatus for managing storage media to address the shortcomings of related technologies.
[0005] Specifically, this specification is implemented through the following technical solution:
[0006] According to a first aspect of the embodiments of this specification, a method for implementing mutual exclusion of write operations is provided, the method comprising:
[0007] Receive append write operations for snapshot data, the type of append write operation includes write data operation or complete snapshot operation, the snapshot data includes original data blocks and append record blocks;
[0008] The append record block is updated to write the append write record corresponding to the append write operation into the append record block;
[0009] If the update fails, check if there is an append write record corresponding to the completed snapshot operation in the append record block; if there is, terminate the append write operation, otherwise retry updating the append record block.
[0010] According to a second aspect of the embodiments of this specification, a method for managing a storage medium is provided, applied to a metadata node in a storage cluster, the storage cluster further comprising storage nodes, the method comprising:
[0011] Receive a specified media type sent by the storage node, the specified media type being used to characterize the purpose of the storage media installed in the storage node;
[0012] Based on the defined media type, storage tasks related to the intended use are assigned to the storage medium.
[0013] According to a third aspect of the embodiments of this specification, a storage medium management device is provided, applied to a storage node in a storage cluster, the storage cluster further including a metadata node, the device comprising:
[0014] Purpose determination unit, used to determine the storage medium assembled in the storage node and the purpose of the storage medium;
[0015] A type generation unit is used to generate a specified medium type for the storage medium, wherein the specified medium type is used to characterize the purpose of the storage medium;
[0016] A type sending unit is used to send the set medium type to the metadata node, so that the metadata node allocates storage tasks related to the purpose to the storage medium according to the set medium type.
[0017] According to a fourth aspect of the embodiments of this specification, a storage medium management apparatus is provided, applied to a metadata node in a storage cluster, the storage cluster further comprising storage nodes, the apparatus comprising:
[0018] A type receiving unit is used to receive a specified medium type sent by the storage node, wherein the specified medium type is used to characterize the purpose of the storage medium installed in the storage node;
[0019] The task allocation unit is used to allocate storage tasks related to the intended use to the storage medium according to the set medium type.
[0020] According to a fifth aspect of the embodiments of this specification, a storage medium management system is provided, comprising:
[0021] Storage node for performing the steps of the method as described in the first aspect;
[0022] Metadata nodes are used to perform the steps of the methods described in the second aspect.
[0023] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods described in the first and second aspects.
[0024] According to a seventh aspect of the embodiments of this specification, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the methods described in the first and second aspects.
[0025] In the technical solution provided in this specification, by generating a setting media type corresponding to the storage medium according to the purpose of the storage medium and sending the above-mentioned setting media type to the metadata node, the metadata node can distinguish the same type of storage medium for different purposes and allocate storage tasks to each storage medium in a targeted manner.
[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings.
[0028] Figure 1 This is a schematic diagram of the architecture of a storage media management system shown in an exemplary embodiment of this specification;
[0029] Figure 2 This is a schematic flowchart illustrating an exemplary embodiment of a storage medium management method shown in this specification;
[0030] Figure 3a This is a schematic diagram illustrating an exemplary embodiment of a storage medium management method as shown in this specification;
[0031] Figure 3b This is a schematic diagram illustrating another method for managing storage media, as shown in an exemplary embodiment of this specification;
[0032] Figure 3c This is a schematic diagram illustrating yet another method for managing a storage medium, as shown in an exemplary embodiment of this specification;
[0033] Figure 4 This is a schematic flowchart illustrating another method for managing storage media, as shown in an exemplary embodiment of this specification.
[0034] Figure 5 This is a schematic structural diagram of an electronic device shown in an exemplary embodiment of this specification;
[0035] Figure 6 This is a schematic diagram of the structure of a storage medium management device shown in an exemplary embodiment of this specification;
[0036] Figure 7 This is a schematic diagram illustrating the structure of another storage medium management device according to an exemplary embodiment of this specification. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0038] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0039] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0040] In related technologies, traditional network storage systems use centralized storage servers to store all data. However, these storage servers, acting as a bottleneck for system performance and a focal point for reliability and security, are increasingly unable to meet the needs of large-scale storage applications. Distributed network storage systems, on the other hand, employ a scalable system architecture, utilizing storage clusters composed of multiple servers to distribute the storage load. This not only improves system reliability, availability, and access efficiency but also facilitates expansion.
[0041] Based on the differences in the functions they perform, servers in a storage cluster can be divided into storage nodes and metadata nodes, with the metadata nodes handling the unified scheduling of data read and write operations on the storage nodes. For example, HDFS (Hadoop Distributed File System) in related technologies includes NameNode and DataNode, where NameNode is equivalent to the aforementioned metadata node and DataNode is equivalent to the aforementioned storage node.
[0042] The following is based on Figure 1 Please provide a detailed explanation. Figure 1 This is a schematic diagram illustrating the architecture of a storage media management system according to an exemplary embodiment of this specification. Figure 1 As shown, it may include storage node group 11 and metadata node 12.
[0043] Storage node group 11 includes one or more storage nodes from a storage cluster. These storage nodes can be used to execute the management methods for storage media applied to the storage nodes described below. The storage nodes are electronic devices for storing data; for example, the electronic device can be a physical server containing an independent host. One or more embodiments of this specification do not limit this. During system operation, each storage node in storage node group 11 can send a setting of the media type to metadata node 12, enabling metadata node 12 to perform subsequent storage task allocation operations.
[0044] Metadata node 12 serves as an electronic device for maintaining metadata in the storage cluster. This metadata node 12 can be used to execute the management methods applied to the storage media of the metadata node described below. This electronic device can be a physical server containing an independent host, and one or more embodiments of this specification are not limited thereto. Metadata node 12 can be used to define the media type of the storage media installed on each storage node in storage node group 11. During system operation, metadata node 12 can receive the defined media type from each storage node in storage node group 11 and allocate storage tasks related to the intended use of the storage media according to the defined media type; wherein the defined media type characterizes the intended use of the storage media installed in the storage node.
[0045] Each storage node can be equipped with one or more types of storage media, and the architecture of different storage nodes can be distinguished based on the type of storage media installed. Here, "type" refers to the actual media type, such as SDD media, HDD (Hard Disk Drive) media, etc. It should be noted that, as described below, the media type specified in this specification may be the same as the actual media type, or it may be unrelated. In related technologies, based on the actual media types installed in the storage nodes, the above-mentioned storage clusters can be divided into heterogeneous clusters and homogeneous clusters. The difference between the two is that the actual media types installed in the storage nodes of a heterogeneous cluster differ; for example, some storage nodes are equipped with SDDs, while others are equipped with both SDDs and HDDs. In contrast, all storage nodes in a homogeneous cluster are equipped with the same actual media type, such as all being equipped with only SDDs or all being equipped with both SDDs and HDDs.
[0046] Different storage media types have different physical characteristics; for example, SDDs have faster read and write speeds than HDDs. Therefore, related technologies allocate appropriate storage tasks to each storage medium based on its actual media type. However:
[0047] In heterogeneous clusters, storage nodes with different architectures may all be equipped with storage media of a certain actual media type, and these media on different architecture nodes have different storage capacities. However, since storage nodes only report the actual media type of each storage medium they are equipped with to the metadata node, the metadata node cannot distinguish the differences between these storage media. This may lead to a large number of data storage tasks being assigned to storage media with relatively small storage capacities, making those storage media more prone to running out of storage space. Furthermore, although storage media on storage nodes with different architectures may have the same actual media type, their performance (such as throughput) and lifespan (such as erase cycles) still differ, and therefore their applicable use cases are also different. Blindly using them may not meet actual usage needs. For example, storage tasks that require high-performance storage media may be assigned to low-performance storage media, leading to a decrease in the storage efficiency of that storage media.
[0048] In reality, even within a homogeneous cluster, the storage media installed on each storage node may differ in performance, lifespan, and other aspects. This can lead to situations, such as the aforementioned allocation of high-performance storage tasks to lower-performance storage media, resulting in decreased storage efficiency. Similarly, in a homogeneous cluster, the metadata node will inevitably be unable to effectively distinguish the differences between various storage media. In short, related technologies, relying solely on the actual type of storage media, struggle to allocate storage tasks appropriate to the specific needs of different storage media.
[0049] Therefore, this specification proposes the following technical solutions to solve the above problems.
[0050] The following is combined Figure 2 The embodiments shown illustrate the technical solutions of this specification. Figure 2 This is a flowchart illustrating an exemplary embodiment of a storage medium management method, as shown in this specification. Figure 2 As shown, the method may include the following steps:
[0051] S201, determine the storage medium assembled in the storage node and the purpose of the storage medium.
[0052] The aforementioned storage nodes can be equipped with one or more storage media. These storage media can be classified based on different dimensions. For example, based on storage speed, they can be divided into high-speed storage media similar to SSDs and low-speed storage media similar to HDDs; or based on storage purpose, they can be at least divided into tiered media for tiered storage and cache media for temporary data storage. Furthermore, different storage media can correspond to the same or different purposes. For example, both SSDs and HDDs can be used to store long-term data, or HDDs can be used to store long-term data, while SSDs are only used to transfer data to be stored to the HDDs.
[0053] Those skilled in the art will understand that the criteria for distinguishing the above-mentioned storage media types are not fixed or unique, and the various types of storage media classified by different dimensions can overlap or be independent according to actual needs. For example, the above-mentioned SSD can be used as a high-speed storage medium while also being a tiered medium or a cache medium, or the above-mentioned SSD can be used solely as a high-speed storage medium to store data such as large amounts of small-capacity read / write information when it is not a tiered medium or a cache medium. This specification does not impose any limitations on this. Among them, the above-mentioned cache medium can be defined as: 1. a data transit warehouse; 2. high data throughput performance; 3. high write resistance and high DWDP (Drive Writes Per Day). At the same time, the above-mentioned tiered media and the above-mentioned cache medium have different uses: the above-mentioned tiered media will necessarily transfer data to other storage media on the storage node where the tiered media is located, and this is often not perceived by the user; while the above-mentioned cache medium can transfer data to other storage media on any storage node in the above-mentioned storage cluster, and this action is often driven by user operation or preset specific functions.
[0054] Furthermore, the correspondence between the above storage media and their uses follows the usage logic of those skilled in the art or the usage requirements in specific scenarios. For example, HDDs have lower storage speeds and lower costs compared to SSDs, so HDDs are not suitable as tiered media requiring high throughput, and SSDs are not suitable for storing large amounts of long-term data.
[0055] S202, Generate a defined media type for the storage medium, wherein the defined media type is used to characterize the purpose of the storage medium.
[0056] The aforementioned media type setting can characterize the purpose of the corresponding storage medium, thereby enabling the metadata node below to distinguish the same storage medium for different purposes based on the media type setting. Taking the tiered media mentioned earlier as an example, assuming there is an SSD used to transfer data to an HDD corresponding to the same storage node, then the aforementioned media type setting can be any string, number, or symbol that can characterize the concept of "tiered media," and this specification does not impose any restrictions on it.
[0057] Those skilled in the art will understand that the setting of the media type is performed by the data storage node, so the intrusion into the overall storage media pool is minimal and will not affect the content in the storage media.
[0058] The aforementioned storage media can serve multiple purposes simultaneously, and this application can generate corresponding media types for each purpose.
[0059] In one embodiment, the storage node can partition the storage medium based on the various uses, obtaining media partitions corresponding to each use, and generating a corresponding set media type for each media partition based on its intended use. Partitioning, as a technique for dividing disk space, can divide a storage medium with a corresponding actual media type into multiple storage media with different virtual media types. These virtual media types can also be directly used as the set media type corresponding to the respective use, or converted into any string, number, or symbol that can represent the corresponding set media type. The actual media type is the original media type before the use of the storage medium is determined, such as an SSD or HDD. For example, if there is an SSD where 70% of the storage space will be used as a cache medium and the remaining 30% will be used as a tiered medium, the storage node can partition the SSD, dividing it into two partitions, A and B, with a ratio of "70%" and "30%". Partition A can be represented as a cache medium, while partition B can be represented as a tiered medium.
[0060] The above partitioning operation can be determined as hard partitioning or soft partitioning according to specific actual needs, thereby achieving isolation of the storage medium capacity and capabilities. The specific execution operations of hard partitioning and soft partitioning have been disclosed in related technologies, and will not be repeated here.
[0061] When the aforementioned storage cluster is a heterogeneous cluster, it will contain storage nodes with various architectures, such as all-flash storage nodes and hybrid storage nodes. The actual types of storage media installed in storage nodes with different architectures will vary.
[0062] In one embodiment, if a storage medium of a first actual media type is assembled on storage nodes of at least two architectures in the heterogeneous cluster, and the storage medium of the first actual media type has the same purpose in the storage nodes of the at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the first actual media type is the first actual media type.
[0063] The following example illustrates how to determine the media type using the same storage medium on different storage nodes for the same purpose. Figure 3a This is a schematic diagram illustrating a storage medium management method according to an exemplary embodiment of this specification. Figure 3a As shown in the diagram, assuming that storage nodes X1 to Xm corresponding to the all-flash model each contain 12 SSDs as storage media, and storage nodes Y1 to Yn corresponding to the hybrid model each contain 2 SSDs and 60 HDDs as storage media, where m and n are integers greater than or equal to 1. Since SSDs are installed in storage nodes X1 to Xm and Y1 to Yn, when the SSDs in storage nodes X1 to Xm and Y1 to Yn are used to cache data and transfer it to the storage media of any of their storage nodes, the media type set for storage nodes X1 to Xm and Y1 to Yn for that SSD remains SSD, that is, the set media type and the actual media type remain unchanged.
[0064] Those skilled in the art will understand that, theoretically, the aforementioned media type can also be determined as a cache medium. However, in actual use cases, if the media type of the SSDs of storage nodes X1 to Xm and Y1 to Yn is all cache medium, then the SSDs of each storage node will not be able to store a large amount of small-capacity read and write information compared to SSDs with the same media type. Therefore, from a practical point of view, when the same storage medium of different storage nodes has the same purpose, it is more appropriate to unify the corresponding media type to the actual media type.
[0065] In another embodiment, if the storage medium of the second actual media type is assembled on storage nodes of at least two architectures in the heterogeneous cluster, and the use of the storage medium of the second actual media type differs at the storage nodes of the at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the second actual media type is related to the corresponding use, and at most one set media type corresponding to the use is the second actual media type.
[0066] The following example illustrates how to determine the media type using the same storage medium on different storage nodes for different purposes. Figure 3b This is a schematic diagram illustrating another method for managing storage media, as shown in an exemplary embodiment of this specification. Figure 3b As shown in the diagram, assuming that storage nodes X1 to Xm corresponding to the all-flash model each contain 12 SSDs as storage media, and storage nodes Y1 to Yn corresponding to the hybrid model each contain 2 SSDs and 60 HDDs as storage media, where m and n are integers greater than or equal to 1. Since SSDs are installed in storage nodes X1 to Xm and Y1 to Yn, when storage nodes X1 to Xm are used to handle large amounts of small-capacity read / write information, and the SSDs in Y1 to Yn are used to transfer data to the HDDs within the same storage node, the media type set for the corresponding SSDs in storage nodes X1 to Xm remains SSD; the media type set for the corresponding SSDs in Y1 to Yn changes to tiered media.
[0067] Furthermore, in Figure 3b Based on the illustrated embodiment, it can also be explained that the use of the third actual media type differs at the storage nodes of the same storage architecture. Figure 3c This is a schematic diagram illustrating yet another method for managing a storage medium, as shown in an exemplary embodiment of this specification. Figure 3c As shown, assuming that the SSDs of storage nodes X1 to Xm are all used to ensure a large amount of small-capacity read and write information, and the SSDs of Y1 to Yn are partitioned into two parts of storage space in a 50% to 50% ratio, with the first part of storage space used to transfer data to the HDD of this storage node and the second part of storage space used to transfer data to other storage media of any storage node in the storage cluster, then the media type set for storage nodes X1 to Xm can remain SSD; the media type set for Y1 to Yn for their corresponding SSDs can change to tiered media and cached media, where the tiered media corresponds to the first part of storage space and the cached media corresponds to the second part of storage space.
[0068] S203, send the set media type to the metadata node so that the metadata node allocates storage tasks related to the purpose to the storage medium according to the set media type.
[0069] Once the aforementioned storage node generates the designated media type for the aforementioned storage medium, it can send it to the aforementioned metadata node. For example, as mentioned earlier, upon receiving the designated media type, the metadata node can distinguish between different uses of the same storage medium based on the received designated media type, and then allocate storage tasks related to the intended use to the aforementioned storage medium. This avoids the problem of mismatch between the data stored on the storage medium and the usage method of the storage medium in related technologies, thus improving the storage efficiency of the storage medium. Simultaneously, since the aforementioned metadata node can distinguish between different uses of the same storage medium, it also naturally solves the problem of uneven allocation of storage tasks by the metadata node in related technologies, avoiding the problem of insufficient storage space under normal circumstances.
[0070] Those skilled in the art will understand that if the aforementioned storage medium has multiple uses and thus requires partitioning, then when the metadata node allocates storage tasks, since each partition is an independent storage medium for the metadata node, the operation of allocating storage tasks to the aforementioned storage medium is actually to allocate tasks to each partition of the storage medium, rather than to allocate tasks to the entire storage medium.
[0071] Figure 4 This is a flowchart illustrating another method for managing storage media, as shown in an exemplary embodiment of this specification. Figure 4 As shown, this method, applied to metadata nodes in a storage cluster, which also includes storage nodes, comprises the following steps:
[0072] S401, Receive the specified media type sent by the storage node, the specified media type being used to characterize the purpose of the storage media installed in the storage node.
[0073] S402, allocate storage tasks related to the intended use to the storage medium according to the set medium type.
[0074] As mentioned above, the storage media has multiple uses. The storage nodes are used to partition the storage media based on these multiple uses to obtain media partitions corresponding to various uses. For each media partition, a corresponding media type is generated for the corresponding media partition.
[0075] As mentioned above, the aforementioned storage cluster can be a heterogeneous cluster, which contains storage nodes with various architectures; among them, the actual media types of the storage media installed in storage nodes with different storage architectures are different.
[0076] As mentioned above, if a storage medium of the first actual media type is assembled in storage nodes of at least two architectures in the above heterogeneous cluster, and the storage medium of the first actual media type has the same purpose in the storage nodes of the above at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the first actual media type is the first actual media type.
[0077] If the storage medium of the second actual media type is installed on storage nodes of at least two architectures in the above heterogeneous cluster, and the use of the storage medium of the second actual media type differs at the storage nodes of the at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the second actual media type is related to the corresponding use, and at most one use corresponds to the set media type of the second actual media type.
[0078] As mentioned above, the storage nodes in the heterogeneous cluster include: storage nodes using all-flash type and storage nodes using hybrid type.
[0079] As can be seen from the above embodiments, the storage node in this specification generates a corresponding media type based on the intended use of the storage medium and sends this media type to the metadata node. This allows the metadata node to distinguish between the same type of storage medium with different uses and allocate storage tasks to each storage medium accordingly. This solves the problems in related technologies where uneven allocation of storage tasks leads to insufficient storage space on some storage nodes, and where mismatch between the data stored in the storage medium and its usage methods results in decreased storage efficiency. Furthermore, by generating corresponding media types for each partitioned media, this application achieves the technical effect of generating corresponding media types for different uses of the same storage medium. Moreover, since the media differentiation operation is performed by the storage node, the impact on the overall storage medium pool is minimal.
[0080] Figure 5 This is a schematic structural diagram of an electronic device according to an exemplary embodiment. Please refer to... Figure 5 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other necessary hardware. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it, forming a storage medium management device at the logical level. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0081] Corresponding to the embodiments of the aforementioned storage medium management method, this specification also provides embodiments of a storage medium management device.
[0082] Please refer to Figure 6 , Figure 6 This is a schematic diagram illustrating the structure of a storage medium management device according to an exemplary embodiment. For example... Figure 6 As shown, in a software implementation, the device is applied to a storage node in a storage cluster, which also includes metadata nodes. The device may include:
[0083] Purpose determination unit 601 is used to determine the storage medium assembled in the storage node and the purpose of the storage medium;
[0084] The type generation unit 602 is used to generate a specified medium type for the storage medium, wherein the specified medium type is used to characterize the purpose of the storage medium;
[0085] The type sending unit 603 is used to send the set medium type to the metadata node so that the metadata node can allocate storage tasks related to the purpose to the storage medium according to the set medium type.
[0086] Optionally, the storage medium has multiple uses, and the type sending unit 603 is specifically used for:
[0087] The storage medium is partitioned based on the various uses to obtain media partitions corresponding to each use.
[0088] For each media partition, a corresponding media type is generated for its intended use.
[0089] Optionally, the storage cluster is a heterogeneous cluster, which contains storage nodes with multiple architectures; wherein the actual media types of the storage media installed in the storage nodes of different storage architectures are different.
[0090] Optionally, if a storage medium of the first actual media type is assembled in storage nodes of at least two architectures in the heterogeneous cluster, and the storage medium of the first actual media type has the same purpose in the storage nodes of the at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the first actual media type is the first actual media type.
[0091] If a storage medium of the second actual media type is assembled on storage nodes of at least two different architectures in the heterogeneous cluster, and the purpose of the storage medium of the second actual media type differs at the storage nodes of the at least two different architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the second actual media type is related to the corresponding purpose, and at most one purpose corresponds to the set media type of the second actual media type.
[0092] Optionally, the storage nodes in the heterogeneous cluster include: storage nodes using all-flash type and storage nodes using hybrid type.
[0093] Please refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the structure of another storage medium management device as shown in an exemplary embodiment. Figure 7 As shown, in a software implementation, the device is applied to a metadata node in a storage cluster, which also includes storage nodes. The device may include:
[0094] The type receiving unit 701 is used to receive a specified medium type sent by the storage node, wherein the specified medium type is used to characterize the purpose of the storage medium installed in the storage node;
[0095] The task allocation unit 702 is used to allocate storage tasks related to the intended use to the storage medium according to the set medium type.
[0096] Optionally, the storage medium has multiple uses, and the storage node is used to partition the storage medium based on the multiple uses to obtain media partitions corresponding to various uses, and generate corresponding media types for each media partition for each use.
[0097] Optionally, the storage cluster is a heterogeneous cluster, which contains storage nodes with multiple architectures; wherein the actual media types of the storage media installed in the storage nodes of different storage architectures are different.
[0098] Optionally, if a storage medium of the first actual media type is assembled in storage nodes of at least two architectures in the heterogeneous cluster, and the storage medium of the first actual media type has the same purpose in the storage nodes of the at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the first actual media type is the first actual media type.
[0099] If a storage medium of the second actual media type is assembled on storage nodes of at least two different architectures in the heterogeneous cluster, and the purpose of the storage medium of the second actual media type differs at the storage nodes of the at least two different architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the second actual media type is related to the corresponding purpose, and at most one purpose corresponds to the set media type of the second actual media type.
[0100] Optionally, the storage nodes in the heterogeneous cluster include: storage nodes using all-flash type and storage nodes using hybrid type.
[0101] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0102] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0103] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0104] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.
[0105] Suitable computers for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0106] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0107] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0108] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0109] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0110] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A method for managing storage media, applied to storage nodes in a storage cluster, wherein the storage cluster further includes metadata nodes, the method comprising: Determine the storage media assembled in the storage node and the purpose of the storage media; A defined media type is generated for the storage medium. The defined media type is used to characterize the purpose of the storage medium. The defined media type is not related to the actual media type of the storage medium, and the defined media type is generated by the storage node based on the purpose. The metadata node sends the specified media type to the metadata node so that the metadata node allocates storage tasks related to the intended use to the storage medium according to the specified media type.
2. The method according to claim 1, wherein the storage medium has multiple uses; the specified medium type for generating the storage medium includes: The storage medium is partitioned based on the various uses to obtain media partitions corresponding to each use. For each media partition, a corresponding media type is generated for its intended use. 3.The method of claim 1, wherein the storage cluster is a heterogeneous cluster including storage nodes of multiple architectures; and wherein, The actual media types installed in storage nodes of different storage architectures vary.
4. The method according to claim 3, wherein if a storage medium of the first actual media type is assembled in storage nodes of at least two architectures in the heterogeneous cluster, and the storage medium of the first actual media type has the same purpose in the storage nodes of the at least two architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the first actual media type is the first actual media type. If a storage medium of the second actual media type is assembled on storage nodes of at least two different architectures in the heterogeneous cluster, and the purpose of the storage medium of the second actual media type differs at the storage nodes of the at least two different architectures, then the set media type generated by the storage nodes of each architecture for the storage medium of the second actual media type is related to the corresponding purpose, and at most one purpose corresponds to the set media type of the second actual media type.
5. The method of claim 3, the storage nodes in the heterogeneous cluster comprising: Storage nodes using all-flash architecture and storage nodes using hybrid architecture.
6. A method for managing storage media, applied to metadata nodes in a storage cluster, wherein the storage cluster further includes storage nodes, the method comprising: The storage node receives a specified media type, which is used to characterize the purpose of the storage media installed in the storage node. The specified media type is not related to the actual media type of the storage media, and the specified media type is generated by the storage node based on the purpose. Based on the defined media type, storage tasks related to the intended use are assigned to the storage medium.
7. A storage medium management device, applied to a storage node in a storage cluster, the storage cluster further including a metadata node, the device comprising: Purpose determination unit, used to determine the storage medium assembled in the storage node and the purpose of the storage medium; A type generation unit is used to generate a specified media type for the storage medium. The specified media type is used to characterize the purpose of the storage medium. The specified media type is not related to the actual media type of the storage medium, and the specified media type is generated by the storage node based on the purpose. A type sending unit is used to send the set medium type to the metadata node, so that the metadata node allocates storage tasks related to the purpose to the storage medium according to the set medium type.
8. A storage medium management device, applied to a metadata node in a storage cluster, the storage cluster further comprising storage nodes, the device comprising: A type receiving unit is used to receive a specified medium type sent by the storage node. The specified medium type is used to characterize the purpose of the storage medium installed in the storage node. The specified medium type is not related to the actual medium type of the storage medium, and the specified medium type is custom-generated by the storage node based on the purpose. The task allocation unit is used to allocate storage tasks related to the intended use to the storage medium according to the set medium type.
9. A storage media management system, comprising: A storage node for performing the steps of the method as described in any one of claims 1 to 5; Metadata node, used to perform the steps of the method as described in claim 6.
10. A computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the steps of the method as claimed in any one of claims 1 to 6.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as claimed in any one of claims 1 to 6.