Method of converting a hybrid hard disk drive to a normal HDD

A method of converting a hybrid hard disk drive (HDD) to a normal HDD when a system is powered on depending on whether the total number of defective blocks in a non-volatile cache (NVC) exceeds a predetermined threshold. The method of converting a hard disk drive (HDD) from a hybrid HDD to a normal HDD where the HDD has a normal hard disk and a non-volatile cache includes the steps of determining whether a mode conversion flag is enabled during a power-on period. When the mode conversion flag is enabled, operating the HDD as a normal HDD. When the mode conversion flag is disabled, determining whether an operating mode of the HDD is a normal mode or a hybrid mode. When the operating mode of the HDD is in the normal mode, the HDD operates as a normal HDD. A determination is made when the HDD is in the hybrid mode as to whether the total number of defective blocks in the non-volatile cache is greater than a predetermined threshold. The HDD is operated as a hybrid HDD when the total number of defective blocks is not greater than the threshold. The mode conversion flag is enabled and the HDD is operated as a hybrid HDD when the total number of defective blocks is greater than the threshold.

CROSS-REFERENCE TO RELATED APPLICATION

This U.S. non-provisional application claims priority under 35 U.S.C. §119 of Korean Patent Application No. 10-2007-0023167 filed on Mar. 8, 2007, the entire contents of which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method of converting a hybrid hard disk drive (HDD) to a normal HDD. More particularly, embodiments of the invention relate to a method of converting a hybrid HDD to a normal HDD when a system having the hybrid HDD is powered on depending on whether the total number of defective blocks in a non-volatile cache is greater than a predetermined threshold.

2. Discussion of Related Art

A hybrid hard disk drive (HDD) is a type of HDD that is a combination of a normal hard disk and a non-volatile cache (NVC). A spindle motor must be rotated at a predetermined speed in order to read a file from a normal hard disk, but the spindle motor need not be rotated in order to read a file from a NVC. Thus, it is possible to reduce a time required to boot the operating system or to access data stored therein by storing files or data files for booting the operating system in an NVC, such as flash memory, and reading them from the NVC. Also, as the spindle motor need not be rotated in order to read the files from the NVC, power consumption can be reduced.

FIG. 1is a block diagram of a computer system100with a hybrid HDD120. Computer system100includes a host110and hybrid HDD120. Hybrid HDD120includes a normal hard disk130and NVC140. The number of times data can be erased from a flash memory that is used as NVC140is limited.

FIG. 2is a graph illustrating an error rate versus the number of erasing times that data is erased from a flash memory. Erasing a flash memory is performed in block units and data must be erased from a block before the block is programmed. When the number of erasing times exceeds a limited number of erasing times, the rate of error in a programming operation or an erasing operation increases exponentially. A block in which the number of erasing times is greater than the limited number of erasing times available may be considered a defective block. A wear leveling technique may be used to suppress the number of erasing times on a specific block from being significantly increased. This is done by dispersedly performing erasing operations on a plurality of blocks in order to prevent the erasing operation or a programming operation from being performed repeatedly on the same block. This delays the occurrence of a defective block.

In general, a flash memory includes spare blocks which are used to replace a defective block. However, when all spare blocks are used, it is difficult to expect normal operation of the flash memory. Accordingly, there is a need for a method of converting a hybrid HDD that utilizes both a normal hard disk and an NVC into a normal HDD that uses only the normal hard disk before the NVC140reaches its use limit.

SUMMARY OF THE INVENTION

The present invention provides a method of converting a hybrid hard disk drive (HDD) to a normal HDD when the system is powered on depending on whether the total number of defective blocks in a non-volatile cache (NVC) exceeds a predetermined threshold. In an exemplary embodiment, the method of converting a hard disk drive (HDD) from a hybrid HDD to a normal HDD where the HDD has a normal hard disk and a non-volatile cache includes determining whether a mode conversion flag is enabled during a power-on period. When the mode conversion flag is enabled, operating the HDD as a normal HDD. When the mode conversion flag is disabled, determining whether an operating mode of the HDD is in a normal mode or a hybrid mode. When the operating mode of the HDD is in the normal mode, the HDD is operated as a normal HDD. A determination is made when the HDD is in the hybrid mode as to whether the total number of defective blocks in the non-volatile cache is greater than a predetermined threshold. The HDD is operated as a hybrid HDD when the total number of the defective blocks is not greater than the threshold. The mode conversion flag is enabled and the HDD is operated as a hybrid HDD when the total number of defective blocks is greater than the threshold.

DESCRIPTION OF EMBODIMENTS

FIG. 3illustrates a block diagram of hybrid HDD320and host310. Host310may be, for example, a computer system. Hybrid HDD320includes controller321, memory322, driving unit323, read/write (R/W) unit324, normal hard disk330, and a non-volatile cache (NVC)340. Controller321controls the overall operation of hybrid HDD320and allows hybrid HDD320to exchange data or commands with host310. Memory322temporarily stores data or programs necessary to control the operation of controller321. A method of converting a hybrid HDD into a normal HDD may be stored in the form of a program in memory322. Driving unit323includes a voice coil driving unit that supplies current for driving a voice coil, and a spindle motor driving unit that drives a spindle motor. R/W unit324includes a pre-amplifier that amplifies data read from normal hard disk330and a write driver that amplifies data transmitted from host310. Hybrid HDD320uses both the normal hard disk330and NVC340in a hybrid mode. In order to convert hybrid HDD320back into a normal HDD, NVC340is deactivated and controller321informs host310that NVC340is deactivated. Thereafter, only the normal hard disk330is used in a normal mode.

FIG. 4Ais a flowchart illustrating a method of converting a HDD from a hybrid HDD to a normal HDD in accordance with an embodiment of the invention. When a system with the HDD is powered on, a determination is made whether or not a mode conversion flag is enabled at step S410. This determines whether or not to convert the HDD from a hybrid HDD to a normal HDD. In particular, if the mode conversion flag is enabled, data stored in an NVC is moved to a normal hard disk at step S422and the hybrid HDD is to be converted into a normal HDD or the hybrid HDD has been converted into the normal HDD. At step S424, the hybrid mode is turned off and the mode conversion flag is disabled and the HDD operates as a normal HDD (operation S429).

FIG. 4Billustrates the state of the mode conversion flag when the hybrid HDD is converted into the normal HDD. If the mode conversion flag is not enabled, a determination is made at step430whether the current HDD operating mode is a normal mode or a hybrid mode. If the HDD is not operating in the hybrid mode, then the method proceeds to step S429and the HDD operates as a normal HDD. If the current HDD operating mode is the hybrid mode, the state of the NVC is checked at step S440. At step S450, a check is performed to determine if the total number of defective blocks in the NVC is greater than a predetermined threshold. The threshold is determined by the total number of spare blocks in the NVC. In particular, the threshold may be determined differently according to a defect management method for a flash memory used as an NVC.

The defect management method for a flash memory may be categorized as two types based on whether to allow use of the flash memory when the total number of defective blocks in the flash memory is greater than that of the spare blocks in the flash memory. In a first type of defect management method, if the total number of defective blocks is greater than that of spare blocks, the flash memory is not used any further. In a second type of defect management method, if the total number of defective blocks is greater than that of spare blocks, the flash memory is temporarily used while the total number of available valid blocks is reduced one by one.

If a flash memory managed according to the first type of defect management method is used as an NVC in a hybrid HDD, the threshold may be set to be a value obtained by subtracting a user margin from the total number of spare blocks. In this manner, it is possible to convert the hybrid HDD into a normal HDD before the total number of defective blocks becomes greater than that of the spare blocks in the flash memory hybrid HDD. That is, the hybrid HDD is converted into the normal HDD before the flash memory can be used any further.

If a flash memory managed according to the second type of defect management is used such as an NVC in a hybrid HDD, the threshold may be set as the total number of spare blocks. Even if the total number of defective blocks is greater than that of the spare blocks, the flash memory can be temporarily used by reducing the total number of available valid blocks one by one. This allows the HDD to temporarily operate in the hybrid mode. If it is determined in operation S450that the total number of defective blocks is not greater than the threshold, the HDD operates as a hybrid HDD at step S470. If it is determined in operation S450that the total number of the defective blocks is greater than the threshold, the mode conversion flag is enabled in step S460and the HDD operates as a hybrid HDD at step S470. After the operation of a normal HDD has finished (step S429) or the hybrid HDD has finished its operation (step S470), the system having the HDD is powered off.

In order to guarantee stable operation of the system, the hybrid HDD is not converted directly into the normal HDD when the mode conversion flag is enabled at step S460. Instead, the HDD operates on an interim period basis as a hybrid HDD between when the mode conversion flag is enabled at step S460and when the system is powered off after step S470. An “interim period” illustrated inFIGS. 4A,5A,6A, and7A denotes the above interim state. Thereafter, when the system is again powered on, the hybrid HDD is converted to the normal HDD.

As illustrated inFIG. 4A, the mode conversion flag is enabled when the total number of the defective blocks is greater than the threshold (step S460) and is disabled when the current HDD operating mode is converted from a hybrid mode to a normal mode (step S424).

During an Nth power-on of the system having the HDD, if the mode conversion flag is disabled in step S410, the current HDD operating mode is in the hybrid mode (step S430), and the total number of defective blocks in the NVC is not greater than the threshold (steps S440and S450), then the HDD operates as a hybrid HDD (step S470). In this case, during the operation of the hybrid HDD (step S470), the total number of defective blocks in the NVC becomes greater than the threshold and the system is powered off.

During an N+1th power-on of the system, if the mode conversion flag is disabled (step S410), the HDD operates in the hybrid mode (step S430), and the total number of defective blocks is greater than the threshold (steps S440and S450), then the mode conversion flag is enabled (step S460) and the HDD operates on an interim period basis as a hybrid HDD (step S470). The system is then powered off.

During an N+2th power-on of the system, if the mode conversion flag is enabled (step S410), then the hybrid mode is turned “off” and the HDD operates as a normal HDD (step S429). If it is determined in step S410that the mode conversion flag is enabled, then data stored in the NVC is moved to the normal hard disk (step S422). The hybrid mode is then turned “off” and the mode conversion flag is disabled (step S424). Then the HDD operates as a normal HDD (step S429) and the system is powered off. During an N+3th power-on of the system, if the mode conversion flag is disabled (step S410) and the HDD operating mode is in the normal mode (step S430), the HDD operates as a normal HDD (step S429).

FIG. 5Ais a flowchart illustrating a method of converting a HDD from a hybrid HDD to a normal HDD in accordance with an embodiment of the present invention.FIG. 5Billustrates a mode conversion flag state when a hybrid HDD is converted into a normal HDD according to the method ofFIG. 5A. Steps S510, S522, S524, S529, S530, S540, S550, S560, and S570ofFIG. 5Acorrespond to operations S410, S422, S424, S429, S430, S440, S450, S460, and S470ofFIG. 4Arespectively. Similarly, a mode conversion flag is enabled when the total number of defective blocks is greater than a predetermined threshold (step S560) and is disabled when the HDD operating mode is converted from a hybrid mode to a normal mode (step S524). However, the method illustrated inFIG. 5Afurther includes a loop back for determining again whether the total number of defective blocks in an NVC is greater than the threshold at steps S540and S550after the hybrid HDD operates (S570) and before the system is powered off. Thereafter, operation S560or S570is performed again according to the result of determining again whether the total number of defective blocks in an NVC is greater than the threshold at steps S540and S550.

The difference between the methods ofFIG. 5AandFIG. 4Ais apparent from a comparison ofFIG. 5BandFIG. 4B, which will be described with reference toFIG. 5B. During an Nth power-on of the system, if the mode conversion flag is disabled (step S510), the HDD is operating in a hybrid mode (step S530), and the total number of defective blocks in an NVC is not greater than a predetermined threshold (steps S540and S550), then the HDD operates as a hybrid HDD (step S570). During operation of the hybrid HDD (step S570), the total number of defective blocks becomes greater than the threshold. A determination is made again as to whether the total number of defective blocks is greater than the threshold (steps S540and S550) and the mode conversion flag is enabled when the total number of the defective blocks is greater than the threshold (step S560) and the HDD operates as a hybrid HDD on an interim basis (step S570). The system is then powered off.

During an N+1th power-on of the system, if the mode conversion flag is enabled (step S510) then the hybrid mode is turned “off” and the HDD operates as a normal HDD (step S529). If it is determined in step S510that the mode conversion flag is enabled, data stored in the NVC is moved to the normal HDD at step S522, the hybrid mode is turned “off” at step S524and the mode conversion flag is disabled at step S524. The HDD is operating as a normal HDD (step S529) and the system is then powered off. During an N+2th power-on of the system, if the mode conversion flag is disabled (step S510) and the HDD operating mode is in normal mode (step S530), then the HDD operates as a normal HDD (step S529).

FIG. 6Ais a flowchart illustrating a method of converting a HDD from a hybrid HDD to a normal HDD, according to another embodiment of the present invention.FIG. 6Billustrates the state of a mode conversion flag when the hybrid HDD is converted into a normal HDD according to the method ofFIG. 6A. First, if a system having a HDD is powered on, step S610determines whether a mode conversion flag is enabled. If the mode conversion flag is enabled, the HDD operates as a normal HDD at step S629. If the mode conversion flag is enabled, step S621determines whether the hybrid mode is turned “off.” If it is determined in step S621that the hybrid mode is not turned “off”, data stored in an NVC is moved to a normal hard disk at step S622, the hybrid mode is turned “off” at step S623, and the HDD operates as a normal HDD in step S629. If it is determined in step S621that the hybrid mode is turned “off”, the HDD operates directly as a normal HDD at step S629.

If it is determined in step S610that the mode conversion flag is disabled, a determination is made whether the total number of defective blocks in the NVC is greater than a predetermined threshold (steps S640and S650). As described above, the threshold may be set to be the total number of spare blocks in the NVC, or a value obtained by subtracting a user margin from the total number of spare blocks. If it is determined in step S650that the total number of the defective blocks is not greater than the threshold, the HDD operates as a hybrid HDD in step S670. If the total number of defective blocks is greater than the threshold, the mode conversion flag is enabled at step S660and the HDD operates as a hybrid HDD at step S670on an interim basis. After the normal HDD has finished operation (step S629) or the hybrid HDD has finished operation (step S670), the system is powered off.

Unlike the embodiments described with reference toFIGS. 4A and 5A, the method ofFIG. 6Aillustrates that the mode conversion flag is enabled when the total number of defective blocks is greater than the threshold (step S660), and maintains the enabled state even when the HDD operating mode is converted from the hybrid mode to the normal mode at steps S623and S629.

Referring toFIG. 6B, during an Nth power-on of the system, if the mode conversion flag is disabled (step S610) and the total number of the defective blocks in the NVC is not greater than the threshold (steps S640and S650), then the HDD operates as a hybrid HDD at step S670. During the operation of the hybrid HDD (step S670), the total number of defective blocks becomes greater than the threshold and the system is powered off.

During an N+1th power-on of the system, if the mode conversion flag is disabled at step S610and the total number of the defective blocks is greater than the threshold (steps S640and S650), then the mode conversion flag is enabled at step S660and the HDD operates as a hybrid HDD at step S670on an interim basis. The system is then powered off.

During an N+2th power-on of the system, if the mode conversion flag is enabled at step S610and the hybrid mode is not turned “off” (step S621), then the data stored in the NVC is moved to a normal hard disk at step S622, the hybrid mode is turned “off” (step S623), and the HDD operates as a normal HDD at step S629. The system is then powered off. During an N+3th power-on of the system, if the mode conversion flag is enabled at step S610and the hybrid mode is “off” (step S621), then the HDD operates directly as a normal HDD at step S629.

FIG. 7Ais a flowchart illustrating a method of converting a hybrid HDD to a normal HDD according to another embodiment of the present invention.FIG. 7Billustrates the state of a mode conversion flag when the hybrid HDD is converted into a normal HDD according to the method ofFIG. 7A. Operations S710, S721, S722, S723, S729, S740, S750, S760, and S770illustrated inFIG. 7Acorrespond to operations S610, S621, S622, S623, S629, S640, S650, S660, and S670respectively ofFIG. 6A. The mode conversion flag is enabled when the total number of defective blocks is greater than a predetermined threshold in step S760. The conversion flag is also enabled when the HDD operating mode is converted from a hybrid mode to a normal mode at steps S723and S729. However, unlike in the embodiment referenced inFIG. 6A, the method ofFIG. 7Afurther includes the step of determining again whether the total number of defective blocks in the NVC is greater than the threshold at steps S740and S750. If the total number of defective blocks has already been determined as not being greater than the threshold at step S750, a determination is made again after the hybrid HDD operates at step S770and before the system is powered off. Steps S760or S770is performed again based on the result of determining whether the total number of defective blocks in the NVC is greater than the threshold.

The difference between the methods ofFIG. 7AandFIG. 6Ais apparent from a comparison ofFIGS. 7B and 6B. In particular as referenced inFIG. 7B, during an Nth power-on of the system, if the mode conversion flag is disabled at step S710and the total number of defective blocks in the NVC is not greater than the threshold from steps S740and S750, then the HDD operates as a hybrid HDD at step S770. During the operation of the hybrid HDD at step S770, the total number of the defective blocks becomes greater than the threshold. Next, it is again determined whether the total number of defective blocks is greater than the threshold (steps S740and S750). If the total number of defective blocks is greater than the threshold, the mode conversion flag is enabled at step S760and the HDD operates as a hybrid HDD at step S770. The system is then powered off.

During an N+1th power-on of the system, if the mode conversion flag is enabled from step S710and the hybrid mode is not turned “off” at step S721, data stored in an NVC is moved to a normal HDD at step S722. The hybrid mode is turned “off” at step S723and the HDD operates as a normal HDD at step S729. During an N+2th power-on of the system, if the mode conversion flag is enabled at step S710and the hybrid is turned “off” at step S721, then the HDD directly operates as a normal HDD in step S729. In this manner, it is possible to convert a hybrid HDD into a normal HDD before a flash memory used as an NVC in a hybrid HDD reaches its use limit.