Patent Document

BACKGROUND OF THE INVENTION  
       [0001]     Current generation magnetic disk storage devices are vulnerable to data integrity problems that appear gradually. At first, recovery from such problems may require only the use of the conventional drive Error Correcting Code (ECC) processing or Input/Output (I/O) retry operations. However, these problems gradually worsen to the point that data may become unrecoverable. An example of a data integrity problem of this kind is known as “track squeeze”.  
         [0002]     Track squeeze is seen especially in very high data density devices, when they are used under high loads in server applications. It appears when a track on the disk drive is written only rarely, while one or both of the adjacent tracks are written much more frequently. Due to the finite positioning tolerance of the head actuator mechanism, the electromagnetic forces used to effect adjacent track writes intrude to some extent into the rarely written track, causing reduced signal strength of the affected track. This in turn causes data errors during read operations. This problem can be reduced or avoided by reducing the track density on the disk surface or increasing the sophistication and accuracy of the head actuator and the data read process, but all of these techniques have associated cost.  
         [0003]     When errors such a track squeeze initially begin to appear, the impact is modest enough that conventional disk drive error recovery mechanisms (such as read retry or drive ECC) can recover the data. In that case, the problem is not visible to higher layer I/O processing or application programs as an error, but it nevertheless causes performance loss due to the time required to perform these corrective mechanisms.  
         [0004]     As gradual onset errors such as track squeeze become more severe, they progress beyond the point where disk drive error recovery mechanisms can handle them. In that case, I/O operations begin to fail at the disk drive level. Mechanisms for fault tolerant data storage such as Redundant Arrays of Independent Disks  0  are effective for maintaining data availability even in the presence of unrecoverable errors in the underlying disk drives. However, this is only the case when the error rate is low enough that the probability of errors beyond the recovery capability of RAID is extremely low. Therefore, normal practice with RAID is to consider as “failed” any disk drive that produces more than a very low error rate.  
         [0005]     In the presence of problems such as track squeeze, such a practice may cause disk drives to be considered as “failed” at a rate well in excess of what is acceptable to customers or economically tolerable to storage system suppliers.  
       SUMMARY OF THE INVENTION  
       [0006]     Thus there is a need for a mechanism that can detect gradual onset errors such as track squeeze, and then take corrective action to eliminate the error. Such a mechanism would allow disk drives to continue in normal service as good drives.  
         [0007]     The present invention is directed to techniques that detect impending data errors such as the track squeeze problem, and, furthermore, to repair the problem or impending problem when detected, such as by rewriting the affected tracks. In many cases the problem is detected and repair is effected when the original data can still be read. As a result, that original data is used directly to do the repair.  
         [0008]     In other cases, the data is no longer readable on the disk in question, but when the disk is part of a RAID system, or other system in which higher level, system fault tolerance mechanisms are implemented, the missing data can be recovered via RAID layer mechanisms and then used to repair the track squeeze problem.  
         [0009]     The invention can be implemented as firmware in a storage system, as a component of a general purpose operating system, or inside individual disk drives, or it can use a combination of these implementations.  
         [0010]     The invention can also be implemented as part of a functioning system in use by a customer in the field, in a manufacturing screening process, or in a diagnosis and repair of units returned from the field.  
         [0011]     The present invention offers a number of advantages over the prior art.  
         [0012]     It is frequently desirable to reduce the cost of disk drives in a storage system. This need is particularly acute in massive storage arrays consisting of many individual storage units. “Commodity” drives based on technology used in high volume desktop PC systems are usually the most attractive option, since they provide the lowest cost per megabyte of storage. However, most manufacturers of storage arrays typically consider the commodity drives having the highest available storage density per unit to not be the best choice, because they typically do not provide the highest reliability. For example, while gradual onset errors such a track squeeze can potentially occur in any modern type of disk drive, they are a particular concern in commodity disk drives because of the higher track density and the cost pressures on the drive mechanical and electronic components. In a personal computer (PC) intended for use by an individual, a typical access to the drive occurs so infrequently that errors do not appreciably affect performance. However, in storage arrays used in file servers and the like, as mentioned above, it is necessary to keep disk drive error rates very low, not only to avoid customer data loss, but also to control product support costs due to drive replacement.  
         [0013]     By detecting errors such as track squeeze usually before the point where they are severe enough to cause unrecoverable data loss, the invention protects customer data from these errors. And by corrective action that actually repairs the underlying problem, the invention effectively eliminates errors such as track squeeze from being a factor in limiting the useful life of disk drives or a factor in the failure rate of disk drives in the field. Repairing the underlying problem also repairs the performance loss that appears when the errors are still recoverable by normal disk drive recovery mechanisms such as ECC or read retry. These benefits now makes it economically feasible to now use lower cost higher density disk drives (“commodity” drives), which provide desktop PC technology and manufacturing efficiencies, in high-availability applications such as server and network attached storage systems.  
         [0014]     Also, the invention relies only on properties of conventional industry standard disk drives. It does not require any specialized error indications, counters, or non-standard drive commands. Furthermore, the invention comprises both detection and repair, after which the impending problem is eliminated. It is not merely an enhanced read error retry scheme—which might delay the point at which gradual onset errors become unrecoverable, and which does not correct the underlying problem.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0015]     The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.  
         [0016]      FIG. 1  shows a computer system with associated disk storage.  
         [0017]      FIG. 2  shows the impending error detection process based on observation of I/O timing variance.  
         [0018]      FIG. 3  shows the impending error detection process based on observation of SMART error statistics.  
         [0019]      FIG. 4  shows the impending error detection process based on observation of sequential I/O throughput.  
         [0020]      FIG. 5  shows the impending error detection process based on observation of individual I/O timing.  
         [0021]      FIG. 6  shows the error repair process in its basic form.  
         [0022]      FIG. 7  shows the error repair process in a system where higher layer redundancy mechanisms such as RAID are implemented.  
         [0023]      FIG. 8  shows a step in a disk drive acceptance process or a failure analysis process, based on the impending error detection processes.  
         [0024]      FIG. 9  shows a layering of the detection and repair processes within the user I/O processing path of an operating system, storage system, or disk drive.  
         [0025]      FIG. 10  shows a layering of the detection and repair processes in a surface scan background process for an operating system, storage system, or disk drive.  
         [0026]      FIG. 11  shows a layering of the detection and repair processes within an operating system or storage system that implements RAID.  
         [0027]      FIG. 12  shows an example of I/O throughput as a function of disk drive block address for a normally operating disk drive, and for a disk drive affected by track squeeze.  
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0028]     A description of preferred embodiments of the invention follows.  
         [0029]      FIG. 1  shows a computer system, which may be a server system or a user workstation such as a desktop or laptop computer. The host or base computer  100  (the central processor of the computer system excluding its attached storage), connects to a storage controller  120 . The storage controller  120  may be a simple disk controller, or it may incorporate more advanced storage mechanisms such as Redundant Array of Independent Disks (RAID). The computer  100  is connected to the controller  120  via an interconnect  110 . The interconnect may be a system bus such as the Peripheral Component Interface (PCI) bus, or it may be a Storage Area Network (SAN) based on Fibre Channel or other SAN technology. The storage controller  120  in turns connects to one or more disk drives  140 , via disk channels  130 . The disk channels may be provided any suitable disk drive interface such as Advanced Technology Attachment (ATA), Small Computer System Interface (SCSI) or other disk interfaces.  
         [0030]     The processes described below may be implemented in computer  100 , in storage controller  120 , or within drive electronics  150  contained in the disk drives  140 . When implemented in computer  100 , typically the implementation would be part of the operating system or device drivers installed in that computer. When implemented in computer  100  or storage controller  120 , the recovery process described in  FIG. 7  may be used, if the computer or storage controller includes higher system layer functions, such as a RAID fault tolerance mechanism, data mirroring, or backup. When implement in the drive electronics  150  of disk drives  140 , typically the recovery process described in  FIG. 6  would be applied, unless provision is made to communicate with any higher layer fault tolerance mechanisms implemented elsewhere, e.g., in storage controller  120 .  
         [0031]     In addition, the processes described below might be implemented in part in one component and in part in another. For example, the detection processes described in  FIGS. 2 through 5  might be implemented in disk drives  140 , while the recovery mechanism described in  FIG. 7  is implemented in storage controller  120 .  
         [0032]      FIGS. 2 through 5  shows flow charts for four different variations for processes that detect impending data integrity errors (impending data loss).  
         [0033]     In each of these flow charts, the process shown performs the actual I/O operations requested by other components of the system, along with detection steps that serve to detect impending data errors. The intent of these steps is to be able, in many cases, to indicate that data loss is threatened before such loss actually occurs. As a result, the threatened data is typically still readable, and this data is available for the repair process. Several of the variations shown here rely on a common characteristic of the class of errors to be detected, namely that the early stages of gradual onset errors such as track squeeze are recoverable by the disk drive using its normal error recovery mechanism, but these mechanisms take time and are therefore detectable by observing the drive performance. It should be noted that these approaches are applicable to all disk drives, and are not dependent on any unusual or customized error reporting capabilities in the disk drives.  
         [0034]      FIG. 2  illustrates an impending data error detection process that uses I/O timing variance for its detection mechanism. The process begins at step  210  by accepting an I/O request, such as a data read or data write operation, from other components of the system. At step  220 , the current time is recorded. Next at step  230 , the I/O request is performed in the usual manner, such as by sending an I/O command to the disk drive, which in turn causes a data read or write operation to occur from or to the magnetic media on the disk, such as via a read/record head. Upon completion, at step  240  the elapsed time required to perform the I/O is computed. In step  250 , computed elapsed time values from a number of consecutive I/O requests are analyzed statistically to compute the variance of the elapsed time. In step  260 , the calculated variance is compared with a threshold setting to determine if it exceeds the expected variance. The expected variance can be established from data provided by the disk drive manufacturer, or from measurements made as part of product design or disk drive type acceptance. In step  270 , if the observed variance exceeds the established threshold value, the process indicates that impending data loss has been detected. In either case, the I/O operation is now complete.  
         [0035]      FIG. 3  illustrates an impending data error detection process that uses disk drive SMART (Self-Monitoring, Analysis, and Reporting Technology) counters for its detection mechanism. Such SMART counters are typically maintained by most modern commodity disk drives  140  and can be read by drive electronics  150  and/or storage controller  120 . The process begins at step  210  by accepting an I/O request from other components of the system. At step  230 , the I/O request is performed in the usual manner. Upon completion, at step  310  the SMART counters are obtained. In step  320 , appropriate SMART counters, such as the Raw Read Error Rate counter, are compared with a threshold setting. The threshold setting is typically chosen by design and may be supplied by the manufacturer of the disk drive. At step  270 , if the counter value is beyond the threshold, the process indicates that impending data loss has been detected. In either case, the I/O operation is now complete.  
         [0036]      FIG. 4  illustrates an impending data error detection process that uses deviation from expected throughput for its detection mechanism. The process begins at step  210  by accepting an I/O request from other components of the system. At step  220 , the current time is recorded. Next at step  230 , the I/O request is performed in the usual manner. Upon completion, at step  240  the elapsed time required to perform the I/O is computed. In step  410 , computed elapsed time values from a number of consecutive I/O requests for a given disk drive track or portion of a track are analyzed statistically to compute the average I/O throughput. In step  420 , the calculated throughput is compared with a threshold setting to determine if it exceeds the expected variance. The expected throughput can be established from data provided by the disk drive manufacturer, or from measurements made as part of product design or disk drive type acceptance; this is described further below in  FIG. 12 . In step  270 , if the observed throughput is less than the established threshold value, the process indicates that impending data loss has been detected for the track or portion of the track in question. In either case, the I/O operation is now complete.  
         [0037]      FIG. 5  illustrates an impending data error detection process that uses I/O timing and I/O operation timeout for its detection mechanism. The process begins at step  210  by accepting an I/O request from other components of the system. At step  220 , the current time is recorded. Next at step  230 , the I/O request is performed in the usual manner. Upon completion, at step  240  the elapsed time required to perform the I/O is computed. In step  510 , the elapsed is compared with a threshold setting to determine if it exceeds the expected time required to perform an I/O operation, or if the I/O operation timed out. The expected I/O latency can be established from data provided by the disk drive manufacturer, or from measurements made as part of product design or disk drive type acceptance. In step  270 , if the I/O timed out or the elapsed time exceeds the established threshold value, the process indicates that impending data loss has been detected. In either case, the I/O operation is now complete.  
         [0038]      FIGS. 6 and 7  are flow charts for processes that respond to an indication of impending data loss by taking corrective action.  
         [0039]     In each of these processes, the corrective action has the effect of completely repairing the impending error; that is, the operation of the disk (for that track or portion of the track) is restored to full normal operation at normal performance. This produces several benefits. First, the gradual onset of the data integrity error is stopped before it becomes severe enough to make the data unrecoverable. Second, as discussed above, the normal disk drive recovery mechanisms triggered by the gradual onset error have a cost in I/O performance; the repair process, by eliminating the error, restores the drive to its full performance. The corrective action appropriate for the “track squeeze” error is rewriting of the affected tracks or portion of a track. A single rewrite operation suffices for current generation disk drives. However, the processes described here are not limited to a single rewrite operation, and other recovery mechanisms (for example, multiple rewrite operations) may be employed if the disk drive technology changes to make such changes necessary. Furthermore, the recovery process may rewrite a region larger than a single track. This effectively handles cases where track squeeze occurs on several adjacent tracks, or when the disk access patterns are such that detectable track squeeze on one track is an indication that track squeeze is likely to be a near-term risk on other tracks in the region.  
         [0040]     In  FIG. 6 , the correction process starts by performing an I/O request  610  according to any of the processes shown above in  FIGS. 2 through 5 . In step  620 , the process checks whether the I/O operation process  610  indicated that impending data loss was detected. If not, the I/O operation is complete. If impending data loss was detected, step  630  then determines whether the I/O operation was a read operation and that operation successfully read the data requested. If not (i.e., either the operation was not a read, or it was not successful), at step  640  the process performs a read operation. This read operation  640  may include more extensive than normal error recovery mechanisms, for example the use of longer than normal timeouts, to maximize the probability that the data can be read from the disk drive. At step  650 , the process checks if that read operation succeeded; if not, the I/O operation is unsuccessful and no corrective action is possible, at step  660 . If data was read successfully either via step  630  or step  650 , the data obtained is written back to the disk at step  670 . At this point, the I/O operation is complete and successful.  
         [0041]      FIG. 7  illustrates an I/O process incorporated in a storage system that includes data recovery mechanisms beyond that which can be performed by the disk drives  140  themselves. Such data recovery mechanisms may include RAID, or other mechanisms such as data replication or data backup. They may also include mechanisms that can reconstruct the needed data on demand from information maintained in higher layer memory data, for example RAID metadata, or control structures in a file system or storage virtualization (logical volume manager) system. The process starts by performing an I/O request  610  according to any of the processes shown above in  FIGS. 2 through 5 . In step  620 , the process checks whether the I/O operation process  610  indicated that impending data loss was detected. If not, the I/O operation is complete. If impending data loss was detected, step  630  then determines whether the I/O operation was a read operation and that operation successfully read the data requested. If not (i.e., either the operation was not a read, or it was not successful), at step  640  the process performs a read operation. This read operation  640  may include more extensive than normal error recovery mechanisms, for example the use of longer than normal timeouts, to maximize the probability that the data can be read from the disk drive. At step  650 , the process checks if that read operation succeeded. If not, at step  700  the process uses the available higher layer data recovery mechanisms (such as RAID) to reconstruct the data that could not be read from the disk drive. The data obtained either by successful read operations at step  630  or  650 , or by the higher layer data reconstruction step  700 , is then written back to the disk at step  710 . At this point, the I/O operation is complete and successful.  
         [0042]      FIG. 8  is a flow chart for a device acceptance or fault analysis process. The illustrated process could be one of the steps in an incoming disk drive screening process used in a manufacturing line. It can also be used as a step in a fault analysis process applied to disk drives suspected to be defective.  
         [0043]     The process begins at step  810  by initializing an error counter. Next, at step  820 , a read request is performed according to any of the processes described in  FIGS. 2 through 5 . Upon completion, the process tests whether the read process  820  reported impending data loss. If yes, at step  840  the error counter is incremented, and at step  850  known good data is written to repair the impending error. Step  860  then tests whether the disk scan is complete, and if not, the process repeats steps  820  through  850  as required to scan the disk drive thoroughly. Upon completion of the scan, at step  870  the error counter is compared with a threshold value. The threshold value is set by design or engineering policy, based on a determination of what level of impending data loss indication is considered acceptable and normal in the current generation of disk drives. If the error counter exceeds the established threshold, the disk drive is rejected at step  890 ; otherwise it is accepted at step  880 .  
         [0044]      FIGS. 9 through 11  illustrate how the processes described above may be incorporated into the layered structure of an operating system storage subsystem, storage controller, or disk drive I/O processing subsystem.  
         [0045]     In  FIG. 9 , the detection and recovery processes are incorporated in the processing path that processes I/O requests from the users or application programs that use the storage device. These I/O requests are represented schematically by arrow  900 . These I/O requests may be submitted, for example, via operating system request mechanisms, or via messages delivered across a system bus or SAN. The lowest processing layer  930  is the conventional I/O processing layer, for example a device driver. Layered above that layer  930  is impending error detection layer  920 , which implements any of the processes shown in  FIGS. 2 through 5 . Layered above that is an error recovery layer  910 , which implements the process described in  FIG. 6  (or possibly that described in  FIG. 7 ).  
         [0046]     In  FIG. 10 , the detection and recovery processes are used by a disk surface scan process  1000 . This approach is useful when it is desirable to scan the entire surface of the disk drive (or all disk drives) for gradual onset errors, rather than only rely on detecting such impending errors when the affected area is actually referenced by users or application programs. Note that both approaches may be combined within a single system, i.e., both the methods of  FIG. 9  and the method of  FIG. 10  may exist in a system at the same time. This provides both real-time recovery from errors detected during user I/O handling, and background scanning for errors on the entire disk or disk array.  
         [0047]     Surface scan process  1000  generates read requests such as to scan over the entire disk drive, or array of disk drives. Typically, this process will be responsive to system load to avoid a significant impact on application performance. These I/O requests are passed down the layers. The lowest processing layer  930  is the conventional I/O processing layer, for example a device driver. Layered above that layer  930  is impending error detection layer  920 , which implements any of the processes described in  FIGS. 2 through 5 . Layered above that layer  920  is error recovery layer  910 , which implements the process described in  FIG. 6  (or possibly that described in  FIG. 7 ).  
         [0048]      FIG. 11  illustrates an example of the detection and recovery processes incorporated in a storage system that implements RAID. The lowest processing layer  930  is the conventional I/O processing layer, for example a device driver. Layered above that layer  930  is impending error detection layer  920 , which implements any of the processes described in  FIGS. 2 through 5 . Layered above that layer  920  is RAID subsystem  1100 . Contained within the RAID subsystem is recovery process  1110 , which implements the process described in  FIG. 7 . In cases where the recovery process cannot recover data from an individual disk drive, it employs the higher layer redundancy mechanisms of RAID to reconstruct the lost data, which it then uses to correct the error as shown in  FIG. 7 , at steps  700  and  710 .  
         [0049]      FIG. 12  illustrates that measured I/O throughput is dependent on disk block address, and shows an example of throughput affected by errors such as track squeeze.  
         [0050]     Graph  1200  is a typical example of measured I/O throughput for a fully functional drive. The graph shows disk block address on the X-axis vs. throughput on the Y-axis. As shown here, throughput is not constant for all blocks; instead it varies in a fairly smooth fashion according to block address. The underlying reason for this is that in modern disk drives the number of blocks per track (i.e., per disk revolution) changes according to the circumference of the track, so lower block numbers, which are closer to the outer (longer) tracks, correspond to more sectors accessed per disk revolution. For a given disk drive model, the expected throughput graph  1200  is fixed, and can be learned from data provided by the drive manufacturer or measured during system design or as part of drive type acceptance.  
         [0051]     Graph  1210  shows an example of the change in I/O throughput caused by gradual onset errors such as track squeeze. In this example, region  1220  of the graph shows lower than expected throughput and deviates significantly from the corresponding region of the normal smooth graph  1200 . This deviation, when it exceeds a threshold set by design, is used in the process described in  FIG. 4  as indication of impending data loss.  
         [0052]     While this invention has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.

Technology Category: g