Management method and device of storage system, electronic equipment and storage medium

CN117608477BActive Publication Date: 2026-09-25BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311587036.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2026-09-25
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

但是,两个SSD组成一个RAID1,两个SSD之间的数据需要完全一致,导致两个SSD上能够缓存数据的空间实质上等于一个SSD的容量,缓存空间的利用率较低

Benefits of technology

[0031]在一些实施例中,本申请实施例提供的存储介质中存储有计算机可执行指令,所述计算机可执行指令在被处理器调用和执行时,所述计算机可执行指令促使处理器实现上述存储系统的管理方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117608477B_ABST
    Figure CN117608477B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of storage management, and discloses a storage system management method and device, electronic equipment and a storage medium; wherein the storage system comprises n solid state disks and a mechanical disk taking the n solid state disks as cache disks; the storage system management method comprises the following steps: obtaining to-be-written data; saving the to-be-written data in the n solid state disks respectively; in the case that a preset writing condition is met, determining a first target disk from the n solid state disks; sending a writing instruction to the first target disk, triggering the first target disk to write the to-be-written data into the mechanical disk; and releasing the to-be-written data in m solid state disks; m is greater than or equal to 1 and less than or equal to n-1. In this way, the space utilization of the cache disk composed of the solid state disks can be improved while maintaining the reliability of the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage management technology, and in particular to a storage system management method and apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, common storage media are divided into hard disk drives (HDDs) and solid-state drives (SSDs). HDDs work by using a robotic arm to position the read / write head for operations. Because the movement of the robotic arm and the positioning of the head take time, HDD access speeds are relatively slow, failing to meet users' demands for fast data access. SSDs, compared to HDDs, offer advantages such as low access latency, high read / write speeds, and high reliability. However, SSDs have relatively smaller capacities and are relatively more expensive. Therefore, to balance the capacity advantages of HDDs with the performance advantages of SSDs, an SSD is typically added as a cache disk to one or a group of HDDs. Frequently accessed data blocks are cached on the SSD. When the computer system needs to read this data, it can read it directly from the SSD without waiting for the rotational latency and seek time of the HDD, thus improving read speed. Simultaneously, a write-back strategy is used, caching data to be written to the SSD first, and then writing it to the HDD from the SSD, reduces the impact of write operations on applications, thereby improving overall write performance.

[0003] If only one SSD is used as a cache disk, its failure will prevent data from being written to the mechanical hard drive, resulting in data loss and requiring extensive data recovery, thus significantly impacting the storage system. To address this issue, related technologies often use two SSDs in a RAID 1 configuration (mirrored disk). This way, if one SSD fails, the other can continue to provide service. However, in a RAID 1 configuration, the data on both SSDs must be completely identical, meaning the available cache space on both SSDs is essentially equal to the capacity of a single SSD, resulting in low cache space utilization.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0006] This application provides a storage system management method and apparatus, electronic device, and storage medium to improve the space utilization of a cache disk composed of solid-state drives while maintaining data reliability.

[0007] In some embodiments, the storage system includes n solid-state drives (SSDs) and a mechanical hard disk drive (HDD) using the n SSDs as cache disks; where n is an integer greater than or equal to 2; the management method of the storage system includes: acquiring data to be written; storing the data to be written in each of the n SSDs; determining a first target hard disk from the n SSDs when a preset write condition is met; sending a write command to the first target hard disk, triggering the first target hard disk to write the data to be written into the HDD; and releasing the data to be written from m SSDs; where m is greater than or equal to 1 and less than or equal to n-1.

[0008] In the above implementation, by writing the data to be written to multiple solid-state drives (SSDs) upon obtaining the data, data loss can be avoided if some SSDs fail. When the data to be written to the hard disk drives (HDDs) is written, the data is released from some of the SSDs. Since the data is already stored on the HDDs, even if the SSDs storing the data fail, the data can still be retrieved from the HDDs, ensuring data reliability. Simultaneously, releasing the data from some SSDs frees up some of their capacity, thereby improving the space utilization of the cache disk composed of SSDs while maintaining data reliability.

[0009] In some embodiments, each solid-state drive (SSD) is divided into multiple buckets; the data to be written is stored in each of the n SSDs, including: establishing an association between target buckets; the target bucket is the bucket in each of the SSDs used to store the data to be written; and the data to be written is stored in each of the target buckets.

[0010] In the above implementation, by establishing a relationship between target buckets, the data to be written is then written to the target buckets with the relationship. When searching for data to be written, other buckets storing the same data can be easily and conveniently found through the relationship. This facilitates the rapid retrieval of the data to be written from other SSD buckets in the event of a failure of the SSD storing the data to be written.

[0011] In some embodiments, establishing the association between target buckets includes: selecting one target bucket from each of the n solid-state drives; for each target bucket, adding first copy information to the metadata of the target bucket; the first copy information includes the identification information of all target buckets except the target bucket.

[0012] In the above implementation, by adding first copy information to the metadata, the association between target buckets can be established simply by modifying the metadata. This facilitates flexible establishment of associations between target buckets.

[0013] In some embodiments, the metadata of each bucket includes usage status information, which is used to characterize whether the bucket is in a usable state; after saving the data to be written, the usage status information of each target bucket is a first value; the first value is used to identify that the bucket is in an unusable state; releasing the data to be written from the m solid-state drives includes: selecting m buckets to be released from the m solid-state drives among the target buckets; modifying the usage status information of each bucket to be released from the first value to a second value; the second value is used to identify that the bucket is in a usable state.

[0014] In the above implementation, the usage status information of the bucket to be released is modified to make the bucket usable. Thus, when the SSD receives new data to be written, it can write the data to the bucket that is now usable. Therefore, by modifying the usage status information of the bucket to be released, the capacity of the SSD can be freed up.

[0015] In some embodiments, after releasing the data to be written in the m solid-state drives, the method further includes: deleting the copy information of each bucket to be released; and deleting the identification information of each bucket to be released from the metadata of each reserved bucket other than the bucket to be released in each target bucket.

[0016] In the above implementation, after releasing the data to be written from the SSD, the copy information of each bucket to be released is deleted. This changes the relationships between the target buckets on the SSD after releasing the data. Therefore, updating the copy information after releasing the data ensures that the relationships between the target buckets on the SSD can still be accurately queried even after releasing a portion of the data.

[0017] In some embodiments, the preset write conditions include at least one of the following: the number of writes to all n solid-state drives is less than a first preset number of writes; or the usable capacity of a solid-state drive is less than a first preset capacity.

[0018] In the above implementation, when the number of write operations on each SSD is less than a first preset number, meaning each SSD is in an idle state, a first target SSD is selected and triggered to write the data to be written to the HDD. This reduces the impact on the interaction between the SSD and the upper-layer application, thereby improving the user experience. To ensure data reliability, the SSD can only release the data to be written after it has been written to the HDD. Therefore, by selecting a first target SSD when the usable capacity of an SSD is less than a first preset capacity, and triggering the first target SSD to write the data to the HDD, it is easier to release the SSD capacity subsequently, thereby improving the space utilization of the SSD.

[0019] In some embodiments, the management method of the storage system further includes: sending read instructions for the same target data to n solid-state drives (SSDs) to enable each SSD to search for the target data; if the target data is not found in any of the n SSDs, sending read instructions for the target data to the mechanical hard disk (HDD) to obtain the target data from the HDD; and storing the target data in k second target SSDs among the n SSDs, wherein k is greater than or equal to 1 and less than or equal to n-1.

[0020] In the above implementation, when the target data is not stored on the solid-state drives (SSDs), it is stored on k secondary target SSDs out of n SSDs. This allows upper-layer applications to quickly retrieve the target data when reading the same data again. Simultaneously, since the target data is already stored on the hard disk drives (HDDs), even if the SSDs fail, the target data can still be read from the HDDs, ensuring the reliability of the target data. Therefore, not storing the target data on all SSDs reduces wasted SSD space while ensuring fast and reliable retrieval of the target data.

[0021] In some embodiments, each solid-state drive (SSD) is divided into multiple buckets; the k second target SSDs are determined by: obtaining the number of buckets in a usable state from the n SSDs; and determining the first k SSDs as the second target SSDs in descending order of the number.

[0022] In the above implementation, solid-state drives (SSDs) are selected as the second target SSDs based on the number of available buckets, from highest to lowest. This allows the target data to be stored in SSDs with more available buckets, thus avoiding significant differences in available capacity among the SSDs.

[0023] In some embodiments, the storage system management method further includes: when the number of writes to all n solid-state drives is less than a second preset number, releasing the used capacity of the solid-state drives according to the usable capacity of each solid-state drive.

[0024] In the above implementation, the used capacity of the SSDs is released when the number of write operations on all n SSDs is less than a second preset number. This allows for the release of more SSD capacity without affecting the interaction between the SSDs and upper-layer applications, ensuring that the SSDs can store new data normally in the future.

[0025] In some embodiments, each solid-state drive (SSD) is divided into multiple buckets; releasing the used capacity of an SSD based on its usable capacity includes: obtaining the usable capacity of n SSDs; identifying SSDs with usable capacity lower than a second preset capacity as disks to be cleaned; and releasing the used capacity of the disks to be cleaned based on the presence of dirty data in each bucket of the disks to be cleaned; the presence of dirty data is used to characterize whether there is dirty data in the bucket.

[0026] In the above implementation, solid-state drives (SSDs) with usable capacity lower than a second preset capacity are identified as the drives to be cleaned. This ensures that the SSDs being cleaned are those with relatively high capacity usage. Therefore, it avoids a situation where some SSDs have ample capacity while others have already used up their capacity. This approach effectively balances the remaining capacity across all SSDs.

[0027] In some embodiments, releasing the used capacity of the hard disk to be cleaned based on the presence of dirty data in each bucket of the hard disk to be cleaned includes: identifying buckets in the hard disk to be cleaned that do not contain dirty data as buckets to be cleaned; and releasing the buckets to be cleaned according to their priority; the priority is used to characterize the frequency at which the data stored in the buckets to be cleaned is accessed.

[0028] In the above implementation, the higher the priority of the bucket to be cleaned, the more frequently the data within that bucket is accessed. Releasing the bucket to be cleaned based on its priority makes it easier to clean up buckets with lower access frequency. This reduces the impact on the speed of upper-layer applications accessing the solid-state drive.

[0029] In some embodiments, the storage system management device provided in this application includes n solid-state drives (SSDs) and mechanical hard disks (HDDs) using the n SSDs as cache disks; where n is an integer greater than or equal to 2; the device includes: an acquisition module for acquiring data to be written; an SSD writing module for storing the data to be written in each of the n SSDs; a hard disk determination module for determining a first target hard disk from the n SSDs when preset writing conditions are met; an HDD writing module for sending a write command to the first target hard disk, triggering the first target hard disk to write the data to be written into the HDD; and a release module for releasing the data to be written from m SSDs; where m is greater than or equal to 1 and less than or equal to n-1.

[0030] In some embodiments, the electronic device provided in this application includes a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above-described storage system management method.

[0031] In some embodiments, the storage medium provided in this application stores computer-executable instructions. When the computer-executable instructions are invoked and executed by the processor, the computer-executable instructions cause the processor to implement the above-described storage system management method.

[0032] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0033] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:

[0034] Figure 1 This is a schematic diagram of the structural composition of a storage system provided in an embodiment of this application;

[0035] Figure 2 This is a schematic diagram of a storage system management method provided in an embodiment of this application;

[0036] Figure 3 This is a schematic diagram of a data storage structure provided in an embodiment of this application;

[0037] Figure 4 This is a schematic diagram of the bucket distribution of a solid-state drive provided in an embodiment of this application;

[0038] Figure 5 This is a schematic diagram of a storage system management device provided in an embodiment of this application;

[0039] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of this application.

[0040] Figure label:

[0041] 1: Storage system; 2: Solid-state drive (SSD); 3: Hard disk drive (HDD); 4: Bucket in usable state; 5: Bucket containing dirty data; 6: Bucket not containing dirty data; 7: Acquisition module; 8: SSD write module; 9: HDD determination module; 10: HDD write module; 11: Release module; 12: Processor; 13: Memory; 14: Communication interface; 15: Bus. Detailed Implementation

[0042] To provide a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this application. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0043] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0044] Unless otherwise stated, the term "multiple" means two or more.

[0045] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0046] In some embodiments, the storage system includes n solid-state drives (SSDs) and a hard disk drive (HDD) using the n SSDs as cache disks, where n is an integer greater than or equal to 2. Combined with Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of a storage system. Storage system 1 includes two solid-state drives (SSDs) 2 and five mechanical hard drives (HDDs) 3, with the two SSDs 2 serving as cache disks. It can be understood that... Figure 1 This is merely an example and is not intended as a structural limitation on the storage system. For instance, the number of solid-state drives (SSDs) in a storage system can be more than two, and the number of hard disk drives (HDDs) can be any number other than five.

[0047] In order to improve the space utilization of the cache disk composed of solid-state drives while maintaining data reliability, this application provides a management method for the above-mentioned storage system. This method can be applied to the upper-layer application of electronic devices, and the processor running the upper-layer application accesses the solid-state drive and mechanical hard drive to achieve the management of the storage system.

[0048] Combination Figure 2 As shown in the figure, this application provides a storage system management method, including:

[0049] Step S101: Obtain the data to be written.

[0050] Step S102: Save the data to be written to each of the n solid-state drives.

[0051] Step S103: If the preset write conditions are met, determine a first target hard disk from n solid-state drives.

[0052] Step S104: Send a write command to the first target hard disk, triggering the first target hard disk to write the data to be written into the mechanical hard disk.

[0053] Step S105: Release the data to be written from m solid-state drives; m is greater than or equal to 1 and less than or equal to n-1.

[0054] The storage system management method provided in this application avoids data loss in the event of damage to some SSDs by writing the data to be written to multiple SSDs when the data to be written is obtained. When the data to be written is written to a mechanical hard drive (HDD), the data is released from some of the SSDs. Since the data to be written is already stored on the HDDs, even if the SSD storing the data fails, the data can still be retrieved from the HDD, ensuring data reliability. Simultaneously, by releasing the data to be written from some of the SSDs, some of the SSD capacity is freed up, thereby improving the space utilization of the cache disk composed of SSDs while maintaining data reliability.

[0055] In some embodiments, the data to be written represents data to be written to the hard disk drive. This data can be obtained by the upper-layer application based on relevant business requirements.

[0056] In some embodiments, each solid-state drive (SSD) can be divided into multiple buckets. In this case, step S102, which involves saving the data to be written to each of the n SSDs, may include:

[0057] A relationship is established between target buckets, and the data to be written is stored in each target bucket. Here, a target bucket is the bucket in each solid-state drive (SSD) used to store the data to be written. In this embodiment, at least one bucket can be selected from each SSD as the target bucket, thereby achieving storage of the data to be written across n SSDs and avoiding data loss due to damage to some SSDs. By establishing a relationship between target buckets, other buckets storing the same data can be easily and conveniently located when searching for data to be written. This facilitates the rapid retrieval of the data from other SSD buckets even if one of the SSDs storing the data fails.

[0058] In this embodiment, the process of establishing the association between target buckets may include: selecting one target bucket from each of the n solid-state drives; for each target bucket, adding first copy information to its metadata; the first copy information includes the identification information of all target buckets except the target bucket itself. Specifically, the first copy information records the identification information of buckets storing the same data. This method of adding first copy information to the metadata allows for a quick and convenient establishment of the association between target buckets.

[0059] Optionally, in this embodiment, a bucket that is in a usable state can be randomly selected from the solid-state drive as the target bucket.

[0060] In some embodiments, the metadata of each solid-state drive bucket can be stored in storage space accessible to upper-layer applications, such as in memory, but this is not a limitation.

[0061] In some embodiments, the metadata may include a replica field. The replica field describes buckets that store the same data using the bucket's identification information. That is, the content of the replica field indicates buckets that store the same data. Adding replica information to the replica field establishes the association between target buckets.

[0062] In this embodiment, the identification information refers to information that can uniquely identify a bucket. One example is a storage system comprising n solid-state drives (SSDs), each with u buckets. Assume the identification information is a positive integer from 1 to n×u, and the identification information assigned to a bucket is one of 1 to n×u, with different buckets having different identification information. Another example is a storage system comprising n SSDs, each with u buckets. Assume the SSDs are numbered from 1 to n, and different SSDs have different numbers. The buckets within a single SSD are numbered from 1 to u, and different buckets within the same SSD have different numbers. The identification information can be the SSD number plus the bucket number. For example, n+u. For instance, consider a storage system comprising two SSDs, SSD A and SSD B. Assume the metadata of each bucket in SSD A and SSD B are stored in memory. The upper-layer application selects a usable bucket from SSD A as the first target bucket and obtains its identification information 'a'. The upper-layer application selects a usable bucket from SSD B as the second target bucket and obtains its identification information 'b'. The upper-layer application searches for the metadata 'c' describing the first target bucket in memory and adds a copy of 'identification information a' to the 'replica' field of metadata 'c'. The upper-layer application searches for the metadata 'd' of the second target bucket in memory and adds a copy of 'identification information b' to the 'replica' field of metadata 'd'. This establishes a relationship between the first and second target buckets. The upper-layer application stores the data to be written in both the first and second target buckets.

[0063] In this embodiment, the process of establishing the association between target buckets can also be as follows: select one target bucket from each of the n solid-state drives; store the association between each target bucket in a preset association table. The preset association table is stored in storage space accessible to the upper-layer application, such as in memory, but this is not a limitation. For example, the association table is displayed in tabular form, storing the identification information of target buckets with associations in the same table. Buckets corresponding to the identification information in the same table store the same data to be written.

[0064] In some embodiments, combined with Figure 3As shown, data to be written can be stored in the target bucket in the following order: dirty field, size field, bucket_offset field, hdd_id field, hdd_offset field, and data field. Multiple data entries can be stored in a single bucket. The dirty field indicates whether dirty data exists in the bucket. The size field indicates the length of the data to be written, in sectors. The bucket_offset field indicates the location of the data to be written within the bucket. The hdd_id field indicates the serial number of the hard drive storing the data to be written. Each hard drive in the storage system has a unique serial number. The hdd_offset field indicates the offset of the starting position of the data to be written from the hard drive. The data field contains the data to be written. Upper-layer applications can determine the location of the data to be written on the hard drive using the hdd_id, hdd_offset, and size fields.

[0065] Optionally, the preset write conditions may include at least one of the following:

[0066] The number of write operations for each of the n solid-state drives is less than the first preset number of write operations;

[0067] The usable capacity of the solid-state drive is less than the first preset capacity.

[0068] Therefore, when the SSD is under heavy workload, writing data to the HDD may cause the SSD to be unresponsive to upper-layer applications, resulting in a poor user experience. By triggering the SSD to write data to the HDD when all n SSDs have completed fewer write cycles than a first preset number, the SSD can write data to the HDD when workloads are low. This reduces the likelihood of the SSD being unresponsive to upper-layer applications, thus improving the user experience. Since the usable capacity of the SSD is less than a first preset capacity, it may be unable to store data when needed later. Therefore, triggering the SSD to write data to the HDD when the usable capacity of the SSD is less than the first preset capacity ensures that the SSD can store new data normally in the future.

[0069] In some embodiments, the write count of the solid-state drive (SSD) is the number of writes per second. For example, the first preset count is 30. This first preset count is set by researchers based on the typical write count of the SSD when it is in a low-intensity state.

[0070] In some embodiments, researchers, based on experience, determine a threshold value below which the usable capacity of the solid-state drive (SSD) might affect the next time new data is written to the SSD. Therefore, a first preset capacity is set.

[0071] Optionally, if the preset write condition is that the usable capacity of some solid-state drives (SSDs) is less than a first preset capacity, the SSD with the smallest usable capacity among the n SSDs can be determined as the first target SSD. Optionally, if the preset write condition is that the number of writes to all n SSDs is less than a first preset number of writes, a first target SSD can be determined from the n SSDs as follows: obtain the usable capacity of each SSD; if there is a capacity difference greater than a preset capacity difference, determine the SSD with the lowest usable capacity as the first target SSD. If there is no capacity difference greater than a preset capacity difference, randomly select one SSD as the first target SSD. The capacity difference is the absolute value of the difference between the usable capacities of the two SSDs.

[0072] Optionally, if the preset write condition is that the number of writes to all n SSDs is less than a first preset number, a first target SSD can be determined from the n SSDs as follows: Obtain the number of usable buckets on each SSD; if there is a difference in the number of buckets greater than a preset difference, determine the SSD with the lowest number of usable buckets as the first target SSD. If there is no difference in the number of buckets greater than the preset difference, randomly select one SSD as the first target SSD. The difference in number is the absolute value of the difference between the number of usable buckets on the two SSDs.

[0073] For example, consider a storage system comprising three solid-state drives (SSDs): SSD C, SSD D, and SSD E. Assume that SSD C has 20 usable buckets, SSD D has 15 usable buckets, and SSD E has 8 usable buckets. Therefore, the difference in the number of usable buckets between SSD C and SSD D is 5. The difference between SSD C and SSD E is 12. The difference between SSD D and SSD E is 7. Assuming a preset difference of 5, since there exists a difference greater than the preset difference, SSD E, with the lowest number of usable buckets, is selected as the first target drive. Assuming a preset difference of 20, since there is no difference greater than the preset difference, one SSD is randomly selected from SSD C, SSD D, and SSD E as the first target drive.

[0074] In some embodiments, when the number difference between two solid-state drives (SSDs) is large, one SSD may have more remaining capacity while the other has less. To avoid an imbalance in remaining capacity among the SSDs, researchers set a preset number difference based on empirical values.

[0075] Alternatively, in this embodiment of the application, one solid-state drive can be randomly selected from n solid-state drives to be determined as the first target hard drive.

[0076] Optionally, in some embodiments, the metadata of each bucket may include a dirty data presence status, which indicates whether dirty data exists in the bucket. Before the data to be written is saved, the dirty data presence status of each target bucket is a fourth value; the fourth value indicates that no dirty data exists. After the first target hard disk is triggered to write the data to be written to the mechanical hard disk, the dirty data presence status of each bucket to be released can be modified from the fourth value to a third value; the third value indicates that dirty data exists in the bucket. Here, dirty data represents data to be written that has not yet been written to the mechanical hard disk. In this way, by modifying the dirty data presence status, it is easier for upper-layer applications to know whether the data in the bucket has been written to the mechanical hard disk, thereby facilitating the rapid release of the bucket subsequently.

[0077] In some embodiments, combined with Figure 4 As shown, Figure 4 This is a diagram illustrating the bucket distribution of a solid-state drive. For example... Figure 4 As shown, a solid-state drive (SSD) can be divided into multiple buckets based on bucket size. Furthermore, buckets are categorized into different states based on the data stored within them. For example, buckets can be divided into bucket 4 (which is usable), bucket 5 (which stores dirty data), and bucket 6 (which does not store dirty data). Moreover, when two SSDs exist, the buckets storing dirty data on both SSDs are interconnected.

[0078] Optionally, the metadata for each bucket may include usage status information, which indicates whether the bucket is in a usable state. After saving the data to be written, the usage status information of each target bucket is a first value, which indicates that the bucket is in an unusable state. When releasing the data to be written from m SSDs, m buckets located on the m SSDs can be selected from the target buckets. The usage status information of each bucket to be released is then modified from the first value to a second value, which indicates that the bucket is in a usable state. In this way, by changing the usage status information of a bucket to a usable state, data can be stored in that bucket when data that needs to be saved on the SSD is received. By modifying only the usage status information, the usable capacity of the SSD can be changed quickly and conveniently.

[0079] In some embodiments, the inused field of the metadata represents usage status information. A bucket with an inused field of 1 is a bucket that is in a usable state. A bucket with an inused field of 0 is a bucket that is in an unusable state.

[0080] Optionally, m SSDs can be selected from n SSDs as follows: Obtain the number of usable buckets on each SSD; if the difference in the number of buckets exceeds a preset threshold, select m SSDs in ascending order of the number of usable buckets. If no difference in the number of buckets exceeds the preset threshold, randomly select m SSDs. The difference in number is the absolute value of the difference between the number of usable buckets on two SSDs.

[0081] Optionally, the process of releasing the data to be written from the m solid-state drives may include: selecting the m buckets to be released from the m solid-state drives from each target bucket; sending a delete command to the solid-state drives corresponding to the m buckets to be released, triggering the solid-state drives to delete the data stored in the m buckets to be released.

[0082] In this embodiment of the application, the m buckets to be released from the m solid-state drives can be selected from the target buckets in the following way: obtain the usable capacity of each solid-state drive; determine the target buckets in the first m solid-state drives as buckets to be released in order of usable capacity from low to high.

[0083] Optionally, when the usage status information of each bucket to be released is modified from a first value to a second value, or when the solid-state drive (SSD) is triggered to delete the data stored in m buckets to be released, the replica information of each bucket to be released can also be deleted. Furthermore, for the reserved buckets in each target bucket (excluding the buckets to be released), the identifier information of each bucket to be released in the metadata of each reserved bucket can be deleted. In this way, because some of the data to be written on the SSD is released, the association relationships between the target buckets change. Therefore, after releasing the data to be written on the m SSDs, the replica information is updated. This ensures that even after releasing some of the data to be written on the SSDs, the association relationships between the target buckets on the SSD can still be accurately queried.

[0084] In some embodiments, the storage system includes three solid-state drives (SSDs): SSD F, SSD G, and SSD H. Data to be written is stored on each of the three SSDs. For example, a third target bucket is selected on SSD F, a fourth target bucket on SSD G, and a fifth target bucket on SSD H; the data to be written is then stored in the third, fourth, and fifth target buckets respectively. At this time, the metadata of the third target bucket stores the "identification information gg" of the fourth target bucket and the "identification information hh" of the fifth target bucket. The metadata of the fourth target bucket stores the "identification information ff" of the third target bucket and the "identification information hh" of the fifth target bucket. The metadata of the fifth target bucket stores the "identification information ff" of the third target bucket and the "identification information gg" of the fourth target bucket. If m equals 2, and the third and fourth target buckets are selected as buckets to be released, then the fifth target bucket is a reserved bucket. After releasing the data to be written stored in the third and fourth target buckets, delete the "identification information ff" and "identification information gg" from the metadata of the fifth target bucket. At this time, there is no replica information in the metadata of the fifth target bucket. If m equals 1, and the fourth target bucket is selected as the bucket to be released, then the third and fifth target buckets are reserved buckets. After releasing the data to be written stored in the fourth target bucket, delete the "identification information gg" from the metadata of the third target bucket, and delete the "identification information gg" from the metadata of the fifth target bucket. At this time, the metadata of the third target bucket stores "identification information hh". The metadata of the fifth target bucket stores "identification information ff".

[0085] Optionally, after saving the data to be written, the dirty data presence status of each target bucket is the third value. After releasing the data to be written from m solid-state drives, the dirty data presence status of each bucket to be released can be modified from the third value to the fourth value.

[0086] Optionally, the storage system management method may further include: sending read commands for the same target data to n solid-state drives (SSDs) to enable each SSD to search for the target data; if the target data is not found in any of the n SSDs, sending read commands for the target data to mechanical hard drives (HDDs) to retrieve the target data from the HDDs; and storing the target data in k secondary target SSDs among the n SSDs, where k is greater than or equal to 1 and less than or equal to n-1. In this way, if the target data is not found in any of the n SSDs, the target data is searched for in the HDDs and stored in m SSDs. This allows upper-layer applications to quickly read the target data from the SSDs the next time they search for it. Simultaneously, since the target data is already stored in the HDDs, even if an SSD fails, the target data can still be read from the HDDs, ensuring the reliability of the target data. Therefore, not storing the target data on all SSDs reduces wasted SSD space while ensuring fast and reliable retrieval of the target data.

[0087] In this embodiment, k second target solid-state drives (SSDs) can be determined as follows: The number of usable buckets in each of the n SSDs is obtained; the first k SSDs are selected as the second target SSDs in descending order of the number of usable buckets. This allows the target data to be stored in SSDs with more usable buckets, avoiding significant differences in available capacity among the SSDs—that is, preventing some SSDs from having a large amount of available capacity while others have a small amount.

[0088] Specifically, when k is greater than or equal to 2, the process of storing the target data in k second target solid-state drives among n solid-state drives may include: establishing the association between candidate buckets; the candidate buckets being the buckets in each solid-state drive used to store the target data; and storing the target data in each candidate bucket.

[0089] In some embodiments, the process of establishing associations between candidate buckets may include: selecting one candidate bucket from each of the k second target solid-state drives; for each candidate bucket, adding second copy information to the metadata of that candidate bucket; the second copy information includes the identification information of all candidate buckets except the selected candidate bucket. In this way, by adding second copy information, associations between candidate buckets can be easily established.

[0090] For example, consider a storage system comprising three solid-state drives (SSDs): SSD I, SSD J, and SSD K. The upper-layer application can send read commands for target data "e" to SSDs I, J, and K respectively. If the target data "e" is not stored in any of SSDs I, J, or K, the upper-layer application sends a read command for the target data "e" to the hard disk drive (HDD) and then retrieves the target data "e" from the HDD. Assume k equals 2, and the number of usable buckets in SSD I is 20, in SSD J is 25, and in SSD K is 30. Based on the order of the number of usable buckets from highest to lowest, SSDs K and J are designated as the second target SSDs. The upper-layer application selects a usable bucket from SSD K as the sixth target bucket and retrieves the identification information f of the sixth target bucket. The upper-layer application selects a usable bucket from the solid-state drive J as the seventh target bucket and obtains its identification information j. The upper-layer application then searches for the metadata h describing the sixth target bucket in memory and adds the content "identification information j" to the replica field of metadata h. Next, the upper-layer application searches for the metadata i of the seventh target bucket in memory and adds the content "identification information f" to the replica field of metadata i. Finally, the upper-layer application stores the target data "e" in both the sixth and seventh target buckets.

[0091] In some embodiments, the length of the data to be written can be an integer multiple of the number of sectors. The minimum length of the data to be written is 1 sector, or 512 bytes. The length of the target data is an integer multiple of the number of sectors. The minimum length of the target data is 1 sector.

[0092] In some embodiments, the size of the bucket in the solid-state drive (SSD) is the same as the erase size of the SSD. For example, if the erase size of the SSD is 512KB, the size of the bucket in the SSD is also 512KB.

[0093] Optionally, the storage system management method may further include: when the number of write operations on all n solid-state drives (SSDs) is less than a second preset number of write operations, releasing the used capacity of each SSD based on its available capacity. Here, available capacity represents the capacity occupied by buckets in an usable state, or, alternatively, the capacity of data that can be stored within the SSD. When available capacity represents the capacity occupied by buckets in an usable state, used capacity represents the capacity occupied by buckets in an unusable state. When available capacity represents the capacity of data that can be stored within the SSD, used capacity represents the capacity occupied by data already stored within the SSD. In this way, when the number of write operations on all n SSDs is less than the second preset number of write operations, the used capacity of the SSDs is released. This allows for the release of more SSD capacity without affecting the interaction between the SSDs and upper-layer applications, ensuring that the SSDs can store new data normally in the future.

[0094] In some embodiments, the first preset number of writes can be equal to the second preset number of writes. The second preset number of writes is also set by researchers based on the typical number of writes required when the solid-state drive is in a low-intensity state.

[0095] In some embodiments, the process of releasing the used capacity of a solid-state drive (SSD) based on the available capacity of each SSD may include: obtaining the available capacity of n SSDs; identifying SSDs with available capacity lower than a second preset capacity as SSDs to be cleaned; and releasing the used capacity of the SSDs to be cleaned based on the presence of dirty data in each bucket of the SSDs.

[0096] In some embodiments, researchers, based on experience, determine a threshold value below which the usable capacity of the solid-state drive (SSD) might affect the next time new data is written to the SSD. Therefore, a second preset capacity is set.

[0097] In some embodiments, releasing the used capacity of the hard disk to be cleaned based on the presence of dirty data in each bucket of the hard disk to be cleaned includes: identifying buckets on the hard disk to be cleaned that do not contain dirty data as buckets to be cleaned; and releasing the buckets to be cleaned based on their priority; the priority is used to characterize the frequency at which the data stored in the buckets to be cleaned is accessed.

[0098] Optionally, in the above embodiments, releasing buckets to be cleaned according to their priority can be done by releasing buckets with a priority lower than a preset priority. In this way, since buckets with lower priority are less likely to be accessed, cleaning up buckets with lower priority can improve the space utilization of the solid-state drive without affecting the user's read speed.

[0099] Alternatively, in the above embodiments, releasing the bucket to be cleaned according to its priority can also be done by releasing the buckets to be cleaned sequentially in order of priority from low to high, until the number of writes to the solid-state drive exceeds the second preset number.

[0100] In some embodiments, researchers, based on extensive experimental investigations, have determined that setting a preset priority level can balance the response speed of upper-layer applications to data while freeing up solid-state drive (SSD) capacity. This allows for the appropriate settings.

[0101] In some embodiments, the priority of a bucket can be incremented by 1 each time the data in the bucket is accessed.

[0102] In some embodiments, the storage system includes two solid-state drives (SSDs), SSD L and SSD M, as an example. If the number of write operations for both SSD L and SSD M is less than a second preset number, the usable capacity of SSD L is determined as ll. The usable capacity of SSD M is determined as mm. Assuming that the usable capacity of SSD L (ll) is higher than the second preset capacity, while the usable capacity of SSD M (mm) is lower than the second preset capacity, SSD M is identified as the drive to be cleaned. Buckets in SSD M that do not contain dirty data are identified as buckets to be cleaned. The priority of each bucket to be cleaned is obtained, and buckets with a priority lower than a preset priority are released.

[0103] In some embodiments, the metadata structure for each bucket is as follows: struct bucket_meta{bool inused; bool dirty; uint16_t priority; uint64_t replica;}. Here, the inused field represents the usage status information, the dirty field represents the presence of dirty data, the priority field represents the bucket's priority, and the replica field represents buckets storing the same data.

[0104] In some embodiments, it is assumed that two 500GB solid-state drives (SSDs) are used as cache disks. If the two SSDs are configured as a RAID 1 array, the available cache space is only 500GB. If dirty data is limited to a maximum of 40%, meaning that a maximum of 40% of the SSD's capacity is used to store dirty data, then 200GB can be used to store dirty data, and 300GB can be used to store non-dirty data. If the storage system management method of this application is adopted, if dirty data is limited to a maximum of 40%, assuming the size of the dirty data is x, then x / (x+2(500-x)) = 40%, the maximum capacity used to store dirty data is 285.7GB, and 428.6GB is used to store non-dirty data, which is 42.85% more space than the RAID 1 scheme.

[0105] Combination Figure 5 As shown, the storage system includes n solid-state drives (SSDs) and mechanical hard drives (HDDs) using the n SSDs as cache disks; n is an integer greater than or equal to 2. This application provides a storage system management device, including: an acquisition module 7, an SSD writing module 8, a hard drive determination module 9, an HDD writing module 10, and a release module 11. The acquisition module 7 is used to acquire data to be written; the SSD writing module 8 is used to store the data to be written in each of the n SSDs; the hard drive determination module 9 is used to determine a first target hard drive from the n SSDs when preset writing conditions are met; the HDD writing module 10 is used to send a write command to the first target hard drive, triggering the first target hard drive to write the data to be written into the HDD; the release module 11 is used to release the data to be written in m SSDs; m is greater than or equal to 1 and less than or equal to n-1.

[0106] The storage system management device provided in this application acquires the data to be written through an acquisition module. A solid-state drive (SSD) writing module stores the data to be written in n SSDs. A hard disk determination module determines a first target hard disk from the n SSDs when preset writing conditions are met. A hard disk (HDD) writing module sends a write command to the first target hard disk, triggering the first target hard disk to write the data to be written into the HDD. A release module releases the data to be written in m SSDs; m is greater than or equal to 1 and less than or equal to n-1. This method of writing the data to be written to multiple SSDs avoids data loss in the event of damage to some SSDs. When the data to be written is written to the HDDs, it is released in some SSDs. Since the data to be written is already stored in the HDDs, even if the SSDs storing the data fail, the data can still be retrieved from the HDDs, ensuring data reliability. Simultaneously, because the data to be written is released in some SSDs, the capacity of some SSDs can be freed up, thereby improving the space utilization of the cache disk composed of SSDs while maintaining data reliability.

[0107] Optionally, each solid-state drive (SSD) is divided into multiple buckets; the SSD writing module saves the data to be written in each of the n SSDs in the following way: establishing the association between target buckets; the target bucket is the bucket in each SSD used to store the data to be written; and saving the data to be written in each target bucket.

[0108] Optionally, the solid-state drive writing module establishes the association between target buckets in the following way: select one target bucket from each of the n solid-state drives; for each target bucket, add first copy information to the metadata of the target bucket; the first copy information includes the identification information of all target buckets except the target bucket.

[0109] Optionally, the metadata of each bucket includes usage status information, which indicates whether the bucket is in a usable state. After saving the data to be written, the usage status information of each target bucket is a first value. The first value is used to indicate that the bucket is in an unusable state. The release module releases the data to be written in the m solid-state drives in the following way: selects m buckets to be released from the m solid-state drives from each target bucket; modifies the usage status information of each bucket to be released from the first value to a second value. The second value is used to indicate that the bucket is in a usable state.

[0110] Optionally, the release module is used to: delete the first copy information of each bucket to be released after releasing the data to be written in m solid-state drives; and for each target bucket other than the bucket to be released, delete the identification information of each bucket to be released in the metadata of each reserved bucket.

[0111] Optionally, the management device of the storage system further includes a write module. The write module is used to send read commands for the same target data to n solid-state drives (SSDs) so that each SSD can search for the target data; if the target data is not found in any of the n SSDs, it sends read commands for the target data to the hard disk drive (HDD) to retrieve the target data from the HDD; and stores the target data in k second target SSDs among the n SSDs; k is greater than or equal to 1 and less than or equal to n-1.

[0112] Optionally, the write module determines the k second target solid-state drives by: obtaining the number of usable buckets in the n solid-state drives respectively; and determining the first k solid-state drives as the second target solid-state drives in descending order of the number.

[0113] Optionally, the storage system management device further includes a capacity cleanup module. The capacity cleanup module is used to release the used capacity of each solid-state drive (SSD) based on its available capacity when the number of write operations on all n SSDs is less than a second preset number of write operations.

[0114] Optionally, the capacity cleanup module releases the used capacity of the solid-state drives (SSDs) based on the available capacity of each SSD in the following way: obtain the available capacity of n SSDs; identify SSDs with available capacity lower than a second preset capacity as SSDs to be cleaned; release the used capacity of the SSDs to be cleaned based on the presence of dirty data in each bucket of the SSDs to be cleaned; the presence of dirty data is used to characterize whether there is dirty data in the bucket.

[0115] Optionally, the capacity cleanup module releases the used capacity of the hard disk to be cleaned based on the presence of dirty data in each bucket of the hard disk to be cleaned in the following ways: determining the buckets on the hard disk to be cleaned that do not contain dirty data as the buckets to be cleaned; releasing the buckets to be cleaned according to their priority; the priority is used to characterize the frequency of access to the data stored in the buckets to be cleaned.

[0116] Combination Figure 6As shown, this application embodiment provides an electronic device, including a processor 12 and a memory 13. Optionally, the device may further include a communication interface 14 and a bus 15. The processor 12, communication interface 14, and memory 13 can communicate with each other via the bus 15. The communication interface 14 can be used for information transmission. The processor 12 can call logical instructions in the memory 13 to execute the memory system management method of the above embodiment.

[0117] Furthermore, the logic instructions in the aforementioned memory 13 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0118] The memory 13, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 12 executes functional applications and data processing by running the program instructions / modules stored in the memory 13, thereby implementing the storage system management method in the above embodiments.

[0119] The memory 13 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 13 may include high-speed random access memory and may also include non-volatile memory.

[0120] This application provides a storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement the aforementioned storage system management method.

[0121] This application provides a computer program product, which includes a computer program stored on a storage medium. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform the aforementioned storage system management method.

[0122] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0123] The technical solutions of this application embodiment can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this application embodiment. The aforementioned storage medium can be a non-transitory storage medium, including: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0124] The foregoing description and accompanying drawings fully illustrate embodiments of this application to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. Without further limitation, an element defined by the phrase “comprising an…” does not exclude the presence of additional identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar parts between embodiments may be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts may be referred to the description of the method section.

[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0126] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. 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 units can be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description; sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for managing a storage system, characterized in that, The storage system includes n solid-state drives (SSDs) and mechanical hard drives (HDDs) using the n SSDs as cache disks; where n is an integer greater than or equal to 2; the method includes: Get the data to be written; The data to be written is stored in each of the n solid-state drives; If the preset write conditions are met, a first target hard disk is determined from the n solid-state drives; A write command is sent to the first target hard disk, triggering the first target hard disk to write the data to be written to the mechanical hard disk; Release the data to be written from m of the solid-state drives; where m is greater than or equal to 1 and less than or equal to n-1. Each solid-state drive (SSD) is divided into multiple buckets; the data to be written is stored in each of the n SSDs, including: Establish the association between target buckets; the target bucket is the bucket in each of the solid-state drives used to store the data to be written. The data to be written is stored in each of the target buckets.

2. The method according to claim 1, characterized in that, Establishing relationships between target buckets includes: Select a target bucket from each of the n solid-state drives; For each target bucket, first copy information is added to the metadata of that target bucket; the first copy information includes the identification information of all target buckets except that target bucket.

3. The method according to claim 2, characterized in that, The metadata of each bucket includes usage status information, which is used to characterize whether the bucket is in a usable state; after saving the data to be written, the usage status information of each target bucket is a first value; The first value is used to indicate that the bucket is in an unusable state; Releasing the data to be written from m of the solid-state drives includes: Select m buckets to be released from the m solid-state drives from each of the target buckets; The usage status information of each bucket to be released is modified from the first value to the second value; the second value is used to indicate that the bucket is in a usable state.

4. The method according to claim 3, characterized in that, After releasing the data to be written from the m solid-state drives, the process further includes: Delete the first copy information of each bucket to be released; For each of the target buckets other than the bucket to be released, delete the identifier information of the bucket to be released from the metadata of each of the reserved buckets.

5. The method according to any one of claims 1 to 4, characterized in that, The preset write conditions include at least one of the following: The number of write operations for each of the n solid-state drives is less than the first preset number of write operations; The usable capacity of the solid-state drive is less than the first preset capacity.

6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Send read commands for the same target data to n solid-state drives, so that each solid-state drive can locate the target data; If the target data is not found in any of the n solid-state drives, a read command for the target data is sent to the mechanical hard drive to obtain the target data from the mechanical hard drive; The target data is stored in k second target solid-state drives out of the n solid-state drives; where k is greater than or equal to 1 and less than or equal to n-1.

7. The method according to claim 6, characterized in that, Each solid-state drive (SSD) is divided into multiple buckets; k second target SSDs are determined using the following method: Obtain the number of usable buckets in each of the n solid-state drives; Based on the order of quantity from high to low, the first k solid-state drives are determined as the second target solid-state drives.

8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If the number of write operations to all n solid-state drives is less than the second preset number of write operations, the used capacity of each solid-state drive is released according to its usable capacity.

9. The method according to claim 8, characterized in that, Each solid-state drive (SSD) is divided into multiple buckets; the used capacity of each SSD is released based on its available capacity, including: Obtain the usable capacity of the n solid-state drives; Solid-state drives with a usable capacity lower than the second preset capacity are identified as drives to be cleaned; Based on the presence of dirty data in each bucket of the hard drive to be cleaned, the used capacity of the hard drive to be cleaned is released; the presence of dirty data is used to indicate whether there is dirty data in the bucket.

10. The method according to claim 9, characterized in that, Based on the presence of dirty data in each bucket of the hard drive to be cleaned, the used capacity of the hard drive to be cleaned is released, including: The buckets on the hard drives to be cleaned that do not contain dirty data are identified as buckets to be cleaned. Release the bucket to be cleaned according to its priority; the priority is used to characterize the frequency at which the data stored in the bucket to be cleaned is accessed.

11. A management device for a storage system, characterized in that, The storage system includes n solid-state drives (SSDs) and mechanical hard drives (HDDs) using the n SSDs as cache disks; where n is an integer greater than or equal to 2; the device includes: The acquisition module is used to acquire the data to be written. A solid-state drive writing module is used to store the data to be written in each of the n solid-state drives; The hard disk determination module is used to determine a first target hard disk from the n solid-state drives when preset write conditions are met; The mechanical hard disk writing module is used to send a write command to the first target hard disk, triggering the first target hard disk to write the data to be written to the mechanical hard disk; A release module is used to release the data to be written from m of the solid-state drives; where m is greater than or equal to 1 and less than or equal to n-1. Each solid-state drive (SSD) is divided into multiple buckets; the SSD writing module is specifically used for: establishing the association between target buckets; the target bucket is the bucket in each SSD used to store the data to be written; and storing the data to be written in each target bucket.

12. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the storage system management method according to any one of claims 1 to 10.

13. A storage medium, characterized in that, The storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the storage system management method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • SSD management method and device in mixed storage system

    CN107015763A

  • Data processing method, device and equipment and storage medium

    CN109656487A

  • Data read-write method and device based on solid state disk cache, and storage medium

    CN111538461A