Method and system for detecting and correcting errors on a tape in a tape drive system

Abstract: A method and system detect and correct for errors on a tape resulting from, for example, debris on the tape. Location of the tape is continuously monitored, and when an error is detected during a data transfer operation, the tape is moved and re-positioned to rewrite a data block where the error was detected. If the error is not corrected, a minimum threshold requirement is decreased so the system detects the data block as corrected thereby avoiding system hang-ups or the like.

Description: BACKGROUND OF THE INVENTION The present invention generally relates to a method for reducing errors in tape drives. More specifically, the invention relates to hard write and read errors in tape drives due to debris on the head or on the tape itself. Typically, tape drives can be used for storing data from computers, data acquisition systems, and the like. Tape drives are often operated by trained technicians, frequently in controlled environments, to reduce any problems or malfunctions which may arise. However, this is not always the case. Tape drives are more frequently being used in a variety of environments by personnel with no special training in tape drive or tape maintenance and care. Furthermore, tape drives are often required to operate without anyone supervising their operation for an extended period, for example, during back up operations which often take place in the nighttime. Corporate users, like banks, governmental offices, insurance companies and the like often require a tape system which is capable of operating unattended for a period of several hours. This operation is more critical in systems designed as auto loaders, libraries and stackers in which the system automatically picks one tape from a tape magazine without any operator interference. A major source for failure in such systems is debris which accumulates on the head or on the tape itself. Debris may come from the tape, the tape cassette (cartridge) mechanism, the tape drive or the surrounding air. In addition, human debris is often a source for this problem. Debris which accumulates on the head and/or tape will often lift the tape away from the head. As a result, signal output falls exponentially when the distance between the tape and head increases. Therefore, maintaining both a clean head and a clean tape is important. This problem is further apparent in high density tape drives which often record at more than 50,000 flux transitions per inch. At these densities, a small amount of debris may significantly reduce the signal amplitude to the extent that the drive cannot read back any data. When performing a read-while-write operation, a tape drive which encounters a hard write error will typically attempt a rewrite operation of the data further down the tape. In many systems, this rewriting operation may be performed as many as sixteen or more times before the system gives up. If the debris is physically on the tape itself, this rewrite procedure will normally work well; however, if the debris is on the recording head, rewriting the data block several times does not typically solve the problem. During read operations, if the drive encounters a hard read error, it will either try to read the block several times or use error correction characters (ECC) to regenerate the lost data. As long as the debris is on the tape itself, this will normally work; however, with debris on the head, the chances of recovering the data is reduced. Hard write errors have become a more serious problem than hard read errors. A first reason for this is that tape systems often employ powerful ECC systems which can correct even major read errors. Another reason is that systems often can read signals reliably to less than ten percent of their nominal value. In contrast, when writing, most systems require the minimum signal read back in read-while-write mode to be in the order of thirty-five to forty percent. Therefore, a drive may report a hard write error because the read signal has dropped to, as an example twenty percent, although the drive itself would be able to read such a signal. A tougher requirement on the quality of the read signal during the read-while-write operation insures adequate margins for tapes if they are to be read by other tape drives and/or stored for a long period of time. Traditionally, a method which is used to remove debris from recording heads includes some form of cleaning, either manually or using some form of cleaning tape or cleaning cassette/cartridge. Such a method is normally effective for removing debris on the head itself, but typically requires an operator to perform at least part of the operation. As previously stated, this is frequently not desirable or not possible. Additionally, if debris is stuck on the tape itself, head cleaning will normally not solve this problem. To avoid problems with debris on the tape itself, 1/2-inch systems in which tape reels were handled by skilled operators can employ special scrapers built into the tape drive. These scraping devices can be effective in removing debris from the tape. In addition, other systems have been designed with separate scraping units. If a tape system failed with a hard write or read error, the operator may first attempt to clean the head by some manual method. If that did not solve the problem, the operator could then remove the tape reel and run it past a scraping device. Thesa methods, coupled with the fact the systems were operating at fairly low linear densities and with wide tracks, can make such operations reliable. Today, however, the situation has changed. First, the most popular form of tape drive system is no longer the 1/2-inch reel-to-reel system. The 1/4-inch tape cartridge is now the most popular form of tape for data storage. Some cartridges can hold more than two GBytes of data. However, the 1/4-inch tape cartridge has the problems related to hard write and read errors. For such high capacity systems, errors are becoming more and more of a problem. This is partially due to the increase in linear density and number of tracks, and further due to the fact that systems are typically operated by non-skilled workers in all kinds of environments. Additionally, since the tape is inside the cartridge, tape cleaning is more difficult. Traditional scrapers cannot normally be used since they may negatively influence the high density recordings. In the document EP-A-0 208 556 a magnetic tape system with write retry means is disclosed. In case that a write error occurs during writing data on a magnetic tape, a write retry operation is executed. Before the retry of writing is performed, the length of tape, on which the write error has occurred, is erased. The write retry operation is performed on a tape position, following the erased portion. In case that the write error re-occurs, erasing is repeated, and again retry is performed further downstream. If required, such procedure is performed until a predetermined number of write retries has been performed. Thus, a method is provided which is suitable for variable length block systems, since the compatibility of the magnetic tape is not lost, because a maximum value of erased blocks is given. However, since writing errors most likely occur due to debris on the magnetic head and/or magnetic tape, it is additionally desired to remove such debris. Thus, the cited document discloses a method comprising a write retry operation for particular variable length tapes, however, removal of error-inducing debris is not provided. SUMMARY OF THE INVENTION It is, therefore, an object of the present invention to remove debris from the tape and/or the magnetic head and, thereby, to provide a method for reducing hard write and read errors in tape drives. To this end, a method as defined in claim 1 and a system as defined in claim 6 are provided for removing debris from the head or from the tape without the need for a special system or for operator support. In addition, a method is provided for finishing the write operation in a controlled fashion even if all of the debris has not been removed. Additional features and advantages of the present invention are described, and will be apparent from, the detailed description of the presently preferred embodiments and from the drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a diagram of a typical track layout of a tape. Figure 2A illustrates a data track where an error is detected before a block is written. Figure 2B illustrates a data track where an error is detected after a block has been written. Figures 3A and 3B illustrate track layouts where all blocks labeled "N" have an error detected. Figure 4 is a block diagram of a tape drive control unit for monitoring and storing tape position data. Figures 5, 5A, 5B and 5C illustrate the positioning of the tape to correct errors in data blocks of the tape. DETAILED DESCRIPTION OF THE PRESENTLY PREFERRED EMBODIMENTS In accordance with the invention, a method is provided for removing or reducing read errors and write errors during data transfer operations due to debris on a tape or on a head of a tape drive. The method is applicable to 1/4-inch tape cartridges or any other system in which a recording media, such as a tape, is in contact with the head. The present invention will be described with respect to hard write errors since such errors are typically the most serious errors and the most difficult errors to correct. However, the method works equally well for read errors. In most tape drives, the device is operated in a "streaming" mode. That is, the tape is kept running continuously from one end to the other while fixed blocks of data bytes are written one track at a time. Figure 1 shows a typical track layout of a tape 10. Data blocks N, N+1, N+2, ... of the tape 10 are normally of equal size (typically containing 512 or 1024 bytes of user data). The gap area between data blocks is typically small and can be recorded with high density bit patterns. A tape drive may detect a "bad" block, i.e. a block containing debris on the tape 10 or on the head of the tape drive at a point on the tape 10, during the write operation (read-while-write mode) and will normally rewrite the block further down the tape 10. Figures 2A and 2B illustrate this process. In Figure 2A, block N+1 has been determined as a bad block. In a typical rewrite situation, if the drive determines that block N+1 is bad before it actually has finished writing that block, the N+1 block can be rewritten in the next block as shown. However, often the distance between the write head and the read head is larger than the distance between adjacent data blocks. Figure 28 illustrates the situation where the distance between the write head and the read head is large, and the drive is physically writing block N+2 when block block N+1 has been determined as a bad block. When this occurs, block N+1 is not rewritten until block N + 2 has been written. The actual rewrite sequence, therefore, may vary depending upon the actual format of the system and its requirements. However, any bad block will be rewritten at some point further down the tape track. Figure 3A illustrates a situation in which a hard write error occurs where block N has been recorded sixteen times and each block N is bad, i.e. each has failed the read-while-write check. The system will then stop the tape 10 and report a hard write error. Depending upon the system, other hard write error layouts may also occur like that shown in Figure 3B in which all data block N's of the tape 10 are bad. When this hard write error situation occurs like that shown in Figure 3B, a host system will be incapable of detecting whether any recorded block N's can be reliably read back at a later time. A further problem occurs when new data is appended to the recorded tape, for example, after a manual head cleaning operation. In addition, predicting how many of the N blocks were actually recorded on the tape cannot be determined. Therefore, in an append operation, the drive cannot reliably read forward until the last block N because the drive cannot detect whether the block is the last one recorded. Since the drive is continuously unable to write block N correctly, a high probability exists that some debris has accumulated on the head. Debris must then be removed or at least reduced as hereinafter described. When rewriting of a block is required, the drive keeps track of the number of blocks being rewritten. In addition, the drive monitors where it is physically located on the tape 10 at all times. This may be performed by measuring the distance from one of the ends of the tape by counting pulses from a tachometer mouiited on a motor system which moves the tape 10. Pulses may be generated and counted by motor brushes or counted from Hall effect sensors which can be used to control the operation of brushless motors or by similar means. In addition, tapes with prerecorded information along one or more of the tracks may also be used. Such specially recorded track information may then be used to determine the current location of the tape. When a hard write error occurs, the drive ceases writing after a predetermined number of rewrites. This number is less than the number of allowable rewrites when using a format standard. The drive stores tape location data for the last block it tried to write regardless of whether it was able to detect this block. This location will be hereinafter referred to as point T. Figure 4 shows a block diagram of a tape drive control unit which monitors and stores such tape positions. A microprocessor or control unit 12 and a storage device 14, such as a random access memory (RAM), is shown. The RAM 14 stores data generated by the control unit 12 and transfers the stored data back to the control unit 12. A motor system 16 transfers signals for driving of the tape by the control unit 12. These signals carry information which may be used by the control unit 12 to determine the physical tape position. The signals may be pulses which are related to the rotation of the motor generated by a tachometer or a similar device. The control unit 12 may then calculate the position of the tape based on the input from the motor system 16. This information is then stored in the storage device 14. If required, the control unit 12 may read this information at a later time during its operation. System operation begins by the drive running the tape in an opposite direction when an error is detected. The actual time may vary depending upon the particular tape and system being used, but in general, this distance should at least be equivalent to several hundred blocks of data. The tape continues to run in the same direction away from point T while slowly moving the head downward until the recording gaps are at or below the lower tape edge. The tape is then stopped and run in the opposite direction while gradually moving the head upwards until the recording gaps are at or above the upper edge of the tape. The tape continues running in the same direction while moving the head down until it is in a correct position for reading and recording on the track. If necessary, the tape continues running until the head is well back into an already recorded area of the tape. The tape is then stopped and moved in the opposite or original direction again until the head is in the area between the last good block N-1 and the point T. In this area, the write operation is started while the tape is still running in the same direction. In addition, the drive starts writing block N and performs a read-while-write operation at the same time. Block N continues to be written in a read-while-write mode until it is determined as good or until the maximum number of allowable block rewrites has been reached. The head movement operation may, as well, be performed in the opposite mode, that is, moving the head upwards and then moving it downwards. It is not critical to move the head such that the gaps are actually crossing over the edges of the tape; however, the head movement should at least cover a reasonable distance across the tape. This method of moving the head up or down while moving the tape forward and in reverse may be performed repeatedly. Figures 5A - 5C illustrate this process. Figure 5A shows the write operation taking place until a fixed number of bad blocks (N) have been recorded. At this point, information may be stored regarding the location of the last recorded block N (point T). The tape 10 is then moved in the opposite direction for a specified distance, typically several hundred blocks as shown in Figure 5B. The tape 10 is then moved forward as shown in Figure 5C while reading until the last good block N-1 is detected. The write operation is restarted by writing either blocks N or N-1 or gap information until the point T is reached. The writing of block N is continued while performing the read-while-write operation until block N is determined to be good or the maximum number of rewritten blocks is reached. The operation of moving the tape 10 in the opposite direction first and then back again effectively removes debris on the head by wearing it down. In some cases, the operation may be repeated and, if necessary, the tape 10 may move a greater distance in the opposite direction. If, however, debris remains on the head, the system may implement the following steps to avoid system hang-ups, "down" time, and the like. The operation as described above for the hard write error problem will be repeated once. If, however, the error re-occurs, the read-while-write checking is performed with a read threshold set at a lower level, for example, five or ten percent. If debris still exists on the head, lowering of the threshold increases the probability of the block being read as good since a lower threshold decreases the quality requirement. When the bad block can finally be read as good, the drive terminates the write operation with this block and reports to the control unit 12 that the last block was determined as good by using the lower threshold level. This lowering of the read-while-write threshold does not typically remove any debris on the head, but enables the drive to terminate the write operation with a good block which is important for avoiding system hang-ups.

Claims: A method for detecting and correcting an error during a data transfer operation related to a data stream of a tape in a tape drive system including a write/read head, said method comprising: monitoring the location of said tape during said data transfer operation, said location being monitored relative to an end of said tape or prerecorded data on said tape, the locations of which are known from the manufacture of said tape, wherein said monitoring is performed continuously; detecting for an occurrence of said error on said tape; stopping said data transfer operation upon said occurrence of said error; rewinding said tape to a location substantially distant from the location of said error; forwarding said tape to a location of a last good data block preceding the location of said error; characterized by moving said head into a direction of a tape edge during said rewinding of said tape; moving said head into a direction away from said tape edge during said forwarding of said tape; removing debris from said tape and/or said write/read head by said rewinding and/or forwarding of said tape and/or moving of said head; rewriting/rereading a data block of said data stream at said location of said error; and completing said data transfer operation, if a read signal exceeds a threshold level indicative of no errors on said tape. The method of claim 1 further comprising the step of: decreasing said threshold level if said error reoccurs after a predetermined number of repetitions of said rewriting/rereading step. The method of claim 1 or 2 further comprising the step of: continuing said data transfer operation after rewriting/ rereading of said data block. The method of one of the preceding claims wherein said rewriting step writes gap code information instead of said data block at said location of said error. The method of claim 4 further comprising the step of: continuing said data transfer operation after writing said gap code information. A system for detecting and correcting errors during a data transfer operation related to a data stream of a tape in a tape drive system, said system comprising: means for monitoring the location of said tape during said data transfer operation, said location being monitored relative to an end of said tape or prerecorded data on said tape, the locations of which are known from the manufacture of said tape, wherein said monitoring is performed continuously; means for detecting an occurrence of said error on said tape during said data transfer operation; means for stopping said data transfer operation upon said occurrence of said error; means for rewinding said tape to a location substantially distant from the location of said error; means for forwarding said tape to a location of a last good data block preceding said location of said error; characterized by means for moving said head into a direction of a tape edge; means for moving said head into a direction away from said tape edge; said means performing said rewinding and/or forwarding and/or moving such that debris may be removed from said tape and/or said write/read head; means for rewriting/rereading a data block of said data stream at said location of said error; threshold means for setting a threshold level for a read signal, indicative of no errors during said data transfer operation. The system of claim 6 further comprising: means for adjusting said threshold level if said means for rewriting/rereading fails to correct said error.

Inventors: RONNING TORE, SOLHJELL ERIK, RONNING, TORE, SOLHJELL, ERIK
Applicants: TANDBERG DATA, TANDBERG DATA ASA
Application year: 1992
Main classification: G11B20
IPC codes: G11B5, G11B20, G11B23, G11B27