TWI766409B - Data access system - Google Patents

Data access system Download PDF

Info

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
Application number
TW109137507A
Other languages
Chinese (zh)
Other versions
TW202217581A (en
Inventor
簡廷芳
曹世強
蔡攀龍
Original Assignee
大陸商上海川源信息科技有限公司
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 大陸商上海川源信息科技有限公司 filed Critical 大陸商上海川源信息科技有限公司
Priority to TW109137507A priority Critical patent/TWI766409B/en
Publication of TW202217581A publication Critical patent/TW202217581A/en
Application granted granted Critical
Publication of TWI766409B publication Critical patent/TWI766409B/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A data access system includes: a data storage medium, a record medium, a first controller, and a second controller. The record medium includes a first record area and a second record 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 record medium and corresponds to the first record area. The second controller is connected to the data storage medium and the record medium and corresponds to the second record area. The first controller receives the first data, and writes the first data into the data storage medium in a log manner to update the first metadata area, and correspondingly generates the first record in the first record area. The second controller updates the second meta data area according to the first record in the first record area.

Description

資料存取系統data access system

本案是關於儲存領域,特別是一種資料存取系統。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 data access system 10 according to an embodiment of the present invention. Referring to FIG. 1 , the data access system 10 includes: a connection interface 100 having a multipath I/O (MPIO), a data storage medium 200 , a recording medium 300 , a first controller 400 and a second controller 500 . The recording medium 300 includes a first recording area 310 and a second recording area 320 , the first controller 400 includes a first metadata area 410 , and the second controller 500 includes a second metadata area 510 . The connection interface 100 is a network interface. The connection interface 100 is connected to the first controller 400 and the second controller 500 for the first controller 400 and the second controller 500 to receive commands from the client and operate according to the commands. The first controller 400 and the second controller 500 are connected to the data storage medium 200 and the recording medium 300 respectively, so as to access the content stored in the data storage medium 200 and the recording medium 300 .

資料儲存媒體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 data storage medium 200 and the recording medium 300 are, for example, but not limited to, electronically erasable programmable read-only memory (EEPROM), phase-change memory (PCM), magnetic Resistive random access memory (Magnetoresistive Random Access Memory, MRAM), variable resistive memory (Resistive Random Access Memory, ReRAM), or flash memory (Flash Memory) and other non-volatile memories with access functions Body (Non-volatile Memory, NVM). In other embodiments, the data storage medium 200 and the recording medium 300 are, for example, but not limited to, a Hard Disk Drive (HDD), a Solid-State Drive (SSD), or a Redundant Array of Independent Disks, RAID), etc., wherein the disk array is not limited to being composed of hard disks, solid-state hard disks, or a combination of hard disks and solid-state hard disks. It should be noted that, according to some embodiments, the data storage medium 200 is a disk array whose level is not less than the fourth level disk array (RAID 4). The first metadata area 410 and the second metadata area 510 can be implemented by, for example, but not limited to, a non-volatile memory with an access function, a hard disk, or a solid-state hard disk.

資料存取系統10透過第一控制器400或/及第二控制器500將資料儲存於資料儲存媒體200中。依據資料存取系統10運作模式,此些資料選擇性單獨透過第一控制器400、單獨透過第二控制器500、以及部分透過第一控制器400並且部分透過第二控制器500儲存至資料儲存媒體200。在此定義透過第一控制器400儲存的資料為第一資料,透過第二控制器500儲存的資料為第二資料。The data access system 10 stores data in the data storage medium 200 through the first controller 400 or/and the second controller 500 . According to the operation mode of the data access system 10, the data are selectively stored in the data storage through the first controller 400 alone, through the second controller 500 alone, and partly through the first controller 400 and partly through the second controller 500. Media 200. Here, the data stored by the first controller 400 is defined as the first data, and the data stored by the second controller 500 is defined as the second data.

在一些實施例,資料存取系統10適於供至少一用戶端20連線,以執行用戶端20之寫入指令,將用戶端20提供的資料儲存至資料儲存媒體200中;或執行用戶端20之讀取指令,將資料儲存媒體200中的資料傳送至用戶端20。用戶端20具有與資料存取系統10的連接介面100相對應的連接介面21。In some embodiments, the data access system 10 is suitable for connecting at least one client 20 to execute a write command of the client 20, to store the data provided by the client 20 in the data storage medium 200; or to execute the client 20. The read command of 20 transmits the data in the data storage medium 200 to the client 20 . The client 20 has a connection interface 21 corresponding to the connection interface 100 of the data access system 10 .

記錄媒體300包括第一記錄區310及第二記錄區320。第一記錄區310供第一控制器400儲存對於資料儲存媒體200執行寫入、刪除之記錄(於後稱「第一記錄」),第一記錄為第一控制器400以日誌式方式寫入資料時對應產生的。同理,第二記錄區320供第二控制器500儲存對於資料儲存媒體200執行寫入、刪除之記錄,第二記錄為第二控制器500以日誌式方式寫入資料時對應產生的。所述日誌式方式寫入資料是指將資料依序寫入至資料儲存媒體200的實體位址,並產生關於實體位址與邏輯位址的映射關係,以及關於該資料是否為有效或無效(例如執行刪除該資料的指令則是將該資料標註為無效)的有效值。詳細請參照申請人之中華民國第I609323號專利。The recording medium 300 includes a first recording area 310 and a second recording area 320 . The first recording area 310 is for the first controller 400 to store the records of writing and deleting performed on the data storage medium 200 (hereinafter referred to as the “first record”). The first record is written by the first controller 400 in a log mode. corresponding to the data. Similarly, the second recording area 320 is for the second controller 500 to store the records of writing and deleting performed on the data storage medium 200 , and the second record is correspondingly generated when the second controller 500 writes data in a log mode. The writing of data in the log mode refers to sequentially writing the data to the physical address of the data storage medium 200, and generating a mapping relationship between the physical address and the logical address, and whether the data is valid or invalid ( For example, executing an instruction to delete the data is a valid value for marking the data as invalid. For details, please refer to the applicant's ROC Patent No. I609323.

第一控制器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 data storage medium 200 . In some embodiments, the first metadata area 410 and the second metadata area 510 are stored in the recording medium 300 .

在一些實施例中,資料存取系統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 data access system 10 is adapted to operate in a dual active mode and a single active mode. The first controller 400 and the second controller 500 are adapted to operate in an active state or a standby state. When the controller (ie, the first controller 400 or the second controller 500) is in the active state, the controller can receive data and write the data in the data storage medium 200, and can check the recording areas corresponding to other controllers to Get the write status of other controllers, and use this to update your own metadata area. For example, when the first controller 400 operates in the active state, it can receive data and write the data into the data storage medium 200 , and can update the first metadata area 410 according to the second recording area 320 corresponding to the second controller 500 . When the controller is in the standby state, the controller cannot write data into the data storage medium 200, but can check the recording area of other controllers to obtain the writing status of other controllers, and update its own metadata area accordingly . For example, when the second controller 500 operates in a standby state, the second metadata area 510 can be updated according to the first recording area 310 corresponding to the first controller 400 . When the data access system 10 operates in the dual-active mode, both the first controller 400 and the second controller 500 operate in the active state. Conversely, when the data access system 10 operates in the single-active mode, one of the first controller 400 and the second controller 500 operates in the active state, and the other of the first controller 400 and the second controller 500 operates in the active state. The operator operates in the standby state.

圖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 data storage medium 200 according to some embodiments of the present invention. Referring to FIG. 2 , in some embodiments, the data storage medium 200 is a Redundant Array of Independent Disks (RAID), and the data storage medium 200 includes a plurality of physical blocks (PBs) PB1 , PB2 , and PB3 , PB4, multiple stripes (Stripes) S1, S2, S3, S4, but this case is not limited to this, the number of physical blocks and stripes can be increased or decreased according to the actual needs of the data storage medium 200.

條帶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 page 211, page 221, page 231, and page 241, wherein the respective pages of the strip S2 corresponding to the physical blocks PB1-PB4 are page 212, page 222, page 232, and page 242, respectively, Wherein the strip S3 corresponds to the pages of the physical blocks PB1-PB4 are page 213, page 223, page 233, and page 243, and the strip S4 corresponds to the pages of the physical blocks PB1-PB4 are page 214, page 243, respectively 224, page 234, page 244.

請同時參閱圖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, pages 211 to 214 , 221 to 224 , 231 to 234 , and 241 to 244 are used for storing data and corresponding error correction codes (Error Control Codes, ECC). In some embodiments, the first controller 400 may be capable of receiving data to be written (ie, one or more first data), and the first controller 400 stores the first data in pages 211 to 214 and 221 to 224, respectively , 231 to 234, 241 to 244. And the first controller 400 stores the error correction codes corresponding to the first data in pages 211 to 214 , 221 to 224 , 231 to 234 , and 241 to 244 . Similarly, in some embodiments, the second controller 500 can receive data to be written (ie, one or more second data), and the second controller 500 stores the second data in pages 211 to 214 and 221 respectively to 224, 231 to 234, 241 to 244. And the second controller 500 stores the error correction codes corresponding to the second data in pages 211 to 214 , 221 to 224 , 231 to 234 , and 241 to 244 .

在一些實施例,當實體區塊PB1至PB4之中有任一個實體區塊發生故障時,資料儲存媒體200可透過錯誤校正碼以進行同位元檢查(Parity Check)來偵錯,並且資料儲存媒體200進一步透過同一個條帶中其他未故障的實體區塊的資料及錯誤校正碼,以將故障的實體區塊中所儲存的資料復原。In some embodiments, when any one of the physical blocks PB1 to PB4 is faulty, the data storage medium 200 can perform a parity check (Parity Check) through the error correction code to detect errors, and the data storage medium 200 further restores the data stored in the faulty physical block through the data and the error correction code of the other non-faulty physical blocks in the same stripe.

需特別說明的是,依據一些實施例,第一控制器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 data access system 10 can control the location where the first controller 400 and the second controller 500 write to the data storage medium 200 , thereby preventing the first controller 400 and the second controller 500 from writing the same location at the same time. a strip. According to some embodiments, the data access system 10 prevents the first controller 400 and the second controller 500 from simultaneously writing to the same stripe through an instruction from a coordination controller (not shown). The coordination controller is connected to the first controller 400 and the second controller 500 to transmit coordination commands to the first controller 400 and the second controller 500, and distribute the first controller 400 and the second controller 500 through the coordination command The respective written stripes. In some embodiments, it is the first controller 400 or the second controller 500 that allocates the stripes that it and the other controller respectively write to.

圖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 recording medium 300 according to some embodiments of the present invention. Referring to FIG. 1 and FIG. 3 , in some embodiments, the first controller 400 operating in the active state writes the first data into the data storage medium 200 in a log mode to update the first metadata area 410 , and generates a corresponding A first record R1 is in the first record area 310 . That is, when the first controller 400 writes the first data in the log mode, it writes the first data to the physical address of the data storage medium 200 in sequence, and records information about the physical address and the physical address in the mapping table. The relationship between the logical address and the corresponding valid value. In addition, a first record R1 is created according to the changed content, and the content of the first record R1 will be described later. In order to know the latest state of the content stored in the data storage medium 200 , the second controller 500 updates the second metadata area 510 according to the first record R1 in the first record area 310 . The “update” is to add the mapping relationship and valid value (ie, the mapping table) corresponding to the operations of writing, deleting, etc. performed by the first controller 400 to the second metadata area 510 . In this way, the second controller 500 does not need to use an additional transmission channel connected to the first controller 400 or rely on the mutual exclusion mechanism between the two controllers, and the second controller 500 can obtain the first controller 400 related write information. Similarly, for actions such as writing and deleting performed by the second controller 500 , the first controller 400 can also update the first metadata area 410 via the second record R2 in the second record area 320 .

請續參照圖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 data storage medium 200 . The first capacity C1 is the data size of the first data. The connection interface 100 generates a corresponding first time stamp T1 according to the time point when the first data is transmitted through the connection interface 100 with multi-path input and output. According to other embodiments, the first time stamp T1 is a time point when the first data is output to the first controller 400 via the connection interface 100 . Similarly, in some embodiments, the second record R2 includes a second timestamp T2, a second location L2, and a second volume C2. The second time stamp T2 is the time stamp at which the connection interface 100 with multi-path input and output receives the second data. The second location L2 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 second data is stored in the data storage medium 200 . The second capacity C2 is the data size of the second data. According to other embodiments, the second time stamp T2 is a time point when the second data is output to the second controller 500 via the connection interface 100 .

在一些實施例,控制器(如第二控制器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 data storage medium 200 storing data in some embodiments of the present invention. Table 2 is an example of storing records in the first recording area 310 in some embodiments of the present invention. Table 3 is an example in which no records are stored in the second recording area 320 in some embodiments of the present invention. Table 4 is an example of how the first controller 400 and the second controller 500 determine the data storage sequence in the data storage medium 200 according to the records in the recording medium 300 in some embodiments of the present invention. Tables 1 to 4 are as follows:

表1: 資料儲存媒體200   實體區塊PB1 實體區塊PB2 實體區塊PB3 實體區塊PB4 實體區塊PB5 實體區塊PB6 實體區塊PB7 實體區塊PB8 條帶 S1 D1 D2 D3 D4 D5 D6 D7 P1 條帶 S2 D3 D8 D9 D5 D10 D4 D7 P2 條帶 S3                 條帶 S4                 Table 1: Data storage medium 200 Physical block PB1 Physical block PB2 Physical block PB3 Physical block PB4 Physical block PB5 Physical block PB6 Physical block PB7 Physical block PB8 Strip S1 D1 D2 D3 D4 D5 D6 D7 P1 Strip S2 D3 D8 D9 D5 D10 D4 D7 P2 Stripe S3 Stripe S4

表2: 第一記錄區310 第一時間戳記T1 第一位置L1 第一容量C1 1 (S1,PB1) d1 2 (S1,PB2) d2 3 (S1,PB3) d3 4 (S1,PB4) d4 5 (S1,PB5) d5 6 (S1,PB6) d6 7 (S1,PB7) d7 8 (S2,PB1) d3 9 (S2,PB2) d8 10 (S2,PB3) d9 11 (S2,PB4) d5 12 (S2,PB5) d10 13 (S2,PB6) d4 14 (S2,PB7) d7       . . . . . . . . .       Table 2: first recording area 310 first timestamp T1 first position L1 first capacity C1 1 (S1, PB1) d1 2 (S1, PB2) d2 3 (S1, PB3) d3 4 (S1, PB4) d4 5 (S1, PB5) d5 6 (S1, PB6) d6 7 (S1, PB7) d7 8 (S2, PB1) d3 9 (S2, PB2) d8 10 (S2, PB3) d9 11 (S2, PB4) d5 12 (S2, PB5) d10 13 (S2, PB6) d4 14 (S2, PB7) d7 . . . . . . . . .

表3: 第二記錄區320 第二時間戳記T2 第二位置L2 第二容量C2       . . . . . . . . .       table 3: The second recording area 320 second time stamp T2 second position L2 The second capacity C2 . . . . . . . . .

表4: 資料儲存媒體200   實體區塊PB1 實體區塊PB2 實體區塊PB3 實體區塊PB4 實體區塊PB5 實體區塊PB6 實體區塊PB7 實體區塊PB8 條帶 S1 D1 D2 D3-舊 D4-舊 D5-舊 D6 D7-舊 P1 條帶 S2 D3-新 D8 D9 D5-新 D10 D4-新 D7-新 P2 條帶 S3                 條帶 S4                 Table 4: Data storage medium 200 Physical block PB1 Physical block PB2 Physical block PB3 Physical block PB4 Physical block PB5 Physical block PB6 Physical block PB7 Physical block PB8 Strip S1 D1 D2 D3 - old D4 - old D5 - old D6 D7 - old P1 Strip S2 D3-new D8 D9 D5-new D10 D4-new D7-new P2 Stripe S3 Stripe S4

請參照圖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 data storage medium 200 is a fourth-level disk array, the stripes include four stripes S1 to S4, and the physical blocks include eight groups of entities PB1 to PB8 block, and the physical block PB8 is used to store the error correction code. It is assumed that neither the data storage medium 200 nor the recording medium 300 originally stored data or records. The first controller 400 operates in an active state. The second controller 500 is not limited to operate in an active state or a standby state.

承上,資料存取系統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 data access system 10 sequentially writes fourteen pieces of first data through the first controller 400 (respectively D1, D2, D3, D4, D5, D6, D7, D3, D8, D9 according to the writing order) , D5, D10, D4, D7) in the data storage medium 200, wherein the first seven first data are written into the strip S1, and the last seven first data are written into the strip S2. Therefore, the first data stored in the data storage medium 200 is shown in Table 1, wherein the error correction code P1 and the error correction code P2 are the error correction codes corresponding to the stripe S1 and the stripe S2, respectively.

而依據第一控制器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 data storage medium 200 in a log-like manner is shown in Table 2. The first recording area 310 stores a first time stamp T1, a first position L1 and a first capacity C1. The first time stamp T1 is described by taking “1 to 14” as an example, and the larger the value of the first time stamp T1 represents the newer data. The first position L1 is illustrated by taking "(S1, PB1)" as an example, and represents the page corresponding to the stripe S1 and the physical block PB1. The first capacity C1 is described by taking "d1" as an example, which stores the data size of the first data D1.

並且,由於第二控制器500未寫入資料於資料儲存媒體200中,因此第二記錄R2如表3所示,第二記錄區320未儲存記錄。Moreover, since the second controller 500 does not write data into the data storage medium 200 , the second record R2 is shown in Table 3, and no record is stored in the second recording area 320 .

當第二控制器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 first recording area 310, the second controller 500 can obtain the relevant information that the first controller 400 writes the first data to the data storage medium 200 in a log-like manner (as shown in Table 2). ), and can determine the data storage sequence in the data storage medium 200 (as shown in Table 4). Herein, "D3-old" and "D3-new" are taken as examples for description, "D3-old" and "D3-new" are respectively stored in different pages in the data storage medium 200, but "D3-old" and "D3- "New" is the data "D3" stored in the data storage medium 200 at different time points, "D3-Old" represents the data stored at an earlier time point, and "D3-New" represents the data stored at a later time point. In some embodiments, data stored at an earlier time point is invalid data and can be erased as junk data. The data stored at a later time point is the valid data, that is, the valid data when read by the data access system 10 .

並且,以表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 first recording area 310 to update the second metadata area 510 . The second controller 500 obtains the sequence in which the first data is written into the data storage medium 200 according to the first time stamp T1. Therefore, in this embodiment, the update starts from the data whose first time stamp T1 is “1”, and the data is updated according to the first time stamp T1. The size of T1 is sequentially updated to the data whose first timestamp T1 is "14". The second controller 500 obtains the location information of the first data stored in the data storage medium 200 through the first location L1. As mentioned above, the location information may be the entity of the first data stored in the data storage medium 200 according to different embodiments address, logical address, or a combination of physical and logical addresses. With the location information, the second controller 500 can restore the mapping table written by the first controller 400 to the data storage medium 200 with the first data, and update the second metadata area 510 with the mapping table. In some embodiments, the second controller 500 needs to obtain the data size of the first data through the first capacity C1, and based on the information of the data size of the first data, the second controller 500 can perform the aforementioned restoration of the first controller 400 is an operation of writing the first data into the mapping table of the data storage medium 200 . Because, in some embodiments, the operation process between the physical address and the logical address needs to be matched with the information of the data size to obtain the correct location information.

並且,第一控制器400將第一資料以日誌式方式寫入資料儲存媒體200時,第一控制器400會更新第一元資料區410,因此第一控制器400能藉由第一元資料區410判別資料儲存媒體200中的資料儲存順序。In addition, when the first controller 400 writes the first data into the data storage medium 200 in a log mode, the first controller 400 will update the first metadata area 410, so the first controller 400 can use the first metadata The area 410 discriminates the data storage order in the data storage medium 200 .

表5為本案一些實施例中,資料儲存媒體200儲存資料的範例。表6為本案一些實施例中,第一記錄區310儲存記錄的範例。表7為本案一些實施例中,第二記錄區320儲存記錄的範例。表8為本案一些實施例中,依據記錄媒體300中的記錄,第一控制器400及第二控制器500判別資料儲存媒體200中的資料儲存順序的範例。表5至表8如下所示:Table 5 is an example of the data storage medium 200 storing data in some embodiments of the present invention. Table 6 is an example of storing records in the first recording area 310 in some embodiments of the present invention. Table 7 is an example of storing records in the second recording area 320 in some embodiments of the present invention. Table 8 is an example of how the first controller 400 and the second controller 500 determine the data storage sequence in the data storage medium 200 according to the records in the recording medium 300 in some embodiments of the present invention. Tables 5 to 8 are as follows:

表5: 資料儲存媒體200   實體區塊PB1 實體區塊PB2 實體區塊PB3 實體區塊PB4 實體區塊PB5 實體區塊PB6 實體區塊PB7 實體區塊PB8 條帶 S1 D1 D2 D4 D5 D6 D7 D8 P1 條帶 S2                 條帶 S3 D3 D5 D6 D7 D8     P3 條帶 S4                 table 5: Data storage medium 200 Physical block PB1 Physical block PB2 Physical block PB3 Physical block PB4 Physical block PB5 Physical block PB6 Physical block PB7 Physical block PB8 Strip S1 D1 D2 D4 D5 D6 D7 D8 P1 Strip S2 Stripe S3 D3 D5 D6 D7 D8 P3 Stripe S4

表6: 第一記錄區310 第一時間戳記T1 第一位置L1 第一容量C1 1 (S1,PB1) d1 2 (S1,PB2) d2 4 (S1,PB3) d4 5 (S1,PB4) d5 8 (S1,PB5) d6 10 (S1,PB6) d7 11 (S1,PB7) d8       . . . . . . . . .       Table 6: first recording area 310 first timestamp T1 first position L1 first capacity C1 1 (S1, PB1) d1 2 (S1, PB2) d2 4 (S1, PB3) d4 5 (S1, PB4) d5 8 (S1, PB5) d6 10 (S1, PB6) d7 11 (S1, PB7) d8 . . . . . . . . .

表7: 第二記錄區320 第二時間戳記T2 第二位置L2 第二容量C2 3 (S3,PB1) d3 6 (S3,PB2) d5 7 (S3,PB3) d6 9 (S3,PB4) d7 12 (S3,PB5) d8       . . . . . . . . .       Table 7: The second recording area 320 second time stamp T2 second position L2 The second capacity C2 3 (S3, PB1) d3 6 (S3, PB2) d5 7 (S3, PB3) d6 9 (S3, PB4) d7 12 (S3, PB5) d8 . . . . . . . . .

表8: 資料儲存媒體200   實體區塊PB1 實體區塊PB2 實體區塊PB3 實體區塊PB4 實體區塊PB5 實體區塊PB6 實體區塊PB7 實體區塊PB8 條帶 S1 D1 D2 D4 D5-舊 D6-新 D7-新 D8-舊 P1 條帶 S2                 條帶 S3 D3 D5-新 D6-舊 D7-舊 D8-新     P3 條帶 S4                 Table 8: Data storage medium 200 Physical block PB1 Physical block PB2 Physical block PB3 Physical block PB4 Physical block PB5 Physical block PB6 Physical block PB7 Physical block PB8 Strip S1 D1 D2 D4 D5 - old D6-new D7-new D8 - old P1 Strip S2 Stripe S3 D3 D5-new D6 - old D7 - old D8 - new P3 Stripe S4

請參照圖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 data storage medium 200 is a fourth-level disk array, the stripes include four stripes S1 to S4, and the physical blocks include eight groups of entities PB1 to PB8 block, and the physical block PB8 is used to store the error correction code. It is assumed that neither the data storage medium 200 nor the recording medium 300 originally stored data or records. Both the first controller 400 and the second controller 500 operate in an active state.

承上,資料存取系統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 data access system 10 sequentially writes seven first data (respectively D1, D2, D4, D5, D6, D7, and D8 according to the writing order) into the data storage medium 200 through the first controller 400 , and the data access system 10 also sequentially writes five second data (respectively D3, D5, D6, D7, and D8 according to the writing order) into the data storage medium 200 through the second controller 500 . Seven of the first data are written into the strip S1, and five of the second data are written into the strip S3. Therefore, the first data and the second data stored in the data storage medium 200 are shown in Table 5, wherein the error correction code P1 and the error correction code P3 are the error correction codes corresponding to the stripe S1 and the stripe S3, respectively.

而第一記錄區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 first recording area 310 is shown in Table 6, and the second record R2 in the second recording area 320 is shown in Table 7. The corresponding records are similar to the descriptions in the foregoing Table 2, and are not described here. Repeat. It should be noted that the first time stamp T1 in Table 6 (1, 2, 4, 5, 8, 10, 11 in sequence) and the second time stamp T2 in Table 7 (3, 6, 7, 9, 12), since the first time stamp T1 and the second time stamp T2 are both generated when the connection interface 100 with multi-path input and output is in the same transmission stage, the first time stamp T1 and the second time stamp T2 The values represented by the two time stamps T2 can be compared with each other, and the larger value represents the newer data.

因此,當第一控制器400當讀取第二記錄區320時,第一控制器400能藉由第一元資料區410及第二記錄區320的記錄判別資料儲存媒體200中的資料儲存順序,如表8所示。同理,當第二控制器500讀取第一記錄區310時,第二控制器500能藉由第二元資料區510及第一記錄區310的記錄判別資料儲存媒體200中的資料儲存順序,如表8所示。Therefore, when the first controller 400 reads the second recording area 320 , the first controller 400 can determine the data storage sequence in the data storage medium 200 according to the records in the first metadata area 410 and the second recording area 320 , as shown in Table 8. Similarly, when the second controller 500 reads the first recording area 310 , the second controller 500 can determine the data storage sequence in the data storage medium 200 according to the records in the second metadata area 510 and the first recording area 310 , as shown in Table 8.

綜上,本案一些實施例之資料存取系統包括第一控制器及第二控制器。藉由記錄區中的記錄,可讓另一控制器據以更新元資料區,使得兩控制器對於資料儲存媒體中的資料的獲知程度達到同步。因此資料存取系統不需要受限於雙控制器之間的傳輸頻寬,也不需依賴雙控制器之間的互斥鎖機制,進而使資料存取系統達到雙控制器控制的高速存取功能。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)

一種資料存取系統,包括:一資料儲存媒體;一記錄媒體,包括一第一記錄區及一第二記錄區;一第一控制器,連接至該資料儲存媒體及該記錄媒體,並與該第一記錄區相對應,該第一控制器包括一第一元資料區;及一第二控制器,連接至該資料儲存媒體及該記錄媒體,並與該第二記錄區相對應,該第二控制器包括一第二元資料區;其中,該第一控制器接收一第一資料,以將該第一資料以一日誌式方式寫入該資料儲存媒體中而更新該第一元資料區,並對應產生一第一記錄於該第一記錄區中,該第二控制器依據該第一記錄區中的該第一記錄更新該第二元資料區;其中,該第一控制器檢查該第一記錄區寫滿時,觸發該第二控制器依據該第一記錄區中的該第一記錄更新該第二元資料區,並確認該第二控制器更新完畢後清除該第一記錄區。 A data access system includes: a data storage medium; a recording medium including a first recording area and a second recording area; a first controller connected to the data storage medium and the recording medium, and communicating with the data storage medium and the recording medium Corresponding to the first recording area, the first controller includes a first metadata area; and a second controller, connected to the data storage medium and the recording medium, and corresponding to the second recording area, the first The two controllers include a second metadata area; wherein the first controller receives a first data, and updates the first metadata area by writing the first data into the data storage medium in a log mode , and correspondingly generate a first record in the first record area, the second controller updates the second metadata area according to the first record in the first record area; wherein, the first controller checks the When the first record area is full, trigger the second controller to update the second metadata area according to the first record in the first record area, and confirm that the second controller clears the first record area after the update is completed . 如請求項1所述的資料存取系統,其中該第二控制器檢查該第一記錄區中的該第一記錄的佔有容量滿足一閥值時,依據該第一記錄區中的該第一記錄更新該第二元資料區。 The data access system of claim 1, wherein when the second controller checks that the occupied capacity of the first record in the first recording area satisfies a threshold, The record updates the second metadata area. 如請求項1所述的資料存取系統,其中該第二控制器接收一第二資料,以將該第二資料以該日誌式方式寫入該資料儲存媒體中而更新該第二元資料區,並對應產生一第二記錄於該第二記錄區中,該第一控制器依據該第二記錄區中的該第二記錄更新該第一元資料區。 The data access system of claim 1, wherein the second controller receives a second data to update the second metadata area by writing the second data into the data storage medium in the log mode , and correspondingly generate a second record in the second record area, and the first controller updates the first metadata area according to the second record in the second record area. 如請求項3所述的資料存取系統,其中該第一控制器檢查該第二記錄區中的該第二記錄的佔有容量滿足一閥值時,依據該第二記錄區中的該第二記錄更新該第一元資料區。 The data access system as claimed in claim 3, wherein when the first controller checks that the occupied capacity of the second record in the second recording area satisfies a threshold, according to the second record in the second recording area The record updates the first metadata area. 如請求項3所述的資料存取系統,其中該第二控制器檢查該第二記錄區寫滿時,觸發該第一控制器依據該第二記錄區中的該第二記錄更新該第一元資料區,並確認該第一控制器更新完畢後清除該第二記錄區。 The data access system of claim 3, wherein when the second controller checks that the second recording area is full, triggers the first controller to update the first recording area according to the second record in the second recording area The metadata area is confirmed, and the second recording area is cleared after confirming that the first controller is updated. 如請求項3所述的資料存取系統,更包括:一多重路徑輸入輸出,連接該第一控制器及該第二控制器,該第一控制器經由該多重路徑輸入輸出接收該第一資料,該第二控制器經由該多重路徑輸入輸出接收該第二資料。 The data access system of claim 3, further comprising: a multi-path input and output, connected to the first controller and the second controller, the first controller receives the first controller via the multi-path input and output data, the second controller receives the second data via the multi-path input and output. 如請求項6所述的資料存取系統,其中該第一記錄包括:經由該多重路徑輸入輸出接收該第一資料的一第一時間戳記、該第一資料儲存在該資料儲存媒體的一第一位置、及該第一資料的一第一容量;該第二記錄包括:經由該多重路徑輸入輸出接收該第二資料的一第二時間戳記、該第二資料儲存在該資料儲存媒體的一第二位置、及該第二資料的一第二容量。 The data access system of claim 6, wherein the first record comprises: a first time stamp of receiving the first data via the multipath input and output, a first time stamp of the first data stored in the data storage medium a location, and a first volume of the first data; the second record includes: a second timestamp of the second data received via the multipath input and output, a second data stored in the data storage medium the second location, and a second volume of the second data. 如請求項1所述的資料存取系統,更包括:一多重路徑輸入輸出,連接該第一控制器,該第一控制器經由該多重路徑輸入輸出接收該第一資料。 The data access system of claim 1, further comprising: a multi-path input and output connected to the first controller, and the first controller receives the first data via the multi-path input and output. 如請求項8所述的資料存取系統,其中該第一記錄包括:經由該多重路徑輸入輸出接收該第一資料的一第一時間戳記、該第一資料儲存在該資料儲存媒體的一第一位置、及該第一資料的一第一容量。The data access system of claim 8, wherein the first record comprises: a first time stamp of the first data received via the multipath input and output, a first time stamp of the first data stored in the data storage medium a location, and a first volume of the first data.
TW109137507A 2020-10-28 2020-10-28 Data access system TWI766409B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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