TWI766409B - Data access system - Google Patents
Data access system Download PDFInfo
- Publication number
- TWI766409B TWI766409B TW109137507A TW109137507A TWI766409B TW I766409 B TWI766409 B TW I766409B TW 109137507 A TW109137507 A TW 109137507A TW 109137507 A TW109137507 A TW 109137507A TW I766409 B TWI766409 B TW I766409B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- controller
- record
- area
- storage medium
- Prior art date
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本案是關於儲存領域,特別是一種資料存取系統。This case is about the field of storage, especially a data access system.
近年來,隨著資料存取系統的技術日新月異,資料存取系統已廣泛使用在日常生活的許多應用上,例如電子信件伺服器、金融交易、資料庫管理等。由於現今資料存取系統需處理的資料及提供的服務持續地增加,使得資料存取系統運作的負擔也跟著加重。因此如何使資料存取系統在多工高速處理時減少停機時間,也就是讓資料存取系統保持高可用性,已成為重要的課題。In recent years, with the rapid development of data access system technology, data access systems have been widely used in many applications in daily life, such as electronic mail servers, financial transactions, database management, and so on. As the data to be processed and the services provided by today's data access systems continue to increase, the operational burden of the data access systems also increases. Therefore, how to reduce the downtime of the data access system during multi-tasking and high-speed processing, that is, to maintain the high availability of the data access system, has become an important issue.
目前具有雙控制器的資料存取系統,由於受限在雙控制器之間存取權限切換的架構設計,或者受限於雙控制器之間傳輸介面的頻寬,使得資料存取系統的運作速度受限並且效能降低。The current data access system with dual controllers is limited by the architectural design of switching access rights between the dual controllers, or limited by the bandwidth of the transmission interface between the dual controllers, making the operation of the data access system impossible. Speed is limited and performance is reduced.
有鑑於此,本案提出一種資料存取系統。In view of this, this case proposes a data access system.
依據一些實施例,一種資料存取系統包括:一資料儲存媒體、一記錄媒體、一第一控制器及一第二控制器。其中記錄媒體包括一第一記錄區及一第二記錄區。第一控制器包括一第一元資料區。第二控制器包括一第二元資料區。第一控制器連接至資料儲存媒體及記錄媒體,並與第一記錄區相對應。第二控制器連接至資料儲存媒體及記錄媒體,並與第二記錄區相對應。第一控制器接收一第一資料,以將第一資料以日誌式方式寫入資料儲存媒體中而更新第一元資料區,並對應產生一第一記錄於第一記錄區中。第二控制器依據第一記錄區中的第一記錄更新第二元資料區。According to some embodiments, a data access system includes: a data storage medium, a recording medium, a first controller, and a second controller. The recording medium includes a first recording area and a second recording area. The first controller includes a first metadata area. The second controller includes a second metadata area. The first controller is connected to the data storage medium and the recording medium, and corresponds to the first recording area. The second controller is connected to the data storage medium and the recording medium, and corresponds to the second recording area. The first controller receives a first data, and writes the first data into the data storage medium in a log mode to update the first metadata area, and correspondingly generates a first record in the first recording area. The second controller updates the second metadata area according to the first record in the first record area.
依據一些實施例,前述資料存取系統之中的第二控制器檢查第一記錄區中的第一記錄的佔有容量滿足一閥值時,依據第一記錄區中的第一記錄更新第二元資料區。According to some embodiments, when the second controller in the aforementioned data access system checks that the occupied capacity of the first record in the first recording area satisfies a threshold, it updates the second element according to the first record in the first recording area. data area.
依據一些實施例,前述資料存取系統之中的第一控制器檢查第一記錄區寫滿時,觸發第二控制器依據第一記錄區中的第一記錄更新第二元資料區,並確認第二控制器更新完畢後清除第一記錄區。According to some embodiments, when the first controller in the aforementioned data access system checks that the first recording area is full, the second controller is triggered to update the second metadata area according to the first record in the first recording area, and confirms that After the second controller is updated, the first recording area is cleared.
依據一些實施例,前述資料存取系統之中的第二控制器接收一第二資料,以將第二資料以日誌式方式寫入資料儲存媒體中而更新第二元資料區,並對應產生一第二記錄於第二記錄區中,第一控制器依據第二記錄區中的第二記錄更新第一元資料區。According to some embodiments, the second controller in the data access system receives a second data, writes the second data into the data storage medium in a log mode to update the second metadata area, and generates a corresponding The second record is in the second record area, and the first controller updates the first metadata area according to the second record in the second record area.
依據一些實施例,前述資料存取系統之中的第一控制器檢查第二記錄區中的第二記錄的佔有容量滿足一閥值時,依據第二記錄區中的第二記錄更新第一元資料區。According to some embodiments, when the first controller in the aforementioned data access system checks that the occupied capacity of the second record in the second recording area satisfies a threshold, it updates the first element according to the second record in the second recording area. data area.
依據一些實施例,前述資料存取系統之中的第二控制器檢查第二記錄區寫滿時,觸發第一控制器依據第二記錄區中的第二記錄更新第一元資料區,並確認第一控制器更新完畢後清除第二記錄區。According to some embodiments, when the second controller in the data access system checks that the second recording area is full, the first controller is triggered to update the first metadata area according to the second record in the second recording area, and confirms After the first controller is updated, the second recording area is cleared.
依據一些實施例,前述資料存取系統更包括:一多重路徑輸入輸出,連接第一控制器及第二控制器。第一控制器經由多重路徑輸入輸出接收第一資料,第二控制器經由多重路徑輸入輸出接收第二資料。According to some embodiments, the aforementioned data access system further includes: a multi-path input and output connected to the first controller and the second controller. The first controller receives the first data through the multi-path input and output, and the second controller receives the second data through the multi-path input and output.
依據一些實施例,前述資料存取系統之中的第一記錄包括:經由多重路徑輸入輸出接收第一資料的一第一時間戳記、第一資料儲存在資料儲存媒體的一第一位置、及第一資料的一第一容量。前述資料存取系統之中的第二記錄包括:經由多重路徑輸入輸出接收第二資料的一第二時間戳記、第二資料儲存在資料儲存媒體的一第二位置、及第二資料的一第二容量。According to some embodiments, the first record in the aforementioned data access system includes: a first time stamp of receiving the first data via multi-path input and output, the first data being stored in a first location on the data storage medium, and the first A first volume of a data. The second record in the aforementioned data access system includes: a second time stamp for receiving the second data via the multi-path input and output, a second location for storing the second data in the data storage medium, and a first time stamp for the second data Two capacity.
依據一些實施例,前述資料存取系統更包括:一多重路徑輸入輸出,連接第一控制器。第一控制器經由多重路徑輸入輸出接收第一資料。According to some embodiments, the aforementioned data access system further includes: a multi-path input and output connected to the first controller. The first controller receives the first data via the multi-path input and output.
依據一些實施例,前述資料存取系統之中的第一記錄包括:經由多重路徑輸入輸出接收第一資料的一第一時間戳記、第一資料儲存在資料儲存媒體的一第一位置、及第一資料的一第一容量。According to some embodiments, the first record in the aforementioned data access system includes: a first time stamp of receiving the first data via multi-path input and output, the first data being stored in a first location on the data storage medium, and the first A first volume of a data.
綜上,本案一些實施例之資料存取系統包括第一控制器及第二控制器。藉由記錄區中的記錄,可讓另一控制器據以更新元資料區,使得兩控制器對於資料儲存媒體中的資料的獲知程度達到同步。因此資料存取系統不需要受限於雙控制器之間的傳輸頻寬,也不需依賴雙控制器之間的互斥鎖機制,進而使資料存取系統達到雙控制器控制的高速存取功能。To sum up, the data access system of some embodiments of the present application includes a first controller and a second controller. Through the recording in the recording area, another controller can update the metadata area accordingly, so that the two controllers can synchronize their knowledge of the data in the data storage medium. Therefore, the data access system does not need to be limited by the transmission bandwidth between the dual controllers, nor does it need to rely on the mutual exclusion lock mechanism between the dual controllers, so that the data access system can achieve high-speed access controlled by the dual controllers. Function.
圖1為本案一實施例之資料存取系統10的示意圖。請參照圖1,資料存取系統10包括:具有多重路徑輸入輸出(Multipath I/O,MPIO)的連接介面100、資料儲存媒體200、記錄媒體300、第一控制器400及第二控制器500。記錄媒體300包括一第一記錄區310及一第二記錄區320,第一控制器400包括第一元資料區410,第二控制器500包括第二元資料區510。連接介面100為網路介面,連接介面100連接第一控制器400及第二控制器500,以供第一控制器400及第二控制器500接收用戶端之指令,並根據該指令操作。第一控制器400與第二控制器500均分別連接至資料儲存媒體200及記錄媒體300,以存取資料儲存媒體200及記錄媒體300中儲存的內容。FIG. 1 is a schematic diagram of a
資料儲存媒體200及記錄媒體300分別例如但不限於電子抹除式可複寫唯讀記憶體(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、相變化記憶體(Phase-Change Memory,PCM)、磁阻式隨機存取記憶體(Magnetoresistive Random Access Memory,MRAM)、可變電阻式記憶體(Resistive Random Access Memory、ReRAM)、或快閃記憶體(Flash Memory)等具有存取功能的非揮發性記憶體(Non-volatile Memory,NVM)。在另一些實施例,資料儲存媒體200及記錄媒體300分別例如但不限於硬碟(Hard Disk Drive,HDD)、固態硬碟(Solid-State Drive,SSD)、或磁碟陣列(Redundant Array of Independent Disks,RAID)等,其中磁碟陣列不限於由硬碟組成、固態硬碟組成、或硬碟及固態硬碟共同組成。需特別說明的是,依據一些實施例,資料儲存媒體200為等級不小於第四等級磁碟陣列(RAID 4)的磁碟陣列。第一元資料區410及第二元資料區510可由例如但不限於具有存取功能的非揮發性記憶體、硬碟、或固態硬碟實現。The
資料存取系統10透過第一控制器400或/及第二控制器500將資料儲存於資料儲存媒體200中。依據資料存取系統10運作模式,此些資料選擇性單獨透過第一控制器400、單獨透過第二控制器500、以及部分透過第一控制器400並且部分透過第二控制器500儲存至資料儲存媒體200。在此定義透過第一控制器400儲存的資料為第一資料,透過第二控制器500儲存的資料為第二資料。The
在一些實施例,資料存取系統10適於供至少一用戶端20連線,以執行用戶端20之寫入指令,將用戶端20提供的資料儲存至資料儲存媒體200中;或執行用戶端20之讀取指令,將資料儲存媒體200中的資料傳送至用戶端20。用戶端20具有與資料存取系統10的連接介面100相對應的連接介面21。In some embodiments, the
記錄媒體300包括第一記錄區310及第二記錄區320。第一記錄區310供第一控制器400儲存對於資料儲存媒體200執行寫入、刪除之記錄(於後稱「第一記錄」),第一記錄為第一控制器400以日誌式方式寫入資料時對應產生的。同理,第二記錄區320供第二控制器500儲存對於資料儲存媒體200執行寫入、刪除之記錄,第二記錄為第二控制器500以日誌式方式寫入資料時對應產生的。所述日誌式方式寫入資料是指將資料依序寫入至資料儲存媒體200的實體位址,並產生關於實體位址與邏輯位址的映射關係,以及關於該資料是否為有效或無效(例如執行刪除該資料的指令則是將該資料標註為無效)的有效值。詳細請參照申請人之中華民國第I609323號專利。The
第一控制器400內部具有第一元資料區410用於儲存前述實體位址與邏輯位址之間的映射關係的記錄及對應的有效值(以下,簡稱為「映射表」)。相似的,第二控制器500內部具有第二元資料區510用於儲存前述實體位址與邏輯位址之間的映射關係的記錄及對應的有效值(即映射表)。The first controller 400 internally has a first metadata area 410 for storing the aforementioned records of the mapping relationship between physical addresses and logical addresses and corresponding valid values (hereinafter referred to as “mapping table”). Similarly, the second controller 500 internally has a second metadata area 510 for storing the aforementioned records of the mapping relationship between physical addresses and logical addresses and corresponding valid values (ie, a mapping table).
在一些實施例中,第一元資料區410及第二元資料區510是儲存在資料儲存媒體200中。在一些實施例中,第一元資料區410及第二元資料區510是儲存在記錄媒體300中。In some embodiments, the first metadata area 410 and the second metadata area 510 are stored in the
在一些實施例中,資料存取系統10適於操作於雙主動模式及單主動模式。第一控制器400及第二控制器500適於操作於主動(active)狀態或待用(standby)狀態。當控制器(即,第一控制器400或第二控制器500)於主動狀態時,控制器能接收資料並寫入資料於資料儲存媒體200中,且能檢查對應其他控制器的記錄區以獲得其他控制器的寫入狀況,並藉此更新本身的元資料區。例如,當第一控制器400操作於主動狀態時,能接收資料並寫入資料於資料儲存媒體200中,且能依據對應第二控制器500的第二記錄區320更新第一元資料區410。當控制器於待用狀態時,控制器不能寫入資料於資料儲存媒體200中,但能檢查其他控制器的記錄區以獲得其他控制器的寫入狀況,並藉此更新本身的元資料區。例如,當第二控制器500操作於待用狀態時,能依據對應第一控制器400的第一記錄區310更新第二元資料區510。當資料存取系統10操作於雙主動模式時,第一控制器400及第二控制器500皆操作於主動狀態。反之,當資料存取系統10操作於單主動模式時,第一控制器400與第二控制器500的其中一者操作於主動狀態,而第一控制器400與第二控制器500的另一者操作於待用狀態。In some embodiments, the
圖2為本案一些實施例之資料儲存媒體200的示意圖。請參照圖2,在一些實施例,資料儲存媒體200為一磁碟陣列(Redundant Array of Independent Disks,RAID),資料儲存媒體200包括多個實體區塊(Physical Block,PB)PB1、PB2、PB3、PB4、多個條帶(Stripe)S1、S2、S3、S4,但本案不以此為限,實體區塊及條帶的數量可依資料儲存媒體200的實際需求而增加或減少。FIG. 2 is a schematic diagram of a
條帶S1-S4分別橫跨實體區塊PB1-PB4,具體而言,條帶S1-S4橫跨實體區塊PB1-PB4之區域包括多個頁面(Page),其中條帶S1對應於實體區塊PB1-PB4的各個頁面分別為頁面211、頁面221、頁面231、頁面241,其中條帶S2對應於實體區塊PB1-PB4的各個頁面分別為頁面212、頁面222、頁面232、頁面242,其中條帶S3對應於實體區塊PB1-PB4的各個頁面分別為頁面213、頁面223、頁面233、頁面243,其中條帶S4對應於實體區塊PB1-PB4的各個頁面分別為頁面214、頁面224、頁面234、頁面244。The strips S1-S4 span the physical blocks PB1-PB4 respectively. Specifically, the area of the strips S1-S4 spanning the physical blocks PB1-PB4 includes a plurality of pages (Page), wherein the strip S1 corresponds to the physical area The pages of the blocks PB1-PB4 are respectively
請同時參閱圖1及圖2,在一些實施例,頁面211至214、221至224、231至234、241至244是用於儲存資料及對應的錯誤校正碼(Error Control Codes,ECC)。在一些實施例,第一控制器400可能夠接收待寫入資料(即,一或多個第一資料),並且第一控制器400將第一資料分別儲存於頁面211至214、221至224、231至234、241至244中。並且第一控制器400將對應第一資料的錯誤校正碼儲存於頁面211至214、221至224、231至234、241至244中。同理,在一些實施例,第二控制器500能夠接收待寫入資料(即,一或多個第二資料),並且第二控制器500將第二資料分別儲存於頁面211至214、221至224、231至234、241至244中。並且第二控制器500將對應第二資料的錯誤校正碼儲存於頁面211至214、221至224、231至234、241至244中。Please refer to FIG. 1 and FIG. 2 simultaneously. In some embodiments,
在一些實施例,當實體區塊PB1至PB4之中有任一個實體區塊發生故障時,資料儲存媒體200可透過錯誤校正碼以進行同位元檢查(Parity Check)來偵錯,並且資料儲存媒體200進一步透過同一個條帶中其他未故障的實體區塊的資料及錯誤校正碼,以將故障的實體區塊中所儲存的資料復原。In some embodiments, when any one of the physical blocks PB1 to PB4 is faulty, the
需特別說明的是,依據一些實施例,第一控制器400及第二控制器500不會同時寫入同一條條帶,例如當第一控制器400正在將第一資料存於條帶S1時,則第二控制器500不會將第二資料存於條帶S1。因此,第一控制器400及第二控制器500在執行時並不會發生衝突。在一些實施例,資料存取系統10能控制第一控制器400及第二控制器500寫入資料儲存媒體200的位置,因此能避免第一控制器400及第二控制器500同時寫入同一條條帶。依據一些實施例,資料存取系統10透過一協調控制器(圖中未繪示)的指令以避免第一控制器400及第二控制器500同時寫入同一條條帶。此協調控制器連接至第一控制器400及第二控制器500,以傳送協調指令至第一控制器400及第二控制器500,透過協調指令分配第一控制器400與第二控制器500各自寫入的條帶。在一些實施例中,是由第一控制器400或第二控制器500分配其與另一控制器各自寫入的條帶。It should be noted that, according to some embodiments, the first controller 400 and the second controller 500 will not write to the same stripe at the same time, for example, when the first controller 400 is storing the first data in the stripe S1 , the second controller 500 will not store the second data in the strip S1. Therefore, the first controller 400 and the second controller 500 do not conflict during execution. In some embodiments, the
圖3為本案一些實施例之記錄媒體300的示意圖。請參閱圖1及圖3,在一些實施例,操作於主動狀態的第一控制器400將第一資料以日誌式方式寫入資料儲存媒體200中而更新第一元資料區410,並對應產生一第一記錄R1於第一記錄區310中。也就是,當第一控制器400以日誌式方式寫入第一資料時,會將第一資料依序寫入至資料儲存媒體200的實體位址,並在映射表中記錄關於實體位址與邏輯位址的關係與對應的有效值。並且依據變更內容做成第一記錄R1,第一記錄R1的內容將於後說明。為了得知資料儲存媒體200儲存內容的最新狀態,第二控制器500依據第一記錄區310中的第一記錄R1更新第二元資料區510。所述「更新」是將第一控制器400執行寫入、刪除等操作對應的映射關係與有效值(即映射表)新增至第二元資料區510。藉此,第二控制器500不需藉由額外連通第一控制器400的傳輸通道,也不需仰賴兩控制器之間的互斥鎖機制,第二控制器500即可獲得第一控制器400的相關寫入資訊。同理,對於第二控制器500所做的寫入、刪除等動作,第一控制器400也能經由第二記錄區320中的第二記錄R2,對第一元資料區410進行更新。FIG. 3 is a schematic diagram of a
請續參照圖3,在一些實施例,第一記錄R1包括:第一時間戳記T1、第一位置L1、及第一容量C1。第一時間戳記T1為具有多重路徑輸入輸出的連接介面100接收第一資料的時間戳記。第一位置L1例如但不限於第一資料儲存在資料儲存媒體200的頁面的實體位址、邏輯位址、或是實體位址及邏輯位址的組合。第一容量C1為第一資料的資料大小。連接介面100依據第一資料傳輸經具有多重路徑輸入輸出的連接介面100的時間點產生對應的第一時間戳記T1。依據另一些實施例,第一時間戳記T1為第一資料經由連接介面100輸出至第一控制器400的時間點。相似的,在一些實施例中,第二記錄R2包括:第二時間戳記T2、第二位置L2、及第二容量C2。第二時間戳記T2為具有多重路徑輸入輸出的連接介面100接收第二資料的時間戳記。第二位置L2例如但不限於第二資料儲存在資料儲存媒體200的頁面的實體位址、邏輯位址、或是實體位址及邏輯位址的組合。第二容量C2為第二資料的資料大小。依據另一些實施例,第二時間戳記T2為第二資料經由連接介面100輸出至第二控制器500的時間點。Please continue to refer to FIG. 3 , in some embodiments, the first record R1 includes: a first timestamp T1 , a first location L1 , and a first capacity C1 . The first time stamp T1 is the time stamp at which the connection interface 100 with multi-path input and output receives the first data. The first location L1 is, for example, but not limited to, the physical address, the logical address, or the combination of the physical address and the logical address of the page where the first data is stored in the
在一些實施例,控制器(如第二控制器500)檢查另一控制器(如第一控制器400)的記錄區(於此為第一記錄區310)中的第一記錄R1的佔有容量滿足一閥值(例如特定容量)時,更新第二元資料區510(於此是依據第一記錄區310的第一記錄R1更新)。也就是說,控制器是檢查另一控制器的記錄區,當資料變更內容達到一定程度才進行更新。在一些實施例中,相應於第一記錄R1的佔有容量的閥值與相應於第二記錄R2的佔有容量的閥值不同。In some embodiments, a controller (eg, the second controller 500 ) checks the occupied capacity of the first record R1 in the recording area (here, the first recording area 310 ) of another controller (eg, the first controller 400 ) When a threshold value (eg, a specific capacity) is satisfied, the second metadata area 510 is updated (here, it is updated according to the first record R1 of the first record area 310 ). That is to say, the controller checks the recording area of another controller, and only updates the data when the content of the data changes reaches a certain level. In some embodiments, the threshold corresponding to the occupied capacity of the first record R1 is different from the threshold corresponding to the occupied capacity of the second record R2.
在一些實施例,控制器(如第一控制器400)檢查自身的記錄區(於此為第一記錄區310)是否寫滿,若寫滿,則觸發另一控制器(於此為第二控制器500)依據第一記錄區310中的第一記錄R1更新(於此是更新第二元資料區510)。並且控制器(於此為第一控制器400)確認更新完畢(於此即為更新第二元資料區510)後,清除記錄區內的記錄(於此為第一記錄R1)。In some embodiments, a controller (eg, the first controller 400 ) checks whether its own recording area (here, the first recording area 310 ) is full, and if it is full, triggers another controller (here, the second record area 310 ) The controller 500) updates according to the first record R1 in the first record area 310 (here, the second metadata area 510 is updated). And the controller (here, the first controller 400 ) confirms that the update is completed (here, the second metadata area 510 is updated), and then clears the records in the recording area (here, the first record R1 ).
表1為本案一些實施例中,資料儲存媒體200儲存資料的範例。表2為本案一些實施例中,第一記錄區310儲存記錄的範例。表3為本案一些實施例中,第二記錄區320未儲存記錄的範例。表4為本案一些實施例中,依據記錄媒體300中的記錄,第一控制器400及第二控制器500判別資料儲存媒體200中的資料儲存順序的範例。表1至表4如下所示:Table 1 is an example of the
表1:
表2:
表3:
表4:
請參照圖1及表1至表4,在一些實施例,資料儲存媒體200為第四等級磁碟陣列,條帶包括S1至S4共四條條帶,實體區塊包括PB1至PB8共八組實體區塊,並且以實體區塊PB8用於儲存錯誤校正碼。假設資料儲存媒體200及記錄媒體300原先皆未儲存資料或記錄。第一控制器400操作於主動狀態。第二控制器500不限於操作於主動狀態或待用狀態。Referring to FIG. 1 and Tables 1 to 4, in some embodiments, the
承上,資料存取系統10透過第一控制器400依序寫入十四個第一資料(依照寫入順序分別為D1、D2、D3、D4、D5、D6、D7、D3、D8、D9、D5、D10、D4、D7)於資料儲存媒體200中,其中前七個第一資料寫入條帶S1,後七個第一資料寫入條帶S2。因此資料儲存媒體200儲存的第一資料如表1所示,其中錯誤校正碼P1、錯誤校正碼P2分別為條帶S1及條帶S2對應的錯誤校正碼。Continuing from the above, the
而依據第一控制器400將第一資料以日誌式方式寫入資料儲存媒體200中而對應產生的第一記錄R1如表2所示。第一記錄區310儲存包括第一時間戳記T1、第一位置L1及第一容量C1。其中第一時間戳記T1以「1至14」為例說明,第一時間戳記T1數值越大者表示越新的資料。而第一位置L1以「(S1,PB1)」為例說明,代表條帶S1及實體區塊PB1對應的頁面。第一容量C1以「d1」為例說明,其儲存第一資料D1的資料大小。The first record R1 correspondingly generated according to the first controller 400 writing the first data into the
並且,由於第二控制器500未寫入資料於資料儲存媒體200中,因此第二記錄R2如表3所示,第二記錄區320未儲存記錄。Moreover, since the second controller 500 does not write data into the
當第二控制器500讀取第一記錄區310時,第二控制器500能獲得第一控制器400將第一資料以日誌式方式寫入資料儲存媒體200的相關資訊(如表2所示),並且能判別資料儲存媒體200中的資料儲存順序(如表4所示)。其中以「D3-舊」及「D3-新」為例說明,「D3-舊」及「D3-新」分別儲存於資料儲存媒體200中的不同頁面,但是「D3-舊」及「D3-新」為不同時間點存入資料儲存媒體200的資料「D3」,「D3-舊」代表在較早時間點存入的資料,「D3-新」代表在較晚時間點存入的資料。在一些實施例,較早時間點存入的資料即為無效的資料,可被當成垃圾資料抹去。而較晚時間點存入的資料即為有效的資料,也就是資料存取系統10讀取時的有效資料。When the second controller 500 reads the
並且,以表1至表4為例說明第二控制器500讀取第一記錄區310中的第一記錄R1以更新第二元資料區510的過程。第二控制器500依據第一時間戳記T1獲得第一資料寫入資料儲存媒體200的順序,因此於本實施例由第一時間戳記T1為「1」的資料開始更新,並且依照第一時間戳記T1的大小依序更新至第一時間戳記T1為「14」的資料。第二控制器500藉由第一位置L1獲得第一資料儲存在資料儲存媒體200的位置資訊,如前所述,該位置資訊依據不同實施例可能是第一資料儲存在資料儲存媒體200的實體位址、邏輯位址、或是實體位址及邏輯位址的組合。藉由該位置資訊,第二控制器500即可還原第一控制器400寫入第一資料於資料儲存媒體200的映射表,並以該映射表更新第二元資料區510。在一些實施例,第二控制器500需透過第一容量C1以獲得第一資料的資料大小,並藉由第一資料的資料大小的資訊,第二控制器500才能執行前述還原第一控制器400寫入第一資料於資料儲存媒體200的映射表的運算。因為,在一些實施例中,實體位址及邏輯位址之間的運算過程,需搭配資料大小的資訊才能獲得正確的位置資訊。Furthermore, Table 1 to Table 4 are used as examples to illustrate the process of the second controller 500 reading the first record R1 in the
並且,第一控制器400將第一資料以日誌式方式寫入資料儲存媒體200時,第一控制器400會更新第一元資料區410,因此第一控制器400能藉由第一元資料區410判別資料儲存媒體200中的資料儲存順序。In addition, when the first controller 400 writes the first data into the
表5為本案一些實施例中,資料儲存媒體200儲存資料的範例。表6為本案一些實施例中,第一記錄區310儲存記錄的範例。表7為本案一些實施例中,第二記錄區320儲存記錄的範例。表8為本案一些實施例中,依據記錄媒體300中的記錄,第一控制器400及第二控制器500判別資料儲存媒體200中的資料儲存順序的範例。表5至表8如下所示:Table 5 is an example of the
表5:
表6:
表7:
表8:
請參照圖1及表5至表8,在一些實施例,資料儲存媒體200為第四等級磁碟陣列,條帶包括S1至S4共四條條帶,實體區塊包括PB1至PB8共八組實體區塊,並且以實體區塊PB8用於儲存錯誤校正碼。假設資料儲存媒體200及記錄媒體300原先皆未儲存資料或記錄。第一控制器400及第二控制器500皆操作於主動狀態。Referring to FIG. 1 and Tables 5 to 8, in some embodiments, the
承上,資料存取系統10透過第一控制器400依序寫入七個第一資料(依照寫入順序分別為D1、D2、D4、D5、D6、D7、D8)於資料儲存媒體200中,並且資料存取系統10也透過第二控制器500依序寫入五個第二資料(依照寫入順序分別為D3、D5、D6、D7、D8)於資料儲存媒體200中。其中七個第一資料寫入條帶S1,五個第二資料寫入條帶S3。因此資料儲存媒體200儲存的第一資料及第二資料如表5所示,其中錯誤校正碼P1、錯誤校正碼P3分別為條帶S1及條帶S3對應的錯誤校正碼。Continuing from the above, the
而第一記錄區310中的第一記錄R1如表6所示,第二記錄區320中的第二記錄R2如表7所示,其中對應的記錄類似於前述表2的說明,在此不再贅述。而需特別說明的是,表6中的第一時間戳記T1(依序為1、2、4、5、8、10、11)以及表7中的第二時間戳記T2(依序為3、6、7、9、12),由於第一時間戳記T1及第二時間戳記T2都是在具有多重路徑輸入輸出的連接介面100處於相同的傳輸階段時產生的,因此第一時間戳記T1及第二時間戳記T2所代表的數值能互相比較,並且數值越大者表示越新的資料。The first record R1 in the
因此,當第一控制器400當讀取第二記錄區320時,第一控制器400能藉由第一元資料區410及第二記錄區320的記錄判別資料儲存媒體200中的資料儲存順序,如表8所示。同理,當第二控制器500讀取第一記錄區310時,第二控制器500能藉由第二元資料區510及第一記錄區310的記錄判別資料儲存媒體200中的資料儲存順序,如表8所示。Therefore, when the first controller 400 reads the
綜上,本案一些實施例之資料存取系統包括第一控制器及第二控制器。藉由記錄區中的記錄,可讓另一控制器據以更新元資料區,使得兩控制器對於資料儲存媒體中的資料的獲知程度達到同步。因此資料存取系統不需要受限於雙控制器之間的傳輸頻寬,也不需依賴雙控制器之間的互斥鎖機制,進而使資料存取系統達到雙控制器控制的高速存取功能。To sum up, the data access system of some embodiments of the present application includes a first controller and a second controller. Through the recording in the recording area, another controller can update the metadata area accordingly, so that the two controllers can synchronize their knowledge of the data in the data storage medium. Therefore, the data access system does not need to be limited by the transmission bandwidth between the dual controllers, nor does it need to rely on the mutual exclusion lock mechanism between the dual controllers, so that the data access system can achieve high-speed access controlled by the dual controllers. Function.
10:資料存取系統 100:連接介面 200:資料儲存媒體 300:記錄媒體 310:第一記錄區 320:第二記錄區 400:第一控制器 410:第一元資料區 500:第二控制器 510:第二元資料區 R1:第一記錄 R2:第二記錄 T1:第一時間戳記 T2:第二時間戳記 L1:第一位置 L2:第二位置 C1:第一容量 C2:第二容量 PB1-PB4:實體區塊 S1-S4:條帶 211-214:頁面 221-224:頁面 231-234:頁面 241-244:頁面 20:用戶端 21:連接介面 10: Data Access System 100: Connection interface 200: Data storage medium 300: Recording Media 310: First recording area 320: Second recording area 400: First Controller 410: First metadata area 500: Second Controller 510: Second metadata area R1: First record R2: Second record T1: first timestamp T2: Second timestamp L1: first position L2: Second position C1: first capacity C2: Second capacity PB1-PB4: Physical Blocks S1-S4: Strip 211-214: Pages 221-224: Pages 231-234: Pages 241-244: Pages 20: Client 21: Connection interface
[圖1]為本案一些實施例之資料存取系統的示意圖。 [圖2]為本案一些實施例之資料儲存媒體的示意圖。 [圖3]為本案一些實施例之記錄媒體的示意圖。 [FIG. 1] is a schematic diagram of a data access system according to some embodiments of the present invention. 2 is a schematic diagram of a data storage medium according to some embodiments of the present invention. [FIG. 3] is a schematic diagram of a recording medium according to some embodiments of the present invention.
10:資料存取系統 100:連接介面 200:資料儲存媒體 300:記錄媒體 310:第一記錄區 320:第二記錄區 400:第一控制器 410:第一元資料區 500:第二控制器 510:第二元資料區 20:用戶端 21:連接介面 10: Data Access System 100: Connection interface 200: Data storage medium 300: Recording Media 310: First recording area 320: Second recording area 400: First Controller 410: First metadata area 500: Second Controller 510: Second metadata area 20: Client 21: Connection interface
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109137507A TWI766409B (en) | 2020-10-28 | 2020-10-28 | Data access system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109137507A TWI766409B (en) | 2020-10-28 | 2020-10-28 | Data access system |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202217581A TW202217581A (en) | 2022-05-01 |
TWI766409B true TWI766409B (en) | 2022-06-01 |
Family
ID=82558790
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109137507A TWI766409B (en) | 2020-10-28 | 2020-10-28 | Data access system |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI766409B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040044865A1 (en) * | 2000-03-31 | 2004-03-04 | Sicola Stephen J. | Method for transaction command ordering in a remote data replication system |
TWI588649B (en) * | 2016-02-24 | 2017-06-21 | 廣達電腦股份有限公司 | Hardware recovery methods, hardware recovery systems, and computer-readable storage device |
TW201944271A (en) * | 2018-04-16 | 2019-11-16 | 緯創資通股份有限公司 | Electronic device and method for event logging |
US20200081648A1 (en) * | 2018-09-06 | 2020-03-12 | Pure Storage, Inc. | Local relocation of data stored at a storage device of a storage system |
-
2020
- 2020-10-28 TW TW109137507A patent/TWI766409B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040044865A1 (en) * | 2000-03-31 | 2004-03-04 | Sicola Stephen J. | Method for transaction command ordering in a remote data replication system |
TWI588649B (en) * | 2016-02-24 | 2017-06-21 | 廣達電腦股份有限公司 | Hardware recovery methods, hardware recovery systems, and computer-readable storage device |
TW201944271A (en) * | 2018-04-16 | 2019-11-16 | 緯創資通股份有限公司 | Electronic device and method for event logging |
US20200081648A1 (en) * | 2018-09-06 | 2020-03-12 | Pure Storage, Inc. | Local relocation of data stored at a storage device of a storage system |
Also Published As
Publication number | Publication date |
---|---|
TW202217581A (en) | 2022-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108073357B (en) | Storage device for storing data in RAID mode | |
TWI816879B (en) | Pool-level storage management | |
US8356292B2 (en) | Method for updating control program of physical storage device in storage virtualization system and storage virtualization controller and system thereof | |
US11698728B2 (en) | Data updating technology | |
TW201024994A (en) | Storage ststem snapshot assisted by SSD technology | |
TW200939228A (en) | Semiconductor memory device | |
US7380198B2 (en) | System and method for detecting write errors in a storage device | |
US10467074B2 (en) | Conditional journal for storage class memory devices | |
CN106168920A (en) | Controlling a Redundant Array of Independent Disks (RAID) comprising read only flash data storage devices | |
JP4667925B2 (en) | Method, system, and program for managing write processing | |
US11669515B2 (en) | Data access system | |
TW202125208A (en) | Solid state drive and method thereof | |
CN110502188A (en) | A kind of date storage method and device based on data base read-write performance | |
CN113838511A (en) | Cache programming with backup blocks | |
TWI766409B (en) | Data access system | |
CN117149062A (en) | Processing method and computing device for damaged data of magnetic tape | |
CN114415934B (en) | Data access system | |
CN110231914A (en) | Data storage device and its operating method | |
CN114730247A (en) | Storage device with minimum write size of data | |
US20210019082A1 (en) | Nonvolatile memory bad row management | |
JP2021125090A (en) | Memory controller and flash memory system | |
TW201743212A (en) | Redundant array of independent disk and data storage method thereof | |
GB2402803A (en) | Arrangement and method for detection of write errors in a storage system | |
JP3699797B2 (en) | Disk array device | |
CN113127386A (en) | Defective memory portion recovery in a memory device |