This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2009-146798, filed Jun. 19, 2009; the entire contents of which are incorporated herein by reference.
Embodiments described herein relate generally to a duplexing apparatus to control a duplexed storage unit, and a duplexing control method applied to the processor.
A computer is used for executing various operations in many systems. If a failure occurs in such a system and a system goes down, the influence is serious. Therefore, various measures are taken to increase the reliability of a system.
Jpn. Pat. Appln. KOKAI Publication No. 2008-123481 discloses a technique, in which a storage medium (flash drive) provided in a computer system is mirrored, and the redundancy of data stored in the storage medium is improved, thereby increasing the reliability.
However, in the technique disclosed in the above Publication No. 2008-123481, mirroring is performed, and writing is completed after data is written to two storage media. This requires much load and time for writing data, compared with writing data to one storage medium. This problem is conspicuous in a flash memory having a slow writing speed.
In general, according to one embodiment, a duplexing apparatus includes a controller configured to write data in a first storage module when the data is transferred from a host computer, to read the data from the first storage module when the notice has been transmitted to the host computer, the notice showing that the data is written in the first storage module and a second storage module, and to write the data read from the first storage module in the second storage module, and a transmission module configured to transmit the notice to the host computer when the data is written in the first storage module.
An embodiment of the invention will be explained hereinafter with reference to the accompanying drawings.
As described above, the duplexing apparatus 20 is connectable to the host computer 10, and has a function of duplexing and storing various data transferred from the host computer 10. The duplexing apparatus 20 comprises a communication module 21, a controller 22, and duplexing data storage 30. The communication module 21 transfers and receives data with the host computer 10. The controller 22 controls writing and reading of the data transferred from the host computer 10. The controller 22 comprises a CPU 23 that is a core of the controller 22, and a flash memory (a management information storage area) 24. The flash memory 24 comprises a difference information storage area 24A, and a priority information storage area 24B. The duplexing data storage 30 comprises a SSD0 (first storage module), and a SSD1 (second storage module). The storage information stored in the flash memory (management information storage area) 24 includes difference information compared with the other SSD, to which data is not written, when data is written to one of SSD0 and SSD1, and priority information in data storing in storage media in the duplexing apparatus 20. The data difference information is stored in the difference information storage area 24A, and the priority information is stored in the priority information storage area 24B.
First, the host computer 10 transfers data to the controller 22 of the duplexing apparatus 20. The controller 22 of the duplexing apparatus 20 writes the data transferred from the host computer 10 to SSD0 of the duplexing data storage according to predetermined priority information. After storing the data transferred from the host computer 10 to SSD0 of the duplexing data storage 30, the controller 22 sends a notice of write completion to the host computer 10. Actually, as described above, only the operation of storing the data transferred from the host computer 10 to SSD0 of the duplexing data storage 30 is completed, and the operation of storing the data in SSD1 of the duplexing data storage 30 is not completed. After sending the notice of write completion to the host computer 10, the controller 22 reads the data stored in SSD0 of the duplexing data storage 30, and stores the data in SSD1 of the duplexing data storage 30. After the notice of write completion is sent to the host computer 10, duplexing is not performed until the duplexing is completed. However, as an SSD used as a storage medium is highly reliable compared with an HDD, and the time while the duplexing is not performed is negligible.
Next, an explanation will be given of a procedure of writing data executed by the duplexing apparatus 20 with reference to the flowchart of
The controller 22 of the duplexing apparatus 20 determines whether the host computer 10 transfers data to the duplexing apparatus 20, and receives a write request notice (block B101). If the controller 22 determines that the host computer 10 transfers data to the duplexing apparatus 20, and receives a write request (YES in block B101), the controller 22 selects a destination storage medium to write the data transferred from the host computer 10 (block B102). The destination storage medium is selected by the priority information stored in the priority information storage area 24B in the flash memory 24 of the duplexing apparatus 20. For example, if the duplexing apparatus 20 comprises SSD0 and SSD1, and the priority information is SSD0, the controller 22 selects SSD0 as a destination storage medium to write the data transferred from the host computer 10. Then, the controller 22 updates the difference information stored in the difference information storage area 24A in the flash memory 24 of the duplexing apparatus 20 by regarding the data transferred from the host computer as difference information (block B103). The difference information is updated by updating the drive identifier and difference data (address information of a storage medium storing the data) of the storage medium storing the data transferred from the host computer 10, and storing the updated data in the difference information storage area 24A in the flash memory 24 of the duplexing apparatus 20. For example, SSD0 is stored as a drive identifier, and the address information in SSD0, which is a storage medium storing the data, is stored as difference data.
Thereafter, the controller 22 writes the data transferred from the host computer 10 according to the address information of SSD0 (block B104). Updating of the difference information and writing of the data transferred from the host computer 10 may be simultaneously performed, or the data may be previously written. When the controller 22 writes the data transferred from the host computer 10 to SSD0 in block B104, the controller 22 sends a notice of write completion to the host computer 10 (block B105). In the state of block B105, in which the notice of write completion is sent to the host computer 10, the data transferred from the host computer 10 is written to SSD0 only, and the data is not written (duplexed) to SSD1. The data writing procedure is completed by the above blocks. The controller 22 sends a notice of write completion to the host computer 10, and performs duplexing according to the difference information (
Next, an explanation will be given of a procedure of duplexing data executed by the duplexing apparatus 20 with reference to the flowchart of
As described above, the controller 22 of the duplexing apparatus 20 completes writing of the data transferred from the host computer 10 to SSD0 (refer to
According to the above embodiment, data is written to one of duplexing storage media, a notice of write completion is sent to a host computer when data writing is finished, and duplexing is performed (the data written to one storage medium is written to the other storage medium) after the notice is sent, thereby duplexing can be performed at high speed with small load.
In the difference information storage area 24A, difference information consists of a pair of drive identifier 201 and difference data 202 (refer to
Hereinafter, an explanation will be given of a case where data is written in both SSD0 and SSD1. When data transferred from the host computer 10 is stored in both storage media by switching SSD0 and SSD1, for example, difference information corresponding to both SSD0 and SSD1 is stored in the difference information storage area 24A, as shown in
The controller 22 reads data from SSD0 and writes the data to SSD1 according to the drive identifier (SSD0) as difference information and difference data (address information of SSD0), and reads data from SSD1 and writes the data to SSD0 according to the disk identifier (SSD1) as difference information and difference data (address information of SSD1), thereby duplexing the data written to both SSD0 and SSD1. Even if the duplexing apparatus 20 comprises three or more storage media, duplexing is possible by increasing the number of difference information and writing data transferred from the host computer 10 to the storage media. Duplexing is possible at high speed regardless of the number of storage media.
In
Further, in the above embodiment, the duplexing apparatus 20 comprises two storage media. The number of storage media is not limited to two. Duplexing is possible even if one storage media is an SSD, or an HDD is mixed, or all media are HDDs.
As described in the above embodiment, when two or more SSD are used as storage media, as the number of write times (lifetime) is limited in an SSD, the number of write times can be controlled. In other words, when data is written to an SSD, data is written to the block size unit that is a storage cell of the SSD, and the number of unnecessary writing of data smaller than the block size can be reduced. Therefore, by using SSDs with different lifetime, the reliability is increased to higher than the case using SSDs with the same lifetime.
The above description is applicable to a case where duplexing and strapping are simultaneously performed.
Further, in the embodiment described hereinbefore, a destination storage medium of the data transferred from the host computer 10 is selected based on the priority information stored in the priority information storage area 24B in the flash memory 24 of the duplexing apparatus 20. A destination storage medium may be selected in other way. The priority information storage area 24B may not be provided. A destination storage medium may be selected at the time when data is transferred from the host computer 10. When selecting a destination storage medium, the controller 22 can sequentially write data to storage media according to the number of commands waited for processing. A log of history of writing the data transferred from the host computer 10 is recorded, and the data may be written in the order of more or less number of history according to the recorded log. Further, storage medium writing and reading speeds are measured, and the data may be written in the order of the speeds. Storage medium writing and reading speeds are previously measured and stored as priority information in the priority information storage area 24B, and the data may be written according to the priority information.
Further, in the embodiment described hereinbefore, difference information is stored in the flash memory 24 of the duplexing apparatus 20. A storing device is not limited to a flash memory. Difference information may be stored in storage media provided in the duplexing apparatus 20. For example, if the duplexing apparatus 20 comprises SSD0 and SSD1 as storage media, after the data transferred from the host computer is written to SSD0, the difference information corresponding to the data may be written to a preset storage area in SSD1. If the data transferred from the host computer 10 is written to SSD0, the difference information corresponding to the data may be written to a preset storage area in the same SSD0.
The various modules of the systems described herein can be implemented as software applications, hardware and/or software modules, or components on one or more computers, such as servers. While the various modules are illustrated separately, they may share some or all of the same underlying logic or code.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2009-146798 | Jun 2009 | JP | national |