Storage system
By establishing a mapping between the target logical address and the on-disk address space of the healthy port in the storage controller, and dynamically switching write operations, the data inconsistency problem under dual-port solid-state drive path failure is solved, achieving fast and seamless switching and business continuity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUGON INFORMATION IND
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-12
AI Technical Summary
In high-availability storage systems, path failure switching of dual-port solid-state drives can lead to data inconsistency and business interruption, which existing technologies cannot effectively solve.
By establishing a mapping relationship between the target logical address and the healthy port's address space in the storage controller, write operations are dynamically switched to the healthy port, ensuring data consistency and business continuity.
It enables rapid and seamless switching in fault scenarios, ensuring data accuracy and business continuity, and avoiding long-term interruptions caused by forced reset.
Smart Images

Figure CN122018795A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and more specifically to a storage system. Background Technology
[0002] In the design of high-availability storage systems, using dual-port solid-state drives to create redundant data access paths is a common solution to ensure business continuity. Such storage systems typically rely on multipath I / O management technology to achieve automatic failover in the event of path failures.
[0003] In related technologies, when the storage controller detects a timeout in an access request initiated through a certain physical port, it determines that the path is faulty and immediately resends the same access request to the solid-state drive (SSD) via another healthy physical port. Because SSDs have independent processors and complex flash memory management mechanisms, input / output requests may be suspended in the device's internal queue. If a write timeout occurs and the system directly switches paths and retryes the write, the old write requests previously suspended on the faulty port may only be executed by the SSD after the new write request is completed, resulting in newly written data being accidentally overwritten and compromising data consistency. Summary of the Invention
[0004] In view of the above problems, this application provides a storage system for fast failover of access paths of dual-port solid-state drives while ensuring data consistency.
[0005] According to a first aspect of this application, a storage system is provided, comprising: a storage controller; and at least one solid-state drive (SSD), the SSD having at least two physical ports, and the at least two physical ports having separate disk address spaces; wherein the storage controller is configured to: in response to a timeout of a write request initiated through a first physical port to a target logical address, establish a mapping relationship between the target logical address and the disk address space corresponding to a second physical port, wherein the target logical address is mapped to the disk address space corresponding to the first physical port before the write request timeout; and perform a write operation on the target logical address through the second physical port according to the mapping relationship.
[0006] The storage system provided in this application fundamentally solves the core problem of data inconsistency in multi-port storage devices under single-path write timeout failure scenarios. By dynamically switching the address mapping of the faulty port to the independent address space of the healthy port, a fast and seamless switch at the business level is achieved, ensuring data correctness and business continuity, while avoiding prolonged business interruption caused by forced reset of the faulty port.
[0007] According to an embodiment of this application, the disk address space is a logical address space, which includes a first logical address space and a second logical address space. The first logical address space is different from the second logical address space. The first physical port corresponds to the first logical address space, and the second physical port corresponds to the second logical address space. The target logical address has a mapping relationship with a first logical address in the first logical address space. The storage controller is configured to perform the following operations to establish a mapping relationship between the target logical address and the disk address space corresponding to the second physical port: allocating a second logical address for the target logical address in the second logical address space; and establishing a mapping relationship between the target logical address and the second logical address.
[0008] By partitioning and managing space at the logical address layer of SSDs, port isolation can be achieved using existing storage protocols and interfaces, reducing the implementation threshold and cost of the solution while maintaining core advantages such as data consistency and fast switching. This provides a practical implementation solution that is easy to implement and has low hardware dependence.
[0009] According to an embodiment of this application, the disk address space is a physical address space, which includes a first physical address space and a second physical address space. The first physical address space is different from the second logical address space. The first physical port corresponds to the first physical address space, and the second physical port corresponds to the second physical address space. The target logical address has a mapping relationship with the first physical address in the first physical address space. The storage controller is configured to perform the following operations to establish a mapping relationship between the target logical address and the disk address space corresponding to the second physical port: allocating a second physical address for the target logical address in the second physical address space; and establishing a mapping relationship between the target logical address and the second physical address.
[0010] By implementing hard isolation at the physical media level of the SSD and allocating an independent physical address pool to each port, any possibility of data overwriting is eliminated from the physical source, providing the highest level of data security and reliability.
[0011] According to an embodiment of this application, the storage controller is configured to perform the following operations to execute a write operation on the target logical address through the second physical port according to the mapping relationship: determining the disk target address corresponding to the target logical address based on the mapping relationship, the disk target address being located in the disk address space corresponding to the second physical port; and sending a write command to the solid-state drive through the second physical port, the write command including the disk target address and the data to be written.
[0012] By converting the mapping relationship into a write command containing the precise target address and sending it through a healthy port, the accuracy and atomicity of the write operation are guaranteed, avoiding write failures or errors caused by address resolution errors.
[0013] According to an embodiment of this application, the storage controller is further configured to: store an address mapping record, the address mapping record being used to indicate the mapping relationship between the target logical address and the disk address space corresponding to the second physical port.
[0014] By persistently storing dynamically changing address mappings, the system can accurately locate the latest physical data location corresponding to each logical address after fault switching, restart, or recovery. This is the foundation for ensuring the entire solution is traceable and recoverable.
[0015] According to an embodiment of this application, the solid-state drive is divided into metadata storage areas, each of which includes a first area and a second area; the storage controller is configured to: in the (i-1)th write request timeout state, write the address mapping record corresponding to the (i-1)th write request timeout state into the first area; in the i-th write request timeout state, write the address mapping record corresponding to the i-th write request timeout state into the second area, where i is an integer greater than 1.
[0016] By rotating writes to either the first or second region, wear and tear or damage caused by frequent writes to the same storage area is avoided, ensuring that the system always reads the latest and most valid mapping information. This improves the reliability and durability of the mapping record metadata itself.
[0017] According to an embodiment of this application, the storage controller is configured to: determine that the address mapping record is successfully saved if a write operation is successful in a metadata storage area exceeding a preset threshold; and determine that the address mapping record is successfully read if a read operation is successful in a metadata storage area exceeding a preset threshold.
[0018] It provides highly available distributed fault tolerance for critical mapping record operations, ensuring that the recording and reading of mapping information can still be carried out normally even when some storage units fail, greatly enhancing the availability of the entire storage system.
[0019] According to an embodiment of this application, the storage controller is further configured to: query the address mapping record in response to a read operation on the target logical address; determine the physical port corresponding to the target logical address and the disk target address corresponding to the physical port based on the address mapping record; and perform a read operation on the disk target address through the physical port.
[0020] It achieves consistency and closed-loop operation of the read-write link, ensuring that read operations follow the same and latest address mapping relationship as write operations, avoiding reading outdated or incorrect data, thus providing users with a strongly consistent data view, which is the key to ensuring the correctness of business logic.
[0021] According to an embodiment of this application, the storage controller is further configured to: mark the first physical port as a write request timeout state in response to a write request timeout initiated through the first physical port to the target logical address; perform a reset and / or repair operation on the first physical port, and mark the first physical port as a healthy state after the operation is successful.
[0022] The system achieves self-healing and resource reuse. Time-consuming operations such as hardware resets and link diagnostics are moved to the background for asynchronous execution, avoiding interference with foreground business performance. After successful recovery, the ports can be put back into use, restoring the system's redundant design capacity and improving the system's long-term availability and resource utilization.
[0023] According to a second aspect of this application, a storage system is provided, comprising: a storage system including: a storage controller; and at least one solid-state drive (SSD), the SSD having at least two physical ports, and the at least two physical ports having separate disk address spaces; wherein the storage controller is configured to: in response to a timeout of a write request initiated through a first physical port to a target logical address, establish a mapping relationship between the target logical address and the disk address space corresponding to a second physical port, wherein before the write request timeout, the target logical address is mapped to the disk address space corresponding to the first physical port; and perform a write operation on the target logical address through the second physical port according to the mapping relationship. Attached Figure Description
[0024] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0025] Figure 1 This diagram illustrates the I / O overwrite process in the event of a write timeout failure in related technologies.
[0026] Figure 2 This illustration schematically shows an architecture diagram of a storage system according to an embodiment of the present application;
[0027] Figure 3 This illustration schematically shows an I / O interaction flow diagram during a write timeout failure according to an embodiment of this application;
[0028] Figure 4 A schematic diagram illustrating the metadata storage area of a solid-state drive according to an embodiment of this application is shown; and
[0029] Figure 5 The flowchart illustrating fault switching and recovery under write timeout fault conditions according to an embodiment of this application is shown schematically. Detailed Implementation
[0030] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0031] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0032] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0033] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0034] Figure 1 The diagram illustrates the IO overwrite process during a write timeout failure in related technologies.
[0035] Under normal circumstances, each business process has two redundant paths for accessing each disk. If one path fails, access can be switched to the other. For example, a business can read and write to the SSD through two paths, port A and port B respectively. The advantages of having two ports are: first, redundant access is achieved through dual independent data paths, maintaining business continuity even in the event of a single link failure; second, parallel access reduces data queuing time, leading to performance improvements. When an I / O timeout occurs on a port, the return of the I / O cannot be waited for too long, otherwise it will cause interruption and unavailability of upper-layer services. Therefore, it is necessary to switch to another path. However, if a switch to another path is made hastily, there is a risk of data inconsistency. Figure 1 As shown, during the period when IO-1 was stuck, the service switched to port B and successfully retried the write, and then wrote IO-2. However, after that, IO-1, which was originally stuck on port A, recovered and wrote the content as IO-1, which caused the user's service data to be corrupted (the expected latest write IO-2 actually became IO-1).
[0036] To address the aforementioned technical problems, embodiments of this application provide a storage system, including: a storage controller; and at least one solid-state drive (SSD), the SSD having at least two physical ports, and the at least two physical ports having separate internal address spaces; wherein the storage controller is configured to: mark the first physical port as faulty in response to a timeout of an access request initiated through the first physical port to a target logical address; establish a mapping relationship between the target logical address and the internal address spaces corresponding to the second physical port; and perform an access operation for the target logical address through the second physical port according to the mapping relationship.
[0037] Figure 2 An architectural diagram of a storage system according to an embodiment of this application is illustrated.
[0038] like Figure 2 As shown, this embodiment provides a storage system applied in enterprise-level storage arrays requiring high reliability and availability. The storage system includes a storage controller 110 and at least one solid-state drive (SSD) 120 connected to the storage controller. The SSD 120 has at least two independent physical ports to provide redundant data access paths. The storage controller runs a disk service process and various business processes. The disk service process is responsible for receiving I / O requests from the business processes and driving the disk to complete read and write operations.
[0039] In one example, during the SSD initialization phase, independent, non-overlapping on-disk address spaces are pre-allocated to each physical port of the solid-state drive. Specifically, the storage controller uses management commands to divide the on-disk address space within the SSD into two independent subsets: a first address space A is bound to a first physical port A, and a second address space B is bound to a second physical port B. This partitioning achieves data storage area isolation at the physical media level.
[0040] In one example, under normal operating conditions, the storage controller maintains a dynamic address mapping table. When a business process initiates a write request for a specific logical address (LBA), the disk service process, by default, processes it through a healthy physical port, such as port 1. The storage controller maps the target logical address to a specific address in the first address space corresponding to port 1, and issues a write command to the SSD through port A to write the data to that address. It should be understood that the target logical address in this application refers to a fixed location identifier of the data to be read or written, specified by the upper-layer business process, and it exists in a contiguous logical address space from the user's or application's perspective. This address remains unchanged throughout the entire lifecycle of the business request, regardless of whether the corresponding write request experiences a single-path timeout failure, port switching, or address remapping in the underlying storage system; the business process always perceives and operates on the same "target logical address."
[0041] In one example, when a write request initiated through the first physical port to the target logical address times out, the storage controller immediately triggers a fault handling procedure. First, port A is marked as "faulty" or "write timeout fault." The controller establishes a new mapping relationship between the target logical address and the disk address space corresponding to the second physical port. That is, the controller allocates a new address for the target logical address in the disk address space corresponding to the second port and updates its internal dynamic address mapping table. After establishing the new mapping relationship, the storage controller immediately executes a write operation for the original target logical address through the second physical port according to this mapping relationship. The controller sends a write command to port B of the SSD, indicating the newly mapped address for writing. This allows write requests for business processes to be completed quickly, effectively avoiding prolonged business interruptions caused by waiting for the faulty port to recover or performing time-consuming reset operations.
[0042] Figure 3 The diagram illustrates the I / O interaction flow during a write timeout failure according to an embodiment of this application.
[0043] like Figure 3As shown, a host or service process initiates a write request to the storage controller, targeting a specific logical address (e.g., LBA-X). Upon receiving the request, the storage controller selects an available path, such as the first physical port (port A), based on a preset strategy (e.g., load balancing). According to its internally maintained initial mapping, the controller maps the target logical address (LBA-X) to a specific address (e.g., PBA_A1) within the independent disk address space corresponding to port A, and sends a write command to the SSD through port A. The command includes the address (PBA_A1) and the data to be written. After the write command is sent through port A, a timeout occurs during its execution within the SSD, failing to receive a response within the specified time. The storage controller detects this timeout failure. In response to this timeout, the storage controller immediately performs the following operation: marking the first physical port (port A) as faulty. A mapping relationship is established between the target logical address and the disk address space corresponding to the second physical port. Specifically, for the same target logical address (LBA-X), the controller internally remaps it to the disk address space corresponding to the second physical port (port B), which is independent of the space at port A, and allocates a new address (e.g., PBA_B1) within that space. Based on the newly established mapping relationship, the storage controller sends a new write command to the SSD through the second physical port (port B). This command points to the newly allocated disk address (PBA_B1) and carries the data to be written.
[0044] The write command was successfully delivered to the SSD via port B and executed, with data written to the location PBA_B1. Upon receiving the success response, the storage controller returned a successful write operation result to the host or application process.
[0045] The storage system provided in this application embodiment, when a write path through a certain physical port fails, does not directly switch paths to write to the same logical address. Instead, while keeping the target logical address unchanged, it dynamically remaps it to a physically isolated disk address space corresponding to another healthy port. This ensures both user interface stability and data consistency while achieving a safe switch of the underlying physical write location. It fundamentally solves the core problem of data inconsistency in multi-port storage devices under single-path write timeout failure scenarios, achieving rapid and seamless switching at the business level, ensuring data correctness and business continuity, and avoiding prolonged business interruptions caused by forced reset of the faulty port.
[0046] According to an embodiment of this application, the disk address space is a logical address space, which includes a first logical address space and a second logical address space. The first logical address space is different from the second logical address space. The first physical port corresponds to the first logical address space, and the second physical port corresponds to the second logical address space. The target logical address has a mapping relationship with a first logical address in the first logical address space. The storage controller is configured to perform the following operations to establish a mapping relationship between the target logical address and the disk address space corresponding to the second physical port: allocating a second logical address for the target logical address in the second logical address space; and establishing a mapping relationship between the target logical address and the second logical address.
[0047] In one example, the disk's address space can be a logical address space. This space is pre-divided into a first logical address space and a second logical address space, which are non-overlapping and statically bound to a first physical port and a second physical port, respectively. The storage controller maintains a global mapping table to manage the mapping of user logical addresses (i.e., the target logical addresses in business process requests) to these port-specific logical address spaces. Initially, for a write request to a target logical address (e.g., LBA_X), the controller maps it to a specific address (e.g., LBA_A1) in the first logical address space and writes it through port A. When a write request through port A times out, the controller immediately performs a remapping operation: it allocates a new logical address (e.g., LBA_B1) belonging to the same target logical address LBA_X in the second logical address space corresponding to the healthy second physical port, and updates the global mapping table to establish a new mapping relationship of "LBA_X→LBA_B1". Based on this new mapping relationship, the controller issues a write command to the SSD through the second physical port; the write address specified in the command is the newly allocated logical address LBA_B1. This solution implements port isolation at the SSD's general logical address layer, utilizes the SSD's internal FTL to complete the final logical address to physical address translation, is relatively simple to implement, and fundamentally avoids data written to different ports from being overwritten due to address conflicts.
[0048] According to an embodiment of this application, the disk address space is a physical address space, which includes a first physical address space and a second physical address space. The first physical address space is different from the second logical address space. The first physical port corresponds to the first physical address space, and the second physical port corresponds to the second physical address space. The target logical address has a mapping relationship with the first physical address in the first physical address space. The storage controller is configured to perform the following operations to establish a mapping relationship between the target logical address and the disk address space corresponding to the second physical port: allocating a second physical address for the target logical address in the second physical address space; and establishing a mapping relationship between the target logical address and the second physical address.
[0049] In one example, the internal address space of a solid-state drive (SSD) can also be a physical address space. This physical address space is divided into two independent subsets during SSD initialization or controller management: a first physical address space and a second physical address space, permanently allocated to the first and second physical ports. The storage controller's address mapping layer directly manages the mapping from user logical addresses to these physical addresses. When a business process requests to write to a target logical address (e.g., LBA_Y), if it does so through port A, the controller allocates a free physical block (e.g., PBA_Ax) from the first physical address space, maps it to the target logical address, and writes the data. Once the write operation times out, the controller initiates a switching process: in the second physical address space corresponding to the second physical port, it directly allocates a new physical address (e.g., PBA_By) for the same target logical address LBA_Y and establishes a mapping record of "LBA_Y→PBA_By". Then, the controller sends a write command to the SSD through port B, explicitly pointing to the physical address PBA_By. Because the physical address ranges accessible by ports A and B are completely isolated at the hardware level, even if an old write operation previously stuck inside the SSD pointing to PBA_Ax is subsequently resumed, it will have absolutely no impact on the data already written to PBA_By. This solution achieves ultimate isolation at the physical media level, providing the highest level of data security, and is especially suitable for scenarios with extremely stringent data consistency requirements.
[0050] According to an embodiment of this application, the storage controller is configured to perform the following operations to execute a write operation on the target logical address through the second physical port according to the mapping relationship: determining the disk target address corresponding to the target logical address based on the mapping relationship, the disk target address being located in the disk address space corresponding to the second physical port; and sending a write command to the solid-state drive through the second physical port, the write command including the disk target address and the data to be written.
[0051] In one example, after the storage controller establishes a mapping between the target logical address and the address space corresponding to the second physical port in response to a write request timeout, it enters the specific write operation execution phase. First, based on the newly established mapping, the controller determines the disk target address located within the address space of the second port, corresponding to the target logical address LBA_X: in the logical address space scheme, this address is the allocated second logical address (e.g., LBA_B1); in the physical address space scheme, this address is the allocated second physical address (e.g., PBA_By). Subsequently, the controller sends a specific write command to the solid-state drive through the second physical port. This write command explicitly includes the determined disk target address (LBA_B1 or PBA_By) and the business data to be written. By transforming the dynamic mapping into a single port write operation pointing to a specific target address, this step ensures that after failover, data can be accurately and atomically written to the predetermined, secure storage location, thus fully realizing a fast and reliable redirected write process.
[0052] According to an embodiment of this application, the storage controller is further configured to: store an address mapping record, the address mapping record being used to indicate the mapping relationship between the target logical address and the disk address space corresponding to the second physical port.
[0053] In one example, after successfully establishing a new mapping relationship between the target logical address (e.g., LBA_X) and the disk address space corresponding to the second physical port, the storage controller needs to persistently save this crucial information. The controller generates an address mapping record, which contains at least the following core information: the target logical address to which the switch occurred, the identifier of the valid physical port currently mapped to that address, and the specific disk target address within the address space corresponding to that port. This record is saved to a non-volatile storage medium. In a preferred embodiment, this record is stored separately from user data as metadata. This ensures that after an unexpected power outage or restart, the system can accurately reconstruct the latest data layout view after the failover by reloading these records, thereby guaranteeing the continuity and correctness of data addressing. This is the cornerstone of maintaining the recoverability of the entire dynamic mapping system.
[0054] Figure 4 A schematic diagram of a solid-state drive metadata storage area according to an embodiment of this application is shown.
[0055] According to an embodiment of this application, the solid-state drive is divided into metadata storage areas, each of which includes a first area and a second area; the storage controller is configured to: in the (i-1)th write request timeout state, write the address mapping record corresponding to the (i-1)th write request timeout state into the first area; in the i-th write request timeout state, write the address mapping record corresponding to the i-th write request timeout state into the second area, where i is an integer greater than 1.
[0056] In one example, such as Figure 4 As shown, the system allocates a portion of space from multiple hard drives, preferably an odd number of blocks, as a unified metadata storage area specifically for storing the aforementioned address mapping records. This area on each hard drive is further divided into two parts: a first area (Area A) and a second area (Area B). All Areas A on all hard drives together form a logical stripe (Stripe A), and all Areas B on all hard drives form another logical stripe (Stripe B). During writes, the system employs a rotation strategy: for example, when a write request times out and mapping is recorded for the (i-1)th time, the system chooses to write the record to Stripe A; when a failover occurs and a new mapping relationship needs to be recorded, the system switches to writing the record to Stripe B. Each write, whether to Area A or Area B, increments a global version number and records it accordingly. This A / B area rotation write mechanism effectively avoids the problem of excessively rapid media wear caused by frequent writes to the same physical area. Simultaneously, through the version number, the system can easily identify and select the latest and most valid set of mapping information during recovery.
[0057] According to an embodiment of this application, the storage controller is configured to: determine that the address mapping record is successfully saved if a write operation is successful in a metadata storage area exceeding a preset threshold; and determine that the address mapping record is successfully read if a read operation is successful in a metadata storage area exceeding a preset threshold.
[0058] In one example, when the storage controller needs to write an address mapping record, it is not required that all hard drives within the stripe must successfully complete the write operation. This embodiment sets a preset threshold, typically more than half of the total number of hard drives within the stripe. As long as the number of hard drives that successfully complete the write operation exceeds this preset threshold, the recording operation is considered successful, and the front-end services can continue. Similarly, when the system needs to read the address mapping record during startup or recovery, as long as data is successfully read from the corresponding stripe (A or B) and the number of hard drives that successfully read the data exceeds this preset threshold (usually by comparing version numbers to determine the latest valid data), the read operation is considered successful. This majority-rule-based mechanism ensures that even if a few hard drives in the set of hard drives containing the metadata storage area fail simultaneously, critical mapping record operations can still be performed successfully, thereby greatly improving the availability and robustness of the metadata management subsystem and even the entire storage system.
[0059] According to an embodiment of this application, the storage controller is further configured to: query the address mapping record in response to a read operation on the target logical address; determine the physical port corresponding to the target logical address and the disk target address corresponding to the physical port based on the address mapping record; and perform a read operation on the disk target address through the physical port.
[0060] In one example, when a business process subsequently initiates a read operation on a target logical address LBA_X, the storage controller does not directly request the data at that logical address from the hard drive. Instead, it first queries the persistently stored address mapping record. The controller searches in the metadata storage area (such as AB stripes) to find the latest version of the mapping record associated with the target logical address LBA_X. Based on this record, the controller determines the physical port currently in which LBA_X is validly mapped (e.g., the record indicates that it has switched to port B due to a historical failure) and the specific on-disk target address within the address space corresponding to that port (e.g., LBA_B1 or PBA_By). Subsequently, the controller sends a read command to the solid-state drive through the determined physical port (port B), and the read address specified in the command is the on-disk target address. Through this mechanism, the system ensures that regardless of whether a failover has occurred along the write path of the logical address, the read operation can always locate and access the last successfully written physical location, thereby guaranteeing strong data consistency, avoiding the risk of reading old versions or erroneous data, and completing a closed loop of the entire data path from dynamic mapping write to correct and consistent read.
[0061] Figure 5 The flowchart illustrating fault switching and recovery under write timeout fault conditions according to an embodiment of this application is shown schematically.
[0062] According to an embodiment of this application, the storage controller is further configured to: mark the first physical port as a write request timeout state in response to a write request timeout initiated through the first physical port to the target logical address; perform a reset and / or repair operation on the first physical port, and mark the first physical port as a healthy state after the operation is successful.
[0063] In one example, such as Figure 5 As shown, when the storage controller detects a timeout in a write request to a target logical address via the first physical port (port A) and triggers a fast switch to the second physical port (port B), the controller asynchronously initiates a recovery process for the faulty port A. First, the controller marks port A as either "write request timeout" or "faulty" in its internal state management module. This marking prevents new foreground I / O requests from being scheduled to that port. Subsequently, a background maintenance process is awakened or scheduled to execute, independent of the foreground data path handling user I / O requests. The background process performs a series of diagnostic, reset, and / or repair operations on the faulty port A, such as attempting to reset port-related links, sending specific management commands to the SSD to reset port logic, or performing deeper error detection and recovery. These operations may take some time, but because they are performed in the background, they do not affect the normal foreground service continuity that has been switched to port B. Once the background recovery operation is confirmed to have completed successfully (e.g., a successful response to a port reset command, or a subsequent I / O test passes), the background process notifies the status management module to re-mark port A as "healthy." Afterward, port A and its corresponding independent address space will be reintegrated into the controller's available resource pool, ready to serve subsequent I / O requests or serve as a redundant backup path for other ports. This mechanism achieves silent isolation and automated recovery of faulty resources, effectively maintaining the redundancy of the storage system design and the persistent availability of the overall service.
[0064] This application also provides an electronic device that includes the storage system provided in the above embodiments.
[0065] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0066] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0067] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0068] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A storage system, comprising: Storage controller; as well as At least one solid-state drive (SSD), the SSD having at least two physical ports, and the at least two physical ports having separate on-disk address spaces; The storage controller is configured as follows: In response to a timeout of a write request initiated through the first physical port to the target logical address, a mapping relationship is established between the target logical address and the disk address space corresponding to the second physical port, wherein the target logical address is mapped to the disk address space corresponding to the first physical port before the write request times out. Based on the mapping relationship, a write operation is performed on the target logical address through the second physical port.
2. The storage system according to claim 1, characterized in that, The disk address space is a logical address space, which includes a first logical address space and a second logical address space. The first logical address space is different from the second logical address space. The first physical port corresponds to the first logical address space, and the second physical port corresponds to the second logical address space. The target logical address has a mapping relationship with the first logical address of the first logical address space. The storage controller is configured to perform the following operations to establish a mapping relationship between the target logical address and the disk address space corresponding to the second physical port: Allocate a second logical address for the target logical address in the second logical address space; Establish a mapping relationship between the target logical address and the second logical address.
3. The storage system according to claim 1, characterized in that, The disk address space is a physical address space, which includes a first physical address space and a second physical address space. The first physical address space is different from the second logical address space. The first physical port corresponds to the first physical address space, and the second physical port corresponds to the second physical address space. The target logical address has a mapping relationship with the first physical address of the first physical address space. The storage controller is configured to perform the following operations to establish a mapping relationship between the target logical address and the disk address space corresponding to the second physical port: Allocate a second physical address for the target logical address in the second physical address space; Establish a mapping relationship between the target logical address and the second physical address.
4. The storage system according to claim 2 or 3, characterized in that, The storage controller is configured to perform a write operation on the target logical address via the second physical port, according to the mapping relationship: Based on the mapping relationship, the disk target address corresponding to the target logical address is determined, and the disk target address is located in the disk address space corresponding to the second physical port; A write command is sent to the solid-state drive through the second physical port. The write command includes the target address on the disk and the data to be written.
5. The storage system according to claim 1, characterized in that, The storage controller is also configured to: Save the address mapping record, which is used to indicate the mapping relationship between the target logical address and the disk address space corresponding to the second physical port.
6. The storage system according to claim 5, characterized in that, The solid-state drive is divided into metadata storage areas, and each metadata storage area includes a first area and a second area. The storage controller is configured as follows: During the (i-1)th write request timeout state, the address mapping record corresponding to the (i-1)th write request timeout state is written into the first region; In the i-th write request timeout state, the address mapping record corresponding to the i-th write request timeout state is written into the second region, where i is an integer greater than 1.
7. The storage system according to claim 6, characterized in that, The storage controller is configured as follows: If a write operation is successful in a metadata storage area that exceeds a preset threshold, the address mapping record is determined to have been successfully saved. If a read is successful in a metadata storage area that exceeds a preset threshold, the address mapping record is determined to have been successfully read.
8. The storage system according to claim 5, characterized in that, The storage controller is also configured to: In response to a read operation on the target logical address, query the address mapping record; Based on the address mapping record, determine the physical port corresponding to the target logical address and the disk target address corresponding to the physical port, and perform a read operation on the disk target address through the physical port.
9. The storage system according to claim 1, characterized in that, The storage controller is also configured to: In response to a timeout of a write request initiated through the first physical port to the target logical address, the first physical port is marked as a write request timeout state; Perform a reset and / or repair operation on the first physical port, and mark the first physical port as healthy after the operation is successful.
10. An electronic device, characterized in that, include: Storage systems, including: Storage controller; and At least one solid-state drive (SSD), the SSD having at least two physical ports, and the at least two physical ports having separate on-disk address spaces; The storage controller is configured as follows: In response to a timeout of a write request initiated through the first physical port to the target logical address, a mapping relationship is established between the target logical address and the disk address space corresponding to the second physical port, wherein the target logical address is mapped to the disk address space corresponding to the first physical port before the write request times out. Based on the mapping relationship, a write operation is performed on the target logical address through the second physical port.