Method, electronic device and computer program product for managing a disk
By acquiring the hardware-level status codes and failed access counts of NVMe disks, the problem of the storage system being unable to identify the actual status was solved, improving fault handling efficiency and user experience.
Patent Information
- Application Number
- CN202110444199.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2041-04-23
AI Technical Summary
In storage systems, existing technologies cannot effectively identify the actual state of NVMe disks, leading to decreased storage system performance and an inability to properly resolve I/O errors, thus impacting user experience.
By obtaining the first status code at the operating system level, and further obtaining the second status code at the disk hardware level, the system determines whether the disk is marked as faulty based on the processing strategy, and manages the disk based on the number of failed access operations.
Quickly identifying the specific reasons for disk access operation failures improves the efficiency of storage system fault handling and enhances the user experience.
Smart Images

Figure CN115237333B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of data storage, and more specifically, to a method, an electronic device and a computer program product for managing a disk. BACKGROUND
[0002] A storage system refers to a system composed of various storage devices that store programs and data, control components, and devices and algorithms that manage information scheduling. As storage technology develops, more and more data is stored in the storage system, resulting in more and more use of the storage system by users.
[0003] Now that the use of the storage system by users is rapidly increasing, the performance, security, and reliability of the storage system are increasingly required. However, there are still many problems to be solved when using the storage system to store data. SUMMARY
[0004] Embodiments of the present disclosure provide a method, an electronic device and a computer program product for managing a disk.
[0005] According to a first aspect of the present disclosure, a method for managing a disk is provided. The method includes obtaining a message for an access operation of the disk, the message including a first status code at an operating system level for the access operation. The method also includes obtaining a second status code at a disk hardware level for the access operation if it is determined that the first status code indicates that the access operation failed. The method also includes determining whether the disk is to be marked as failed according to a handling policy corresponding to the second status code. The method also includes managing the disk based on a number of failed access operations for the disk if it is determined that the disk is not to be marked as failed.
[0006] According to a second aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processor; and a memory coupled to the at least one processor and having stored therein instructions that, when executed by the at least one processor, cause the device to perform acts including: obtaining a message for an access operation of the disk, the message including a first status code at an operating system level for the access operation; obtaining a second status code at a disk hardware level for the access operation if it is determined that the first status code indicates that the access operation failed; and determining whether the disk is to be marked as failed according to a handling policy corresponding to the second status code; and managing the disk based on a number of failed access operations for the disk if it is determined that the disk is not to be marked as failed.
[0007] According to a third aspect of the present disclosure, a computer program product is provided, tangibly stored in a non-transitory computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform the steps of the method of the first aspect of the present disclosure. Attached Figure Description
[0008] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.
[0009] Figure 1 The illustration shows a schematic diagram of an example environment 100 in which the devices and / or methods according to embodiments of the present disclosure may be implemented;
[0010] Figure 2 A flowchart of a method 300 for processing data according to an embodiment of the present disclosure is illustrated;
[0011] Figure 3 The illustration shows an example 300 of the correspondence between status codes and processing strategies according to an embodiment of the present disclosure;
[0012] Figure 4 The illustration shows a schematic diagram of an example 400 of the interaction between various components within a management device according to an embodiment of the present disclosure;
[0013] Figure 5 A schematic block diagram of an example device 500 suitable for implementing embodiments of the present disclosure is shown.
[0014] In the various figures, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0016] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0017] The principles of the present disclosure will now be described with reference to a number of example embodiments illustrated in the drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it is understood that these embodiments are merely for the purpose of better illustrating the present disclosure and are not intended to limit the scope of the present disclosure in any way.
[0018] For a storage system, a user usually needs to write data to the disks of the storage system or read data from the disks of the storage system. However, errors sometimes occur during these write or read operations. Therefore, how to handle the Input / Output (I / O) errors of the disks in the storage system is very important for improving the service quality of the storage system, especially for the storage system formed by disks conforming to the Non-Volatile Memory express (NVMe) specification.
[0019] According to the NVMe specification, the return status code of the NVMe controller can be used to identify the NVMe I / O status. However, in the operating system, there are certain I / O stacks between the user area and the kernel, which cross the NVMe driver, the block layer, and the asynchronous I / O and system call layer. After various I / O operations are performed on the NVMe disk, the corresponding NVMe status code is obtained. Then, the NVMe status code is mapped between the layers to finally obtain the operating system level status code, such as “ENODATA”. The mapping process loses the detailed information of the NVMe status code. Therefore, the upper layer application cannot identify the actual status or actual problem of the NVMe disk. In this case, the problem cannot be correctly solved, which leads to the performance degradation of the storage system and cannot provide good service for the user.
[0020] At least to solve the above and other potential problems, embodiments of the present disclosure propose a method for managing a disk. In the method, a management device first receives a message of an access operation for the disk, the message including a first status code at an operating system level for the access operation. If it is determined that the access operation fails through the first status code, a second status code at a hardware level of the disk for the access operation is obtained. Then the management device determines whether the disk will be marked as faulty according to a processing strategy corresponding to the second status code; if it is determined that the disk is not marked as faulty, the disk is managed by using the number of failed access operations for the disk. Through the method, the specific reason for the failure of the disk access operation can be quickly determined, so that the problem can be quickly solved, time is saved, and user experience is improved.
[0021] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown.
[0022] The management device 102 and the disk 108 are included in the example environment 100. The management device is used to manage access operations to the disk 108. The management device 102 includes, but is not limited to, a personal computer, a server computer, a handheld or laptop device, a mobile device (such as a mobile phone, a personal digital assistant (PDA), a media player, etc.), a multiprocessor system, a consumer electronic product, a minicomputer, a mainframe computer, a distributed computing environment including any of the above systems or devices, etc. Figure 1 Only one disk 108 is shown in the example environment 100, which is only an example and not a specific limitation of the present disclosure. The management device 102 can be used to manage multiple disks.
[0023] The management device 102 includes a manager 104 and a disk drive module 106. The manager 104 can be used to send an access operation to the disk from a user to the disk drive module 106, such as an NVMe drive module. The disk drive module 106 then performs the access operation to the disk 108. Status information of the performed access operation is returned to the manager 104 through the disk drive module 106.
[0024] In some embodiments, the disk drive module 106 includes a disk driver module, a block layer, and an asynchronous I / O and system call layer. A status code at a disk hardware level for identifying a status of an access operation to the disk 108 is usually returned from the disk 108 to the disk drive module 106. The disk hardware level code obtained by the disk drive module 106 from the disk 108 is mapped multiple times in order to obtain an operating system level status code. A message including the operating system level status code is then returned to the manager 104.
[0025] In one example, the disk 108 is an NVMe disk. If the NVMe status code at the disk hardware level obtained by the disk 108 is 0x286, it indicates that the access is rejected. When it is passed to the block layer of the disk drive module 106, it is mapped to the status code "BLK_STS_MEDIUM". After passing through the asynchronous I / O and system call layer, it is mapped to the operating system level status code "-ENODATA". At this time, the specific reason for the access operation to the disk 108 cannot be determined.
[0026] If the operating system level status code returned to the manager 104 through the disk drive module 106 indicates that the access operation is normally performed, the manager 104 can return information that the access operation is correctly performed to an upper layer application. If the operating system level status code returned to the manager 104 through the disk drive module 106 indicates that the access operation fails, in order to solve this problem, the manager 104 needs to directly obtain the status code at the disk hardware level. Then, according to the hardware level status code, the reason for the failure of the access operation is determined, and then a corresponding processing strategy is performed.
[0027] In some embodiments, a dedicated access channel is used to obtain the disk hardware-level status code from disk 108. In some embodiments, a request is sent to the disk to obtain the disk hardware-level status code. The above examples are merely for describing this disclosure and are not intended to limit the specific scope of this disclosure. Those skilled in the art can devise any suitable method to obtain the hardware-level status code.
[0028] After obtaining the status code, the manager 104 will retrieve the corresponding handling policy. If the handling policy is to directly mark the disk as faulty, indicating that the disk can no longer be used, then this policy will be executed. If the handling policy is not to mark the disk as faulty, then appropriate processing will be performed according to the policy. At this time, it is also necessary to count the number of access failures corresponding to the disk, and then use the number of access failures to perform management operations on the disk.
[0029] In some embodiments, the disk may be processed accordingly based on whether the number of failed access operations within a predetermined access operation window reaches different thresholds, such as resetting the disk, restarting the disk, or marking the disk as faulty if different thresholds are reached.
[0030] In some embodiments, the ratio of the number of failures within a predetermined access operation window to the size of the window can be determined to reach different thresholds for corresponding processing. For example, reaching different thresholds may trigger operations such as disk reset, disk restart, or marking the disk as faulty. The above examples are merely for describing this disclosure and are not intended to limit the scope of this disclosure. Those skilled in the art can set any suitable method to manage the disk based on the number of failed access operations as needed.
[0031] In some embodiments, the handling strategy for certain disk hardware-level status codes provides indications for retrying disk access operations and logging errors; for other disk hardware-level status codes, the handling strategy is to mark the disk as locked and send an indication for unlocking. The above examples are merely illustrative of this disclosure and not intended to limit it.
[0032] This method allows for the rapid identification of the specific reasons for disk access failures, enabling quick problem resolution, saving time, and improving the user experience.
[0033] The above combination Figure 1 A block diagram of an example system 100 in which embodiments of the present disclosure can be implemented is described. The following is in conjunction with… Figure 2 A flowchart describing a method 200 for managing a disk according to embodiments of the present disclosure is provided. Method 200 can be performed in... Figure 1 It is executed at the management device 102 and any suitable computing device.
[0034] likeFigure 2 As shown, at block 202, the management device 102 obtains a message for an access operation to the disk, the message including a first status code at an operating system level for the access operation. The management device 102 obtains a message for the access operation after the access operation is performed on the disk 108. The message usually includes a status code at an operating system level indicating the status of the access operation.
[0035] In some embodiments, the status code at the operating system level is mapped from a status code at a disk hardware level by the disk drive module 106. The status code at the operating system level usually reflects a coarse-grained error and does not determine the disk hardware level failure. Further, usually multiple disk hardware level failures correspond to one status code at the operating system level.
[0036] At block 204, the management device 102 obtains a second status code at a disk hardware level for the access operation if it determines that the first status code indicates that the access operation fails.
[0037] In some embodiments, the management device 102 determines a value corresponding to the first status code. The value of the first status code is usually positive, and for ease of use, the corresponding value is usually set to be the negative of the value of the first status code. Then, the management device 102 compares the value corresponding to the first status code with a threshold value, such as 0, to determine whether the access operation fails. If it is less than the threshold value, it is determined that the access operation fails. Then the management device 102 obtains a second status code at a disk hardware level for the access operation.
[0038] In some embodiments, the management device can save a list of status codes at the operating system level indicating that the access operation fails, and then look up whether the first status code is in the list to determine whether the access operation fails. If the first status code is found in the list, it indicates that the access operation fails. Then the management device 102 obtains a second status code at a disk hardware level for the access operation. The above examples are only used to describe the present disclosure, but not to limit the present disclosure.
[0039] If the management device 102 determines that the first status code does not indicate that the access operation fails, it can return an indication that the access operation is successful to the application for subsequent operations.
[0040] At block 206, the management device 102 determines whether the disk will be marked as failed according to a processing policy corresponding to the second status code. In order to handle the problem corresponding to the second status code, a processing policy corresponding to each second status code is determined in advance. Figure 3 An example of the processing policy corresponding to the second status code is shown.
[0041] AsFigure 3 As shown, at this time, the second status code is a NVMe status code, each status code has a corresponding description and also has a corresponding processing strategy. For example, for status code 0x286, its corresponding processing strategy is to mark the drive as locked, and inform the unlocking operation by setting the lock attribute of the storage encrypted disk.
[0042] Now return to Figure 2 Then described, at block 208, the management device 102 manages the disk based on the number of failed access operations for the disk if it is determined that the disk is not marked as failed. If the corresponding processing strategy is to mark the disk as failed, the disk is no longer accessed after being marked as failed.
[0043] In some embodiments, if the corresponding strategy is not to directly mark the disk as failed, the management device 102 performs corresponding processing with the strategy corresponding to the second status code. In addition, the management device 102 also updates the number of times by incrementing the number of failed access operations for the disk. Then, the disk is managed according to the updated number of times. In this way, the disk can be further reasonably managed by the number of failures.
[0044] In some embodiments, if it is determined that the number of times is greater than or equal to a first threshold number of times, the disk is reset; if it is determined that the number of times is greater than or equal to a second threshold number of times, the disk is restarted, the second threshold number of times being greater than the first threshold number of times; and if it is determined that the number of times is greater than or equal to a third threshold number of times, the disk is marked as failed, the third threshold number of times being greater than the second threshold number of times. In this way, the disk can be better managed. Alternatively or additionally, the number of failed access operations is the number of failed access operations in a predetermined number of access operation number windows, for example, the number of failed access operations is the number of failed access operations in the last 5000 access operations.
[0045] In some embodiments, if the ratio of the number of failed access operations to the size of the number of times window is greater than or equal to a first threshold, the disk is reset; if it is determined that the ratio is greater than or equal to a second threshold, the disk is restarted, the second threshold being greater than the first threshold; and if it is determined that the ratio is greater than or equal to a third threshold, the disk is marked as failed, the third threshold being greater than the second threshold. In this way, the disk can be better managed. The above examples are only used to describe the present disclosure, but not to limit the present disclosure.
[0046] In some embodiments, it can be determined according to the processing strategy whether the access operation will be retried; if it is determined that the access operation will be retried, an indication about retrying the access operation is sent. In this way, the processing efficiency of failure can be improved, and the user experience can be improved.
[0047] In some embodiments, the disk includes a disk compliant with the NVMe high-speed non-volatile memory specification.
[0048] This method allows for the rapid identification of the specific reasons for disk access failures, enabling quick problem resolution, saving time, and improving the user experience.
[0049] The above combination Figure 2 and Figure 3 A flowchart of a method 200 for managing a disk, according to embodiments of this disclosure, is described below. Figure 4 A schematic diagram illustrating an example 400 of the interaction between components within a management device according to an embodiment of the present disclosure.
[0050] like Figure 4 As shown, the management device 402 includes an application 404. The application 404 sends an access operation for disk 416 to the disk object module 406, which manages a disk. The NVMe driver module 414 then sends the access operation to disk 416 for execution. After execution, the NVMe driver module 414 provides a notification message about the access operation to the disk object module 406. The disk object module 406 can obtain the operating system-level status code from this notification message. If the status code does not indicate that the access operation failed, it can return a success message to the application 404 to proceed with subsequent operations.
[0051] If the disk object module 406 determines that the access operation has failed based on the operating system-level status code, the error handling module 408 will handle the situation. The error handling module 408 obtains the disk hardware-level status code 410 generated by the disk 416 for this access operation. Then, it performs processing according to the handling strategy corresponding to the status code 410. If the handling strategy marks the disk as faulty, the disk cannot be used, and no further operations are performed. If the handling strategy does not mark the disk as faulty, for example, by issuing a retry or unlock instruction, this instruction can be sent to the application 404 for corresponding processing. For example, if the status code is 0x286, the disk is marked as locked, and the application 404 is instructed to unlock the disk 416 by setting the disk's lock attribute.
[0052] When the processing policy does not indicate to mark the disk as failed and to process using the corresponding policy, at the same time, the number of access operation failures for the disk accumulated in the bucket module 412 can be used to perform different operations, such as resetting the disk, restarting the disk, or marking the disk as failed, if the number of access operation failures accumulated in the sliding time window exceeds a different threshold. In one example, if the disk needs to be reset, an out-of-band signal can be transmitted to the disk 416 through a path different from the path from the NVMe module 414 to the disk 416 to operate the disk 416. If the disk needs to be marked as failed, an indication of marking the disk as failed can be sent to the application 404. The above examples are only used to describe the present disclosure, but not to limit the present disclosure.
[0053] Through the method, the specific reason for the disk access operation failure can be quickly determined, so that the problem can be quickly solved, time is saved, and user experience is improved.
[0054] Figure 5 A schematic block diagram of an example device 500 that can be used to implement embodiments of the present disclosure is shown. Figure 1 the management device 102 in Figure 4 The device 500 can be used to implement the management device 402 in The device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 502 or loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0055] A plurality of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunications networks.
[0056] The various processes and processes described above, such as the method 200, can be performed by the processing unit 501. For example, in some embodiments, the method 200 can be implemented as a computer software program tangibly embodied in a machine readable medium, such as the storage unit 508. In some embodiments, portions or all of the computer program can be loaded and / or installed onto the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded onto the RAM 503 and executed by the CPU 501, one or more acts of the method 200 described above can be performed.
[0057] The present disclosure can be a method, apparatus, system, and / or computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for performing various aspects of the present disclosure.
[0058] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched tape, a
[0059] The computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0060] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0061] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0062] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0063] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0064] The flow diagrams and the block diagrams in the drawings are presented to illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logic functions. In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and
[0065] Embodiments of the present disclosure have been described above, and the description is intended to be illustrative of the embodiments and not restrictive. Many modifications and variations of the described embodiments are possible and are within the scope of the disclosure. The selection of the terms to be used in the description is not intended to limit the scope of the embodiments described herein, but rather to best describe the principles of the embodiments in the context of the specific application.
Claims
1. A method for managing a disk, comprising: obtaining a message for an access operation to a disk, the message including a first status code at an operating system level for the access operation; if it is determined that the first status code indicates that the access operation failed, obtaining a second status code at a disk hardware level for the access operation; and determining whether the disk is to be marked as failed according to a handling policy corresponding to the second status code; if it is determined that the disk is not to be marked as failed, managing the disk based on a number of failed access operations to the disk; wherein managing the disk includes: if it is determined that the number is greater than or equal to a first threshold number, resetting the disk; if it is determined that the number is greater than or equal to a second threshold number, rebooting the disk, the second threshold number being greater than the first threshold number; and if it is determined that the number is greater than or equal to a third threshold number, marking the disk as failed, the third threshold number being greater than the second threshold number.
2. The method of claim 1, wherein obtaining a second status code at a disk hardware level for the access operation includes: determining a value corresponding to the first status code; and if it is determined that the value corresponding to the first status code is less than a threshold value, determining that the access operation failed, and obtaining the second status code at a disk hardware level for the access operation.
3. The method of claim 1, wherein managing the disk based on a number of failed access operations to the disk includes: updating the number of failed access operations to the disk by incrementing the number; and managing the disk in accordance with the updated number.
4. The method of claim 1, further comprising: determining whether the access operation is to be retried according to the handling policy; if it is determined that the access operation is to be retried, sending an indication to retry the access operation.
5. The method of claim 1, wherein the disk includes a disk that conforms to a Non-Volatile Memory Express (NVMe) specification.
6. An electronic device, the electronic device comprising: at least one processor; and memory coupled to the at least one processor and having stored thereon instructions which, when executed by the at least one processor, cause the device to perform actions including: obtaining a message for an access operation to a disk, the message including a first status code at an operating system level for the access operation; if it is determined that the first status code indicates that the access operation failed, obtaining a second status code at a disk hardware level for the access operation; and determining whether the disk is to be marked as failed according to a handling policy corresponding to the second status code; if it is determined that the disk is not to be marked as failed, managing the disk based on a number of failed access operations to the disk; wherein managing the disk includes: if it is determined that the number is greater than or equal to a first threshold number, resetting the disk; if it is determined that the number of times is greater than or equal to a second threshold number of times, greater than the first threshold number of times, then rebooting the disk; and if it is determined that the number of times is greater than or equal to a third threshold number of times, greater than the second threshold number of times, then flagging the disk as failed.
7. The electronic device of claim 6, wherein obtaining a second status code at a disk hardware level for the access operation comprises: determining a value corresponding to the first status code; and if it is determined that the value corresponding to the first status code is less than a threshold value, determining that the access operation failed, and obtaining the second status code at a disk hardware level for the access operation.
8. The electronic device of claim 6, wherein managing the disk based on a number of failed access operations for the disk comprises: updating the number of failed access operations for the disk by incrementing the number of failed access operations for the disk; and managing the disk in accordance with the updated number of failed access operations.
9. The electronic device of claim 6, the actions further comprising: determining, in accordance with the handling policy, whether the access operation is to be retried; if it is determined that the access operation is to be retried, sending an indication to retry the access operation.
10. The electronic device of claim 6, wherein the disk comprises a disk that conforms to the Non-Volatile Memory Express (NVMe) specification.
11. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions that, when executed, cause a machine to perform the steps of the method of any one of claims 1-5.
Citation Information
Patent Citations
Information processing apparatus, control method
US20130318392A1
Crash log storage and retrieval using boot partitions in solid state systems
US20190340058A1