A slow disk reuse method, device, equipment and medium in a storage system
By identifying the repairable areas of slow disks in the storage system, isolating and relocating sectors, the waste and maintenance costs caused by direct isolation of slow disks are resolved, enabling disk reuse and performance improvement.
Patent Information
- Application Number
- CN202210443598.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-04-25
AI Technical Summary
In existing storage systems, direct isolation of slow disks leads to disk waste and increased maintenance costs.
By acquiring the disk area to be repaired, isolating the area to be repaired, obtaining the access latency, determining the access latency threshold, triggering sector relocation, and adding the disk back to the business process after the repair is completed.
This increases the average lifespan of the disk, avoids impacting the main system business, improves overall system performance, and reduces maintenance costs.
Smart Images

Figure CN114968634B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data storage, and in particular to a slow disk reuse method, device, equipment and medium in a storage system. BACKGROUND
[0002] In a disk-based storage system, sometimes some disks are slow due to sector damage and other problems, thereby affecting the overall performance of the system. In most storage systems, attempts are made to detect slow disks. In some storage systems, in order to avoid the influence of slow disks on the overall performance of the system, the slow disks are isolated from the system business on the premise of not affecting the availability of the system. In actual applications, since the disks are isolated and no longer used, the value of slow disk detection is usually set relatively conservatively to avoid disk waste. This makes the storage system have to tolerate some high access latency disks to slow down the performance of the entire system in some cases. In addition, directly isolating and discarding disks due to partial sector damage will cause waste and increase the cost of use and maintenance. SUMMARY
[0003] In view of the problems existing in the prior art, the present application provides a slow disk reuse method, device, equipment and medium in a storage system, which mainly solves the problem that direct isolation of existing slow disks easily causes disk waste and increases the cost of use and maintenance.
[0004] In order to achieve the above-mentioned purpose and other purposes, the technical scheme adopted by the present application is as follows.
[0005] A slow disk reuse method in a storage system, comprising:
[0006] Obtaining a disk area to be repaired and isolating the area to be repaired from the business, accessing the area to be repaired to obtain a first access latency of the corresponding area to be repaired and obtaining an average latency of the disk area other than the area to be repaired;
[0007] Determining an access latency threshold value according to the average latency; comparing the first access latency with the access latency threshold value, and triggering sector relocation of the corresponding area to be repaired according to the comparison result, obtaining a second access latency of the corresponding area to be repaired after sector relocation;
[0008] Comparing the second access latency with the access latency threshold value to determine whether the corresponding area to be repaired is repaired, and re-adding the repaired disk to the business process.
[0009] Optionally, before determining the access latency threshold value according to the average latency, comprising:
[0010] Determining an upper latency threshold value and a lower latency threshold value according to the average latency;
[0011] acquiring a first number of disks in the disk area other than the to-be-repaired area, whose time delay is higher than the upper limit threshold of the time delay;
[0012] acquiring a second number of disks in the disk area other than the to-be-repaired area, whose time delay is lower than the lower limit threshold of the time delay;
[0013] if the first number of disks is lower than a preset number threshold, discarding the disk area whose time delay is higher than the upper limit threshold of the time delay;
[0014] if the second number of disks is lower than the number threshold, discarding the disk area whose time delay is lower than the lower limit threshold of the time delay;
[0015] redetermining the average time delay according to the disk area other than the to-be-repaired area remaining after the discarding operation is completed.
[0016] Optionally, determining the upper limit threshold of the time delay and the lower limit threshold of the time delay according to the average time delay comprises:
[0017] acquiring an upper limit coefficient and a lower limit coefficient according to the value of the average time delay;
[0018] multiplying the average time delay by the upper limit coefficient to obtain the upper limit threshold of the time delay;
[0019] multiplying the average time delay by the lower limit coefficient to obtain the lower limit threshold of the time delay.
[0020] Optionally, the manner of determining the access time delay threshold according to the average time delay comprises:
[0021]
[0022] wherein, is the access time delay threshold; is the average time delay; is the access time delay of the to-be-repaired area.
[0023] Optionally, after the access time delay threshold is determined according to the average time delay, the method further comprises:
[0024] acquiring the disk area in the disk area other than the to-be-repaired area, whose access time delay is higher than the access time delay threshold, as the to-be-repaired area for disk repair.
[0025] Optionally, the comparison of the second access time delay and the access time delay threshold to determine whether the corresponding to-be-repaired area is repaired, and the re-adding of the repaired disk to the business process comprises:
[0026] after triggering sector relocation, acquiring the current disk sector relocation count and the count of sectors being relocated through the SMART information of the disk, and determining whether the sector relocation is completed according to the sector relocation count in the SMART information.
[0027] After the sector relocation is completed, the corresponding to-be-repaired region is re-accessed to obtain a second access latency of the to-be-repaired region;
[0028] If the second access latency is higher than the access latency threshold, disk SMART information is checked to determine whether a new sector relocation is triggered;
[0029] If the new sector relocation is not triggered, repeated attempts are made to access the to-be-repaired region, and a second access latency of the corresponding to-be-repaired region is obtained for comparison and determination, until the number of repeated attempts exceeds a set number threshold, at which point the attempts are stopped, and it is output that the corresponding sector cannot be repaired;
[0030] If the new sector relocation is triggered, the sector relocation is waited for to be completed, and it is determined whether the access latency after the sector relocation is lower than the access latency threshold, if the access latency after the sector relocation is lower than the access latency threshold, the corresponding to-be-repaired region is successfully repaired;
[0031] After all to-be-repaired regions are successfully repaired, the entire disk is scanned to determine that there is no to-be-repaired region, and then the disk is re-added to the business process.
[0032] Optionally, before the disk that is repaired is re-added to the business process, the method further includes:
[0033] After the business process receives a disk repair completion notification, it is scanned and compared whether the repaired disk data and other disk data in the system satisfy consistency under an erasure correction algorithm, if the consistency is not satisfied, data recovery of the repaired disk is triggered, the disk data is updated, and then the disk is added to the business process.
[0034] A slow disk reuse device in a storage system includes:
[0035] A to-be-repaired disk determination module is configured to obtain a to-be-repaired region of a disk, isolate the to-be-repaired region from a business, access the to-be-repaired region to obtain a first access latency of the corresponding to-be-repaired region, and obtain an average latency of a disk region other than the to-be-repaired region;
[0036] A relocation module is configured to determine an access latency threshold according to the average latency, compare the first access latency with the access latency threshold, trigger sector relocation of the corresponding to-be-repaired region according to a comparison result, and obtain a second access latency of the corresponding region after the sector relocation;
[0037] A reuse module is configured to compare the second access latency with the access latency threshold to determine whether the corresponding to-be-repaired region is repaired, and re-add the repaired disk to a business process.
[0038] An apparatus comprising: one or more processors; and one or more machine-readable media having stored thereon instructions which, when executed by the one or more processors, cause the apparatus to perform the slow disk reuse method in a storage system as described.
[0039] A computer-readable storage medium having stored thereon instructions which, when executed by one or more processors, cause an apparatus to perform the slow disk reuse method in a storage system as described.
[0040] As described above, the slow disk reuse method, device, apparatus and medium in a storage system of the present application have the following beneficial effects.
[0041] The present application increases the average service life of the disk by acquiring the disk area to be repaired and isolating the area to be repaired from the service, accessing the area to be repaired to obtain the first access latency of the corresponding area to be repaired and obtaining the average latency of the remaining disk area other than the area to be repaired; determining the access latency threshold according to the average latency; comparing the first access latency with the access latency threshold, triggering sector relocation of the corresponding area to be repaired according to the comparison result, obtaining the second access latency of the corresponding area after sector relocation; comparing the second access latency with the access latency threshold to determine whether the corresponding area to be repaired is repaired, and re-adding the repaired disk to the service process. The disk repair and reuse mechanism is increased, the average service life of the disk is increased, the disk relocation and the service process are independent of each other to avoid affecting the main service of the system, and since the disk can be re-added to the service process after repair, a relatively strict slow disk detection strategy can be used when detecting the slow disk, so that the disks used in the main service of the system have relatively high read-write performance, and the overall performance of the system can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 The figure is a flowchart of the slow disk reuse method in a storage system according to an embodiment of the present application.
[0043] Figure 2 The figure is a module diagram of the slow disk reuse device in a storage system according to an embodiment of the present application.
[0044] Figure 3 The figure is a structural diagram of the apparatus according to an embodiment of the present application.
[0045] Figure 4 The figure is a schematic diagram of the overall process of disk repair according to an embodiment of the present application.
[0046] Figure 5 The figure is a flowchart of the average latency correction according to an embodiment of the present application. DETAILED DESCRIPTION
[0047] Following make the embodiments of the present application specific, concrete examples, those skilled in the art can easily understand the advantages and effects of the present application from the disclosure. The present application can also be implemented or applied by another different embodiment, the details in the specification can be based on different views and applications, various modifications or changes without departing from the spirit of the present application. It should be noted that the following examples and features in the examples can be combined with each other without conflict.
[0048] It should be noted that the drawings provided in the following examples only illustrate the basic concept of the present application in a schematic manner, and only the components related to the present application are shown in the drawings, not the number, shape and size of the components when actually implemented. The actual implementation of each component may be a random change, and the component layout pattern may be more complex.
[0049] Please refer to Figure 1 The present application provides a slow disk reuse method in a storage system, comprising the following steps:
[0050] Step S01, obtaining a disk area to be repaired and isolating the area to be repaired from the service, accessing the area to be repaired to obtain the first access latency of the corresponding area to be repaired and obtaining the average latency of the disk area other than the area to be repaired;
[0051] Step S02, determining the access latency threshold according to the average latency; comparing the first access latency with the access latency threshold, triggering sector relocation of the corresponding area to be repaired according to the comparison result, and obtaining the second access latency of the corresponding area after sector relocation;
[0052] Step S03, comparing the second access latency with the access latency threshold to determine whether the corresponding area to be repaired is repaired, and adding the repaired disk to the service flow.
[0053] In an embodiment, taking a video storage system as an example, the video storage system is usually composed of a video acquisition input end, a central scheduling server and a storage server end. The video data of the video acquisition input end flows into the central scheduling server, which decides to select the storage server end, and the video data flows into the server end for storage. The central scheduling server mainly balances the data storage of each storage server end. Slow disk reuse can be deployed in the storage server end, and by detecting the slow disk of the storage server end, the slow disk is obtained and temporarily isolated from the service, and added to the repair queue. Slow disk detection can be determined by detecting the access latency of the IO port in the disk, and the specific detection method can be selected according to actual needs, which is not limited here.
[0054] The storage server software records the access latency of all data disks during operation. When the problem disk is isolated, the storage software calculates the average latency T0 of the remaining disks. The access latency threshold of the disk area to be repaired can be determined according to the average latency.
[0055] In an embodiment, before determining the access latency threshold according to the average latency, the method comprises:
[0056] Determining an upper latency threshold and a lower latency threshold according to the average latency;
[0057] Obtaining a first number of disks in the disk area outside the to-be-repaired area whose latency is higher than the upper latency threshold;
[0058] Obtaining a second number of disks in the disk area outside the to-be-repaired area whose latency is lower than the lower latency threshold;
[0059] If the first number of disks is lower than a preset number threshold, discarding the disk area whose latency is higher than the upper latency threshold;
[0060] If the second number of disks is lower than the number threshold, discarding the disk area whose latency is lower than the lower latency threshold;
[0061] Re-determining the average latency according to the disk area outside the to-be-repaired area remaining after the discarding operation is completed.
[0062] In an embodiment, determining the upper latency threshold and the lower latency threshold according to the average latency comprises:
[0063] Obtaining an upper coefficient and a lower coefficient according to the value of the average latency;
[0064] Multiplying the average latency by the upper coefficient to obtain the upper latency threshold;
[0065] Multiplying the average latency by the lower coefficient to obtain the lower latency threshold.
[0066] Specifically, please refer to Figure 5 To avoid the extreme values of a small number of disks affecting the calculation result of the average value, the average latency of the disk area outside the to-be-repaired area is calculated first, and then the high-latency threshold and the low-latency threshold are determined according to the latency value. The number of disks higher than the high threshold and lower than the low threshold is counted, and if the number is less than the threshold, the disks in this part are discarded, and the final average access latency is recalculated. According to the specific value of T0, a high threshold T h and a low threshold T l are determined. The calculation method is to determine a coefficient according to the value of T0 and multiply it. The specific value can be referred to in the following table. The high threshold here is the upper latency threshold, and the low threshold is the lower latency threshold.
[0067]
[0068] Then, from the disk latency data, the number N h of disks with latency higher than T h is counted, and the number N l of disks with latency lower than T l is counted. A threshold N0may be set in advance, and if N h < N0, then the disks with latency higher than T h are excluded from the subsequent calculation, and if N l < N0, then the disks with latency lower than T l are excluded from the subsequent calculation. After the above processing, the average latency T of the remaining disks is calculated again for use in the subsequent process.
[0069] In an embodiment, the manner of determining the access latency threshold according to the average latency comprises:
[0070]
[0071] wherein, is the access latency threshold; is the average latency; is the access latency of the region to be repaired. Through this calculation manner, the corresponding access latency threshold can be dynamically adjusted according to the access latency of the region to be repaired. In another embodiment, the access latency threshold can also be set as a fixed value, such as 2T. The specific access latency setting manner can be selected according to actual application requirements, which is not limited here.
[0072] In an embodiment, referring to Figure 4 , the sector relocation function of the disk needs to be triggered by read-write access, and after the disk is isolated from the service, an additional process is needed to re-access the slow-access region to trigger the sector relocation function of the disk. This process will check whether the disk supports sector relocation and whether there is reserved space for relocation, and if the conditions are met, it will attempt to repair. The repair process will access the region to be repaired several times at regular intervals to check whether the disk is ready for sector relocation. If the relocation is not triggered after a certain number of accesses, and the access latency is still too high, it is considered that the disk cannot be repaired, and the disk is discarded and the related alarm is reported. If the disk starts to relocate in the above process, it will wait for the relocation to complete and then re-access the region to confirm the access latency. If the latency meets the conditions, it is considered that the region is repaired, and if it still does not meet the conditions, it will be retried later until the number of retries reaches the threshold, the disk is discarded and an alarm is reported. If all the regions to be repaired of the disk have been repaired and the full-disk scan has been completed, it is considered that the disk has been repaired and can be added back to the service process for use.
[0073] In an embodiment, the second access latency is compared with the access latency threshold to determine whether the corresponding to-be-repaired region is repaired, the repaired disk is re-added to the business process, comprising:
[0074] After triggering sector relocation, the current disk sector relocation count and the count of sectors being relocated are obtained through the SMART information of the disk, and whether the sector relocation is completed is determined according to the sector relocation count in the SMART information;
[0075] After the sector relocation is completed, the corresponding to-be-repaired region is accessed again to obtain the second access latency of the to-be-repaired region;
[0076] If the second access latency is higher than the access latency threshold, the SMART information of the disk is checked to determine whether a new sector relocation is triggered;
[0077] If the new sector relocation is not triggered, the to-be-repaired region is repeatedly accessed to obtain the second access latency of the corresponding to-be-repaired region for comparison and judgment, until the number of repeated attempts exceeds the set number threshold, then the attempt is stopped, and it is output that the corresponding sector cannot be repaired;
[0078] If the new sector relocation is triggered, the sector relocation is waited to be completed, and whether the access latency after the sector relocation is lower than the access latency threshold is determined, if lower than the access latency threshold, the corresponding to-be-repaired region is repaired successfully;
[0079] After all to-be-repaired regions are repaired successfully, the entire disk is scanned to determine that there is no to-be-repaired region, and then the disk is re-added to the business process.
[0080] The sector relocation function of the disk needs a certain number of IO accesses to trigger, in the storage software, when the disk is added to the to-be-repaired queue, the region of the disk known to have slow access is also recorded. In the background repair process, the storage software will try to repair as follows.
[0081] (1) The current disk sector relocation count and the count of sectors being relocated are obtained through the SMART information of the disk;
[0082] (2) The region of the disk recorded to have slow access is accessed repeatedly, and the access latency T is counted r ;
[0083] (3) If T rIf 2T, it is considered that the access latency is still too high, the SMART information of the disk is checked to determine whether a new sector relocation is triggered, if not, it is returned to step (2) to try again until the number of retries exceeds a certain number, which is set to 10 times here; if the relocation is triggered, the area is accessed again after the completion of the relocation (judged by the SMART information sector count), if the latency is still too high, it is returned to step (2) to retry;
[0084] (4) Access the entire disk in units of disk sectors to find out whether there is an area with slow access. If the access has a sector access latency that is too high, the area is recorded to the disk repair area table;
[0085] (5) Traverse the repair area table in (4) to repeat steps (2)-(3) to try to repair; (6) If all areas are successfully repaired, it is considered that the disk repair is complete, and the disk can be re-added to the business process for use.
[0086] In an embodiment, after determining the access latency threshold value according to the average latency, further comprising:
[0087] Obtain the disk area with an access latency higher than the access latency threshold value in the disk area other than the repair area as the repair area for disk repair.
[0088] Specifically, it can be detected whether there is a damaged sector in the remaining area of the isolated disk, and while triggering the relocation of the damaged sector of the isolated disk, the average latency of accessing the area is counted, and a latency determination threshold value is determined in combination with the average access latency of the normal disk counted in the foregoing steps. When accessing other areas of the isolated disk, if the latency is higher than the threshold value, it is considered that the area is also a repair area, which is added to the repair list and attempts to repair. Not only the known problem area, but also the remaining area of the disk is automatically detected for potential problems and attempts to repair and judge, avoiding the problem that the disk is repeatedly isolated in a short period of time after recovery.
[0089] In an embodiment, before re-adding the repaired disk to the business process, further comprising:
[0090] After receiving the disk repair completion notification, the business process scans and compares the repaired disk data and other disk data in the system to determine whether they satisfy the consistency under the erasure correction algorithm, if not, the data recovery of the repaired disk is triggered, and the disk is added to the business process after updating the disk data.
[0091] After the disk repair is completed, the repair process will notify the business process that the disk repair is completed and can be used online again. After receiving the notification, the business process will scan and compare the data of the disk with the data of other disks in the system to determine whether the consistency meets the erasure code algorithm. If the consistency does not meet the erasure code algorithm, data recovery is needed to update the data of the disk. After the above processing is completed, the disk can be used in the business process again.
[0092] For example, in a Linux operating system, there are 40 disks in a single storage server for storing business data, and data redundancy is achieved through erasure code in the storage server business. Erasure Code is an encoding technology that can increase M pieces of data from N pieces of original data and restore the original data from any n pieces of data among the N+M pieces of data. That is, if any M or less pieces of data are lost, the remaining data can still be restored. In a system based on this redundancy scheme, data reading and writing are managed in units of stripes, and each stripe contains data from N+M disks. The read-write performance of a stripe has a short technical effect on the performance of the disks under the stripe. If there is one or more bad disks in the N+M disks, the overall read-write performance of the stripe will be affected. After slow disk repair through the foregoing steps, the data in the repaired disk can be recovered through the erasure code algorithm to maintain the data consistency among the disks during system business processing.
[0093] See Figure 2 The embodiment provides a slow disk reuse device in a storage system for executing the slow disk reuse method in the foregoing method embodiment. Since the technical principle of the device embodiment is similar to that of the foregoing method embodiment, the same technical details are not repeated.
[0094] In an embodiment, the slow disk reuse device in a storage system comprises: a to-be-repaired disk determination module 10 configured to acquire a to-be-repaired area of a disk and isolate the to-be-repaired area from a business process, acquire a first access latency of the corresponding to-be-repaired area, and acquire an average latency of a disk area other than the to-be-repaired area; a relocation module 11 configured to determine an access latency threshold according to the average latency, compare the first access latency with the access latency threshold, trigger sector relocation of the corresponding to-be-repaired area according to the comparison result, and acquire a second access latency of the corresponding area after sector relocation; and a reuse module 12 configured to compare the second access latency with the access latency threshold to determine whether the corresponding to-be-repaired area is repaired, and add the repaired disk to the business process again.
[0095] The embodiments of the present application also provide a slow disk reuse device in a storage system, which can include one or more processors, and one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the device to perform the method Figure 1 In actual application, the device can be a terminal device or a server. Examples of the terminal device can include a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, an on-board computer, a desktop computer, a set-top box, a smart TV, a wearable device, and the like. The embodiments of the present application are not limited to a specific device.
[0096] The embodiments of the present application also provide a computer readable storage medium having one or more programs stored thereon, which, when applied to a device, can cause the device to perform the method Figure 1 The computer readable medium can be any available medium or a data storage device including one or more available media integrated in a server, a data center, and the like, which can be stored by a computer. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)), and the like.
[0097] With reference to Figure 3 The embodiments provide a device 80, which can be a desktop computer, a portable computer, a smart phone, or the like. In detail, the device 80 at least includes a memory 82 and a processor 83 connected through a bus 81, where the memory 82 is configured to store a computer program, and the processor 83 is configured to execute the computer program stored in the memory 82 to perform all or part of the steps in the foregoing method embodiments.
[0098] The system bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory.
[0099] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0100] In summary, the slow disk reuse method, device, equipment and medium in the storage system of the present application increase the disk repair and reuse mechanism. After the disk is isolated from the service, it still has the opportunity to be reused after the background repair and judgment process, increases the average service life of the disk, and reduces the corresponding cost to a certain extent. The repair process and the service process triggered by the disk sector relocation are independent, which to a certain extent avoids the influence of the repair process on the system main service and guarantees the system performance. In the background repair process, not only the known problem area is detected, but also the rest of the disk area is automatically detected for potential problems and attempts are made to repair and judge, avoiding the problem that the disk is recovered and repeatedly isolated in a short period of time. Since the disk can be repaired after being isolated, it has the opportunity to be added to the system service again for reuse, so the storage system can adopt a relatively strict slow disk detection strategy, so that the disk used in the system main service has relatively high read-write performance, which can improve the overall performance of the system. Therefore, the present application effectively overcomes the various shortcomings in the prior art and has high industrial utilization value.
[0101] The above embodiments are only illustrative of the principles of the present application and its efficacy, and are not intended to limit the present application. Any modification or change made by any person skilled in the art without departing from the spirit and scope of the present application shall be covered by the claims of the present application.
Claims
1. A method for slow disk reuse in a storage system, the method comprising: The method comprises the following steps: acquiring a disk area to be repaired and isolating the area to be repaired from a service, accessing the area to be repaired to acquire a first access latency of the corresponding area to be repaired and acquiring an average latency of a disk area other than the area to be repaired, wherein the disk area other than the area to be repaired refers to an area of all data disks other than the area to be repaired; determining an access latency threshold according to the average latency, comparing the first access latency with the access latency threshold, triggering sector relocation of the corresponding area to be repaired according to a comparison result, acquiring a second access latency of the corresponding area to be repaired after sector relocation; comparing the second access latency with the access latency threshold to determine whether the corresponding area to be repaired is repaired, and re-adding a disk that is repaired to a service flow.
2. The method of claim 1, wherein, Before the step of determining the access latency threshold according to the average latency, the method comprises the following steps: determining an upper latency threshold and a lower latency threshold according to the average latency; acquiring a first number of disks in the disk area other than the area to be repaired, wherein the latency of the disks is higher than the upper latency threshold; acquiring a second number of disks in the disk area other than the area to be repaired, wherein the latency of the disks is lower than the lower latency threshold; if the first number of disks is lower than a preset number threshold, discarding the disk area whose latency is higher than the upper latency threshold; if the second number of disks is lower than the number threshold, discarding the disk area whose latency is lower than the lower latency threshold; and re-determining the average latency according to the disk area other than the area to be repaired that remains after the discarding operation is completed.
3. The method of claim 2, wherein the slow disk is a hard disk drive (HDD). The method of determining the upper latency threshold and the lower latency threshold according to the average latency comprises the following steps: acquiring an upper coefficient and a lower coefficient according to the value of the average latency; multiplying the average latency by the upper coefficient to obtain the upper latency threshold; multiplying the average latency by the lower coefficient to obtain the lower latency threshold.
4. The method of claim 1, wherein the slow disk is a hard disk drive (HDD). The method of determining the access latency threshold according to the average latency comprises the following steps: wherein, is an access latency threshold value; is an average latency; is an access latency of the area to be repaired.
5. The method of claim 1, wherein the slow disk is a hard disk drive (HDD). After the step of determining the access latency threshold according to the average latency, the method further comprises the following steps: acquiring a disk area in the disk area other than the area to be repaired as the area to be repaired, wherein the access latency of the disk area is higher than the access latency threshold, and performing disk repair on the area to be repaired.
6. The method of claim 1, wherein the slow disk is a hard disk drive (HDD). The method of comparing the second access latency with the access latency threshold to determine whether the corresponding area to be repaired is repaired and re-adding a disk that is repaired to a service flow comprises the following steps: after triggering sector relocation, acquiring a current disk sector relocation count and a count of sectors that are being relocated by using SMART information of the disk, and determining whether sector relocation is completed according to the sector relocation count in the SMART information; after sector relocation is completed, re-accessing the corresponding area to be repaired to acquire a second access latency of the area to be repaired; if the second access latency is higher than the access latency threshold, checking the disk SMART information to determine whether a new sector relocation is triggered; if a new sector relocation is not triggered, repeatedly attempting to access the area to be repaired, acquiring a second access latency of the corresponding area to be repaired, and comparing and determining until a repeated attempt count exceeds a preset count threshold, then stopping the attempt and outputting that the corresponding sector cannot be repaired. If a new sector relocation is triggered, the sector relocation is waited for completion, it is judged whether the access latency after sector relocation is lower than the access latency threshold, if lower than the access latency threshold, the corresponding to-be-repaired region is repaired successfully; After all to-be-repaired regions are successfully repaired, the whole disk is scanned to determine that there is no to-be-repaired region, and then the disk is re-added to the business process.
7. The method of claim 1, wherein the slow disk is a hard disk drive (HDD). Before the repaired disk is re-added to the business process, further comprising: After the business process receives the disk repair completion notification, the repaired disk data and other disk data in the system are scanned and compared to determine whether the consistency under the erasure correction algorithm is met, if the consistency is not met, data recovery of the repaired disk is triggered, the disk data is updated, and then the disk is added to the business process.
8. A slow disk reuse apparatus in a storage system, the apparatus comprising: Comprise: A to-be-repaired disk determination module is configured to acquire a to-be-repaired region of a disk and isolate the to-be-repaired region from a business, acquire a first access latency of the corresponding to-be-repaired region, and acquire an average latency of a disk region other than the to-be-repaired region; the disk region other than the to-be-repaired region refers to a region of all data disks other than the to-be-repaired region; A relocation module is configured to determine an access latency threshold according to the average latency, compare the first access latency with the access latency threshold, trigger sector relocation of the corresponding to-be-repaired region according to a comparison result, and acquire a second access latency of the corresponding to-be-repaired region after sector relocation; A reuse module is configured to compare the second access latency with the access latency threshold to determine whether the corresponding to-be-repaired region is repaired, and re-add the repaired disk to the business process.
9. An apparatus, comprising: Comprise: One or more processors; And One or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the device to perform the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Instructions stored thereon, when executed by one or more processors, cause the device to perform the method of any one of claims 1-7.
Citation Information
Patent Citations
Recovering and relocating unreliable disk sectors when encountering disk drive read errors
US20010010085A1
Reuse of problematic disks in a redundant disk system
US20150309876A1