TW200820011A - A data backup method using snapshot - Google Patents

A data backup method using snapshot Download PDF

Info

Publication number
TW200820011A
TW200820011A TW95139769A TW95139769A TW200820011A TW 200820011 A TW200820011 A TW 200820011A TW 95139769 A TW95139769 A TW 95139769A TW 95139769 A TW95139769 A TW 95139769A TW 200820011 A TW200820011 A TW 200820011A
Authority
TW
Taiwan
Prior art keywords
data
snapshot
block
exception
mapping
Prior art date
Application number
TW95139769A
Other languages
Chinese (zh)
Other versions
TWI321728B (en
Inventor
Chao Duan
Hai-Ting Yao
Jian-Feng Guo
Tom Chen
Win-Harn Liu
Original Assignee
Inventec Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to TW95139769A priority Critical patent/TWI321728B/en
Publication of TW200820011A publication Critical patent/TW200820011A/en
Application granted granted Critical
Publication of TWI321728B publication Critical patent/TWI321728B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Retry When Errors Occur (AREA)

Abstract

A data backup method using snapshot is provided, which setting up a mapping table for recording a mapping status of chunks. When a chunk changes, a mapping position of the chunk is calculated according to the mapping table. Further, determining whether a corresponding data of the chunk is stored in a first exception table when the chunk is marked. If the corresponding data is existed in the first exception table and the chunk is not executed a ''Copy On Write'' (COW) procedure by determining an address of the corresponding data, executing the ''COW'' procedure and changing the chunk. When the chunk is not marked, executing the ''COW'' procedure and changing the chunk directly. Thus, a memory size of a snapshot can be effectively decreased by using the mapping table and the first exception table only.

Description

200820011 九、發明說明: 【發明所屬之技術領域] 次、,種I、之備知方法,特別是指一種利用對應快照之各區塊 貝料之映射細第晰對應絲麟將被變更之區塊資料是否 做過寫入前複製之快照之備份方法。 【先前技術】 决知、疋種可以對儲存區域中某一特定時間點的資料進行即 時備份,並幾乎不影響資料服務(也就是資料讀寫)效率的備份 方式,它是-個獨立存在於儲存媒體上的儲存區域。快照的不是 對儲存區域的資料完整備份,喊將儲存區域分為數個小區塊資 料(Chunk ’通常以KB為單位,其大小是可以調整的),當使用 者改寫儲存區域的資料時’把紐更改的區塊㈣複製到快照 中,也就是寫人前複製。於是’當—個快照被建立時,使用者需 要指定使㈣磁碟空間、對應的儲存區域特訊,快照會備份^ 建立時間點時的資料。 ^ 如「第1圖」所示,當執行有快照程式的統啟動時,會將 儲存於快财_外對應表讀取至記憶體巾,#將#更改的區塊 資料被產生日^ ,快知程式會哥訪記憶體中的例外對應表(步驟 11〇),來判斷將被更改的區塊資料是否做過寫入前複製(步驟 120),若有,則例外對應表中會儲存有將被更改的區塊資料的對 應資料’通常都是將被更改的區塊資料儲存在快照中的位址,這 代表將被更改的資料已經備份到快照中,可以直接變更區塊資料 200820011 (步驟140);若沒有,則需要進行寫入前複製(步驟13〇)以把 將被更改的資料備份至快照中,才能變更區塊資料(步驟14〇)。 快照程式為了減少不斷至快照中讀取例外對應表以完成上述 的判畊過程,快照程式會將儲存於快照中的例外對應表讀入記憶 體中,但疋,一旦儲存區域建立了多個快照,又或者快照中儲存 有大量的區塊資料,則記憶體的使用量將會相當魔大。因此如何 能提供一種可減少至快照中讀取例外對應表,並可減少記憶體使 用量的快照,成為待解決的問題。 【發明内容】 八馨於以上的問題’本發明的主要目的在於提供—種快照的销 2法’係由記憶财之對應快财之所魏塊資料的映射表來 爾斷各區塊資料是顯過寫人前難,若做過寫人 =己= 口二—例外對應表與快照中的第二例外對應表取得將 -例外對人㈣巾之恤,透過記憶财之映射表與第 於映射以減少至快照中讀取第二例外對應表,並且由 以解決先前技術所提到之問題。的己L'體工間亚不多,如此便可 立具區:發:所揭露之方法,包括有下列步驟:建 的標記狀態之_位=^=區塊倾所在之分區區塊對應 表於該記,_,並於魏體中、建立第—例外對應 之部分對應::例外對應表 料之一將被變更時,透過計算找出對庫=錯存區域中之各區塊資 戈出對應將被變更之區塊資料所在 200820011 之分區區塊之映射位置、 出之映射位置未標記時 —映射位置是碰標記,當找 資料之變更、告抽山β 仃冩入前複製並進行將被變更之區塊 例外對應表、;=射位置已標記時,尋訪記憶想中之第-之對瘅β _表中讀存有將觀更之區塊資料 例外二找對咖 區#次、 依據找出之對應資料判斷將被變更之 資料^變更。人前複製時,執行寫人前複製並進行該區塊 …兒之坪細特徵與實作,茲配合圖示在實施方式中詳 二Γ亚〜把,且根據本說明書所揭露之内容及圖式’任何 7相關技藝者可輕易地理解本發明相關之目的及優點。 【實施方式】 以下以-個實施例來解說本翻的運作方法,並請來昭「第 2圖」本發明所提之快照之備份方法之方法流程圖,及「第3圖」。 在執行有本㈣驗難式被啟動之後,猜有本發·快照程 式會先在疏豸4GG巾建立—個對應儲存區域3⑻的映射表4扣 以及對應儲存區域3G0之第-例外對絲42Q (步驟21Q),本實 施例的映射表410以位元映射表⑽㈣)為例,但不以此為限、, 儲存區域300中的各個區塊資料所在的分區區塊分別被對應到被 建立的位元映射表巾的各個映射位置,也就是位元映射表中的各 個位兀(bit)’如「第3圖」所示,映射表中的第一映射位 置411即對應到儲存區域300中的第一分區區塊31〇,映射位置 200820011 儲存的資料表示其對應的分區區塊的標記狀態,標記狀態表示分 區區塊中的區塊資料是否有任何一個區塊資料做過寫入前複製, 若有則被標記。其中,記憶體400中的映射表410由具有本發明 之快照程式由儲存於快照500中的映射表510讀出,如「第4圖」 所示,快照500中的映射表510由快照500的起始位址開始儲 存,但快照500並不以如「第4圖」所示之配置方式為限。其中, 第二例外對應表520在快照500被建立之後,依據儲存區域3〇〇 的分區區塊的總數建立的,分區區塊例如儲存區域3〇〇中的物理 ^區(Physical Extents; PE)等,但不以此為限。此外,每一個 刀區區塊包含著數量相同的區塊資料,由於第二例外對應表是一 次建立完成,因此第二例外對應表咖砂—個完整的儲存空間 配置於快照500中。 第例外對應表420則是由讀取儲存於快照5〇〇中的第二食 中的對應資料的一部份所產生,讀取的出細 5=中^定的方式讀出,例如以隨機的方式由第二例外對鮮 以隨機為限。42G中,但讀取_料之方式不 由執行有她^===4構爾物㈣ 可用的記憶體郎等r二特定因素判斷決定,例如,剩館 (Hash Tabled儲疒n例外對應表420通常是以—個雜湊表 iaD|e)儲存被讀出之對 但第—例外對應表42◦不以雜、奏;^枓,本貝施例亦以此為例, ㈣外對編 200820011 與備份位址5212,其中原始位址5211儲存區塊資料原先儲存在 儲存區域300中的位址、備份位址5212儲存區塊資料儲存在快 照500的區塊資料區530中的位址,如「第5圖」所示,但備份 位址5212並不以上述為限,凡可以讓快照程式依據備份位址 5212讀出未被變更的區塊資料者均屬本發明之範圍。另外,由於 f 一例外對絲420由第二例外對應表52〇中的對應資料521的 一部份所組成’因此第-例外對應表42Q可以變動的使用的記情 體空間來儲存部份的對應資料,以減少記憶體的使用量。 當使用者對具有快照5⑻的儲存區域·中的第一區塊資料 $變更時,例如新增難、對齡作修改、甚至刪除播案, =林發明的快照程式會在第一區塊資料311被變更之前,計 鬼資料311所在的第一分區區塊31〇對應 位置411 (步驟22〇),因為夂 了 至映射表中的各映射位置了=所在的分_分別對應 的_料所在的分 表中的第3二區塊對應的第一映射位置4”即為位元映射 快照驟22〇)後,執行本發明之 挪),例如判斷資料是否為】,m斗是碰標記(步驟 411被標記時,代、—不桃為限。當第-映射位置 做過寫入前複製,^ = 4 31Q巾至少有—倾塊資料已 於疋先至弟一例外對應表420中搜尋是否有儲 200820011 ^於儲存輯·中的原始位址5211 (步驟24Q),若有則表示 第例外對應表中儲存有第一資料區塊311 @第一對應資料 521a ’於是便可以由第一對應資料中52ia相對應的備^位址 5212找出第—區塊資料311被複製到快照500的區塊資料區53〇 中的位址。 在執行有本發明的快照程式由第—區塊資料311儲存在儲存 區域300巾的位址判斷出第—例外對縣4糊存有第—區塊資 料州的第-對應資料521a (步驟24〇)後,表示第一區塊資料 311已被執行過寫入前複製,因此不需再次執行,故可以直接將 變更,的第-區塊資料311寫入儲存區域3〇〇中(步驟2叫 若使用者接著將變更第二區塊資料312,則執行有本發明的 =程式會重複上述的步驟22G至步驟⑽找出第二區塊資料 /所在的第一分區區塊310所對應的第-映射位置州,雖缺 弟-映射位置411 «記’若執行有本發明的快照程式搜尋第一 :=應表420後,無法依據第二區塊資料312儲存在儲存區域 〇中的位址找到第二區塊資料312的對應資料,於是執行 =月計算第二區塊資料312所對應的第四對應資料 25〇 Γ 的第二例外對應表52()中的位址(步驟 ^ !οΓ.:Γ 520 500 ^ 子£或300的刀區區塊的總數建立的,每—個分區包 塊資料’因此每一個區塊資料在第二例外對應表520中一 再加上每個物料521僅包含原始位址 5212,所以每個對應資料奶的長度是固定的, 200820011 是故執行有本發明的快照程式可以依據第二區塊資料312在儲存 區域300中的順序計异出第一區塊資料312對應之第四對應資料 521d儲存在快照5〇〇中的位址,例如第二區塊資料3彳2是第一 分區區塊310的第二個區塊資料,而第—分區區塊31()具疋有64 個區塊資料,料-分區區塊310是儲存區域3⑻的第二個分區 區塊’因此與第二區塊資料312對應之第四對應資料5抑儲存 在第66筆(64+2)對應資料的位址。 在計算出第四對應資料521d的位址後,接著會依據第四對 應賴521d的備份位址5212中記錄的第二區塊資料312儲存在 快照500中的位址判斷是否第二區塊資料扣是否執行過寫入前 、复衣(步驟260) ’例如’當記錄的位址為空時,判斷記錄的位址 無效;當記錄的位址為—個位址值時,判斷記錄的位址有效,若 位址有效,則代表第二區塊㈣312被執行過寫人前複製,因此 可以直接將被變更後的第二區塊資料312寫入儲存區域3〇〇中 、(步驟28G),若位址無效,則表示第二區塊資料312尚未被執行 過寫入前複製’則需要域行寫人前複製(步驟27Q),也就是將 ,變更的第二區塊資料312複製到快照5⑻的區塊資料區咖 並將第二區塊資料312被複製至快照5⑽中的位址寫入至第 Ο外對應表52G中對應第二區塊資料312之第四對應資料泣1 d 赌位址5212中’再將變更後的第二區塊資料312寫入儲存 區域300中(步驟28〇)。 右使用者繼績將變更 快照程式會在計算出第三 第二區塊資料321,則執行有本發明的 區塊資料321所在的第二分區區塊320 13 200820011 對應的第二映射位置412後(步驟220),判斷出第二映射位置 412尚未被標記(步驟230),意即代表第二分區區塊中的所 有區塊資料均尚未被執行過寫入前複製,於是執行有本發明之快 照程式將會直接對第二區塊資料321進行寫入前複製(步驟 270 )’不再至弟一例外對應表420與第二例外對應表520中搜尋 第三區塊資料321對應的第三對應資料521c,並在寫入前複製完 成後,將變更後的第三區塊資料321寫入儲存區域3〇〇中(步驟 280)’並將第二區塊資料321戶斤在的第二分區區塊320對應的第 二映射位置412標記起來(步驟290),避免再次執行寫入前複 製,使得被更改後的第三區塊資料321被複製到快照5〇〇的區塊 資料區530中,造成未被變更的第三區塊資料33〇 (即欲備份的 第三區塊資料)被覆蓋。上述之寫人前複製的動作包含將第三區 塊資料321複製至快照500的區塊資料區53〇中,並將複製至區 塊資料區530中的第三區塊資料321的位址寫入第三對應資料 521c之備份位址5212中及將第三區塊資料321於儲存區域3〇〇 中之位址寫入第三對應資料521c之原始位址521彳中。 在上述的實施例中,若儲存區域300的儲存空間為1〇〇G位 兀組(Bytes; B)、物理分區的大小為32MB、區塊資料的大小為 64KB、帛-例外對應表420與第二例外對應表52〇中各對應資 料的大小為32B,則f知之例外對應表所佔㈣最大記憶體空間 為(100G/64K)*32B=50MB;而本發明所提的映射表41〇佔用的 記憶體空間為(1〇〇G/32M)/8,即約略等於4〇〇B,這是非常小的 δ己憶體使用量,因此,本判最切記紐_量取決於第一例 200820011 外對應表410所佔用的 對應表使_雜體^^社小,但本判之第一例外 例外斜確主1 設定的,也就是說,當第- 心…认為第二例外對絲的百分之-時,林明佔用 ^M:mm 〇·5〇〇4Μ 5 習°知之針健職用記憶體不多的映射表以及 因此=Γ編2G㈣分(㈣―_應表鄉 此本發日聊可崎決記憶體被浪費的問題。 式每=本發明之快照之錯方法,可她_中以集中方 現或以不同元件散佈於若干互連之電腦系統的分散方式實 =本㈣以前叙触實關聽如上,财並非用以限 内,二之=熟習相像技藝者,在不脫離本發明之精神和範圍 明之直 _飾’闕本㈣之專娜魏圍,因此本發 之專利保護範_視本之申料利範圍所界定 【圖式簡單說明】 51圖係習知之快照之備份方法之方法流程圖。 =2圖係本發明所提之快照之備份方法之方法流程圖。 第3圖係本發明實施例所提之區塊資料、映射位置與對應資 料示意圖。 、 第4圖係本發明所提之快照配置空間示意圖。 第5圖係本發明所提之對應資料配置空間示意圖。 15 200820011 【主要元件符號說明】 300 儲存區域 310 第一分區區塊 311 第一區塊資料 312 第二區塊資料 321 第三區塊貧料 320 第二分區區塊 400 記憶體 410 映射表 411 第一映射位置 412 第二映射位置 420 第一例外對應表 500 快照 510 映射表 520 第二例外對應表 521 對應資料 521a 第一對應資料 521b 第二對應資料 521c 第三對應資料 521 d 第四對應資料 5211 原始位址 5212 還原位址 530 區塊貧料區 200820011 步驟110尋訪例外對應表 步驟120是否有對應資料 步驟130執行寫入前複製 步驟140變更區塊 步驟210建立映射表與第一例外對應表 步驟220計算映射位置 步驟230映射位置是否被標記 步驟240第一例外對應表是否有對應資料 步驟250計算第二例外對應表中之區塊之對應位置 步驟260是否執行過寫入前複製 步驟270執行寫入前複製 步驟280變更區塊 步驟290標記映射位置200820011 IX. Description of the invention: [Technical field to which the invention belongs] The second, the type I, the method of knowing, especially the mapping of the blocks of the corresponding blocks using the corresponding snapshots, which corresponds to the area where the silk will be changed. Whether the block data has been used as a backup method for snapshots before copying. [Prior Art] It is determined that the data can be backed up at a specific point in time in the storage area, and the backup method of data service (that is, data reading and writing) efficiency is hardly affected. It is an independent existence. The storage area on the storage medium. The snapshot is not a complete backup of the data in the storage area. The storage area is divided into several pieces of cell data (Chunk 'usually in KB, the size can be adjusted), when the user rewrites the data of the storage area The changed block (4) is copied to the snapshot, which is the copy before the writer. Then, when a snapshot is created, the user needs to specify (4) the disk space, the corresponding storage area, and the snapshot will back up the data at the time of creation. ^ As shown in the "Figure 1", when the execution of the snapshot program is started, the stored in the fast money_outer correspondence table is read to the memory towel, and the #块#的块块数据 is generated. The program will know the exception correspondence table in the memory (step 11〇) to determine whether the block data to be changed has been pre-written (step 120), and if so, the exception table will be stored. The corresponding data of the block data to be changed 'is usually the address of the block data to be changed in the snapshot, which means that the data to be changed has been backed up to the snapshot, and the block data can be directly changed 200820011 (Step 140); if not, a pre-write copy (step 13A) is required to back up the data to be changed to the snapshot to change the block data (step 14). In order to reduce the continuation of the exception mapping table in the snapshot to complete the above arbitrage process, the snapshot program reads the exception correspondence table stored in the snapshot into the memory, but 疋, once the storage area has established multiple snapshots Or if a large amount of block data is stored in the snapshot, the amount of memory used will be quite large. Therefore, it is a problem to be solved by providing a snapshot that can reduce the read exception correspondence table in the snapshot and reduce the amount of memory usage. SUMMARY OF THE INVENTION The problem of the above is the above-mentioned problem. 'The main purpose of the present invention is to provide a snapshot of the method of selling 2', which is based on the mapping table of the data of the corresponding block of the memory of the memory. It is difficult to write before, if you have done writing = = = 2 - the exception table and the second exception table in the snapshot to get the - exception to the person (four) towel, through the memory map and the map The second exception correspondence table is read to reduce the snapshot, and the problem mentioned in the prior art is solved. There are not many L's physical laboratories, so you can set up the zone: Send: The method disclosed includes the following steps: _ bit of the built-in mark state = ^= partition table corresponding to the block dump In the record, _, and in the Wei body, the corresponding part of the corresponding exception is established: When one of the exception corresponding materials is to be changed, the calculation is made to find out the corresponding block in the library=missing area. When the mapping position of the partition block in 200820011 where the changed block data is located is not marked, the mapping position is the touch mark. When the data is changed, the data is copied and the data is copied and executed. Change the block exception correspondence table;;= When the shot position has been marked, search for the first part of the memory to think about the 瘅β _ table in the table to save the view of the block information exception 2 find the right area of the coffee area #次, basis Find out the corresponding data and judge the information that will be changed. When copying before the person, perform the copying before the writer and carry out the detailed features and implementations of the block. The drawing is in the embodiment of the detailed description, and the contents and drawings according to the description are disclosed. The objects and advantages associated with the present invention are readily understood by anyone skilled in the art. [Embodiment] Hereinafter, an operation method of the present embodiment will be explained by way of an embodiment, and a flowchart of a method for backing up a snapshot of the present invention, and "3rd drawing" will be described. After the execution of this (4) test-breaking mode is started, it is guessed that the present hair-snap program will first create a mapping table 4 corresponding to the storage area 3 (8) in the dredging 4GG towel and the first-exception pair wire 42Q of the corresponding storage area 3G0. (Step 21Q), the mapping table 410 of the present embodiment takes the bit mapping table (10) (4) as an example, but not limited thereto, the partitioning blocks in which the respective block data in the storage area 300 are located are respectively corresponding to being established. The respective mapping positions of the bit mapping table, that is, the respective bit bits in the bit mapping table are as shown in FIG. 3, and the first mapping position 411 in the mapping table corresponds to the storage area 300. In the first partition block 31〇, the data stored in the mapping location 200820011 indicates the marking status of the corresponding partitioning block, and the marking status indicates whether the block data in the partitioning block has any block data before being written. Copy, if any, be marked. The mapping table 410 in the memory 400 is read by the mapping table 510 stored in the snapshot 500 by the snapshot program of the present invention. As shown in FIG. 4, the mapping table 510 in the snapshot 500 is taken by the snapshot 500. The start address begins to be stored, but the snapshot 500 is not limited to the configuration shown in Figure 4. The second exception correspondence table 520 is established according to the total number of the partitioning blocks of the storage area 3〇〇 after the snapshot 500 is created, and the partitioning block, for example, the physical extsities (PEs) in the storage area 3〇〇 Wait, but not limited to this. In addition, each block area contains the same number of block data. Since the second exception correspondence table is once completed, the second exception corresponds to the table sand—a complete storage space is configured in the snapshot 500. The first exception correspondence table 420 is generated by reading a part of the corresponding material stored in the second food stored in the snapshot 5, and the read fineness is read in a manner of 5, for example, by random. The way to the second exception is limited to random. In 42G, but the way of reading _ material is not determined by the execution of her ^===4 struct (4) available memory lang and other r-specific factors, for example, the remaining hall (Hash Tabled 疒 n exception correspondence table 420 Usually, the pair is read out by a hash table iaD|e), but the first-to-exception correspondence table 42 is not miscellaneous; ^枓, this example is also taken as an example. (4) External editing 200820011 and The backup address 5212, wherein the original address 5211 stores the address of the block data originally stored in the storage area 300, and the backup address 5212 stores the block data stored in the block data area 530 of the snapshot 500, such as " As shown in FIG. 5, the backup address 5212 is not limited to the above, and any program that allows the snapshot program to read the unaltered block data according to the backup address 5212 is within the scope of the present invention. In addition, since the f-exception pair 420 is composed of a part of the corresponding material 521 in the second exception correspondence table 52A, the first exception-corresponding table 42Q can be used to change the used sensible space to store the portion. Correspondence data to reduce the amount of memory used. When the user changes the first block data $ in the storage area with snapshot 5 (8), for example, adding new difficulty, modifying the age, or even deleting the broadcast, the snapshot program of the invention will be in the first block data. Before the 311 is changed, the first partition block 31 所在 where the ghost data 311 is located corresponds to the position 411 (step 22〇), because each mapping position in the mapping table is = = the corresponding _ material After the first mapping position 4′′ corresponding to the 3rd block in the sub-table is the bit mapping snapshot step 22〇), the method of the present invention is executed, for example, whether the data is determined to be, and the m bucket is a touch mark ( When step 411 is marked, the generation is not limited to the limit. When the first-mapping position is copied before the write, ^ = 4 31Q towel has at least - the dump data has been searched in the first-to-first exception table 420 Is there a stored original address 5211 in the storage block (step 24Q), if any, indicating that the first data block 311 is stored in the first exception correspondence table @first correspondence data 521a ' Corresponding to the corresponding location of 52ia in the corresponding information 5212 to find the first area The data 311 is copied to the address in the block data area 53 of the snapshot 500. In the execution of the snapshot program of the present invention, the first block is determined by the address of the first block data 311 stored in the storage area 300. 4 pastes the first-correspondence data 521a of the first block data state (step 24〇), indicating that the first block data 311 has been copied before the write, so there is no need to perform it again, so the change can be directly changed. The first block data 311 is written in the storage area 3 (step 2 is called if the user subsequently changes the second block data 312, then executing the program with the present invention repeats the above steps 22G to (10) Finding the first-map location state corresponding to the second block data/the first partition block 310, although the missing-map location 411 «Record' if the snapshot program of the present invention is executed first: = should be After the 420, the corresponding data of the second block data 312 cannot be found according to the address stored in the storage area 第二 of the second block data 312, and then the fourth corresponding data corresponding to the second block data 312 is calculated and executed. The second exception of 〇Γ corresponds to the bit in Table 52() Address (step ^ !οΓ.:Γ 520 500 ^ The total number of block blocks of £ or 300 is established, each block partition data 'so each block data is added in the second exception correspondence table 520 Each material 521 only contains the original address 5212, so the length of each corresponding data milk is fixed. 200820011 Therefore, the snapshot program executing the present invention can be calculated according to the order of the second block data 312 in the storage area 300. The fourth corresponding data 521d corresponding to the first block data 312 is stored in the address in the snapshot 5, for example, the second block data 3彳2 is the second block data of the first partition block 310, and The first partition block 31() has 64 block data, and the material-partition block 310 is the second partition block of the storage area 3 (8). Therefore, the fourth corresponding data corresponding to the second block data 312 is 5 It is stored in the address of the 66th (64+2) corresponding data. After the address of the fourth corresponding data 521d is calculated, the second block data is determined according to the address stored in the snapshot 500 by the second block data 312 recorded in the backup address 5212 of the fourth corresponding 521d. Whether the buckle has been executed before or after the writing (step 260) 'For example, when the recorded address is empty, the address of the recorded record is invalid; when the recorded address is an address value, the recorded bit is determined. The address is valid. If the address is valid, it means that the second block (four) 312 has been copied before the write, so the changed second block data 312 can be directly written into the storage area 3 (step 28G). If the address is invalid, it means that the second block data 312 has not been subjected to pre-write copying, then the domain line write copy is required (step 27Q), that is, the changed second block data 312 is copied to the snapshot 5 (8). The block data area and the second block data 312 are copied to the address in the snapshot 5 (10) and written to the fourth corresponding data of the second block data 312 in the second correspondence table 52G. In the address 5212, the changed second block data 312 It is written in the storage area 300 (step 28A). The right user succession will change the snapshot program to calculate the third second block data 321, and then execute the second mapping location 412 corresponding to the second partition block 320 13 200820011 where the block data 321 of the present invention is located. (Step 220), it is determined that the second mapping location 412 has not been marked (step 230), that is, that all the block data in the second partition block has not been subjected to pre-write copying, and thus the present invention is executed. The snapshot program will directly copy the second block data 321 to the pre-write (step 270) 'no longer to the third exception data 321 in the second exception correspondence table 520 and the second exception correspondence table 520. Corresponding to the data 521c, and after the pre-write copy is completed, the changed third block data 321 is written into the storage area 3 (step 280)' and the second block data 321 is placed in the second The second mapping location 412 corresponding to the partitioning block 320 is marked (step 290), and the pre-write copying is prevented from being performed again, so that the changed third tile data 321 is copied to the tile data area 530 of the snapshot 5〇〇. In the middle, caused no change The third block data 33〇 (third block data Jiyu backup) is covered. The above-mentioned copying operation of the writer includes copying the third block data 321 into the block data area 53 of the snapshot 500, and writing the address of the third block data 321 copied to the block data area 530. The backup address 5212 of the third corresponding data 521c and the address of the third block data 321 in the storage area 3 are written into the original address 521 of the third corresponding data 521c. In the above embodiment, if the storage area of the storage area 300 is a 1 〇〇 G bit group (Bytes; B), the size of the physical partition is 32 MB, the size of the block data is 64 KB, and the 帛-exception correspondence table 420 and The size of each corresponding material in the second exception correspondence table 52 is 32B, and the exception correspondence table is occupied by (f) the maximum memory space is (100G/64K)*32B=50MB; and the mapping table 41 of the present invention is proposed. The occupied memory space is (1〇〇G/32M)/8, which is approximately equal to 4〇〇B, which is a very small amount of δ recall memory usage. Therefore, the most important thing to remember is that the amount depends on the first Example 200820011 The correspondence table occupied by the external correspondence table 410 makes the _heterody^^ community small, but the first exception exception of this judgment is set by the main 1, that is, when the first-heart...the second exception is considered The percentage of silk - when Lin Ming occupies ^M:mm 〇·5〇〇4Μ 5 The map of the knowledge of the needles of the health knowledge is not much map and therefore = Γ 2G (four) points ((four) _ _ table township This is a problem that can be used to waste memory. The method of each of the snapshots of the present invention can be used to concentrate on the present or to dissipate it with different components. In the case of a number of interconnected computer systems, the distribution method is as follows: (4) Before the actual touch, the money is not used within the limits, and the second is the familiarity of the artist, without departing from the spirit and scope of the invention. '阙本(四)之专娜Weiwei, therefore, the patent protection scope of the present invention is defined by the scope of the application of the scope of the application. [Simple description of the schema] 51 diagram of the method of backup method of the snapshot of the conventional knowledge. A flowchart of a method for backing up a snapshot of the present invention. FIG. 3 is a schematic diagram of a block data, a mapping location, and a corresponding data according to an embodiment of the present invention. FIG. 4 is a snapshot configuration space proposed by the present invention. Fig. 5 is a schematic diagram of the corresponding data configuration space proposed by the present invention. 15 200820011 [Description of main component symbols] 300 Storage area 310 First partition block 311 First block data 312 Second block data 321 Third area Block lean 320 second partition block 400 memory 410 mapping table 411 first mapping location 412 second mapping location 420 first exception correspondence table 500 snapshot 510 mapping table 520 second exception Table 521 Corresponding data 521a First corresponding data 521b Second corresponding data 521c Third corresponding data 521 d Fourth corresponding data 5211 Original address 5212 Restore address 530 Block poor material area 200820011 Step 110 Search exception correspondence table Step 120 There is a corresponding data step 130 to perform a pre-write copy step 140 to change a block step 210 to establish a mapping table and a first exception correspondence table step 220 to calculate a mapping position step 230 whether the mapping position is marked step 240 whether the first exception correspondence table has a corresponding data step 250. Calculating the corresponding position of the block in the second exception correspondence table. Step 260: Performing the pre-write copy step 270. Performing the pre-write copy step 280, changing the block step 290, marking the map position.

1717

Claims (1)

200820011 十、申清專利範圍: 1· 一種快照(Snapshot)備份方法,該方法包含下列步驟: 建立一映射表於一記憶體中,該映射表記錄可表示一儲存 區域中一個以上區塊資料(chunk)所在之各分區區塊對應之 各映射位置的標記狀態; 建立一第一例外對應表(Exception Table)於該記憶體 中並項取该儲存區域對應之一快照之一第二例外對應表之部 分對應資料至該第一例外對應表中,其中該對應資料包含該區 免資料儲存於该儲存區域中之—原始位址及該對應資料儲存 於該快照中之一備份位址; 、 當該儲存區域令之該區塊資料之一將被變更時,透過計』 找出對應該區塊資料所在之該分區區塊之該映射位置; 、,判斷該映射位置是否被標記,於該映射位置被標記時,^ 判斷該第-例外對應表儲存之各該對應資料之該原始位叫 匕3有ΰ亥區塊資料儲存於該儲存區域中之位址時,透過計算才 出儲存於該第二例外對應表中之該對應資料;及 ” 依據該對應資料之該備份位址判斷該區塊資料未執行3 寫入前複製(CW 0n Write; c〇w)時,執行寫人前複製^ 進行該區塊資料之變更; /其中,觸該映射位置未被標記時,標記該映射位置、幸 行寫入前複製並進行該區塊資料之變更。 .如申请專利範圍第1 j員所述之快照備份方法,其中該建立該喊 射表之步驟係讀取儲存於該快照中之映射表至該記憶體中。 200820011 塊資耗圍第1項所述之快照備份方法,其中該判斷該區 、 域寫人前複製之步驟制斷該備份位址是否有 效0 4.如申晴專利$in第1項所述之快照備份方法,其巾該第二例外 對絲係於建立該快照時’在該快照中依據該儲存區域具有之 區塊資料配置-特定大小之儲存空間產生,負責儲存該對應資 料。 19200820011 X. Shenqing patent scope: 1. A snapshot (Snapshot) backup method, the method comprises the following steps: Establishing a mapping table in a memory, the mapping table record can represent more than one block data in a storage area ( a mark state corresponding to each mapping position of each partition block in which the chunk is located; establishing a first exception correspondence table (Exception Table) in the memory and taking one of the snapshots corresponding to the storage area, the second exception correspondence table And corresponding data to the first exception correspondence table, wherein the corresponding data includes the area free data stored in the storage area—the original address and the corresponding data are stored in one of the backup addresses in the snapshot; When the storage area is such that one of the block data is to be changed, the mapping position of the partition block corresponding to the block data is found through the calculation; and the mapping position is determined whether the mapping position is marked. When the location is marked, ^ determines that the original bit of each corresponding data stored in the first-exception correspondence table is called ΰ3, and the block data is stored in the storage. When the address in the domain is calculated, the corresponding data stored in the second exception correspondence table is calculated; and “the block data is not executed according to the backup address of the corresponding data. 3 Pre-write copy (CW) 0n Write; c〇w), perform a pre-write copy ^ to change the block data; /, when the touch map position is not marked, mark the map position, forgotten to copy before copying and performing the block The data backup method is as described in claim 1 , wherein the step of establishing the shouting table reads the mapping table stored in the snapshot into the memory. 200820011 Block consumption The snapshot backup method according to the first item, wherein the step of determining the pre-copy of the area and the domain writes determines whether the backup address is valid. 4. The snapshot backup method described in the first item of Shen Qing patent $in, The second exception of the towel is generated in the snapshot when the snapshot is created, according to the block data configuration of the storage area - a storage space of a specific size, and is responsible for storing the corresponding data.
TW95139769A 2006-10-27 2006-10-27 A data backup method using snapshot TWI321728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW95139769A TWI321728B (en) 2006-10-27 2006-10-27 A data backup method using snapshot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW95139769A TWI321728B (en) 2006-10-27 2006-10-27 A data backup method using snapshot

Publications (2)

Publication Number Publication Date
TW200820011A true TW200820011A (en) 2008-05-01
TWI321728B TWI321728B (en) 2010-03-11

Family

ID=44770019

Family Applications (1)

Application Number Title Priority Date Filing Date
TW95139769A TWI321728B (en) 2006-10-27 2006-10-27 A data backup method using snapshot

Country Status (1)

Country Link
TW (1) TWI321728B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210056636A (en) * 2019-11-11 2021-05-20 한국전자기술연구원 Method for Fast Block Deduplication and transmission by multi-level PreChecker based on policy

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210056636A (en) * 2019-11-11 2021-05-20 한국전자기술연구원 Method for Fast Block Deduplication and transmission by multi-level PreChecker based on policy
KR102367733B1 (en) 2019-11-11 2022-02-25 한국전자기술연구원 Method for Fast Block Deduplication and transmission by multi-level PreChecker based on policy

Also Published As

Publication number Publication date
TWI321728B (en) 2010-03-11

Similar Documents

Publication Publication Date Title
TWI398770B (en) Data accessing method for flash memory and storage system and controller using the same
CN103970585B (en) Create the method and device of virtual machine
KR101631348B1 (en) Metadata redundancy schemes for non-volatile memories
CN102929884B (en) A kind of method and device that shrinks virtual disk image file
WO2018058944A1 (en) Method and device for deleting cascade snapshot
WO2012100730A2 (en) Method and device for secure data erasure
US20070150645A1 (en) Method, system and apparatus for power loss recovery to enable fast erase time
TW201007735A (en) Block management method for flash memory and storage system and controller using the same
US10114576B2 (en) Storage device metadata synchronization
CN107122223B (en) Data migration method and device
TW201017407A (en) Nonvolatile data storage system and method thereof
TW201035978A (en) Flash memory writing method and storage system and controller using the same
CN101174231A (en) Snap backup method
TW200844744A (en) Near instantaneous backup and restore of disc partitions
TW201712540A (en) Data backup system
KR20140100113A (en) Storage device and data processing method thereof
TW200929237A (en) Memory architecture and configuration method thereof
CN100507865C (en) Method for centralized establishing dependent snap
CN111007990A (en) Positioning method for quickly positioning data block reference in snapshot system
CN104461784A (en) Single progress bitmap based clone copying method and system
CN107544865A (en) A kind of quick available method and apparatus of Backup Data
TW200820011A (en) A data backup method using snapshot
US9535796B2 (en) Method, apparatus and computer for data operation
CN106909514A (en) A kind of localization method and device of snapshot disk address
TWI277866B (en) Information processing apparatus, recording medium with program, and memory managing method

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees