Data writing method of raid group and related device
By performing multi-stream write operations on the data to be written and the verification data in the RAID card, the problem of RAID cards failing to effectively utilize the multi-stream characteristics of SSDs is solved, thereby improving the performance and lifespan of SSDs and achieving efficient partitioned storage and compatibility of data.
Patent Information
- Application Number
- CN202211655651.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-12-22
AI Technical Summary
Existing RAID cards fail to effectively utilize the multi-stream characteristics of SSDs when managing user data and parity data, resulting in user data and parity data being mixed together. This reduces the efficiency of flash block recycling, thereby affecting the performance and lifespan of the SSD.
By using a RAID card to perform multi-stream write operations on the data to be written and the verification data according to the RAID algorithm, and taking advantage of the multi-stream characteristics of SSDs, the data storage is partitioned to ensure that the stream ID of each SSD is marked as open after use to avoid reuse. This method is suitable for different types of SSDs (such as SAS and NVMe) and is compatible with existing protocol families.
It improves SSD performance and lifespan, enhances data writing efficiency through partitioned storage, and has good compatibility, suitable for various SSD types.
Smart Images

Figure CN116204118B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and in particular to a data writing method of a RAID group and a related device. BACKGROUND
[0002] There are various RAID levels for a RAID group, and RAID5 / RAID6 defines check data, and there is a specific check calculation relationship between user data and check data. In order to keep the user data and the check data satisfying the check relationship, the check data needs to be updated correspondingly every time the user data on any disk is modified, and therefore the life cycle of the check data is shorter than that of the user data.
[0003] The user data and the check data can be managed by a RAID card, but the current management of the user data and the check data by the RAID card cannot utilize the multi-stream feature of the SSD, which causes the user data and the check data to be mixed together, reduces the efficiency of flash block recycling, and further reduces the performance and the life of the SSD. SUMMARY
[0004] The present application provides a data writing method of a RAID group and a related device, which is beneficial to improving the performance and the life of the SSD. In a first aspect, the present application provides a data writing method of a RAID group, which is applied to a RAID card. The method comprises:
[0005] The RAID card acquires a write command for a target RAID group, and the write command carries to-be-written data. The RAID card determines a first SSD and a second SSD corresponding to the current operation from the target RAID group according to a RAID algorithm, wherein the first SSD is used to store the to-be-written data, and the second SSD is used to store check data of the to-be-written data. If the first target SSD supports multi-stream, the RAID card performs a multi-stream write operation on the first target SSD according to a first stream ID of the first target SSD and the to-be-written data; if the second target SSD supports multi-stream, the RAID card performs a multi-stream write operation on the second target SSD according to a second stream ID of the second target SSD and the check data. The first target SSD is one of the first SSDs corresponding to the current write operation, and the second target SSD is one of the second SSDs corresponding to the current write operation.
[0006] The first SSD corresponding to the current operation can be one or multiple, and the second SSD corresponding to the current operation can be one or multiple.
[0007] By performing the multi-stream write operation on the to-be-written data and the check data respectively, the partition storage is realized, which is beneficial to improving the performance and the life of the SSD.
[0008] In one possible implementation manner, the method of the present application further comprises:
[0009] After performing the multi-stream write operation on the first target SSD according to the first stream ID of the first target SSD and the data to be written, the RAID card marks the first stream ID of the first target SSD as open; or
[0010] After performing the multi-stream write operation on the second target SSD according to the second stream ID of the second target SSD and the check data, the RAID card marks the second stream ID of the second target SSD as open.
[0011] Since there can be multiple first stream IDs of the first target SSD, after performing the multi-stream write operation using one of the first stream IDs, the first stream ID is marked as open, which can avoid the situation that the first stream ID is repeatedly used and the multi-stream write operation cannot be normally performed. Similarly, since there can be multiple second stream IDs of the second target SSD, after performing the multi-stream write operation using one of the second stream IDs, the second stream ID is marked as open, which can avoid the situation that the second stream ID is repeatedly used and the multi-stream write operation cannot be normally performed.
[0012] In one possible implementation, when the first target SSD or the second target SSD is an SAS disk, the RAID card can determine whether the first target SSD or the second target SSD supports multi-stream in the following manner:
[0013] The RAID card sends an INQUIRY command to a fifth SSD, the fifth SSD being the first target SSD or the second target SSD; receives a block limits extension VPD page (Block Limits Extension VPD page) fed back by the fifth SSD in response to the INQUIRY command; if a MAXIMUM NUMBER OF STREAMS field in the Block Limits Extension VPD page indicates 0, it is determined that the fifth SSD does not support multi-stream; if the MAXIMUM NUMBER OF STREAMS field indicates a value other than 0, it is determined that the fifth SSD supports multi-stream.
[0014] The above manner of determining whether the SSD of the SAS type supports multi-stream can be compatible with the existing SCSI protocol family.
[0015] In one possible implementation, when the first target SSD or the second target SSD is an NVME disk, the RAID card can determine whether the first target SSD or the second target SSD supports multi-stream in the following manner:
[0016] The RAID card acquires an Identify Controller data structure of the fifth SSD; the fifth SSD is the first target SSD or the second target SSD; if an OACS field in the Identify Controller data structure of the fifth SSD indicates that the fifth SSD supports Directives, the RAID card determines whether the fifth SSD supports Streams Directive; if the fifth SSD supports Streams Directive, the RAID card determines that the fifth SSD supports multi-stream; if the OACS field indicates that the fifth SSD does not support Directives, or the fifth SSD does not support Streams Directive, it is determined that the fifth SSD does not support multi-stream.
[0017] In the above manner, whether the SSD of the NVME type supports multi-stream is determined, and the existing NVME protocol family can be compatible.
[0018] In a possible implementation, the method further includes:
[0019] If the first target SSD does not support multi-stream, the RAID card performs a normal write operation on the first target SSD according to the to-be-written data and the LBA; and / or, if the second target SSD does not support multi-stream, the RAID card performs a normal write operation on the second target SSD according to the check data.
[0020] In the case that the first target SSD does not support multi-stream or the second target SSD does not support multi-stream, a normal write operation can be performed on the first target SSD or on the second target SSD, and the partition storage of the to-be-written data and the check data can also be implemented, which is beneficial to improving the performance and service life of the SSD.
[0021] In a possible implementation, the method further includes:
[0022] The RAID card receives a RAID group creation instruction, the RAID group creation instruction being used to indicate the creation of a target RAID group; the RAID group creation instruction includes the identities of a plurality of third SSDs; the RAID card determines the plurality of third SSDs according to the identities of the plurality of third SSDs, the target RAID group including the plurality of third SSDs, acquires a fourth SSD from the plurality of third SSDs, the fourth SSD being an SSD supporting multi-stream among the plurality of third SSDs; and acquires a first stream ID and a second stream ID of the fourth SSD from the fourth SSD.
[0023] In a possible implementation, when the fourth SSD is a SAS disk, the RAID card acquires the first stream ID and the second stream ID of the fourth SSD from the fourth SSD, including:
[0024] sending two flow control instructions to the fourth SSD; receiving two responses respectively sent by the fourth SSD for the two flow control instructions, the two responses respectively carrying the first flow ID and the second flow ID of the fourth SSD.
[0025] In the above manner, the first flow ID and the second flow ID of the SSD of the SAS type are acquired, and the existing SCSI protocol family can be compatible.
[0026] In a possible implementation, when the fourth SSD is an NVME disk, the RAID card acquires the first flow ID and the second flow ID of the fourth SSD from the fourth SSD, including:
[0027] sending a configuration resource instruction to the fourth SSD; receiving a response sent by the fourth SSD for the configuration resource instruction, the response carrying the first flow ID and the second flow ID of the fourth SSD.
[0028] In the above manner, the first flow ID and the second flow ID of the SSD of the NVME type are acquired, and the existing NVME protocol family can be compatible.
[0029] In a second aspect, the present application provides a RAID card, including:
[0030] an acquisition unit configured to acquire a write command for a target RAID group, the write command carrying to-be-written data;
[0031] a determination unit configured to determine, according to a RAID algorithm, a first SSD and a second SSD corresponding to the present operation from the target RAID group by the RAID card, wherein the first SSD is configured to store the to-be-written data, and the second SSD is configured to store check data of the to-be-written data;
[0032] an execution unit configured to perform, by the RAID card, a multi-flow write operation on the first target SSD according to the first flow ID of the first target SSD and the to-be-written data if the first target SSD supports multi-flow, and perform a multi-flow write operation on the second target SSD according to the second flow ID of the second target SSD and the check data if the second target SSD supports multi-flow, the first target SSD being one of the first SSDs corresponding to the present write operation, and the second target SSD being one of the second SSDs corresponding to the present write operation.
[0033] In a possible implementation, the determination unit is further configured to:
[0034] after performing the multi-flow write operation on the first target SSD according to the first flow ID of the first target SSD and the to-be-written data, the RAID card marks the first flow ID of the first target SSD as an open state; or
[0035] After the multi-stream write operation is performed on the second target SSD according to the second stream ID of the second target SSD and the check data, the RAID card marks the second stream ID of the second target SSD as an open state.
[0036] In one possible implementation, the RAID card further includes a transceiver unit, and when the first target SSD or the second target SSD is a SAS disk, the RAID card can determine whether the first target SSD or the second target SSD supports multi-stream in the following manner:
[0037] The transceiver unit is configured to send an INQUIRY command to a fifth SSD, the fifth SSD being the first target SSD or the second target SSD, and receive a Block Limits Extension VPD page fed back by the fifth SSD in response to the INQUIRY command.
[0038] The determining unit is further configured to determine that the fifth SSD does not support multi-stream if a MAXIMUM NUMBER OF STREAMS field in the Block Limits Extension VPD page indicates 0, and determine that the fifth SSD supports multi-stream if the MAXIMUM NUMBER OF STREAMS field indicates a value other than 0.
[0039] In one possible implementation, when the first target SSD or the second target SSD is an NVME disk, the RAID card can determine whether the first target SSD or the second target SSD supports multi-stream in the following manner:
[0040] The obtaining unit is further configured to obtain an Identify Controller data structure of the fifth SSD, the fifth SSD being the first target SSD or the second target SSD.
[0041] The determining unit is configured to determine whether the fifth SSD supports Streams Directive if an OACS field in the Identify Controller data structure of the fifth SSD indicates that the fifth SSD supports Directives, determine that the fifth SSD supports multi-stream if the fifth SSD supports Streams Directive, and determine that the fifth SSD does not support multi-stream if the OACS field indicates that the fifth SSD does not support Directives or the fifth SSD does not support Streams Directive.
[0042] In one possible implementation, the executing unit is further configured to:
[0043] If the first target SSD does not support multi-stream, the RAID card performs a normal write operation on the first target SSD based on the data to be written and the LBA; and / or, if the second target SSD does not support multi-stream, the RAID card performs a normal write operation on the second target SSD based on the verification data.
[0044] In one possible implementation, the transceiver unit is further configured to receive a RAID group creation instruction, the RAID group creation instruction being used to instruct creation of a target RAID group; the RAID group creation instruction including identifiers of the plurality of third SSDs;
[0045] The determining unit is further configured to determine a plurality of third SSDs according to the plurality of third SSD identifiers, wherein the target RAID group includes the plurality of third SSDs;
[0046] The acquiring unit is further configured to acquire a fourth SSD from the plurality of third SSDs, where the fourth SSD is an SSD supporting multi-stream among the plurality of third SSDs;
[0047] The transceiver unit is further configured to obtain the first stream ID and the second stream ID of the fourth SSD from the fourth SSD.
[0048] In a possible implementation, when the fourth SSD is a SAS disk, in terms of obtaining the first stream ID and the second stream ID of the fourth SSD from the fourth SSD, the transceiver unit is specifically configured to:
[0049] Two flow control instructions are sent to the fourth SSD; and two responses sent by the fourth SSD for the two flow control instructions are received, where the two responses carry the first flow ID and the second flow ID of the fourth SSD respectively.
[0050] In a possible implementation, when the fourth SSD is an NVME disk, in terms of obtaining the first stream ID and the second stream ID of the fourth SSD from the fourth SSD, the transceiver unit is specifically configured to:
[0051] A resource configuration instruction is sent to the fourth SSD; and a response to the resource configuration instruction sent by the fourth SSD is received, where the response carries the first stream ID and the second stream ID of the fourth SSD.
[0052] In a third aspect, the present application provides a RAID card comprising a processor and a memory. The memory is configured to store program code. The processor is configured to invoke the program code stored in the memory to execute the method provided in the first aspect or any possible implementation of the first aspect.
[0053] In a fourth aspect, an embodiment of the present application provides a server, comprising multiple RAID groups and a RAID card as described in the second aspect or the third aspect, wherein the target RAID group is one of the multiple RAID groups.
[0054] In a fifth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device executes the method provided in the first aspect or any possible implementation manner of the first aspect.
[0055] In a sixth aspect, the present application provides a computer program product, when the computer program product is executed on a computer, the computer executes the method provided in the first aspect or any possible implementation manner of the first aspect.
[0056] It can be understood that the RAID card in the second aspect, the RAID card in the third aspect, the server in the fourth aspect, the computer storage medium in the fifth aspect and the computer program product in the sixth aspect are all used to implement the method provided in any of the first aspect. Therefore, the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0057] Figure 1a A server hardware architecture schematic diagram is provided for an embodiment of the present application;
[0058] Figure 1b A server software architecture schematic diagram is provided for an embodiment of the present application;
[0059] Figure 2 A flowchart of a data multi-stream writing method of a RAID group is provided for an embodiment of the present application;
[0060] Figure 3 A structure schematic diagram of a RAID card is provided for an embodiment of the present application;
[0061] Figure 4 A structure schematic diagram of a RAID card is provided for an embodiment of the present application;
[0062] Figure 5 A structure schematic diagram of a RAID card is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0063] The terms "first", "second", "third", and "fourth" and the like in the description and in the claims of the present application are used for distinguishing between similar objects, not necessarily described in a particular order. The terms "include", "comprise", and "have" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a list of steps or units are not necessarily limited to the listed steps or units, but can optionally include additional steps or units not expressly listed or inherent to such process, method, system, product, or device.
[0064] Reference to“an embodiment” herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase“in an embodiment” in various places in the specification are not necessarily referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood that embodiments described herein can be combined with other embodiments in each instance.
[0065] “Multiple” refers to two or more. “And / or” describes an associative relationship between associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character“ / ” generally represents that the associated objects before and after are in an“or” relationship.
[0066] Multi-stream writing technology: according to the stream ID provided by the host, data with the same or similar life cycle is written into the same block of the SSD.
[0067] The embodiments of the application are described below with reference to the accompanying drawings.
[0068] Referring to Figure 1a , Figure 1a A hardware system architecture diagram of a server is provided for the embodiments of the application. As shown in Figure 1a , the server includes a central processing unit (CPU), a RAID card, a hard disk backplane, and a plurality of SSDs.
[0069] The plurality of SSDs are connected to the hard disk backplane of the server, and are further connected to the main CPU of the server through the RAID card. The host software runs on the main CPU of the server. The plurality of SSDs include various types of hard disks, such as serial attached small computer system interface (SAS) disks, serial advanced technology attachment (SATA) disks, and non-volatile memory express (NVME) disks.
[0070] The CPU communicates with the RAID card through a PCIe bus, the RAID card communicates with the hard disk backplane through a PCIe bus or SAS, and the hard disk backplane communicates with the SSD through a PCIe bus or SAS. The host software can be a module or a process in the kernel, such as a file system or an application program. The host software can send read and write commands and management configuration commands to the RAID card to realize data reading and writing and RAID group management. The write command includes the multi-stream write command in the embodiments below, and the management configuration command includes the RAID group creation instruction, the flow control instruction, and the like in the embodiments below.
[0071] Referring to Figure 1b , Figure 1b A server software architecture schematic diagram is provided for the embodiments of the present application. As shown in Figure 1b , a plurality of applications run on the main CPU of the server, that is, a plurality of applications run on the operating system, such as APP1 and APP2. The RAID card reports to the operating system after grouping a plurality of SSDs into a RAID group, and each RAID group corresponds to an OS disk symbol. The operating system can directly operate the OS disk symbol, thereby realizing the operation of the RAID group. As shown in Figure 1b , the RAID card can assign the OS disk symbol corresponding to the RAID group to APP1 and APP2 as dev / nvme0n1 and dev / nvme1n1, respectively. It should be understood that Figure 1b the device type presented by the RAID group is NVME. If Figure 1b the device type presented by the RAID group is SCSI, the RAID card can assign the OS disk symbol corresponding to the RAID group to APP1 and APP2 as dev / sda and dev / sdb, respectively.
[0072] Referring to Figure 2 , Figure 2 A flowchart of a data writing method of a RAID group is provided for the embodiments of the present application. As shown in Figure 2 , the method comprises the following steps.
[0073] S201, the RAID card acquires a first write command.
[0074] The first write command is issued by the host. The first write command is used to instruct data writing to a target RAID group, and the first write command carries data to be written.
[0075] S202, the RAID card determines a first SSD for this operation and a second SSD for this operation from the target RAID group according to a RAID algorithm.
[0076] The first SSD is an SSD in the target RAID group for storing the data to be written, and the second SSD is an SSD in the target RAID group for storing the check data of the data to be written.
[0077] After receiving the multi-stream write command for the target RAID group, the RAID card allocates the data to be written to the SSDs of the target RAID group according to the RAID algorithm. Specifically, the RAID card determines the first SSD of the current operation according to the RAID algorithm, divides the data to be written into a plurality of first data blocks based on the number of the first SSD of the current operation, and the number of the first data blocks is the same as the number of the first SSD corresponding to the current write operation. When performing the write operation subsequently, the plurality of first data blocks are written into the first SSD corresponding to the current write operation respectively.
[0078] For the check data, the RAID card calculates the data to be written based on a plurality of different check algorithms, and can obtain a plurality of check data. The number of check data can be the same as or different from the number of the second SSD corresponding to the current write operation. When performing the write operation subsequently, the plurality of check data are written into the second SSD corresponding to the current write operation. It should be understood that one check data is written into one second SSD.
[0079] In one example, it is assumed that the target RAID group has three SSDs. After the target RAID group is formed, the RAID card divides the three SSDs into blocks according to the same depth unit (capacity) respectively. Each SSD of the same depth unit constitutes a stripe of the target RAID group, and the RAID card selects the depth unit corresponding to one disk in a stripe to store the check data. The RAID card presents to the host as a logical drive. The RAID card receives the data to be written sent by the host, and the target area for writing the data to be written is block1, block2, block3 and block4, that is, 4 blocks are needed to store the data to be written. The RAID card calculates the first SSD of the current operation according to the RAID algorithm. Specifically, the RAID card calculates which SSD and position of the SSD the block1, block2, block3 and block4 are located in according to the number of physical disks and the capacity of the depth unit. The RAID card calculates the second SSD of the current operation according to the RAID algorithm, that is, obtains which SSD corresponding to the block of the block1 to store the check data.
[0080] S203, if the first target SSD supports multi-stream, the RAID card performs a multi-stream write operation on the first target SSD according to the first stream ID of the first target SSD and the data to be written; if the second target SSD supports multi-stream, the RAID card performs a multi-stream write operation on the second target SSD according to the second stream ID of the second target SSD and the check data.
[0081] The first target SSD is one of the first SSDs in the current write operation, and the second target SSD is one of the second SSDs in the current write operation.
[0082] It should be noted that the first stream ID of the SSD supporting multi-stream in the target RAID group is used for the multi-stream write operation of the data to be written, and the second stream ID is used for the multi-stream write operation of the check data.
[0083] Specifically, the RAID card determines whether each of the first SSDs in the current operation supports multi-stream, and if the first target SSD supports multi-stream, the RAID card performs a multi-stream write operation on the first target SSD according to the first stream ID of the first target SSD and the data to be written; if the first target SSD does not support multi-stream, the RAID card performs a normal write operation on the first target SSD according to the data to be written. When writing the data to be written to the first target SSD, the first stream ID of the first target SSD is marked as an open state.
[0084] The following method can be used to determine whether the first target SSD or the second target SSD supports multi-stream:
[0085] When the fifth SSD is a SAS disk, the RAID card sends an INQUIRY command to the fifth SSD; the fifth SSD is the first target SSD or the second target SSD; receives the Block Limits Extension VPD page feedback by the fifth SSD for the INQUIRY command; if the MAXIMUM NUMBER OF STREAMS field in the Block Limits Extension VPD page indicates 0, it is determined that the fifth SSD does not support multi-stream; if the MAXIMUM NUMBER OF STREAMS field indicates other than 0, it is determined that the fifth SSD supports multi-stream. The fifth SSD is the first target SSD or the second target SSD.
[0086] Using the above method to determine whether the SSD of the SAS type supports multi-stream can be compatible with the existing SCSI protocol family.
[0087] When the fifth SSD is an NVME disk, the RAID card acquires the Identify Controller data structure of the fifth SSD; the fifth SSD is the first target SSD or the second target SSD; if the OACS field in the Identify Controller data structure of the fifth SSD indicates that the fifth SSD supports Directives, the RAID card determines whether the fifth SSD supports Streams Directive; if the fifth SSD supports Streams Directive, the RAID card determines that the fifth SSD supports multi-stream; if the OACS field indicates that the fifth SSD does not support Directives, or the fifth SSD does not support Streams Directive, it is determined that the fifth SSD does not support multi-stream. The fifth SSD is the first target SSD or the second target SSD.
[0088] In the above manner, whether the SSD of the type of NVME supports multi-stream can be determined, and the existing NVME protocol family can be compatible.
[0089] It should be understood that the RAID card performs a multi-stream write operation on the first target SSD according to the first stream ID of the first target SSD and the data to be written, specifically, the RAID card writes a first data block to the first target SSD in a multi-stream write manner according to the first stream ID of the first target SSD. The RAID card performs a normal write operation on the first target SSD according to the data to be written, specifically, a first data block is written to the first target SSD in a normal write operation. The ultimate goal is that the RAID card writes a plurality of first data blocks into a plurality of first SSDs corresponding to the current write operation.
[0090] The RAID card determines whether each of the second SSDs in the current operation supports multi-stream, and if the second target SSD supports multi-stream, the RAID card performs a multi-stream write operation on the second target SSD according to the second stream ID of the second target SSD and the check data; if the second target SSD does not support multi-stream, the RAID card performs a normal write operation on the second target SSD according to the check data. When writing the check data to the second target SSD, the second stream ID of the second target SSD is marked as an open state.
[0091] In a feasible embodiment, the RAID card also utilizes the first LBA when performing the above multi-stream write operation (including multi-stream write operation of the first data block and multi-stream write operation of the check data) and the normal write operation (including normal write operation of the first data block and normal write operation of the check data). The first LBA is calculated by the RAID card based on the RAID algorithm and the second LBA, and the second LBA is carried in the first write command.
[0092] It is pointed out here that the RAID card implements the multi-stream write operation or the normal write operation through the second write command. Among them, when the first target SSD is an NVME disk, the DTYPE field in the second write command is set to 00h, Directives not in use, when performing a normal write operation; when performing a multi-stream write operation, the DTYPE field in the second write command is set to 01h, Streams, and the stream ID is indicated in the DSPEC field; among them, when implementing the multi-stream write operation of the to-be-written data, the stream ID indicated in the DSPEC field is the first stream ID, and when implementing the multi-stream write operation of the check data, the stream ID indicated in the DSPEC field is the second stream ID.
[0093] In one possible embodiment, the method of the present application further comprises:
[0094] Creating a target RAID group. Among them, the level of the target RAID group can be 5 / 6 / 50 / 60.
[0095] Specifically, the RAID card receives a RAID group creation instruction, the RAID group creation instruction is used to instruct to create a target RAID group, the RAID group creation instruction includes a plurality of third SSD identifiers, and the RAID card determines a plurality of third SSDs according to the plurality of third SSD identifiers, wherein the target RAID group includes the plurality of third SSDs; obtaining a fourth SSD from the plurality of third SSDs, the fourth SSD is an SSD supporting multi-stream in the plurality of third SSDs; for each fourth SSD, the RAID obtains a first stream ID and a second stream ID from each fourth SSD. The first stream ID is used for the multi-stream write operation of the to-be-written data, and the second SSD is used for the multi-stream write operation of the check data.
[0096] In one example, if the SSD included in the target RAID group is an SAS disk, the specific process of the RAID card creating the target RAID group includes:
[0097] The RAID card receives a command of creating a RAID group, where the command of creating the RAID group carries an identifier of a plurality of third SSDs included in the target RAID group. The RAID card determines the plurality of third SSDs according to the identifier of the plurality of third SSDs, and determines whether each of the plurality of third SSDs supports multi-streaming. Specifically, the determination can be made by a command defined in the SAS protocol family. For example, the RAID card sends an INQUIRY command to each of the plurality of third SSDs, and receives a BlockLimits Extension VPD page fed back by each of the third SSDs, where a MAXIMUM NUMBER OF STREAMS in the BlockLimits Extension VPD page is used to indicate whether the third SSD supports multi-streaming. If the value of the MAXIMUM NUMBER OF STREAMS is 0, it indicates that the third SSD does not support multi-streaming; if the value of the MAXIMUM NUMBER OF STREAMS is not 0, it indicates that the third SSD supports multi-streaming, and the value of the MAXIMUM NUMBER OF STREAMS is the number of streams supported by the third SSD.
[0098] The RAID card determines whether each of the plurality of third SSDs supports multi-streaming; for a third SSD in the plurality of third SSDs that does not support multi-streaming, no operation is performed; for a third SSD in the plurality of third SSDs that supports multi-streaming, a flow control command carrying an open instruction is sent to the third SSD, and a response to the flow control command is received, where the first response carries a flow ID of the third SSD. Since two flow IDs are needed from the third SSD that supports multi-streaming, the RAID card needs to send the flow control command carrying the open instruction to the third SSD twice to obtain the two flow IDs, which are a first flow ID and a second flow ID. The RAID card records the relationship between the third SSD and the two flow IDs.
[0099] In another example, if the SSD included in the target RAID group is an NVME disk, the specific process of creating the target RAID group by the RAID card includes:
[0100] The RAID card receives a command of creating a RAID group, where the command of creating the RAID group carries an identifier of a plurality of third SSDs included in the target RAID group. The RAID card determines the plurality of third SSDs according to the identifier of the plurality of third SSDs, and determines whether each of the plurality of third SSDs supports multi-streaming.
[0101] The Directives can be determined according to the NVME specification. For example, the RAID card obtains the Identify Controller data structure of each of the plurality of third SSDs included in the target RAID group, and determines whether each of the plurality of third SSDs supports the Directives according to the bit5 of the OACS field in the Identify Controller data structure of each of the plurality of third SSDs. If the third SSD supports the Directives, the RAID card obtains whether the third SSD supports the Streams Directive by the ReturnParameter operation of the Identify Directive, and if the third SSD supports the Streams Directive, it indicates that the third SSD supports multi-stream. If the third SSD does not support any of the Directives and the Streams Directive, it indicates that the third SSD does not support multi-stream.
[0102] The RAID card enables the Stream Directive of the third SSD supporting multi-stream. The RAID card sends a configuration resource operation of a stream instruction to each of the third SSDs supporting multi-stream to instruct the third SSDs supporting multi-stream to feed back two stream IDs. The third SSDs supporting multi-stream feed back a response to the configuration resource operation to the RAID card, and the response carries the two stream IDs, which are a first stream ID and a second stream ID respectively. The RAID card records the relationship between the third SSD and the two stream IDs.
[0103] After the RAID card completes the above setting for the target RAID group, it also completes other conventional operations for the target RAID group, such as whether to enable cache, whether to set a dedicated cache, the size of the dedicated cache, and the like.
[0104] It can be seen that, when creating a RAID group, two stream IDs are applied to the SSD supporting multi-stream according to the capability of the SSD in the RAID group, which are respectively used for multi-stream write operation of to-be-written data and multi-stream write operation of check data, to realize partition storage, thereby improving the performance and life of the SSD.
[0105] Referring to Figure 3 , Figure 3 A structure schematic diagram of a RAID card provided by an embodiment of the present application is shown in FIG. 3. As shown in FIG. 3, the RAID card 300 includes: Figure 3
[0106] An obtaining unit 301 is configured to obtain a write command for a target RAID group, and the write command carries to-be-written data.
[0107] The determining unit 302 is configured to determine, by the RAID card, a first SSD and a second SSD corresponding to the current operation from the target RAID group according to a RAID algorithm, wherein the first SSD is configured to store the to-be-written data, and the second SSD is configured to store the check data of the to-be-written data.
[0108] The executing unit 303 is configured to perform, by the RAID card, a multi-stream write operation on the first target SSD according to a first stream ID of the first target SSD and the to-be-written data if the first target SSD supports the multi-stream, and perform a multi-stream write operation on the second target SSD according to a second stream ID of the second target SSD and the check data if the second target SSD supports the multi-stream, the first target SSD being one of the first SSDs corresponding to the current write operation, and the second target SSD being one of the second SSDs corresponding to the current write operation.
[0109] In one possible implementation, the determining unit 302 is further configured to:
[0110] After performing the multi-stream write operation on the first target SSD according to the first stream ID of the first target SSD and the to-be-written data, the RAID card marks the first stream ID of the first target SSD as an open state; or
[0111] After performing the multi-stream write operation on the second target SSD according to the second stream ID of the second target SSD and the check data, the RAID card marks the second stream ID of the second target SSD as an open state.
[0112] In one possible implementation, the RAID card 300 further includes a transceiving unit 304, which is configured to determine whether the first target SSD or the second target SSD supports the multi-stream in the following manner when the first target SSD or the second target SSD is a SAS disk:
[0113] The transceiving unit 304 is configured to send an INQUIRY command to a fifth SSD, the fifth SSD being the first target SSD or the second target SSD, and receive a Block Limits Extension VPD page fed back by the fifth SSD in response to the INQUIRY command.
[0114] The determining unit 302 is further configured to determine that the fifth SSD does not support the multi-stream if a MAXIMUM NUMBER OF STREAMS field in the Block Limits Extension VPD page indicates 0, and determine that the fifth SSD supports the multi-stream if the MAXIMUM NUMBER OF STREAMS field indicates a value other than 0.
[0115] In a possible implementation, when the first target SSD or the second target SSD is an NVME disk, the RAID card can determine whether the first target SSD or the second target SSD supports multi-stream in the following manner:
[0116] The obtaining unit 301 is further configured to obtain an Identify Controller data structure of the fifth SSD, the fifth SSD being the first target SSD or the second target SSD;
[0117] The determining unit 302 is configured to determine whether the fifth SSD supports a Streams Directive if an OACS field in the Identify Controller data structure of the fifth SSD indicates that the fifth SSD supports Directives; if the fifth SSD supports the Streams Directive, the RAID card determines that the fifth SSD supports multi-stream; if the OACS field indicates that the fifth SSD does not support Directives, or the fifth SSD does not support the Streams Directive, it is determined that the fifth SSD does not support multi-stream.
[0118] In a possible implementation, the executing unit 303 is further configured to:
[0119] If the first target SSD does not support multi-stream, the RAID card performs a normal write operation on the first target SSD according to the data to be written and the LBA; and / or, if the second target SSD does not support multi-stream, the RAID card performs a normal write operation on the second target SSD according to the check data.
[0120] In a possible implementation, the transceiver unit 304 is further configured to receive a RAID group creation instruction, the RAID group creation instruction being used to instruct to create a target RAID group; the RAID group creation instruction comprises the identities of a plurality of third SSDs;
[0121] The determining unit 302 is further configured to determine the plurality of third SSDs according to the plurality of third SSD identities, the target RAID group comprising the plurality of third SSDs;
[0122] The obtaining unit 301 is further configured to obtain a fourth SSD from the plurality of third SSDs, the fourth SSD being an SSD supporting multi-stream in the plurality of third SSDs;
[0123] The transceiver unit 304 is further configured to obtain a first stream ID and a second stream ID of the fourth SSD from the fourth SSD.
[0124] In a possible implementation, when the fourth SSD is a SAS disk, in the aspect of obtaining the first stream ID and the second stream ID of the fourth SSD from the fourth SSD, the transceiving unit 304 is specifically configured to:
[0125] send two stream control instructions to the fourth SSD; and receive two responses sent by the fourth SSD respectively for the two stream control instructions, where the two responses respectively carry the first stream ID and the second stream ID of the fourth SSD.
[0126] In a possible implementation, when the fourth SSD is a NVME disk, in the aspect of obtaining the first stream ID and the second stream ID of the fourth SSD from the fourth SSD, the transceiving unit 304 is specifically configured to:
[0127] send a configuration resource instruction to the fourth SSD; and receive a response sent by the fourth SSD for the configuration resource instruction, where the response carries the first stream ID and the second stream ID of the fourth SSD.
[0128] It is worth noting that, the specific function implementation of the RAID card 300 can refer to the description of the data multi-stream writing method of the RAID group as shown in the above Figure 2 , such as the obtaining unit 301 is configured to perform the related content of S201, the determining unit 302 is configured to perform the related content of S202, and the obtaining unit 301, the determining unit 302, the executing unit 303 and the transceiving unit 304 are configured to perform the related content of S203, which will not be repeated here. The units or modules in the RAID card 300 can be combined into one or several other units or modules respectively or all, or some of the units or modules can be further split into a plurality of units or modules with smaller functions to constitute, which can realize the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units or modules are divided based on logical functions, and the function of one unit (or module) can also be realized by a plurality of units (or modules) in actual application, or the functions of a plurality of units (or modules) are realized by one unit (or module).
[0129] Referring to Figure 4 , Figure 4 Another server architecture schematic diagram provided by the embodiments of the present application. As shown in Figure 4 , the server includes a host 401, a RAID card 402 and a plurality of SSDs 403. Among them, the RAID driver in the host is configured to realize the interaction between the RAID card and the OS kernel and the BISO, receive the commands of the OS kernel and the BISO, and feed back the corresponding responses.
[0130] The RAID card 402 comprises a front-end processing module 4021, a RAID algorithm module 4022, a configuration management module 4023, and a back-end processing module 4024.
[0131] The front-end processing module 4021 receives the service read-write commands and the configuration management commands sent from the host 401, and distributes them to the RAID algorithm module 4022 and the configuration management module 4023.
[0132] The RAID algorithm module 4022 is used to process the read-write commands for the RAID group, including normal read-write and degraded read-write. After receiving the read-write commands for the RAID group forwarded by the front-end processing module 4021, the RAID algorithm module 4022 splits the received read-write commands into read-write commands for specific physical hard disks (such as SSDs) according to the RAID algorithm, and then distributes the read-write commands to the back-end processing module 4024. For example, the write command for the RAID group can include Figure 2 The write command for the specific physical hard disk in the embodiment shown in the figure includes, for example Figure 2 The instructions for implementing the multi-stream write operation or the normal write operation on the target SSD in the embodiment shown in the figure. According to the RAID group configuration and the service scenario, the RAID algorithm module 4022 may interact with the memory of the RAID card when processing the read-write commands, such as using the memory as a read-write cache, or writing a write log into the memory. The RAID algorithm module 4022 will also receive information from the configuration management module 4023, such as RAID group state changes, hard disk upgrade operations, and the like.
[0133] The configuration management module 4023 is used to process the creation, deletion, reconstruction, and hard disk management of the RAID group, and the like. When the front-end processing module 4021 receives the hard disk firmware upgrade command, it forwards it to the configuration management module 4023, which notifies the RAID algorithm module 4022 to make corresponding processing, and at the same time encapsulates and sends the hard disk firmware upgrade command to the back-end processing module 4024.
[0134] The configuration management command includes Figure 2 The RAID group creation instruction, the flow control instruction for applying a flow, or the configuration resource instruction in the embodiment shown in the figure.
[0135] The back-end processing module 4024 receives the commands from the RAID algorithm module 4022 and the configuration management module 4023, and assembles corresponding protocol instructions according to the type of hard disk, such as Figure 2 The flow control instruction, the configuration resource instruction, the inquiry command, and the like in the embodiment shown in the figure, which realize the interaction with each hard disk (such as an SSD).
[0136] It should be noted that the specific functions and advantages of the front-end processing module 4021, the RAID algorithm module 4022, the configuration management module 4023 and the back-end processing module 4024 can be seen from the related description of the embodiment shown in the foregoing method embodiment and the RAID card embodiment. Figure 2 The related description of the embodiment shown in the foregoing method embodiment and the RAID card embodiment will not be described herein.
[0137] Based on the description of the method embodiment and the RAID card embodiment, please refer to Figure 5 The embodiment of the application further provides a structural diagram of a RAID card 500. Figure 5 The RAID card 500 shown in the figure (which can be a computer device in particular) comprises a memory 501, a processor 502, a communication interface 503 and a bus 504. The memory 501, the processor 502 and the communication interface 503 are communicatively connected to each other through the bus 504.
[0138] The memory 501 can be a ROM, a static storage device, a dynamic storage device or a RAM.
[0139] The memory 501 can store a program, and when the program stored in the memory 501 is executed by the processor 502, the processor 502 and the communication interface 503 are used to execute each step of the RAID group data writing method of the embodiment of the application.
[0140] The processor 502 can adopt a general-purpose CPU, a microprocessor, an ASIC, a GPU or one or more integrated circuits, and is used to execute a related program to implement the functions required to be executed by the units in the RAID card 500 of the embodiment of the application or to execute the RAID group data writing method of the method embodiment of the application.
[0141] Processor 502 may also be an integrated circuit chip with signal processing capabilities. During implementation, each step of the data writing method for a RAID group of the present application may be completed by hardware integrated logic circuits or software instructions within processor 502. The aforementioned processor 502 may also be a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It may implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application may be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software module may be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in memory 501. Processor 502 reads information from memory 501 and, in conjunction with its hardware, performs the functions required by the units included in the network risk association assessment device of the embodiments of the present application, or executes the data writing method for a RAID group of the method embodiments of the present application.
[0142] The communication interface 503 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the RAID card 500 and other devices or a communication network. For example, data can be obtained through the communication interface 503 .
[0143] The bus 504 may include a path for transmitting information between various components of the RAID card 500 (eg, the memory 501 , the processor 502 , and the communication interface 503 ).
[0144] It should be noted that although Figure 5 The RAID card 500 shown only shows the memory, processor, and communication interface. However, in the specific implementation process, those skilled in the art should understand that the RAID card 500 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the RAID card 500 may also include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the RAID card 500 may also include only the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 5 All devices shown in .
[0145] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the data writing method of the RAID group.
[0146] Optionally, as an implementation manner, the chip further comprises a memory, and the memory stores instructions, and the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to execute the data writing method of the RAID group.
[0147] The embodiment of the present application further provides a computer readable storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in any one of the above methods.
[0148] The embodiment of the present application further provides a computer program product comprising instructions, and when the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any one of the above methods.
[0149] Those skilled in the art will appreciate that the functions described with reference to the various illustrative logical blocks, modules, and algorithm steps described in this specification can be implemented as hardware, software, firmware, or any combination thereof. If implemented in software, the functions described with reference to the various illustrative logical blocks, modules, and steps described in this specification can be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of the computer program from one place to another, e.g., according to a communication protocol. In this manner, computer-readable media generally can correspond to (1) tangible computer- readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this specification. A computer program product can include a computer-readable medium.
[0150] By way of example, and not limitation, such computer-readable storage media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code means in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are instead directed to non-transient, tangible storage media. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0151] Instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor," as used herein can refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein as being performed by various illustrative logical blocks, modules, and steps can be implemented in hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques can be embodied in a
[0152] The techniques of this disclosure can be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs (e.g., a chip set). Various components, modules, or units described herein can be implemented as hardware, software, firmware or any combination thereof. Hardware implementations can include processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), secure digital (SD) cards, or any other hardware. Software implementations can include routines executed using one or more processors. Software drivers can include firmware, firmware drivers, software drivers, or any combination thereof. Firmware can include flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or any other hardware.
[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific description of the corresponding step processes in the foregoing method embodiments, which will not be repeated here.
[0154] It should be understood that, in the description of the present application, unless otherwise specified, " / " represents that the objects before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A, B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same function and role are distinguished by using "first", "second" and the like. Those skilled in the art can understand that "first", "second" and the like do not limit the quantity and execution order, and "first", "second" and the like do not necessarily mean different. At the same time, in the embodiments of the present application, "exemplary" or "for example" means to present relevant concepts in a specific way for understanding.
[0155] In several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented by other means. For example, the division of the unit is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0156] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0157] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available medium can be ROM, or random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.
[0158] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any change or replacement within the technical scope disclosed by the embodiments of the present application should be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.
Claims
1. A method of writing data to a RAID group, the method comprising: The method comprises: acquiring a write command for a target RAID group, the write command carrying to-be-written data; determining a first SSD and a second SSD corresponding to the current write operation from the target RAID group according to a RAID algorithm, wherein the first SSD is used to store the to-be-written data, and the second SSD is used to store check data of the to-be-written data; if the first target SSD supports multi-stream, performing a multi-stream write operation on the first target SSD according to a first stream ID of the first target SSD and the to-be-written data; if the second target SSD supports multi-stream, performing a multi-stream write operation on the second target SSD according to a second stream ID of the second target SSD and the check data, the first target SSD being one of the first SSDs corresponding to the current write operation, and the second target SSD being one of the second SSDs corresponding to the current write operation.
2. The method of claim 1, wherein, The method further comprises: after performing the multi-stream write operation on the first target SSD according to the first stream ID of the first target SSD and the to-be-written data, marking the first stream ID of the first target SSD as an open state; or after performing the multi-stream write operation on the second target SSD according to the second stream ID of the second target SSD and the check data, marking the second stream ID of the second target SSD as an open state.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: if the first target SSD does not support multi-stream, performing a normal write operation on the first target SSD according to the to-be-written data; and / or if the second target SSD does not support multi-stream, performing a normal write operation on the second target SSD according to the check data.
4. The method of claim 3, wherein, The method further comprises: receiving a RAID group creation instruction, the RAID group creation instruction being used to instruct to create the target RAID group; the RAID group creation instruction comprising identifications of a plurality of third SSDs; determining a plurality of third SSDs according to the plurality of third SSD identifications, the target RAID group comprising the plurality of third SSDs, acquiring a fourth SSD from the plurality of third SSDs, the fourth SSD being an SSD supporting multi-stream among the plurality of third SSDs; acquiring a first stream ID and a second stream ID of the fourth SSD from the fourth SSD.
5. The method of claim 4, wherein, When the fourth SSD is a SAS disk, the acquiring of the first stream ID and the second stream ID of the fourth SSD from the fourth SSD comprises: sending two stream control instructions to the fourth SSD; receiving two responses respectively sent by the fourth SSD for the two stream control instructions, the two responses respectively carrying the first stream ID and the second stream ID of the fourth SSD.
6. The method of claim 4, wherein, When the fourth SSD is an NVME disk, the acquiring of the first stream ID and the second stream ID of the fourth SSD from the fourth SSD comprises: sending a configuration resource instruction to the fourth SSD; receiving a response sent by the fourth SSD for the configuration resource instruction, the response carrying the first stream ID and the second stream ID of the fourth SSD.
7. The method of claim 6, wherein, The method further comprises: if the fifth SSD is a SAS disk, sending an INQUIRY command to the fifth SSD; the fifth SSD is the first target SSD or the second target SSD; receiving a block limits extended VPD page fed back by the fifth SSD for the INQUIRY command; if a maximum stream number field in the block limits extended VPD page indicates 0, determining that the fifth SSD does not support multi-stream; if the maximum stream number field indicates not 0, determining that the fifth SSD supports multi-stream.
8. The method of claim 6, wherein, The method further comprises: if the fifth SSD is a NVME disk, obtaining an Identify Controller data structure of the fifth SSD; the fifth SSD is the first target SSD or the second target SSD; if an OACS field in the Identify Controller data structure of the fifth SSD indicates that the fifth SSD supports Directives, determining whether the fifth SSD supports Streams Directive; if the fifth SSD supports Streams Directive, determining that the fifth SSD supports multi-stream; if the OACS field indicates that the fifth SSD does not support Directives, or the fifth SSD does not support Streams Directive, determining that the fifth SSD does not support multi-stream.
9. A RAID card, characterized by The RAID card comprises a processor and a memory, the memory is used for storing program code, and the processor is used for calling the program code stored in the memory to execute the method in any one of claims 1-8.
10. A server, characterized by The RAID card comprises a plurality of RAID groups and the target RAID group is one of the plurality of RAID groups.
Citation Information
Patent Citations
Data reading and writing method and device and electronic device
CN110196687A
Multi-stream memory system and method of processing input stream in multi-stream memory system
CN114518842A