1. Field of The Invention
The present invention relates to a data storage system with unique wear-leveling algorithm. The data storage system preferably includes non-volatile memory cards or sub-modules in RAID architecture. The present invention also relates to a data storage method.
2. Description of Related Art
A flash memory system is a system including one or more non-volatile memory units; a memory unit includes a number of memory cells, e.g., 64K, 128K, 256K, etc. An example of such flash memory system is the non-volatile memory card. Non-volatile memory cards are memory cards made by non-volatile memory devices such as, but not limited to, Flash EEPROM, Nitride based non-volatile memory, SONOS (Silicon Oxide Nitride Oxide Silicon), Non-volatile FeRAM (Ferroelectric Random Access Memory), Non-volatile MRAM (Magneto-resistive Random Access Memory), PCRAM (Phase Change Random Access Memory), Perovskite (CaTiO3, Calcium Titanium Oxide), etc. Such memory cards include, but are not limited to, USB flash drive, card bus card, SD flash card, MMC flash card, memory stick, MI card, Expresscard flash card, solid state drive with SATA-II interface, etc.
These types of semiconductor based (solid state) mass storage devices are slower in read/write operations and have significantly lower memory densities than the well known mechanically driven magnetic storage devices. However, they are extremely rugged, highly reliable and highly efficient as compared to those mechanically driven magnetic storage devices.
In recent years, a RAID (redundant array of inexpensive disks) technology has been proposed to improve the data reliability of the mechanically driven magnetic storage devices. For reference, U.S. Pat. Nos. 5,680,579; 6,467,022; 6,513,093; 7,200,715 and 7,334,156 disclose inventions relating to RAID.
In accordance with RAID, a plurality of magnetic media disks are assembled in an array and through a hardware/software interface, presents itself to a host system as a single logical disk drive. A hardware based RAID system employs dedicated electronic circuitry to perform the processing functions of the RAID system. A software based RAID system employs hardware and software which locates processing functions of the RAID system on the host CPU (central processing unit). RAID is used as an architecture for the mechanically driven magnetic storage devices to minimize the risk of data loss.
While the individual drives in a RAID system are still subject to the same failure rates, RAID significantly improves the overall reliability by providing one or more redundant arrays; in this way, data is available even if one of the drives fails.
Redundancy is a method of storing redundant data on drives within the array, so that with the failure of a single drive, the data from the failed disk can be reconstructed using the redundant data from the other operating drives. This mathematical technique of storing redundant data is well known and is referred to as parity, which typically uses an exclusive OR function, and is an important feature of RAID.
A RAID Advisory Board has been established whereby standard RAID configurations are being defined as industry standards. By way of example, RAID-0 has disks with data stripped across the drives. Stripping is a known method of quickly storing blocks of data across a number of different drives. With RAID-0 each drive is read independently and there is no redundancy. Accordingly, the RAID-0 configuration improves speed performance but does not increase data reliability, as compared to individual drives. RAID-1 defines a configuration where data is written in identical form, or mirrored onto two or more drives. With this configuration many drives are required and therefore it is not an economical solution to data reliability. RAID-2 utilizes complex ECC (error correction codes) codes written on multiple redundant disks. RAID-3 incorporates redundancy using a single disk drive to support the extra memory needed for parity, which is shared among all of the drives. This configuration is commonly used where high transfer rates are required and/or long blocks of data are used. The other disk drives (i.e., other than the parity drive) in the RAID-3 configuration operate on every I/O (input/output) transaction handled by the array, i.e., parallel access. RAID-4 is similar to RAID-3 in that it also uses interleaved parity; however unlike RAID-3, RAID-4 uses block-interleaved parity and not bit-interleaved parity. Accordingly, RAID-4 defines a parallel array using block striping and a single redundant parity disk. The RAID-5 configuration has parity shared across all drives in the array. However, in the RAID-5 configuration the disks are independent, i.e., independent access, which is used with many I/O request as it can more rapidly handle concurrent I/O transactions. The RAID-5 configuration is used with multi-user networked workstations. The RAID-6 configuration includes striped set with dual distributed parity. RAID-6 provides fault tolerance from two drive failures; array continues to operate with up to two failed drives. This makes larger RAID groups more practical, especially for high availability systems. This becomes increasingly important because large-capacity drives lengthen the time needed to recover from the failure of a single drive. Single parity RAID levels are vulnerable to data loss until the failed drive is rebuilt: the larger the drive, the longer the rebuild will take. Dual parity gives time to rebuild the array without the data being at risk if one drive, but no more, fails before the rebuild is complete.
Although RAID has been used to improve the data reliability of the mechanically driven magnetic storage devices, sophisticated RAID architecture has not been used in non-volatile memory cards because non-volatile memory cards are believed highly reliable and highly efficient. Moreover, non-volatile memory cards have not been used as primary storage devices in personal computer, notebook, or similar electronic apparatuses.
On the other hand, although non-volatile memory or, more specifically, non-volatile memory storage cells within a flash memory system may be repetitively programmed and erased, each cell or physical location may only be erased a certain number of times before the cell wears out. When a cell is worn out, thereby causing a loss of use or a significant degradation of performance to a portion of the overall storage volume of the flash memory system, a user of the flash memory system may be adversely affected, as for example through the loss of stored data or the inability to store data.
The wear on cells, or physical locations, within a flash memory system varies depending upon how often each of the cells is programmed. If a cell is programmed once and then effectively never reprogrammed, the wear associated with that cell will generally be relatively low. However, if a cell is repetitively written to and erased, the wear associated with that cell will generally be relatively high. As logical addresses are used by a host, e.g., a system which accesses or uses a flash memory system, to access data stored in a flash memory system, if a host repeatedly uses the same logical addresses to write and overwrite data, the same physical locations or cells within the flash memory system are repeatedly written to and erased, as will be appreciated by those of skill in the art.
When some cells are effectively worn out while other cells are relatively unworn, in addition to degradation of performance associated with worn out cells themselves, the overall performance of the flash memory system will be adversely affected. Often, a flash memory system is deemed unusable when a critical number of worn out cells are present in the flash memory system, even when many other cells in the flash memory system are relatively unworn.
In order to increase the likelihood that cells within a flash memory system are worn fairly evenly, a so-called “wear-leveling” technology has been proposed. Wear-leveling is an operation performed within a memory integrated circuit or a memory card to allow the cells which are associated with particular logical addresses to be changed such that the same logical addresses are not always associated with the same cells. By changing the cell associations of logical addresses, it is less likely that a particular cell may wear out well before other cells wear out.
However, so far “wear-leveling” is applied only within a storage device, such as in a memory integrated circuit or in a memory card, but not at the system level. With respect to data storage systems which include multiple memory devices, there has not been any prior art discussing how to improve the endurance of the overall system. Thus, it is desirous to provide a data storage system with wear leveling from system perspective, to prolong its lifetime.
In view of the foregoing drawback, it is therefore an objective of the present invention to provide a data storage system with unique wear-leveling algorithm. The above-discussed and other drawbacks and deficiencies of the prior art are overcome or alleviated by the present invention. The data storage system preferably uses non-volatile memory cards or sub-modules in RAID architecture.
Another objective of the present invention is to provide electrical memory devices arranged according to RAID architecture. In accordance with the present invention, RAID technology type architecture is uniquely combined with solid state non-volatile memory devices. Any of the aforementioned RAID type configurations (e.g., RAID-0 through 6) may be employed with the solid state memory devices.
Another objective of the present invention is to provide a data storage method.
In accordance with the foregoing and other objectives of the present invention, and from one aspect of the present invention, a data storage system is proposed which comprises: a plurality of user data memory devices for storing user data; a redundant memory device; a dedicated memory device for storing operating system software; and an interface and RAID controller electrically connected with the plurality of user data memory devices, the redundant memory device, and the dedicated memory device, and storing the user data in and reading the user data from the plurality of user data memory devices according to RAID configuration.
From another aspect of the present invention, a data storage method is proposed which comprises: storing user data in a plurality of user data memory devices according to RAID configuration; and when a user data memory device is at fault, recovering the correct data to a redundant memory device.
From yet another aspect of the present invention, a data storage system comprises: a plurality of memory devices; and a RAID controller electrically connected with the plurality of memory devices memory devices, and periodically setting at least a different one of the plurality of memory devices as a redundant memory device.
From a still other aspect of the present invention, a data storage system comprises: a first memory device of a longer endurance, such as an SLC (single-level cell) memory card; a plurality of second memory device of a shorter endurance, such as an MLC (multi-level cell) memory card; and a RAID controller electrically connected with the first and second memory devices. Preferably, the RAID controller periodically sets at least a different one of the plurality of memory devices as a redundant memory device.
From a further aspect of the present invention, a data storage method comprises: providing a plurality of memory regions; defining at least one of the plurality of memory regions to be unused when writing data in a time period; and defining at least another one of the plurality of memory regions to be unused when writing data in a subsequent time period.
From a still further aspect of the present invention, a data storage method comprises: providing a plurality of memory regions; checking the written times of each of the plurality of memory regions; moving the data in the memory region which has been written the most times to the presently unused memory region which has been written the fewest times among the presently unused memory regions; and moving the data in the memory region which has been written the fewest times to the memory region which has been written the most times.
From a still further aspect of the present invention, a data storage method comprises: providing a plurality of memory regions; checking the written times of each of the plurality of memory regions; and swapping the data in the memory region which has been written the most times with the data in the memory region which has been written the fewest times.
Preferably, each of the plurality of memory regions in the methods described above includes memory spaces in at least two memory cards.
More preferably, the methods described above further comprise: checking whether wear-leveling is implemented inside the memory cards.
It is to be understood that both the foregoing general description and the following detailed description are provided as examples, for illustration rather than limiting the scope of the invention.
These and other features, aspects, and advantages of the present invention will become better understood with regard to the following description, appended claims, and accompanying drawings.
The OS memory card 141 stores operating system software and operates in “pass-through” mode, i.e., the content in the OS memory card 141 simply passes through the interface and RAID controller 110 without being subject to RAID control. The plurality of memory cards 121-12N stores application software, user data and other information in “RAID” mode, i.e., the content of these memory cards 121-12N are stored according to RAID configuration, any type from RAID-0 to RAID-6, under the control by the interface and RAID controller 110. The interface and RAID controller 110 communicates with external circuits (shown by the thick black arrow) according to agreed protocol, such as SATA-II, PCIe, etc. It receives data from the external circuits and store the data into the memory cards 121-12N according to a predetermined RAID configuration, which can be any type from RAID-0 to RAID-6 set as a default, or selected by a user.
In addition to these memory cards 121-12N and 141, a redundant hot spare memory card 131 is provided. Whenever one of the memory cards 121-12N in RAID mode is at fault that can not be corrected by its own ECC circuit (not shown), a “self-rebuilding” function is performed to recover the correct data to the hot spare memory card 131. This self-rebuilding function can be done inside the data storage system 100 without interrupting the overcall operation of the electronic apparatus, since the operating system is not stored in one of the cards in RAID mode. Once self-rebuilding is finished, preferably, the indicator 150 indicates the at-fault card so that a user can replace the failed card with a new one.
Based on the system structure of
In the unique wear-leveling according to the present invention, all available memory spaces (e.g., blocks) are divided into regions. “Available” in this context means that a memory space is identified as usable and should be subject to second level wear-leveling. For example, it may be arranged either way that the OS memory card 141 is or is not available.
Referring to
To perform the data shifting, hopping or swapping method as above, preferably, an address mapping table should be maintained and updated after data movement is done. The data shifting method is more effective for serial data; the data hopping method is more effective for random data; the data swapping method is more effective for swapping long-live data with frequently written data. In one embodiment, the data swapping method may be initiated whenever the written times difference between two regions has reached a predetermined threshold, implying that one of which stores long-live data and the other of which stores frequently written data.
As described above, each of the data shifting method, the data hopping method and the data swapping method may be used alone or in combination with one or both of the other methods.
Although the present invention has been described in detail with reference to certain preferred embodiment thereof, the description is for illustrative purpose, and not for limiting the scope of the invention. One skilled in this art can readily think of any modifications and variations in light of the teaching by the present invention. For example, in the arrangements shown in