CN101140542A - Method for copying snapshot writing response time in the time of shortening writing time - Google Patents
Method for copying snapshot writing response time in the time of shortening writing time Download PDFInfo
- Publication number
- CN101140542A CN101140542A CNA2007100536502A CN200710053650A CN101140542A CN 101140542 A CN101140542 A CN 101140542A CN A2007100536502 A CNA2007100536502 A CN A2007100536502A CN 200710053650 A CN200710053650 A CN 200710053650A CN 101140542 A CN101140542 A CN 101140542A
- Authority
- CN
- China
- Prior art keywords
- snapshot
- data
- write
- district
- writing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
A method to shorten writing response time in copy snapshot while writing, which belongs to the field of computer store technology, relates to a writing request process flow to support snapshot. The target is to delay to execute the second one of three steps of serial execution of copy snapshot operation while writing, so as to shorten writing request response time of host computers for snapshot and increase availability of the store system. The invention divides the whole storage space in the storage system into a source data area and a snapshot area; when receiving a writing request sent out by the host computer, the system will read out the saved data in the snapshot before adding into the write queue end of snapshot data; it is not necessary to wait until the snapshot data is written into the snapshot area, before writing the request data from the host computer into the source data area. When starting conditions are met for a snapshot data writing procedure, the invention will write snapshot data in snapshot data write queues into a snapshot area. The invention effectively shortens the writing request response time of a host computer during snapshot, and adapts to current storage systems with more and more concentrated IO requests day by day.
Description
Technical field
The invention belongs to computer memory technical field, be specifically related to a kind of shortening Copy on write snapshot write response time method.
Background technology
Disk array (RAID; Redundant Array of Independent Disks) technology has been widely used in the data storage; wherein ranks such as RAID1, RAID5 and RAID6 can provide protection for data when single or two disks break down; but in actual applications because soft faults such as software error, human error, virus attack cause the frequency of loss of data and damage will be far above physical fault; the loss of data that current disk array causes this soft fault can not provide protection.Traditional data guard method mainly adopts periodic backup, but have that backup window is big, release time is long, influence drawback such as front end regular traffic.Snapshot (Snapshot) technology is a kind of online backup method effectively, and it has created the instantaneous reflection that data are carved at a time, when data make a mistake the needs recovery, can return to the state of creating the snapshot time point.In disk array, adopt snapping technique soft, hardware protection method can be combined, further improve the reliabilty and availability of data.
Snapping technique is divided by implementation method, mainly contains three kinds of modes: separation mirror (Split Mirror), Copy on write (Copy-On-Write) and write redirected (Redirect-On-Write).Wherein the Copy on write method takes up room for a short time because of it, creates advantages such as the snapshot time is short, is widely used in the various fast photographic systems.The Copy on write snapping technique when creating snapshot, need not to preserve any data, and constructive process moment can finish, because the data block that its preservation will be changed, this incremental mode that changes based on data block has reduced the consumption to memory capacity to greatest extent.Based on the fast photographic system of Copy on write method, create snapshot at every turn after, if the data in the write request first revision source data district that main frame sends generally will be decomposed into following three steps: (1) reads the data that need snapshot to preserve from the source data district; (2) this snapshot data is write the snapshot district; (3) new data that main frame is sent writes relevant position, source data district.Copy on write Snapshot Method in the past all is that these three step serials are carried out, and promptly writing of main frame write request data needs to wait for that snapshot data is saved to the snapshot district, thereby the main frame write request is brought bigger delay.
Summary of the invention
The present invention proposes a kind of shortening Copy on write snapshot write response time method, purpose is that second step in three steps of Copy on write snapshot operation serial execution postponed to carry out, thereby the main frame write request response time when shortening snapshot, the availability of raising storage system.
A kind of shortening Copy on write snapshot write response time method of the present invention is divided into source data district and snapshot district with the whole storage space of storage system in advance, and the data of host access request are deposited in the source data district, and the data that need snapshot to preserve are deposited in the snapshot district; Set the snapshot block size, structure snapshot linked list head and snapshot indexing structure root node, the snapshot chained list is preserved all snapshot metadata, and the snapshot indexing structure is used to judge whether respective data blocks has been kept at the snapshot district; When receiving the write request that main frame sends over, order is carried out following step:
(1) according to the snapshot block size of setting, the write request data is carried out piecemeal according to its start address and length;
(2) number be that key word is searched in the snapshot indexing structure with each piecemeal, if exist, change step (8), otherwise order carried out;
(3) judging whether the snapshot district has enough remaining spaces, be then to change step (5), otherwise order is carried out;
(4) delete a life period snapshot at most in the snapshot district automatically, and upgrade snapshot district size, change step (3);
(5) start snapshot data and read process, the data block that the need snapshot is preserved is read from the source data district, and join snapshot data and write rear of queue;
(6) position of available snapshot district size and next available sector in the renewal snapshot district;
(7) judging whether all piecemeals all dispose, is that then order is carried out, otherwise changes step (2);
(8) the write request data that main frame is sent write the source data district;
(9) judging whether to satisfy predefined snapshot data and write the process entry condition, is then to start snapshot data to write process, and the data that snapshot data is write in the formation are written to the snapshot district, otherwise order is carried out;
(10) finish.
Described a kind of shortening Copy on write snapshot write response time method, it is characterized in that: described snapshot data is read process, comprises the steps:
(1) structure snapshot data read command is read the data block that the need snapshot is preserved from the source data district, and the sector number in the snapshot district that this data block will write is set;
(2) data block of reading is joined snapshot data and write rear of queue, and member's number that snapshot data writes formation is added 1;
(3) structure snapshot metadata joins current snapshot chained list tail with it, and increases a new node in the snapshot indexing structure, and the snapshot metadata is used for setting up corresponding relation between source data district and snapshot district;
(4) dormancy.
Described a kind of shortening Copy on write snapshot write response time method, it is characterized in that: described snapshot data is write process, comprises the steps:
(1) judging whether snapshot data writes formation is empty, be then to change step (4), otherwise order is carried out;
(2) head that writes formation from snapshot data takes out a snapshot data piece, and the structure write order is written to the snapshot district with this snapshot data piece;
(3) the member's number that snapshot data is write formation subtracts 1, changes step (1);
(4) dormancy.
After the present invention creates snapshot at every turn, when receiving the write request that main frame sends over, after the data that need snapshot to preserve are read and join the snapshot rear of queue, need not to wait for that this snapshot data is written to the snapshot district, main frame write request data can be write the source data district, when satisfying snapshot and write the process entry condition, the snapshot data that snapshot data is write in the formation successively is written to the snapshot district again, has alleviated long problem of main frame write request response time effectively.
Description of drawings
Fig. 1 is the write request treatment scheme synoptic diagram of support snapshot of the present invention;
Fig. 2 reads the process synoptic diagram for snapshot data of the present invention;
Fig. 3 writes the process synoptic diagram for snapshot data of the present invention.
Embodiment
The present invention proposes a kind of shortening Copy on write snapshot write response time method.After creating snapshot, when receiving the write request of main frame transmission, after the data that the need snapshot is preserved are read and are joined snapshot and write rear of queue, main frame write request data can write the source data district, when satisfying snapshot and write the process entry condition, the snapshot data that snapshot data is write in the formation successively is written to the snapshot district again.Its snapshot district adopts reservation mode, and the snapshot district can recycle, and when creating new snapshot, and then the space that last time, snapshot used continues to deposit, and so both can save the space, also helps the rollback operation of snapshot data at every turn.
The present invention relates to snapshot metadata, snapshot chained list and snapshot indexing structure.Wherein the snapshot metadata is used for setting up corresponding relation between raw data and snapshot data, the snapshot chained list adopts doubly linked list, be used for preserving all snapshot metadata, the snapshot indexing structure uses Ji Shu (radix tree) to search fast, whether has been saved to the snapshot district to judge respective data blocks.
Fig. 1 is the write request treatment scheme synoptic diagram of support snapshot of the present invention, and order is carried out following step:
(1) when receiving the write request that main frame sends over, the snapshot block size of setting when creating snapshot carries out piecemeal with the write request data according to its start address and length;
(2) number be that key word is searched in snapshot base tree index structure with each piecemeal, if exist, change step (8), otherwise order carried out;
(3) judging whether the snapshot district has enough remaining spaces, be then to change step (5), otherwise order is carried out;
(4) delete a life period snapshot at most in the snapshot district automatically, and upgrade snapshot district size, change step (3);
(5) start snapshot data and read process, the data block that the need snapshot is preserved is read from the source data district, and join snapshot data and write rear of queue;
(6) upgrade the snapshot district size available in the snapshot district and the position of next available sector;
(7) judging whether all piecemeals all dispose, is that then order is carried out, otherwise changes step (2);
(8) the write request data that main frame is sent write the source data district;
(9) judging whether to satisfy predefined snapshot data and write the process entry condition, is then to start snapshot data to write process, and the data that snapshot data is write in the formation are written to the snapshot district, otherwise order is carried out;
(9) finish.
Fig. 2 reads the process synoptic diagram for snapshot data of the present invention, and order is carried out following step:
(1) structure snapshot data read command is read the data block that the need snapshot is preserved from the source data district, and the sector number in the snapshot district that this data block will write is set;
(2) data block of reading is joined snapshot data and write rear of queue, and member's number that snapshot data writes formation is added 1;
(3) structure snapshot metadata joins current snapshot chained list tail with it, and increases a new node in the snapshot indexing structure, and the snapshot metadata is used for setting up corresponding relation between source data district and snapshot district;
(4) dormancy.
Fig. 3 writes the process synoptic diagram for snapshot data of the present invention, and order is carried out following step:
(1) judging whether snapshot data writes formation is empty, be then to change step (4), otherwise order is carried out;
(2) head that writes formation from snapshot data takes out a snapshot data piece, and the structure write order is written to the snapshot district with this snapshot data piece;
(3) the member's number that snapshot data is write formation subtracts 1, changes step (1);
(4) dormancy.
Claims (3)
1. one kind is shortened Copy on write snapshot write response time method, in advance the whole storage space of storage system is divided into source data district and snapshot district, and the data of host access request are deposited in the source data district, and the data that need snapshot to preserve are deposited in the snapshot district; Set the snapshot block size, structure snapshot linked list head and snapshot indexing structure root node, the snapshot chained list is preserved all snapshot metadata, and the snapshot indexing structure is used to judge whether respective data blocks has been kept at the snapshot district; When receiving the write request that main frame sends over, order is carried out following step:
(1) according to the snapshot block size of setting, the write request data is carried out piecemeal according to its start address and length;
(2) number be that key word is searched in the snapshot indexing structure with each piecemeal, if exist, change step (8), otherwise order carried out;
(3) judging whether the snapshot district has enough remaining spaces, be then to change step (5), otherwise order is carried out;
(4) delete a life period snapshot at most in the snapshot district automatically, and upgrade snapshot district size, change step (3);
(5) start snapshot data and read process, the data block that the need snapshot is preserved is read from the source data district, and join snapshot data and write rear of queue;
(6) position of available snapshot district size and next available sector in the renewal snapshot district;
(7) judging whether all piecemeals all dispose, is that then order is carried out, otherwise changes step (2);
(8) the write request data that main frame is sent write the source data district;
(9) judging whether to satisfy predefined snapshot data and write the process entry condition, is then to start snapshot data to write process, and the data that snapshot data is write in the formation are written to the snapshot district, otherwise order is carried out;
(10) finish.
2. a kind of shortening Copy on write snapshot write response time method as claimed in claim 1, it is characterized in that: described snapshot data is read process, comprises the steps:
(1) structure snapshot data read command is read the data block that the need snapshot is preserved from the source data district, and the sector number in the snapshot district that this data block will write is set;
(2) data block of reading is joined snapshot data and write rear of queue, and member's number that snapshot data writes formation is added 1;
(3) structure snapshot metadata joins current snapshot chained list tail with it, and increases a new node in the snapshot indexing structure, and the snapshot metadata is used for setting up corresponding relation between source data district and snapshot district;
(4) dormancy.
3. a kind of shortening Copy on write snapshot write response time method as claimed in claim 1, it is characterized in that: described snapshot data is write process, comprises the steps:
(1) judging whether snapshot data writes formation is empty, be then to change step (4), otherwise order is carried out;
(2) head that writes formation from snapshot data takes out a snapshot data piece, and the structure write order is written to the snapshot district with this snapshot data piece;
(3) the member's number that snapshot data is write formation subtracts 1, changes step (1);
(4) dormancy.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007100536502A CN101140542A (en) | 2007-10-19 | 2007-10-19 | Method for copying snapshot writing response time in the time of shortening writing time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007100536502A CN101140542A (en) | 2007-10-19 | 2007-10-19 | Method for copying snapshot writing response time in the time of shortening writing time |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101140542A true CN101140542A (en) | 2008-03-12 |
Family
ID=39192501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2007100536502A Pending CN101140542A (en) | 2007-10-19 | 2007-10-19 | Method for copying snapshot writing response time in the time of shortening writing time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101140542A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012853A (en) * | 2011-01-14 | 2011-04-13 | 南开大学 | Zero-copy snapshot method |
CN101714391B (en) * | 2009-11-12 | 2011-09-28 | 东方网力科技股份有限公司 | Data storage method and device |
CN102043687B (en) * | 2009-10-20 | 2012-07-25 | 杭州华三通信技术有限公司 | Copy on first write device for realizing data snapshot and control method |
CN103080908A (en) * | 2010-08-31 | 2013-05-01 | 日本电气株式会社 | Storage system |
CN103713970A (en) * | 2013-12-31 | 2014-04-09 | 曙光云计算技术有限公司 | Disk mirroring file snapshot making method and system based on virtual machine |
CN105138429A (en) * | 2015-08-21 | 2015-12-09 | 浪潮(北京)电子信息产业有限公司 | Copy-on-write method and system of snapshots |
CN105260264A (en) * | 2015-09-23 | 2016-01-20 | 浪潮(北京)电子信息产业有限公司 | Snapshot implementation method and snapshot system |
CN107391396A (en) * | 2017-07-27 | 2017-11-24 | 郑州云海信息技术有限公司 | The data partition method and writeable fast photographing device of a kind of writeable fast photographing device |
CN109445989A (en) * | 2018-10-22 | 2019-03-08 | 郑州云海信息技术有限公司 | A kind of file system data backup method and device |
CN109491605A (en) * | 2018-11-01 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of date storage method based on COW, device and medium |
CN105893877B (en) * | 2015-02-16 | 2020-11-20 | 恩智浦有限公司 | Method for secure data reading and data processing system |
-
2007
- 2007-10-19 CN CNA2007100536502A patent/CN101140542A/en active Pending
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043687B (en) * | 2009-10-20 | 2012-07-25 | 杭州华三通信技术有限公司 | Copy on first write device for realizing data snapshot and control method |
CN101714391B (en) * | 2009-11-12 | 2011-09-28 | 东方网力科技股份有限公司 | Data storage method and device |
CN103080908A (en) * | 2010-08-31 | 2013-05-01 | 日本电气株式会社 | Storage system |
CN102012853B (en) * | 2011-01-14 | 2012-05-23 | 南开大学 | Zero-copy snapshot method |
CN102012853A (en) * | 2011-01-14 | 2011-04-13 | 南开大学 | Zero-copy snapshot method |
CN103713970B (en) * | 2013-12-31 | 2017-02-15 | 曙光云计算技术有限公司 | Disk mirroring file snapshot making method and system based on virtual machine |
CN103713970A (en) * | 2013-12-31 | 2014-04-09 | 曙光云计算技术有限公司 | Disk mirroring file snapshot making method and system based on virtual machine |
CN105893877B (en) * | 2015-02-16 | 2020-11-20 | 恩智浦有限公司 | Method for secure data reading and data processing system |
CN105138429A (en) * | 2015-08-21 | 2015-12-09 | 浪潮(北京)电子信息产业有限公司 | Copy-on-write method and system of snapshots |
CN105138429B (en) * | 2015-08-21 | 2018-11-02 | 浪潮(北京)电子信息产业有限公司 | A kind of Copy on write Snapshot Method and system |
CN105260264A (en) * | 2015-09-23 | 2016-01-20 | 浪潮(北京)电子信息产业有限公司 | Snapshot implementation method and snapshot system |
CN107391396A (en) * | 2017-07-27 | 2017-11-24 | 郑州云海信息技术有限公司 | The data partition method and writeable fast photographing device of a kind of writeable fast photographing device |
CN107391396B (en) * | 2017-07-27 | 2020-10-23 | 苏州浪潮智能科技有限公司 | Data partitioning method of snapshot-writable device and snapshot-writable device |
CN109445989A (en) * | 2018-10-22 | 2019-03-08 | 郑州云海信息技术有限公司 | A kind of file system data backup method and device |
CN109491605A (en) * | 2018-11-01 | 2019-03-19 | 郑州云海信息技术有限公司 | A kind of date storage method based on COW, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101140542A (en) | Method for copying snapshot writing response time in the time of shortening writing time | |
US8190832B2 (en) | Data storage performance enhancement through a write activity level metric recorded in high performance block storage metadata | |
US8074035B1 (en) | System and method for using multivolume snapshots for online data backup | |
US8726070B2 (en) | System and method for information handling system redundant storage rebuild | |
US7127557B2 (en) | RAID apparatus and logical device expansion method thereof | |
US6567892B1 (en) | Use of activity bins to increase the performance of disk arrays | |
US7975168B2 (en) | Storage system executing parallel correction write | |
US8751740B1 (en) | Systems, methods, and computer readable media for performance optimization of storage allocation to virtual logical units | |
US6341342B1 (en) | Method and apparatus for zeroing a transfer buffer memory as a background task | |
US6549977B1 (en) | Use of deferred write completion interrupts to increase the performance of disk operations | |
US7975115B2 (en) | Method and apparatus for separating snapshot preserved and write data | |
US6775794B1 (en) | Use of activity bins to increase the performance of disk arrays | |
US8438332B2 (en) | Apparatus and method to maintain write operation atomicity where a data transfer operation crosses a data storage medium track boundary | |
JP2007156597A (en) | Storage device | |
CN106445405B (en) | Data access method and device for flash memory storage | |
JP2008015769A (en) | Storage system and writing distribution method | |
US9223509B2 (en) | File processing method and storage device | |
JP2005259136A (en) | Transaction processing system using non-disk permanent memory and method | |
JP2010049634A (en) | Storage system, and data migration method in storage system | |
JP2002323959A (en) | System and method for non-volatile write cache based on log of magnetic disk controller | |
US20060112221A1 (en) | Method and Related Apparatus for Data Migration Utilizing Disk Arrays | |
US8862819B2 (en) | Log structure array | |
US9189490B2 (en) | Fast snapshots | |
WO2022142544A1 (en) | Method for preventing data loss from flash memory, solid state drive controller, solid state drive | |
CN111124258B (en) | Data storage method, device and equipment of full flash memory array and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |