Solid state drive power mode switching method and system
Patent Information
- Application Number
- CN202410084432.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-01-19
AI Technical Summary
[0003]有鉴于此,本发明提供了一种固态硬盘功耗模式切换方法及系统,以解决功耗模式切换过程中数据丢失的问题
Smart Images

Figure CN117891406B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive (SSD) storage technology, and more specifically to a method and system for switching power consumption modes in SSDs. Background Technology
[0002] Solid-state drives (SSDs) are becoming increasingly popular, and one of their key features is low power consumption, significantly lower than traditional hard disk drives (HDDs). The Non-Volatile Memory Host Controller Interface Specification (NVME) protocol defines low-power rules, allowing the host to configure the SSD's power state to enter a low-power state, or to automatically switch between low-power states via Autonomous Power State Transition (APST). However, due to the overall requirement for low power consumption, some data loss is unavoidable when an SSD switches power modes during heavy read / write operations. Summary of the Invention
[0003] In view of this, the present invention provides a method and system for switching power consumption modes of a solid-state drive to solve the problem of data loss during power consumption mode switching.
[0004] In a first aspect, the present invention provides a method for switching power consumption modes of a solid-state drive (SSD), applied to the main controller chip of the SSD. The method includes: acquiring RAID card information; determining whether the SSD belongs to a RAID card based on the RAID card information; if it belongs to a RAID card, determining whether the RAID card to which the SSD belongs has a parity disk based on the RAID card information, wherein the parity disk is used to calculate and store the parity values of the data in each SSD of the RAID card; if a parity disk exists, determining whether there are other SSDs in the RAID card to which the SSD belongs that are currently in a power consumption mode switching state based on the RAID card information; if there are no other SSDs currently in a power consumption mode switching state, performing a power consumption mode switching action to enable the SSD to enter the target power consumption mode.
[0005] In the method provided by this invention, when a solid-state drive (SSD) actively switches its power mode, it first determines whether the SSD belongs to a RAID card, and then determines whether a parity disk exists in the RAID card. Because the parity disk can back up the contents of the data disk under the RAID card, in this invention, to ensure data security, the next step is only performed if a parity disk is determined to exist under the RAID card. Furthermore, the SSD only performs a power mode switching action when it is determined that there are no other SSDs in a switching state under the RAID card to which the SSD belongs, so that the SSD enters the target power mode. In this invention, the power mode switching action is only performed after ensuring that the SSD belongs to a RAID card, that a parity disk exists in the RAID card, and that there are no other SSDs in a power mode switching state under the RAID card. By confirming the existence of a parity disk in the RAID card, redundancy protection for data is ensured during the power mode switching process. By confirming that there are no other SSDs in a mode switching state under the RAID card, data loss is avoided.
[0006] In one optional implementation, if the power mode switching action fails, the power mode switching action is repeated multiple times until the power mode switching is successful, or the number of times the power mode switching action is executed is greater than or equal to a preset value.
[0007] In one alternative implementation, if there are other solid-state drives that are in a power mode switching state, the process returns to the step of obtaining RAID card information after waiting for a preset time.
[0008] In one alternative implementation, if the solid-state drive is not part of a RAID card, or if the RAID card to which the solid-state drive belongs does not have a parity disk, the switching process is terminated.
[0009] In one optional implementation, before the step of obtaining RAID card information, the method further includes: determining a target power consumption mode; extracting the number of read / write operations per second performed by the solid-state drive; and if the number of read / write operations per second performed by the solid-state drive meets the switching conditions of the target power consumption mode, executing the step of obtaining RAID card information.
[0010] In one optional implementation, the RAID card information includes the power mode switching status of each solid-state drive (SSD) in the RAID card, as well as the current power mode of each SSD. The RAID card information is obtained through the baseboard management controller. If the SSD starts to perform a power mode switching action, the baseboard management controller marks the power mode switching status of the SSD as switching in progress. If the power mode switching action of the SSD is successfully executed, the baseboard management controller marks the power mode of the SSD as the target power mode.
[0011] Secondly, the present invention provides a solid-state drive (SSD) power mode switching method, applied to a baseboard management controller. The method includes: determining at least one target SSD with a power mode to be switched; determining whether the target SSD belongs to a RAID card based on pre-extracted RAID card information; if the target SSD does not belong to a RAID card, determining whether the RAID card to which the target SSD belongs has a parity disk, wherein the parity disk is used to calculate and store the parity values of the data in each SSD of the RAID card; if a parity disk exists, determining whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information; if there are no other SSDs currently in a power mode switching state, issuing a power mode switching command to the target SSD to cause the target SSD to perform a power mode switching action and enter the target power mode.
[0012] In one optional implementation, the RAID card information includes the power mode switching status of each solid-state drive (SSD) and the current power mode of each SSD. After the step of issuing a power mode switching command to the target SSD, the method further includes: marking the power mode switching status of the target SSD as switching in progress; if the power mode switching action of the target SSD is successfully executed, marking the power mode of the target SSD as the target power mode.
[0013] In one optional implementation, if there are multiple target solid-state drives (SSDs), and each target SSD's RAID card has a parity disk, before performing the step of determining whether there are other SSDs in the RAID card to which the target SSDs belong that are currently in a power mode switching state based on the RAID card information, the method further includes: determining whether there is a parity disk among the multiple target SSDs; if there is no parity disk among the multiple target SSDs, after performing the step of determining whether there are other SSDs in the RAID card to which the target SSDs belong that are currently in a power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the RAID card to which the target SSDs belong that are currently in a power mode switching state... The system simultaneously sends power mode switching commands to each target SSD, causing each target SSD to simultaneously perform power mode switching and enter its respective target power mode. If a parity disk exists among the multiple target SSDs, after determining whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state, the system serially sends power mode switching commands to each target SSD, causing each target SSD to sequentially perform power mode switching and enter its respective target power mode.
[0014] Thirdly, this invention provides a solid-state drive (SSD) power mode switching system, including an SSD and a baseboard management controller. The baseboard management controller acquires RAID card information in real time and sends the RAID card information to each SSD. When the SSD actively switches power modes, the SSD's main control chip acquires the RAID card information. Based on the RAID card information, it determines whether the SSD belongs to a RAID card. If it belongs to a RAID card, it determines whether the RAID card to which the SSD belongs has a parity disk. The parity disk is used to calculate and store the parity values of the data in each SSD of the RAID card. If a parity disk exists, it determines whether there are other SSDs in the RAID card to which the SSD belongs that are currently in a power mode switching state. If there are no other SSDs currently in a power mode switching state, a power mode switching action is performed to make the SSD enter the target power mode. If the SSD starts to perform the power mode switching action, the baseboard management controller marks the power mode switching status of the SSD as switching in progress. If the power mode switching action of the SSD is successfully executed, the baseboard management controller marks the power mode of the SSD as the target power mode.
[0015] In one optional implementation, during the passive power mode switching of the solid-state drive (SSD), the baseboard management controller identifies at least one target SSD to be switched to a different power mode; determines whether the target SSD belongs to a RAID card based on pre-extracted RAID card information; if the target SSD does not belong to a RAID card, determines whether the RAID card to which the target SSD belongs has a parity disk, which is used to calculate and store the parity values of the data in each SSD of the RAID card; if a parity disk exists, determines whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information; if there are no other SSDs currently in a power mode switching state, sends a power mode switching command to the target SSD; the target SSD executes the power mode switching action according to the power mode switching command and enters the target power mode.
[0016] In one optional implementation, the RAID card information includes the power mode switching status of each solid-state drive (SSD) and the current power mode of each SSD. After the baseboard management controller sends a power mode switching command to the target SSD, the baseboard management controller marks the power mode switching status of the target SSD as switching in progress. If the power mode switching action of the target SSD is successfully executed, the baseboard management controller marks the power mode of the target SSD as the target power mode.
[0017] In one optional implementation, if there are multiple target solid-state drives (SSDs), and each target SSD's RAID card has a parity disk, before the baseboard management controller performs the step of determining whether there are other SSDs in the RAID card to which the target SSDs belong, which are currently in a power mode switching state, the baseboard management controller further performs the following steps: determining whether there is a parity disk among the multiple target SSDs; if there is no parity disk among the multiple target SSDs, after performing the step of determining whether there are other SSDs in the RAID card to which the target SSDs belong, which are currently in a power mode switching state, if it is determined that none of the RAID cards to which the target SSDs belong have a parity disk currently in a power mode switching state... Other SSDs in the switching state simultaneously send power mode switching commands to each target SSD, so that each target SSD simultaneously performs power mode switching and enters its respective target power mode. If there is a parity disk among multiple target SSDs, after performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs in the power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the power mode switching state in the RAID card to which each target SSD belongs, power mode switching commands are sent serially to each target SSD, so that each target SSD sequentially performs power mode switching and enters its respective target power mode. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a solid-state drive power consumption mode switching method according to an embodiment of the present invention;
[0020] Figure 2 This is a flowchart illustrating another solid-state drive power consumption mode switching method according to an embodiment of the present invention;
[0021] Figure 3 This is a flowchart illustrating another solid-state drive power consumption mode switching method according to an embodiment of the present invention;
[0022] Figure 4 This is a structural block diagram of a solid-state drive power consumption mode switching system according to an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Solid-state drives (SSDs) are becoming increasingly popular, and one of their key features is low power consumption; compared to traditional hard disk drives (HDDs), SSDs consume significantly less power. The NVMe protocol, a non-volatile memory host controller interface specification, defines low-power rules, allowing the host to switch SSD states in two ways:
[0025] Method 1: Adjust the power state of the SSD to put it into different power consumption states. NVMe SSDs usually have five power states, from PS0 to PS4. Different power states correspond to various power consumption limits. Setting the power state of the SSD on the host side to PS3 or PS4 can put it into a low power consumption state.
[0026] Method 2: Alternatively, you can configure the SSD to automatically enter and exit low-power states by setting the Autonomous Power State Transition (APST). Due to the overall requirement for low power consumption, data loss is unavoidable when the SSD switches power modes during heavy read / write operations.
[0027] Redundant Array of Independent Disks (RAID) technology achieves redundant protection of data by mirroring or storing parity information. While RAID technology ensures low power consumption, it is particularly important in sectors such as banking and finance where data security requirements are equally high.
[0028] When solid-state drives are engaged in heavy read and write operations, the data disk and parity disk under the RAID card cannot avoid switching power consumption modes actively or passively at the same time, which inevitably leads to data loss. The fault tolerance function of the RAID card cannot be demonstrated in this scenario.
[0029] According to an embodiment of the present invention, a method for switching power consumption modes of a solid-state drive is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] This embodiment provides a method for switching power consumption modes of a solid-state drive (SSD), applied to the SSD's controller chip. Figure 1 This is a flowchart of a solid-state drive power consumption mode switching method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0031] Step S101: Obtain RAID card information.
[0032] In one optional embodiment, the RAID card information is obtained through the Baseboard Management Controller (BMC). The BMC acquires and records the RAID level of the RAID card and the corresponding solid-state drive information in real time to form RAID card information, and then sends the RAID card information to each solid-state drive. In one optional embodiment, the solid-state drive information includes the current power consumption mode of each solid-state drive and whether each solid-state drive is currently in a power consumption mode switching state.
[0033] Step S102: Determine whether the solid-state drive belongs to a RAID card based on the RAID card information.
[0034] In one optional embodiment, the RAID card information includes information about all solid-state drives (SSDs) included under the RAID card. Therefore, when an SSD needs to switch power consumption, it can determine whether it belongs to a RAID card based on the RAID card information.
[0035] If it is a RAID card, perform the following steps:
[0036] Step S103: Determine whether the RAID card to which the solid-state drive belongs has a parity disk based on the RAID card information. The parity disk is used to calculate the parity value of the data in each solid-state drive of the RAID card and store the parity value.
[0037] In one alternative embodiment, a parity disk is a hard drive used to calculate and verify the integrity of data on the data disk. It is typically used in certain RAID levels (such as RAID 5 and RAID 6) in RAID configurations to provide data redundancy and fault tolerance. The role of the parity disk is to calculate a checksum of the data using some algorithm (such as parity checking) and store it on the parity disk. If data on the data disk is corrupted or lost, the data can be recalculated and repaired using the parity disk.
[0038] In one optional embodiment, the RAID card information includes the RAID level information of the RAID card, and the presence of a parity disk under the RAID card can be determined based on the RAID level information.
[0039] For example, in RAID 1, each data disk has a corresponding mirror disk for redundant data backup, but there is no dedicated parity disk. In RAID 5, data disks and parity disks are interleaved. Specifically, RAID 5 requires at least three or more data disks, one of which stores parity information, while the others store the actual data. In RAID 6, at least four or more data disks are also required, but it uses two disks to store parity information to provide higher fault tolerance. Therefore, when the RAID card to which the SSD belongs is RAID 5 or RAID 6, it is determined that the RAID card to which the SSD belongs has a parity disk.
[0040] If a verification disk exists, perform the following steps:
[0041] Step S104: Determine whether there are other solid-state drives in the RAID card to which the solid-state drive belongs that are in a power mode switching state based on the RAID card information.
[0042] In this embodiment of the invention, if the solid-state drive that needs to switch power consumption modes is a verification drive, in order to avoid the verification drive from switching power consumption modes simultaneously with other solid-state drives, it is necessary to determine whether there are other solid-state drives in the power consumption mode switching state.
[0043] BMC acquires the status of each SSD in real time and adds the current status of each SSD to the RAID card information and sends it to each SSD. Therefore, the SSD's controller chip can determine whether there are other SSDs in the RAID card to which the SSD belongs that are in a power mode switching state based on the RAID card information.
[0044] If no other SSD is currently in power mode switching mode, perform the following steps:
[0045] Step S105: Perform a power mode switching action to put the solid-state drive into the target power mode.
[0046] In the method provided by this invention, when a solid-state drive (SSD) actively switches its power mode, it first determines whether the SSD belongs to a RAID card, and then determines whether a parity disk exists in the RAID card. Because the parity disk can back up the contents of the data disk under the RAID card, in this invention, to ensure data security, the next step is only performed if a parity disk is determined to exist under the RAID card. Furthermore, the SSD only performs a power mode switching action when it is determined that there are no other SSDs in a switching state under the RAID card to which the SSD belongs, so that the SSD enters the target power mode. In this invention, the power mode switching action is only performed after ensuring that the SSD belongs to a RAID card, that a parity disk exists in the RAID card, and that there are no other SSDs in a power mode switching state under the RAID card. By confirming the existence of a parity disk in the RAID card, redundancy protection for data is ensured during the power mode switching process. By confirming that there are no other SSDs in a mode switching state under the RAID card, data loss is avoided.
[0047] In an optional embodiment, if the power mode switching action fails when performing the above step S105, the power mode switching action is repeated multiple times until the power mode switching is successful, or the number of times the power mode switching action is performed is greater than or equal to a preset value.
[0048] For example, the preset value can be 3, that is, if the power mode switching action fails to be executed 3 times in a row, the current power mode switching will be stopped to avoid affecting the power mode switching of other solid-state drives.
[0049] In an optional embodiment, after performing the above step S102, if it is determined that the solid-state drive does not belong to the RAID card, the current switching operation is terminated and the subsequent process is not executed.
[0050] In an optional embodiment, after performing the above step S103, if it is determined that the RAID card to which the solid-state drive belongs does not have a parity disk, the current switching operation is terminated and the subsequent process is not executed.
[0051] Because when a RAID card does not have a parity disk, it means that the RAID cannot provide data redundancy protection. Since data loss may occur during the solid-state drive mode switching process, if the RAID cannot provide data redundancy protection, the lost data cannot be recovered. Therefore, in order to ensure data security, when there is no parity disk in the RAID card, the power mode switching will no longer be performed.
[0052] In an optional embodiment, after executing the above step S104, if it is determined that there are other solid-state drives under the RAID card that are in a power mode switching state, after waiting for a preset time, the above steps S101-S104 are executed again.
[0053] In an optional embodiment, before performing step S101 above, the method provided by the present invention further includes the following steps:
[0054] First, determine the target power consumption mode.
[0055] In this embodiment of the invention, the target power consumption mode is the power consumption mode that the solid-state drive is expected to switch to. The target power consumption mode is either a low power consumption mode or a high power consumption mode. If the target power consumption mode is a low power consumption mode, it means that the solid-state drive needs to switch from a high power consumption mode to a low power consumption mode. If the target power consumption mode is a high power consumption mode, it means that the solid-state drive needs to switch from a low power consumption mode to a high power consumption mode.
[0056] Then, extract the number of read and write operations performed per second by the solid-state drive.
[0057] If the number of read / write operations performed by the solid-state drive per second meets the switching conditions for the target power consumption mode, proceed to step S101.
[0058] In this embodiment of the invention, both low-power mode and high-power mode have their own corresponding switching conditions. The solid-state drive can only switch to low-power mode when the number of read and write operations per second is lower than the read and write threshold; otherwise, the solid-state drive cannot meet the performance requirements. When the number of read and write operations per second is higher than the read and write threshold, the solid-state drive switches to high-power mode to avoid resource waste.
[0059] In one optional embodiment, the RAID card information is obtained through the baseboard management controller. If the solid-state drive (SSD) begins to perform a power mode switching action, the baseboard management controller marks the SSD's power mode switching status as "switching in progress." If the SSD's power mode switching action is successfully executed, the baseboard management controller marks the SSD's power mode as the target power mode. After completing the update of the RAID card information, the baseboard management controller sends the updated RAID card information to each SSD.
[0060] This embodiment provides a method for switching the power consumption mode of a solid-state drive (SSD), which is applied to a baseboard management controller. This method enables passive switching of the power consumption mode of the SSD through the baseboard management controller. Figure 2 This is a flowchart of a solid-state drive power consumption mode switching method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0061] Step S201: Identify at least one target solid-state drive to switch power consumption modes.
[0062] Step S202: Determine whether the target SSD belongs to a RAID card based on the pre-extracted RAID card information. If the SSD is determined not to be a RAID card, the switching operation is terminated, and subsequent processes are not executed. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0063] If the target SSD is a RAID card, perform the following steps:
[0064] Step S203: Determine if a parity disk exists on the RAID card to which the target SSD belongs. The parity disk is used to calculate and store the parity values of the data in each SSD of the RAID card. If no parity disk exists, the current switching operation is terminated, and subsequent processes are not executed. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0065] If a verification disk exists, perform the following steps:
[0066] Step S204: Determine whether there are other solid-state drives (SSDs) in the RAID card to which the target SSD belongs that are currently in a power mode switching state, based on the RAID card information. If it is determined that there are other SSDs in the RAID card that are currently in a power mode switching state, wait for a preset time, and then execute steps S201-S204 again. For details, please refer to the description in the above embodiments, which will not be repeated here.
[0067] If no other SSD is currently in power mode switching mode, perform the following steps:
[0068] Step S205: Send a power mode switching command to the target solid-state drive so that the target solid-state drive performs a power mode switching action and enters the target power mode.
[0069] Since changing the power state of the target solid-state drive can change the power consumption mode of the target state, in this embodiment of the invention, sending a power consumption mode switching command to the target solid-state drive can be a command to change the target power state. If the target power consumption mode is a low power consumption mode, the power state of the solid-state drive can be set to PS3 or PS4 through the power consumption mode switching command. If the target power consumption mode is a high power consumption mode, the power state of the solid-state drive can be set to PS0 through the power consumption mode switching command.
[0070] In the method provided by this invention, when the baseboard management controller controls the solid-state drive (SSD) to switch power consumption modes, it first determines whether the target SSD belongs to a RAID card, and then determines whether a parity disk exists in the RAID card. Because the parity disk can back up the contents of the data disk under the RAID card, in this invention, to ensure data security, the next step is only performed when it is determined that a parity disk exists under the RAID card. Furthermore, the SSD only performs a power consumption mode switching action when it is determined that there are no other SSDs in a switching state under the RAID card to which the target SSD belongs, so that the SSD enters the target power consumption mode. In this invention, the power consumption mode switching action is only performed after ensuring that the target SSD belongs to a RAID card, that the RAID card has a parity disk, and that there are no other SSDs in a power consumption mode switching state under the RAID card. By confirming the existence of a parity disk under the RAID card, redundancy protection for data is ensured during the power consumption mode switching process. By confirming that there are no other SSDs in a mode switching state under the RAID card, data loss is avoided.
[0071] In an optional embodiment, the RAID card information includes the power mode switching status of each solid-state drive and the current power mode of each solid-state drive. After performing the above step S205, the method provided by this embodiment of the invention further includes the following steps:
[0072] The power mode switching status of the target SSD is marked as switching. If the power mode switching action of the target SSD is successfully executed, the power mode of the target SSD is marked as the target power mode.
[0073] In this embodiment of the invention, the baseboard management controller acquires the status of each solid-state drive in real time, ensuring that it can control the power consumption mode switching of each solid-state drive according to the actual status of each solid-state drive, thereby avoiding data loss.
[0074] In an optional embodiment, the baseboard management controller acquires the status of each solid-state drive in real time, generates RAID card information, and then sends the RAID card information to each solid-state drive so that each solid-state drive can actively switch power consumption modes in combination with the RAID card information. For details on the active power consumption mode switching, please refer to the above steps S101-S105.
[0075] This embodiment provides a method for switching the power consumption mode of a solid-state drive (SSD), which is applied to a baseboard management controller. This method enables passive switching of the power consumption mode of the SSD through the baseboard management controller. Figure 3 This is a flowchart of a solid-state drive power consumption mode switching method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0076] Step S301: Identify multiple target solid-state drives to be switched to different power consumption modes.
[0077] Step S302: Determine whether the target solid-state drive is a RAID card based on the pre-extracted RAID card information. For details, please refer to the description of step S102 in the above embodiment, which will not be repeated here.
[0078] Step S303: Determine whether the RAID card to which the target solid-state drive belongs has a parity disk. The parity disk is used to calculate and store the parity values of the data in each solid-state drive of the RAID card. For details, please refer to the description of step S103 in the above embodiment, which will not be repeated here.
[0079] If all target SSDs are RAID cards, perform the following steps:
[0080] Step S304: Determine whether a verification disk exists among the multiple target solid-state drives.
[0081] That is, determining whether a parity disk exists among the multiple target solid-state drives that require power mode switching. Step S303 above is used to determine whether a parity disk exists in the RAID card to which the target solid-state drive belongs, and step S304 is used to determine whether a parity disk exists among the multiple target solid-state drives that require power mode switching.
[0082] If a check disk is not present in any of the target SSDs, perform the following steps:
[0083] Step S305: Determine whether there are other solid-state drives (SSDs) in the RAID card to which the target SSD belongs that are currently in a power mode switching state, based on the RAID card information. For details, please refer to the description of step S104 in the above embodiment, which will not be repeated here.
[0084] If it is determined that there are no other SSDs in the RAID card to which each target SSD belongs that are currently in a power mode switching state, perform the following steps:
[0085] Step S306: Simultaneously send a power mode switching command to each target solid-state drive, so that each target solid-state drive performs a power mode switching action at the same time and enters the target power mode corresponding to each target solid-state drive.
[0086] After performing step S304 above, if it is determined that a check disk exists among the multiple target solid-state drives, perform the following steps:
[0087] Step S307: Determine whether there are other solid-state drives (SSDs) in the RAID card to which the target SSD belongs that are currently in a power mode switching state, based on the RAID card information. For details, please refer to the description of step S104 in the above embodiment, which will not be repeated here.
[0088] If it is determined that there are no other SSDs in the RAID card to which each target SSD belongs that are currently in a power mode switching state, perform the following steps:
[0089] Step S308: A power mode switching command is serially sent to each target solid-state drive so that each target solid-state drive sequentially performs a power mode switching action and enters the target power mode corresponding to each target solid-state drive.
[0090] In step S306, since there is no check disk among the multiple target solid-state drives, a power mode switching command can be sent to each target solid-state drive simultaneously. Even if data is lost during the power mode switching process of multiple target solid-state drives, the data can be recovered through the check disk.
[0091] However, in step S308, since there are parity disks in multiple target solid-state drives, if power mode switching commands are sent to each target solid-state drive at the same time, it may cause the parity disk and other data disks to switch power modes at the same time. If data loss occurs at this time, it cannot be guaranteed that the parity disk can recover the data. Therefore, it is necessary to send power mode switching commands to each target solid-state drive serially to avoid the parity disk and other data disks switching power modes at the same time, thus ensuring data security.
[0092] In an optional embodiment, if the power mode switching action fails after executing steps S306 and S308, the power mode switching action is repeated multiple times until the power mode switching is successful, or the number of times the power mode switching action is executed is greater than or equal to a preset value. For details, please refer to the description of step S104 in the above embodiment, which will not be repeated here.
[0093] This embodiment also provides a solid-state drive power consumption mode switching system, such as... Figure 4 As shown, it includes a solid-state drive and a baseboard management controller.
[0094] The baseboard management controller acquires RAID card information in real time and sends the RAID card information to each solid-state drive.
[0095] In the active power-saving mode of the solid-state drive
[0096] The SSD's controller chip obtains RAID card information; based on the RAID card information, it determines whether the SSD belongs to a RAID card; if it does, it determines whether the RAID card to which the SSD belongs has a parity disk. The parity disk is used to calculate and store the parity values of the data in each SSD of the RAID card; if a parity disk exists, it determines whether there are other SSDs in the RAID card to which the SSD belongs that are currently in a power mode switching state; if there are no other SSDs currently in a power mode switching state, it performs a power mode switching action to make the SSD enter the target power mode.
[0097] If the solid-state drive (SSD) begins to perform a power mode switching action, the baseboard management controller marks the SSD's power mode switching status as "switching in progress"; if the SSD's power mode switching action is successfully executed, the baseboard management controller marks the SSD's power mode as the target power mode.
[0098] In one optional embodiment, in the solid-state drive passively switching power consumption mode,
[0099] The baseboard management controller identifies at least one target solid-state drive (SSD) to switch power modes; it determines whether the target SSD belongs to a RAID card based on pre-extracted RAID card information; if the target SSD does not belong to a RAID card, it determines whether the RAID card to which the target SSD belongs has a parity disk, which is used to calculate and store the parity values of the data in each SSD of the RAID card; if a parity disk exists, it determines whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information; if there are no other SSDs currently in a power mode switching state, it issues a power mode switching command to the target SSD.
[0100] The target solid-state drive executes a power mode switching action according to the power mode switching command and enters the target power mode.
[0101] In one optional embodiment, the RAID card information includes the power mode switching status of each solid-state drive (SSD) and the current power mode of each SSD.
[0102] After the baseboard management controller sends a power mode switching command to the target solid-state drive, the baseboard management controller marks the power mode switching status of the target solid-state drive as switching in progress.
[0103] If the power mode switching action of the target solid-state drive is successfully executed, the baseboard management controller will mark the power mode of the target solid-state drive as the target power mode.
[0104] In an optional embodiment, if there are multiple target solid-state drives (SSDs), and each target SSD's RAID card has a parity disk, before the baseboard management controller performs the step of determining whether there are other SSDs in the RAID card to which the target SSDs belong that are currently in a power mode switching state based on the RAID card information, the baseboard management controller also performs the following steps:
[0105] Determine if a check disk exists among multiple target solid-state drives;
[0106] If there is no parity disk among multiple target SSDs, after performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs that are in a power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the RAID card to which each target SSD belongs that are in a power mode switching state, a power mode switching command is sent to each target SSD so that each target SSD performs a power mode switching action at the same time and enters the target power mode corresponding to each target SSD.
[0107] If there is a parity disk among multiple target SSDs, after performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs that are in a power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the RAID card to which each target SSD belongs that are in a power mode switching state, a power mode switching command is serially sent to each target SSD so that each target SSD performs a power mode switching action in sequence and enters the target power mode corresponding to each target SSD.
[0108] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for switching power consumption modes of a solid-state drive, characterized in that, The method, applied to a controller chip for solid-state drives, includes: Obtain RAID card information; Determine whether the solid-state drive is a RAID card based on the RAID card information; If it belongs to a RAID card, determine whether the RAID card to which the solid-state drive belongs has a parity disk based on the RAID card information. The parity disk is used to calculate the parity value of the data in each solid-state drive of the RAID card and store the parity value. If a verification disk exists, determine whether there are other solid-state drives in the RAID card to which the solid-state drive belongs that are currently in a power mode switching state, based on the RAID card information; If no other solid-state drive is currently in a power mode switching state, perform a power mode switching action to bring the solid-state drive into the target power mode.
2. The method according to claim 1, characterized in that, If the power mode switching action fails, repeat the power mode switching action multiple times until the power mode switching is successful, or the number of times the power mode switching action is executed is greater than or equal to the preset value.
3. The method according to claim 1, characterized in that, If other solid-state drives are in a power mode switching state, wait for a preset time and then return to the step of obtaining RAID card information.
4. The method according to claim 1, characterized in that, If the solid-state drive is not a RAID card, or if the RAID card to which the solid-state drive belongs does not have a parity disk, the switching process is terminated.
5. The method according to claim 1, characterized in that, Prior to the step of obtaining RAID card information, the method further includes: Determine the target power consumption mode; Extract the number of read and write operations performed per second by the solid-state drive; If the number of read / write operations performed by the solid-state drive per second meets the switching conditions of the target power consumption mode, then the step of obtaining RAID card information is executed.
6. The method according to claim 1, characterized in that, The RAID card information includes the power mode switching status of each solid-state drive in the RAID card, as well as the current power mode of each solid-state drive. The RAID card information is obtained through the baseboard management controller. If the solid-state drive (SSD) starts to perform a power mode switching action, the baseboard management controller marks the power mode switching status of the SSD as switching in progress. If the power mode switching action of the SSD is successfully executed, the baseboard management controller marks the power mode of the SSD as the target power mode.
7. A method for switching power consumption modes of a solid-state drive, characterized in that, Applied to a baseboard management controller, the method includes: Identify at least one target solid-state drive whose power mode needs to be switched; Determine whether the target solid-state drive is a RAID card based on the pre-extracted RAID card information; If the target solid-state drive belongs to a RAID card, determine whether the RAID card to which the target solid-state drive belongs has a parity disk. The parity disk is used to calculate the parity value of the data in each solid-state drive of the RAID card and store the parity value. If a verification disk exists, determine whether there are other solid-state drives in the RAID card to which the target solid-state drive belongs that are currently in a power mode switching state, based on the RAID card information; If there are no other solid-state drives (SSDs) currently in a power mode switching state, a power mode switching command is sent to the target SSD to cause it to perform a power mode switching action and enter the target power mode.
8. The method according to claim 7, characterized in that, The RAID card information includes the power mode switching status of each solid-state drive (SSD) and the current power mode of each SSD. After the step of sending a power mode switching command to the target SSD, the method further includes: The power mode switching status of the target solid-state drive is marked as switching; If the power mode switching action of the target solid-state drive is successfully executed, the power mode of the target solid-state drive is marked as the target power mode.
9. The method according to claim 7, characterized in that, If there are multiple target solid-state drives (SSDs), and each target SSD's RAID card has a parity disk, before performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information, the method further includes: Determine if a check disk exists among multiple target solid-state drives; If there is no parity disk among the multiple target solid-state drives, after performing the step of determining whether there are other solid-state drives in the RAID card to which the target solid-state drive belongs that are in a power mode switching state based on the RAID card information, if it is determined that there are no other solid-state drives in the RAID card to which each target solid-state drive belongs that are in a power mode switching state, a power mode switching command is sent to each of the target solid-state drives at the same time, so that each of the target solid-state drives performs a power mode switching action at the same time and enters the target power mode corresponding to each target solid-state drive. If a parity disk exists among multiple target solid-state drives (SSDs), after performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the RAID card to which each target SSD belongs that are currently in a power mode switching state, a power mode switching command is serially sent to each target SSD so that each target SSD sequentially performs a power mode switching action and enters the target power mode corresponding to each target SSD.
10. A solid-state drive power consumption mode switching system, characterized in that, Including solid-state drives and baseboard management controllers, The baseboard management controller acquires RAID card information in real time and sends the RAID card information to each solid-state drive. In the active power-saving mode of the solid-state drive The main controller chip of the solid-state drive (SSD) acquires RAID card information; determines whether the SSD belongs to a RAID card based on the RAID card information; if it belongs to a RAID card, determines whether the RAID card to which the SSD belongs has a parity disk based on the RAID card information, the parity disk being used to calculate the parity value of the data in each SSD of the RAID card and storing the parity value; if a parity disk exists, determines whether there are other SSDs in the RAID card to which the SSD belongs that are currently in a power mode switching state based on the RAID card information. If there are no other solid-state drives that are currently in a power mode switching state, perform a power mode switching action to make the solid-state drive enter the target power mode; If the solid-state drive (SSD) begins to perform a power mode switching action, the baseboard management controller marks the power mode switching status of the SSD as switching in progress; if the power mode switching action of the SSD is successfully executed, the baseboard management controller marks the power mode of the SSD as the target power mode.
11. The system according to claim 10, characterized in that, In the passive power-saving mode of solid-state drives The baseboard management controller identifies at least one target solid-state drive (SSD) to be switched to a power mode; it determines whether the target SSD belongs to a RAID card based on pre-extracted RAID card information; if the target SSD belongs to a RAID card, it determines whether the RAID card to which the target SSD belongs has a parity disk, the parity disk being used to calculate the parity value of the data in each SSD of the RAID card and storing the parity value; if a parity disk exists, it determines whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information. If there are no other solid-state drives that are currently in power mode switching state, a power mode switching command is sent to the target solid-state drive; The target solid-state drive executes a power mode switching action according to the power mode switching command and enters the target power mode.
12. The system according to claim 11, characterized in that, The RAID card information includes the power mode switching status of each solid-state drive (SSD) and the current power mode of each SSD. After the step of the baseboard management controller issuing a power mode switching command to the target solid-state drive, the baseboard management controller marks the power mode switching status of the target solid-state drive as switching in progress. If the power mode switching action of the target solid-state drive is successfully executed, the baseboard management controller marks the power mode of the target solid-state drive as the target power mode.
13. The system according to claim 11, characterized in that, If there are multiple target solid-state drives (SSDs), and each target SSD's RAID card has a parity disk, before performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information, the baseboard management controller also performs the following steps: Determine if a check disk exists among multiple target solid-state drives; If there is no parity disk among the multiple target solid-state drives, after performing the step of determining whether there are other solid-state drives in the RAID card to which the target solid-state drive belongs that are in a power mode switching state based on the RAID card information, if it is determined that there are no other solid-state drives in the RAID card to which each target solid-state drive belongs that are in a power mode switching state, a power mode switching command is sent to each of the target solid-state drives at the same time, so that each of the target solid-state drives performs a power mode switching action at the same time and enters the target power mode corresponding to each target solid-state drive. If a parity disk exists among multiple target solid-state drives (SSDs), after performing the step of determining whether there are other SSDs in the RAID card to which the target SSD belongs that are currently in a power mode switching state based on the RAID card information, if it is determined that there are no other SSDs in the RAID card to which each target SSD belongs that are currently in a power mode switching state, a power mode switching command is serially sent to each target SSD so that each target SSD sequentially performs a power mode switching action and enters the target power mode corresponding to each target SSD.
Citation Information
Patent Citations
Solid state disk and method for realizing redundant array of independent disks of solid state disk
CN107678690A
Data reconstruction method and apparatus applied to disk array system, and computing device
WO2021082011A1