# US 12,222,808 B2 · System fault handling method and apparatus, device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,222,808 B2
- Document ID: US12222808B2
- Status: Granted
- Kind: B2
- Application number: 18/700,774
- Filed: 2022-06-15
- Published: 2024-10-10
- Granted: 2025-02-11
- Earliest claimed: 2021-12-27
- Assignees: Suzhou Metabrain Intelligent Technology Co., Ltd.
- Applicants: Suzhou Metabrain Intelligent Technology Co., Ltd.
- Inventors: Zhonghui Di; Dan Liu
- Web page: https://patentgrep.com/patent/US12222808B2

## CPC

- G06F 11/1076: {Parity data used in redundant arrays of independent storages, e.g. in RAID systems}
- G06F 11/0727: {in a storage system, e.g. in a DASD or network based storage system (drivers for digital recording or reproducing units G06F3/06; circuits for error detection or correction within digital recording or reproducing units G11B20/18; for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS], H04L67/1097)}
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 11/2094: {Redundant storage or storage space (G06F11/2056 takes precedence)}
- G06F 11/2097: {maintaining the standby controller/processing unit updated (initialisation or re-synchronisation thereof G06F11/1658 and subgroups)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present application discloses a system fault handling method and apparatus, a device, and a storage medium. The method includes: dividing disks in RAID based on the number of stripes, then configuring multi-state standby blocks for the stripes, and distributing the multi-state standby blocks on the disks in the RAID, so as to enable the disks to use the multi-state standby blocks to run at the same time to handle faults when the faults occur at the same time; acquiring fault information factors corresponding to fault blocks after faults occur on the blocks, and then storing the fault information factors in stripe block state mapping items in a stripe block state mapping linked list; and selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform corresponding operations on the fault blocks corresponding to the stripe block state mapping items.

## Claims

### Claim 1

A system fault handling method, applied to a redundant array of independent disks (RAID), comprising:
dividing disks in the RAID based on a number of stripes, to enable blocks with a same number as the disks to exist on each stripe, then configuring multi-state standby blocks for the stripes, and distributing the multi-state standby blocks on the disks in the RAID, so as to enable the disks to use the multi-state standby blocks to run at a same time to handle faults when the faults occur at the same time;
acquiring fault information factors corresponding to fault blocks after the faults occur on the blocks, and then storing the fault information factors in stripe block state mapping items in a stripe block state mapping linked list; and
selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies; wherein before the selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies, the method further comprises:
setting a timing program for the stripe block state mapping linked list, so as to perform the corresponding fault handling operations on the stripe block state mapping items according to a preset time period.

### Claim 2 (depends on 1)

The system fault handling method according to claim 1, wherein the dividing disks in the RAID based on a number of stripes, to enable blocks with a same number as the disks to exist on each stripe, then configuring multi-state standby blocks for the stripes comprises:
dividing the disks in the RAID based on the number of stripes, to enable the blocks with the same number as the disks to exist on each stripe; and
configuring the blocks with a preset number as the multi-state standby blocks.

### Claim 3 (depends on 1)

The system fault handling method according to claim 1, wherein the distributing the multi-state standby blocks on the disks in the RAID, so as to enable the disks to use the multi-state standby blocks to run at a same time to handle faults when the faults occur at the same time comprises:
acquiring a current stripe serial number and a number of the disks in the RAID firstly, wherein a stripe serial number is an incrementing first serial number set for the stripes according to a first preset order;
determining position information of a current multi-state standby block based on the current stripe serial number and the number of the disks and according to a preset position computing rule; and
distributing the multi-state standby blocks on the disks in the RAID, so as to enable the disks to use the multi-state standby blocks to run at the same time to handle the faults when the faults occur at the same time.

### Claim 4 (depends on 3)

The system fault handling method according to claim 3, wherein the preset position computing rule is a remainder of the stripe serial number divided by the number of the disks.

### Claim 5 (depends on 3)

The system fault handling method according to claim 3, wherein the acquiring fault information factors corresponding to fault blocks after the faults occur on the blocks, and then storing the fault information factors in stripe block state mapping items in a stripe block state mapping linked list comprises:
acquiring stripe serial numbers, position serial numbers, error types, input/output (IO) types, and IO data information corresponding to the fault blocks after the faults occur on the blocks, wherein each position serial number of the position serial numbers is a second serial number set for each block of the blocks according to a second preset order; and
storing the stripe serial numbers, the position serial numbers, the error types, the IO types, and the IO data information in the stripe block state mapping items in the stripe block state mapping linked list according to a preset storage rule.

### Claim 6 (depends on 5)

The system fault handling method according to claim 5, wherein each of the position serial numbers is a number of the disks on which one of the fault blocks is located.

### Claim 7 (depends on 5)

The system fault handling method according to claim 5, wherein the IO data information is configured for recording an initial address and a data length.

### Claim 8 (depends on 5)

The system fault handling method according to claim 5, wherein the error types comprise a timeout error type, a bad block error type and an offline error type.

### Claim 9 (depends on 5)

The system fault handling method according to claim 5, wherein the IO types are configured for recording whether an IO is a read IO type or a write IO type.

### Claim 10 (depends on 5)

The system fault handling method according to claim 5, wherein the selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies comprises:
determining corresponding error types based on the stripe block state mapping items; and
determining the corresponding handling strategies based on the corresponding error types, and then performing the fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the corresponding handling strategies.

### Claim 11 (depends on 10)

The system fault handling method according to claim 10, wherein the determining the corresponding handling strategies based on the corresponding error types, and then performing the fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the corresponding handling strategies comprises:
in response to a timeout error type, writing IO type data stored in a multi-state standby block of the multi-state standby blocks to a corresponding block;
in response to a bad block error type, writing the IO type data stored in the multi-state standby block to the corresponding block; and
in response to an offline error type, querying whether a corresponding disk of the disks is in offline.

### Claim 12 (depends on 10)

The system fault handling method according to claim 10, wherein the determining the corresponding handling strategies based on the corresponding error types, and then performing the fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the corresponding handling strategies comprises:
in response to a block read timeout error, reading a corresponding block of the blocks again; and
in response to three times of timeout, entering a step of reading data of other blocks of a corresponding stripe and reconstructing data of the fault blocks.

### Claim 13 (depends on 10)

The system fault handling method according to claim 10, wherein after the selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies, the method further comprises:
determining whether to at least one of delete the stripe block state mapping items or enter corresponding fault handling flows based on the error types in the stripe block state mapping items.

### Claim 14 (depends on 13)

The system fault handling method according to claim 13, wherein the determining whether to at least one of delete the stripe block state mapping items or enter corresponding fault handling flows based on the error types in the stripe block state mapping items comprises:
in response to a timeout error type, writing IO type data stored in a multi-state standby block of the multi-state standby blocks to a corresponding block, in response to a data write success, deleting a corresponding stripe block state mapping item of the stripe block state mapping items;
in response to a bad block error type, writing the IO type data stored in the multi-state standby block to the corresponding block, in response to the data write success, deleting the stripe block state mapping item; and
in response to an offline error type, deleting the stripe block state mapping item.

### Claim 15 (depends on 1)

The system fault handling method according to claim 1, wherein a bad block mapping area is set in the RAID, and a number of data blocks in the bad block mapping area is a self-defined number.

### Claim 16 (depends on 1)

The system fault handling method according to claim 1, wherein the multi-state standby blocks of adjacent stripes are not on a same disk.

### Claim 17 (depends on 1)

The system fault handling method according to claim 1, wherein a plurality of the stripe block state mapping items are stored in the stripe block state mapping linked list.

### Claim 18 (depends on 1)

The system fault handling method according to claim 1, wherein the stripe block state mapping items are put in a head of the stripe block state mapping linked list in the RAID.

### Claim 19

An electronic device, comprising: a memory, configured for storing computer programs; and a processor, configured for executing the computer programs, wherein the processor, upon execution of the program instructions, is configured to:
divide disks in a redundant array of independent disks (RAID) based on a number of stripes, to enable blocks with a same number as the disks to exist on each stripe, then configure multi-state standby blocks for the stripes, and distribute the multi-state standby blocks on the disks in the RAID, so as to enable the disks to use the multi-state standby blocks to run at a same time to handle faults when the faults occur at the same time;
acquire fault information factors corresponding to fault blocks after the faults occur on the blocks, and then store the fault information factors in stripe block state mapping items in a stripe block state mapping linked list; and
select corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies; wherein before the selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies:
set a timing program for the stripe block state mapping linked list, so as to perform the corresponding fault handling operations on the stripe block state mapping items according to a preset time period.

### Claim 20

A non-transitory computer-readable storage medium, being configured for storing computer programs, wherein upon execution by a processor, the computer programs are configured to cause the processor to:
divide disks in a redundant array of independent disks (RAID) based on a number of stripes, to enable blocks with a same number as the disks to exist on each stripe, then configure multi-state standby blocks for the stripes, and distribute the multi-state standby blocks on the disks in the RAID, so as to enable the disks to use the multi-state standby blocks to run at a same time to handle faults when the faults occur at the same time;
acquire fault information factors corresponding to fault blocks after the faults occur on the blocks, and then store the fault information factors in stripe block state mapping items in a stripe block state mapping linked list; and
select corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies; wherein before the selecting corresponding handling strategies based on different stripe block state mapping items, so as to perform fault handling operations on the fault blocks corresponding to the stripe block state mapping items by using the handling strategies:
set a timing program for the stripe block state mapping linked list, so as to perform the corresponding fault handling operations on the stripe block state mapping items according to a preset time period.
