This invention relates to a data backup system and a data backup method, especially to a data backup system and a data backup method for non-volatile storage devices.
With the popularity of flash memories, more and more computers and electronic products use storage devices made from flash memories, such as solid-state drives (SSDs), to replace conventional hard disk drives (HDDs). Due to limited service lives, the flash memories are subject to data backup when their service lives are about to end.
Assuming that the data are about to be backed up from the flash memory storage device 110 (the source) to the flash memory storage device 120 (the destination), as indicated by the direction of the dotted line), the host keeps reading data from the flash memory storage device 110 and writing them into the flash memory storage device 120 during the backup process. As only a fixed amount of data are being read or written each time the file system module 140 accesses the flash memory storage device 110 and the flash memory storage device 120, such as 4 KB for each access, the times of read operations to completely read out the data in the flash memory storage device 110 are quite many. In addition, the data in the flash memory 114 are probably unorganized after a long use of the flash memory storage device 110, meaning that reading data out of the flash memory storage device 110 is accompanied by a huge amount of random accesses. The random access requires the control unit 112 to refer to the L2P table to translate the logical addresses to the physical addresses in each read operation, which is a time-consuming operation for the control unit 112 and therefore renders a long backup time. Moreover, in some cases where an operating system or applications may be installed in the flash memory storage device 110 as well, when a backup operation is being performed, only personal data, such as multimedia files and documents, are backed up by a user while the operation system and/or the applications are missing.
In view of the problems of the prior art, an object of the present invention is to provide a data backup system and method thereof, so as to make an improvement to the prior art.
The present invention discloses a data backup system for backing up target data. The system comprises a first storage device, a second storage device and a driver module. The first storage device comprises a first storage unit for storing the target data, and a first control unit for accessing the first storage unit according to a first logical-to-physical mapping table. The second storage device comprises a second storage unit, and a second control unit for accessing the second storage unit according to a second logical-to-physical mapping table. The driver module for accessing the first storage device and second storage device. During the processing of backing up the target data from the first storage device to the second storage device, the first control unit reads the target data from the first storage unit without accessing the first logical-to-physical mapping table and transmits the target data to the driver module, the driver module transmits the target data to the second control unit, and the second control unit writes the target data to the second storage unit without accessing the second logical-to-physical mapping table.
The present invention also discloses a data backup method for backing up target data, through a driver module, from a first storage device to a second storage device. The first storage device comprises a first storage unit that stores the target data and a first control unit that accesses the first storage unit according to a first logical-to-physical mapping table. The second storage device comprises a second storage unit and a second control unit that accesses the second storage unit according to a second logical-to-physical mapping table. The method comprises the steps of: reading the target data from the first storage unit without accessing the first logical-to-physical mapping table and transmitting the target data to the driver module; transmitting the target data to the second control unit; and writing the target data to the second storage unit without accessing the second logical-to-physical mapping table.
The backup system of this invention and its associated method employ a PA-to-PA approach to copy or transfer data so that the data are accessed continuously rather than randomly to improve the data backup efficiency.
These and other objectives of the present invention no doubt becomes obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiments that are illustrated in the various figures and drawings.
The following description is written by referring to terms of this technical field. If any term is defined in this specification, such term should be explained accordingly. In addition, the connection between objects or events in the below-described embodiments can be direct or indirect provided that these embodiments are practicable under such connection. Said “indirect” means that an intermediate object or a physical space exists between the objects, or an intermediate event or a time interval exists between the events.
The ODBT 410 of the flash memory 224 can be read by a host and then transmitted to the control unit 212 of the flash memory storage device 210; in other words, the host reads the ODBT 410 of the flash memory 224 from the control unit 222 through the file system module 240 and the driver module 230 and then transmits the ODBT to the control unit 212, as indicated by the data path 251 in
After obtaining the ODBT 410 of the flash memory 224, the control unit 212 arranges the data in the flash memory 214 according to the ODBT 410 and updates the L2P table of the flash memory storage device 210 (step S320). In order that a PA-to-PA data copy or transfer process can proceed smoothly, the control unit 212 has to move the data in the flash memory 214 corresponding to the defect blocks at the destination to other unused block in advance. Taking
After the step S320 is completed, the control unit 212 stores the L2P table of the flash memory storage device 210 from a cache (e.g., a DRAM, not shown) of the control unit 212 to the flash memory 214 (step S330). The data (including the L2P table) in the flash memory 214 are in the appropriate physical addresses after the step S330 is completed, so the PA-to-PA data copy or transfer process can then be performed (step S340). Since the process of matching the data at the source and the usable spaces at the destination has been completed, the copy or transfer of data does not need to be processed by the file system module 240; instead, the copy or transfer of data can be processed via the data path 253 of
For example, in one embodiment, the read commands the driver module 230 issues to the control unit 212 contain only the physical address and the length of the data (for example, the format of the read command may be (R,PA,L), with R indicating that the command is a read command, the PA representing the physical address and the L representing the data length), and the write command issued to the control unit 222 contains the same physical address and the same data length (for example, the format of the write command may be (W,PA,L,Dn), with W indicating that the command is a write command, Dn representing the data to be written). The read commands and the write commands of different access operations during the backup process are exemplified in table 1, where one access operation is defined to include reading the data from the flash memory storage device 210 and writing the data into the flash memory storage device 220. Note that the read commands and the write commands listed in table 1 contain only the parts related to the backup operation of this invention and may contain other parameters, and the order of parameters may also be different. Further, although the physical address and the data length L are represented in decimal format in this embodiment, they can alternatively be represented in other formats.
Assuming that the size of each block of the flash memory 214 and the 224 is 64 KB, the range of the physical address of the block al in
When all data are copied or transferred to the flash memory 224 of the flash memory storage device 220, the control unit 222 restores the L2P table by loading the L2P table in the flash memory 224 into its cache (not shown) and initializes the block information of the flash memory 224 (e.g., the erase times) so that the file system module 240 of the host is able to manipulate the flash memory storage device 220 the way it manipulates the flash memory storage device 210. Note that if the capacities of the flash memory 214 and the flash memory 224 are different, the control unit 222 modifies the L2P table in the step of restoring the L2P table to match the actual usage scenarios of the flash memory storage device 220, such as expanding the range of mapping the logical addresses to the physical address in accordance with the actual capacity of the flash memory 224.
In summary, as opposed to the conventional technology, this invention substantially reduces the access times and does not require the translation between the logical addresses and the physical addresses, which greatly speeds up the data backup process of flash memory storage devices. In addition, the aforementioned flash memory storage device is only an exemplary embodiment of this invention; the data backup method disclosed in this invention can also be applied to the PA-to-PA data copy or transfer process between 2 flash memories (e.g., flash drives). As long as the data at the source are arranged in advance according to the ODBT of the destination, the data loss can be prevented. Because this invention copies or moves the data (including L2P table) in the flash memory at the source completely to the destination, the operating system and/or applications at the source are copied or moved as well, which is convenient to clone a storage device. Here clone means copying or moving the entire data (including system data and user data) in the storage device at the source to a storage device at the destination. This invention is applicable to NAND and NOR flash memories, and in addition to personal computers, this invention can also be used in storage servers. When a storage server uses flash memory storage devices as storage media, this invention can also be used to clone the flash memory storage devices to greatly reduce the time required to reconstruct a RAID (Redundant Array of Independent Disks).
Since people of ordinary skill in the art can appreciate the implementation detail and the modification thereto of the present method invention of
The aforementioned descriptions represent merely the preferred embodiments of the present invention, without any intention to limit the scope of the present invention thereto. Various equivalent changes, alterations, or modifications based on the claims of the present invention are all consequently viewed as being embraced by the scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
104131776 A | Sep 2015 | TW | national |
This application is a continuation of U.S. application Ser. No. 15/260,036, filed on Sep. 8, 2016, now patented as U.S. Pat. No. 10,216,451, which claims priority to Taiwan Application Serial Number 104131776, filed Sep. 25, 2015, which is herein incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
5875478 | Blumenau | Feb 1999 | A |
6453383 | Stoddard | Sep 2002 | B1 |
6529458 | Shin | Mar 2003 | B1 |
6594743 | Chen | Jul 2003 | B1 |
7370025 | Pandit | May 2008 | B1 |
7865475 | Yadav | Jan 2011 | B1 |
8954670 | Subramanian | Feb 2015 | B1 |
9043280 | Patwardhan | May 2015 | B1 |
20040117344 | Yang | Jun 2004 | A1 |
20050055520 | Kappler | Mar 2005 | A1 |
20080007853 | Wang | Jan 2008 | A1 |
20090204648 | Best | Aug 2009 | A1 |
20090249010 | Kawada | Oct 2009 | A1 |
20100241806 | Kawano | Sep 2010 | A1 |
20110138112 | Chiang | Jun 2011 | A1 |
20120096335 | Takahashi | Apr 2012 | A1 |
20120272038 | Wei | Oct 2012 | A1 |
20140075149 | Pike | Mar 2014 | A1 |
20150254088 | Chou | Sep 2015 | A1 |
Number | Date | Country |
---|---|---|
440766 | Jun 2001 | TW |
4407656 | Jun 2001 | TW |
201025005 | Jul 2010 | TW |
Entry |
---|
Office Action letter of the counterpart Taiwan application 104131776 dated Nov. 18, 2016. |
English abstract translation of the Office Action letter of the counterpart Taiwan application 104131776 dated Nov. 18, 2016. |
English abstract of TW201025005. |
TW440766 is also granted as U.S. Pat. No. 6,594,743. |
Number | Date | Country | |
---|---|---|---|
20190187910 A1 | Jun 2019 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 15260036 | Sep 2016 | US |
Child | 16282449 | US |