CN1737745A - Read-write method for disc array data and parallel read-write method - Google Patents

Read-write method for disc array data and parallel read-write method Download PDF

Info

Publication number
CN1737745A
CN1737745A CN 200410058582 CN200410058582A CN1737745A CN 1737745 A CN1737745 A CN 1737745A CN 200410058582 CN200410058582 CN 200410058582 CN 200410058582 A CN200410058582 A CN 200410058582A CN 1737745 A CN1737745 A CN 1737745A
Authority
CN
China
Prior art keywords
data
write
unit
read
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200410058582
Other languages
Chinese (zh)
Other versions
CN1306381C (en
Inventor
张巍
唐小松
黄玉环
张国彬
张粤
任雷鸣
陈绍元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2004100585825A priority Critical patent/CN1306381C/en
Publication of CN1737745A publication Critical patent/CN1737745A/en
Application granted granted Critical
Publication of CN1306381C publication Critical patent/CN1306381C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

本发明提供了一种磁盘阵列的数据读取方法、一种磁盘阵列的数据写方法、一种基于写数据过程中的数据读取方法、以及一种基于正常读数据过程中的数据写方法。本发明中,在读、写的过程中,使用分条单元为单元读取数据、或者写数据,以及在按照读写规则进行计算时使用分条单元为单位进行计算。并且,本发明所述基于写数据过程中的数据读取方法可以实现大写、小写、重建写或降级写的过程中的正常读或者降级读的并发,本发明所述基于正常读数据过程中的数据写方法,可以实现正常读过程中的大写、小写、重建写或降级写的并发。使用本发明,可以提高读写的速度,并尽量实现读写并发。

Figure 200410058582

The invention provides a data reading method of a disk array, a data writing method of a disk array, a data reading method based on a data writing process, and a data writing method based on a normal data reading process. In the present invention, in the process of reading and writing, the strip unit is used as the unit to read data or write data, and the strip unit is used as the unit for calculation when calculating according to the read and write rules. Moreover, the data reading method based on the process of writing data in the present invention can realize the concurrency of normal reading or degraded reading in the process of uppercase, lowercase, reconstruction writing or degraded writing. The data writing method can realize the concurrency of uppercase writing, lowercase writing, reconstruction writing or downgrading writing in the normal reading process. By using the present invention, the speed of reading and writing can be increased, and concurrent reading and writing can be realized as much as possible.

Figure 200410058582

Description

一种磁盘阵列数据的读写方法及并行读写方法Method for reading and writing disk array data and parallel reading and writing method

技术领域technical field

本发明涉及磁盘阵列(RAID)的数据读写技术,特别是指一种磁盘阵列数据的读写方法及并行读写方法。The invention relates to data reading and writing technology of a disk array (RAID), in particular to a data reading and writing method of a disk array and a parallel reading and writing method.

背景技术Background technique

磁盘阵列(RAID,Redundant Access Independent Disk)技术已作为一项成熟的技术应用于数据存储备份中。RAID5(RAID LEVEL 5)是磁盘阵列的一个标准。图1为一个由4个磁盘组成的RAID5,4个磁盘在逻辑上看作一个磁盘进行分条(Strip),本例中,分为分条0~3。对于每一个分条,其中的3个磁盘用来存放数据,另外一个磁盘用来存放该分条的校验数据,每个分条分布在每个磁盘上的数据称为分条单元(SU,Strip Unit),分条单元也可称为分段(Block/Segment)。至于分条单元的大小视系统而定,有的系统或以1KB最有效率,或以4KB,或以6KB,甚至是4MB或8MB。由于磁盘的读写是以扇区(Sector,512字节)为单位,因此,分条单元应是512字节的倍数。如图1所示的RAID5,分条0包括SU0~SU2和校验单元P,每个分条单元包含10个磁盘扇区的数据。为了方便说明,本例中将分条0包含的各个磁盘的扇区与存储的数据编号为0~29,存放校验数据的扇区与存储的校验数据编号为P0~P9,将P0~P9称为校验数据单元。Disk array (RAID, Redundant Access Independent Disk) technology has been used as a mature technology in data storage backup. RAID5 (RAID LEVEL 5) is a standard for disk arrays. Figure 1 shows a RAID5 composed of 4 disks. Logically, the 4 disks are regarded as one disk for striping (Strip). In this example, the strips are divided into strips 0-3. For each stripe, three of the disks are used to store data, and the other disk is used to store the parity data of the stripe. The data distributed on each disk of each stripe is called a stripe unit (SU, Strip Unit), the strip unit can also be called a segment (Block/Segment). As for the size of the stripe unit, it depends on the system. In some systems, 1KB is the most efficient, or 4KB, or 6KB, or even 4MB or 8MB. Since the reading and writing of the disk is based on a sector (Sector, 512 bytes), the stripe unit should be a multiple of 512 bytes. In RAID5 shown in FIG. 1 , stripe 0 includes SU0-SU2 and a parity unit P, and each stripe unit includes data of 10 disk sectors. For the convenience of illustration, in this example, the sectors and stored data of each disk included in stripe 0 are numbered 0 to 29, the sectors storing verification data and the stored verification data are numbered P0 to P9, and P0 to P9 is called a check data unit.

下面仍以图1为例,给出了当前磁盘0故障的情况下,向扇区9、10写入数据的过程。由于磁盘0失效,该写请求可以视为拆分成如下的两个不同的“子写”请求,包括以下步骤:Still taking FIG. 1 as an example, the process of writing data to sectors 9 and 10 under the current disk 0 fault condition is given below. Due to the failure of disk 0, the write request can be regarded as split into two different "sub-write" requests as follows, including the following steps:

1)对于写入新数据9的子写,包括:读扇区19、读扇区29,存于缓存中;由于要写的磁盘故障,因此按照降级写(Degraded Write)算法:P9=原数据19XOR原数据29XOR新数据9,生成新校验数据P9存于缓存中,其中XOR表示异或运算;将新的校验数据P9写入扇区P9;1) Sub-write for writing new data 9, including: read sector 19, read sector 29, stored in the cache; because the disk to be written is faulty, according to the degraded write (Degraded Write) algorithm: P9=Original data 19XOR original data 29XOR new data 9, generate new verification data P9 and store in the cache, where XOR means XOR operation; write new verification data P9 into sector P9;

2)对于写入新数据10的子写,包括:读扇区10、读扇区P0,存于缓存中;按照小写(Small Write)或者称为读-修改-写(Read-Modify-Write)算法:P10=旧数据10XOR新数据10XOR P0,生成新校验数据P0,存于缓存中;将新数据10写入扇区10,将新校验数据P0写入扇区P0。2) Sub-writing for writing new data 10 includes: reading sector 10, reading sector P0, stored in the cache; according to small write (Small Write) or called read-modify-write (Read-Modify-Write) Algorithm: P10=old data 10XOR new data 10XOR P0, generate new verification data P0, and store in the cache; write new data 10 into sector 10, and write new verification data P0 into sector P0.

分析以上的过程,由于读写是针对扇区为单位进行,因此读写比较复杂,本例中,就包括了四次对磁盘读,两次计算,三次对磁盘写步骤。另一方面,由于以扇区为单位进行读写,若所读的扇区并不连续,即使是针对一个SU的正常读(Fault-Free Read)数据,例如读扇区11、13,由于并不是针对连续扇区的读操作,也会分成两次读动作,频繁的对磁盘进行操作,影响数据的读写速度。Analyzing the above process, since reading and writing are carried out in units of sectors, reading and writing are relatively complicated. In this example, it includes four steps of reading to the disk, two calculations, and three steps of writing to the disk. On the other hand, since reading and writing are performed in units of sectors, if the read sectors are not continuous, even for a normal read (Fault-Free Read) data of an SU, such as reading sectors 11 and 13, due to the inconsistency The read operation is not for continuous sectors, it will be divided into two read operations, and the disk is frequently operated, which affects the data read and write speed.

其中,上面提到的降级写算法和小写算法为RAID5中的写技术,写技术还包括大写算法(Large Write)和重建写(Reconstruct Write)其中小写、大写、重建写为正常写(Fault-Free Write),上面提到的正常读(Fault-FreeRead)以及在后面提到的降级读(Degraded Read)算法为RAID5中的读技术,所述读写算法可以参见图2所示的读写规则算法示意图,其中图中D表示数据,P表示校验数据。RAID中的读写技术也可参见有关RAID的资料,如CMU大学(Carnegie Mellon University)1996年8月出版的《RAIDFrameBook》或者该大学1996年8月出版的《RAIDFrame:A Rapid Prototyping Toolfor RAID System》对RAID结构及涉及到的读写技术进行了详细的描述。Among them, the degraded write algorithm and lowercase algorithm mentioned above are the writing techniques in RAID5, and the writing technique also includes the uppercase algorithm (Large Write) and the reconstruction write (Reconstruct Write). Write), the above-mentioned normal read (Fault-FreeRead) and the degraded read (Degraded Read) algorithm mentioned later are the read technology in RAID5, and the read-write algorithm can refer to the read-write rule algorithm shown in Figure 2 Schematic diagram, in which D in the figure represents data, and P represents verification data. Read and write technology in RAID can also refer to information about RAID, such as "RAIDFrameBook" published by CMU University (Carnegie Mellon University) in August 1996 or "RAIDFrame: A Rapid Prototyping Toolfor RAID System" published by the university in August 1996 The RAID structure and related reading and writing technologies are described in detail.

另外,不难理解当读、写命令针对同一块扇区时,可能会存在读写冲突。但是即使读、写命令并不是针对同一块扇区时,也可能会出现读写冲突。例如,对于RAID5处于降级(Degraded)状态,即RAID组存在一个磁盘失效的状态,在读取失效磁盘数据时,要通过读取其他磁盘的数据和校验数据,使用降级读算法计算出所需要的数据,因此即使存在的写命令并不是针对该失效磁盘的扇区时,也可能存在着读写冲突,造成读数据不一致。下面详细分析这种情况。In addition, it is not difficult to understand that when the read and write commands target the same sector, there may be read and write conflicts. But even when the read and write commands are not aimed at the same sector, read and write conflicts may occur. For example, if RAID5 is in the Degraded state, that is, there is a disk failure in the RAID group, when reading the data of the failed disk, it is necessary to use the degraded read algorithm to calculate the required data by reading the data and verification data of other disks. Therefore, even if the existing write command is not for the sector of the failed disk, there may be a read-write conflict, resulting in inconsistency in the read data. This situation is analyzed in detail below.

仍以图1所示的RAID5为例,假设磁盘0坏掉而失效,假设当前存在着写分条0的扇区11~18的命令,同时存在读分条0的扇区0~10数据的命令。Still taking the RAID5 shown in Figure 1 as an example, assuming that disk 0 is broken and invalid, assuming that there are currently commands to write sectors 11-18 of stripe 0, and at the same time there are commands to read data from sectors 0-10 of stripe 0. Order.

数据写入扇区11~18的过程包括以下步骤:The process of writing data into sectors 11-18 includes the following steps:

步骤1:根据RAID5小写(Small Write)算法,首先读取SU1上扇区11~18的旧数据11~18_old,并从磁盘3读取出对应的旧校验数据P1~P8_old,将读取的数据存于缓存(Cache)中。Step 1: According to the RAID5 Small Write algorithm, first read the old data 11~18_old of sectors 11~18 on SU1, and read the corresponding old verification data P1~P8_old from disk 3, and read the Data is stored in the cache (Cache).

步骤2:将从磁盘1扇区11~18读取的旧数据及对应的旧校验数据与Cache中的要写入该扇区11~18的新数据按照小写算法:(P1~P8_new)=(11~18_old)XOR(11~18_new)XOR(P1~P8_old),生成新的校验数据(P1~P8_new)。由于步骤1~2的过程并没有对磁盘进行“写”动作,以上步骤1~2也合称为写动作中的预回写或预读(Preread)步骤。Step 2: The old data read from sectors 11-18 of disk 1 and the corresponding old parity data and the new data to be written in the sectors 11-18 in the Cache according to the lowercase algorithm: (P1-P8_new)= (11~18_old)XOR(11~18_new)XOR(P1~P8_old) to generate new check data (P1~P8_new). Since the process of steps 1-2 does not perform a "write" action on the disk, the above steps 1-2 are collectively referred to as a pre-write-back or pre-read (Preread) step in the write action.

步骤3:将新数据11~18_new和新校验数据P1~P8_new分别回写入对应磁盘扇区,结束。Step 3: Write back the new data 11-18_new and the new verification data P1-P8_new respectively to the corresponding disk sectors, and end.

从磁盘0上的扇区0~10读数据过程包括以下步骤:The process of reading data from sectors 0 to 10 on disk 0 includes the following steps:

步骤1:由于磁盘0坏,采用降级读算法,读取磁盘1上扇区10~19数据、磁盘2上扇区20~29的数据、校验数据P0~P9,将读取的数据存于Cache。Step 1: Since disk 0 is broken, use the degraded read algorithm to read data from sectors 10 to 19 on disk 1, data from sectors 20 to 29 on disk 2, and checksum data P0 to P9, and store the read data in Cache.

步骤2:将步骤1读取的数据按照降级读算法:(0~9)=(10~19)XOR(20~29)XOR(P0~P9)得到磁盘1扇区0~9的数据,保存在Cache上。Step 2: The data read in step 1 is read according to the degraded algorithm: (0~9)=(10~19)XOR(20~29)XOR(P0~P9) to get the data of disk 1 sector 0~9, save it on the Cache.

步骤3:将计算出来的数据0~9和在Cache中缓存的数据10作为要读取数据1~10,提供给用户,结束。Step 3: Provide the calculated data 0-9 and the cached data 10 in the Cache as data 1-10 to be read to the user, and end.

分析上述读写步骤,读数据需要涉及读取不同磁盘SU1的10~19、SU2的20~29、以及P的P0~P9,由于是针对不同磁盘的连续扇区进行读取,因此相当于分成3个子读命令。而写操作要写SU1的11~18和P的P1~P8,也可以认为是两个子写命令。当读写同时发生时,由于到达各个磁盘上的读写子命令无法保证顺序,就可能出现读写错误,例如当读数据完成对10~19的子读命令,而尚未执行读取P0~P9子命令时,若此时写操作完成了对P1~P8的子写命令,则读数据会读出更新后的校验数据。于是,便出现降级读数据时,从磁盘1读出的数据是旧数据,而从磁盘3读出的数据中却含有更新后的校验数据,导致在将读取的数据进行异或运算时,生成的数据0~9错误。Analyzing the above reading and writing steps, reading data needs to involve reading 10~19 of different disks SU1, 20~29 of SU2, and P0~P9 of P. Since it is read for consecutive sectors of different disks, it is equivalent to dividing into 3 sub-read commands. The write operation needs to write 11-18 of SU1 and P1-P8 of P, which can also be regarded as two sub-write commands. When reading and writing happen at the same time, because the order of the reading and writing subcommands arriving on each disk cannot be guaranteed, reading and writing errors may occur. For example, when the reading data completes the subreading commands for 10~19, but has not yet executed the reading of P0~P9 During the sub-command, if the write operation completes the sub-write command to P1-P8 at this time, the read data will read the updated check data. Therefore, when degraded reading data occurs, the data read from disk 1 is old data, but the data read from disk 3 contains updated checksum data, resulting in that when the read data is XORed , the generated data 0~9 is wrong.

因此,为了避免读写操作的并行发生,目前对于读写的并行操作均进行加锁,并且加锁的单位为分条,这里的并行发生是指在一个操作的开始到完成之间出现另一个操作,例如写操作完成前出现读操作,或者在读操作完成前出现写操作。读写的加锁,即读数据时加锁禁止并行发生针对该分条的写操作;写数据时加锁禁止并行发生针对该分条的读操作。Therefore, in order to avoid the parallel occurrence of read and write operations, the parallel operations of reading and writing are currently locked, and the unit of locking is a stripe. The parallel occurrence here refers to the occurrence of another operation between the start and completion of one operation. Operations, such as a read operation occurring before a write operation completes, or a write operation occurring before a read operation completes. Locking for reading and writing, that is, locking when reading data prohibits concurrent write operations for the stripe; locking when writing data prohibits concurrent read operations for the stripe.

通过以分条为单位进行加锁,不仅可以避免针对同一块扇区的读写冲突时,也可以避免上述针对不是同一块扇区的读写冲突。并且,通过以分条单位进行加锁,当写命令出现大写、小写、降级写,或者读命令出现正常读、降级读,不论是哪种写命令和读命令都可以避免同时出现,避免读写冲突,确保了数据的读写正确。By locking in units of stripes, it is possible not only to avoid read-write conflicts for the same sector, but also to avoid the above-mentioned read-write conflicts for sectors that are not the same. Moreover, by locking in strip units, when the write command appears uppercase, lowercase, downgraded write, or the read command appears normal read, downgraded read, no matter which kind of write command and read command can be avoided at the same time, avoid reading and writing Conflicts ensure that data is read and written correctly.

目前的加锁方法虽然保证了读写数据的正确性,但是,由于不论是哪种情况都进行加锁,使得对分条的读、写操作无法并行,影响读写操作的性能。会导致在写/读操作过程中下发命令后,用户必须等待当前操作进程结束解锁后,才可以对该分条进行读/写数据。因此加锁方式对读写并行操作时的性能影响较大,影响了读写速度。Although the current locking method guarantees the correctness of reading and writing data, because no matter what the situation is, the locking is performed, so that the read and write operations of the stripes cannot be parallelized, which affects the performance of the read and write operations. As a result, after the command is issued during the write/read operation, the user must wait for the current operation process to be unlocked before reading/writing data on the stripe. Therefore, the locking method has a great impact on the performance of parallel read and write operations, which affects the read and write speed.

发明内容Contents of the invention

有鉴于此,本发明的主要目的在于提供一种磁盘阵列数据的读方法,以减少读命令对磁盘的读指令的下发次数,提高数据读速度。In view of this, the main purpose of the present invention is to provide a method for reading disk array data, so as to reduce the number of read commands issued to the disk and increase the data reading speed.

本发明的另一主要目的在于提供一种磁盘阵列数据的写方法,以减少写命令对磁盘的预读、回写指令的下发次数,提高数据写速度。Another main purpose of the present invention is to provide a method for writing data in a disk array, so as to reduce the number of read-ahead and write-back commands issued by a write command to the disk, and increase the data writing speed.

本发明的进一步的目的是提供一种磁盘阵列数据的基于写数据过程中的数据读取方法,以减少写数据中的对读操作的加锁情况,尽量实现读写的并行操作,提高数据读写速度。A further object of the present invention is to provide a data reading method based on the data writing process of disk array data, to reduce the locking situation of reading operations in writing data, to realize parallel operations of reading and writing as much as possible, and to improve data reading. write speed.

本发明的进一步的目的是提供一种磁盘阵列数据的基于正常读数据过程中的数据写方法,以减少正常读数据过程中对写操作的加锁情况,尽量实现读写的并行操作,提高数据读写速度。A further object of the present invention is to provide a data writing method based on the normal read data process of the disk array data, to reduce the locking situation of the write operation in the normal read data process, to realize the parallel operation of read and write as far as possible, and to improve the data quality. Read and write speed.

本发明提供了一种磁盘阵列的数据读取方法,包括以下步骤:The invention provides a data reading method of a disk array, comprising the following steps:

A、根据当前的读规则,确定出要读取的数据所在扇区;A. According to the current reading rules, determine the sector where the data to be read is located;

B、确定出要读取的扇区所属的分条单元或校验数据单元,从磁盘读取确定出的各个分条单元和校验数据单元,存入缓存;B. Determine the striping unit or verification data unit to which the sector to be read belongs, read the determined striping units and verification data units from the disk, and store them in the cache;

C、判断当前的读是否为正常读,若是,则执行步骤D;否则,根据当前的读规则,使用缓存的分条单元和校验数据单元计算生成所要读取数据所属的分条单元,存于缓存;C. Determine whether the current read is a normal read, and if so, execute step D; otherwise, according to the current read rule, use the cached stripe unit and check data unit to calculate and generate the stripe unit to which the data to be read belongs, and store in the cache;

D、从缓存中的分条单元读取出所需要的数据,提供给用户。D. Read the required data from the stripe unit in the cache and provide it to the user.

本发明还提供了一种磁盘阵列的数据写方法,包括以下步骤:The present invention also provides a data writing method of a disk array, comprising the following steps:

A、根据当前的写规则,确定出要预读的数据所在扇区;A. According to the current writing rules, determine the sector where the data to be read in advance is located;

B、确定出要预读扇区所属分条单元或校验数据单元,以分条单元为单位,从磁盘读取确定出的各个分条单元及校验数据单元,存入缓存;B. Determine the striping unit or verification data unit to which the pre-reading sector belongs, take the striping unit as a unit, read each striping unit and verification data unit determined from the disk, and store them in the cache;

C、将要写入的数据与缓存中的对应的分条单元进行处理,生成含有要写入数据的分条单元,作为要回写的分条单元,存于缓存;C. Process the data to be written with the corresponding striping unit in the cache, generate a striping unit containing the data to be written, and store it in the cache as the striping unit to be written back;

D、根据当前的写规则,利用缓存的、所读取出的分条单元、生成的要回写的分条单元和校验数据单元计算出要回写的校验数据单元,存于缓存;D. According to the current writing rules, use the cached, read-out stripe units, the generated stripe units to be written back and the verification data units to calculate the verification data units to be written back, and store them in the cache;

E、以分条单元为单位,将所要回写的分条单元、要回写的校验数据单元回写入相应的磁盘中。E. Taking the stripe unit as a unit, write back the stripe unit to be written back and the verification data unit to be written back into the corresponding disk.

其中该写方法中,步骤A所述根据当前的写规则,确定出要预读的数据所在扇区包括:Wherein in the writing method, according to the current writing rules described in step A, determining the sector where the data to be pre-read is located includes:

判断写为小写时,所述确定出的扇区包括:将要写入的数据所对应的扇区和对应的校验数据所在扇区;When judging that the writing is lowercase, the determined sector includes: the sector corresponding to the data to be written and the sector where the corresponding verification data is located;

判断写为大写时,所述确定出的扇区包括:将要写入数据所对应的扇区;When judging that the writing is uppercase, the determined sector includes: the sector corresponding to the data to be written;

判断写为重建写时,所述确定出的扇区包括:重建写的写规则所要求预读的扇区、以及将要写入数据所对应的扇区;When judging that the writing is reconstruction writing, the determined sectors include: the pre-read sector required by the writing rule of reconstruction writing, and the sector corresponding to the data to be written;

判断写为降级写时,所述确定出的扇区包括:降级写的写规则所要求预读的扇区、以及校验数据所在扇区。When it is judged that the writing is degraded writing, the determined sectors include: the pre-read sector required by the writing rule of degraded writing, and the sector where the verification data is located.

本发明还相应提供了一种基于写数据过程中的数据读取方法,其中,写数据包括将所要写入的数据所在分条单元读取到缓存中、运算生成含有要写入数据的分条单元的预读,将生成的分条单元及校验数据单元写入磁盘的回写;所述数据读取方法包括以下步骤:The present invention also provides a corresponding data reading method based on the process of writing data, wherein writing data includes reading the strip unit where the data to be written is located into the cache, and generating a strip containing the data to be written. The pre-reading of the unit is to write the generated strip unit and the verification data unit into the disk; the data reading method includes the following steps:

A、根据当前的读规则,判断缓存中是否存储有所有要读取数据所属分条单元,是,则执行步骤C;否则,执行步骤B;A. According to the current reading rules, judge whether all the stripe units to which the data to be read belong to are stored in the cache, if yes, execute step C; otherwise, execute step B;

B、确定出未存于缓存中的要读取数据所属的分条单元;从磁盘中读取所述确定出的分条单元,存入缓存;B. Determine the striping unit to which the data to be read that is not stored in the cache belongs; read the determined striping unit from the disk, and store it in the cache;

C、判断当前的读是否为正常读,若是,则执行步骤D;否则,根据当前的读规则,使用缓存的分条单元和校验数据单元计算生成所要读取数据所属的分条单元,存于缓存;C. Determine whether the current read is a normal read, and if so, execute step D; otherwise, according to the current read rule, use the cached stripe unit and check data unit to calculate and generate the stripe unit to which the data to be read belongs, and store in the cache;

D、从缓存的分条单元中取出所需要的数据,提供给用户。D. Take out the required data from the cached stripe unit and provide it to the user.

其中,所述的写为大写、小写、重建写或降级写。Wherein, the writing is uppercase, lowercase, reconstructed or downgraded.

其中该写数据过程中的读方法中,步骤D所述的分条单元为写过程的预读出的分条单元,或者为预读后计算出的要回写的分条单元。Wherein in the reading method in the process of writing data, the striping unit mentioned in step D is the striping unit read out in advance during the writing process, or the striping unit to be written back calculated after the prereading.

本发明还相应提供了一种基于正常读数据过程中的数据写方法,其中,正常读数据包括将所需数据所在分条单元读取到缓存中,从缓存的分条单元中取出/计算出所需数据提供给用户;所述数据写方法包括以下步骤:The present invention also correspondingly provides a data writing method based on the process of normal data reading, wherein the normal data reading includes reading the stripe unit where the required data is located into the cache, taking out/calculating the data from the cache stripe unit The required data is provided to the user; the data writing method comprises the following steps:

A、判断缓存中是否存储有根据当前的写规则确定出的、要预读的数据所属的所有分条单元或/和校验数据单元,若是,则执行步骤C;否则执行步骤B;A. Determine whether all stripe units or/and check data units to which the data to be pre-read belong to, which are determined according to the current write rule, are stored in the cache, and if so, perform step C; otherwise, perform step B;

B、确定出未存于缓存中的数据所属的分条单元或/和校验数据单元;从磁盘中读取所述确定出的分条单元或/和校验数据单元,存入缓存;B. Determine the stripe unit or/and check data unit to which the data not stored in the cache belongs; read the determined stripe unit or/and check data unit from the disk, and store it in the cache;

C、将要写入的数据与缓存中对应的分条单元进行处理,生成含有要写入数据的分条单元,作为要回写的分条单元,存于缓存;C. Process the data to be written with the corresponding striping unit in the cache, generate a striping unit containing the data to be written, and store it in the cache as the striping unit to be written back;

然后根据所采用的写规则,利用缓存的所读取出的分条单元和校验数据单元、生成的要回写的分条单元计算生成要回写的校验数据单元;Then, according to the adopted writing rule, the read-out stripe unit and the verification data unit of the cache are used, and the generated stripe unit to be written back is calculated to generate the verification data unit to be written back;

D、将需要回写的分条单元、要回写的校验数据单元回写入相应的磁盘中。D. Write back the striping units that need to be written back and the verification data units that need to be written back to the corresponding disks.

其中,该读数据过程中数据写方法中,步骤A所述根据当前的写规则确定出的、要预读的数据所属的所有分条单元或/和校验数据单元包括:Wherein, in the data writing method in the process of reading data, all the striping units or/and verification data units to which the data to be read in advance are determined according to the current writing rules in step A include:

判断写为小写时,所述分条单元包括:将要写入的数据所属分条单元、和校验数据单元;When judging that it is written in lowercase, the striping unit includes: the striping unit to which the data to be written belongs, and the verification data unit;

判断写为大写时,所述分条单元包括:将要写入数据所属的分条单元;When judging that the writing is uppercase, the striping unit includes: the striping unit to which the data to be written belongs;

判断写为重建写时,所述分条单元包括:重建写的写规则所要求预读数据所属分条单元、以及将要写入的数据所属分条单元;When it is judged that the writing is reconstruction writing, the striping unit includes: the striping unit to which the read-ahead data required by the writing rule for reconstruction writing belongs, and the striping unit to which the data to be written belongs;

判断写为降级写时,所述分条单元包括:降级写的写规则所要求预读的数据所述分条单元、以及校验数据单元。When it is judged that the writing is downgraded writing, the striping unit includes: the striping unit of the pre-read data required by the writing rule of the downgraded writing, and a check data unit.

其中,该读数据过程中数据写方法中,步骤D进一步包括:将需要回写的分条单元回写入相应磁盘时,回写的分条单元恰为正常读数据操作当前正在读取的分条单元时,使用所述回写操作下发前缓存的该分条单元作为所述正常读数据操作当前读取的分条单元。其中,所述的分条单元为写过程的预读出的分条单元,或者为预读后计算出要回写的分条单元。Wherein, in the data writing method in the process of reading data, step D further includes: when writing back the stripe unit that needs to be written back into the corresponding disk, the stripe unit to be written back is just the stripe unit that is currently being read by the normal data read operation. When the stripe unit is used, the stripe unit cached before the write-back operation is sent is used as the stripe unit currently read by the normal read data operation. Wherein, the striping unit is the striping unit that is pre-read during the writing process, or is the striping unit that is calculated to be written back after the pre-reading.

由上述方法可以看出,本发明针对分条单元进行读、写操作时,并不是针对各个扇区,因此针对一个分条单元的多个不连续的扇区的读写可以一次读写,降低了对磁盘的读写次数。另一方面,计算也是以分条单元为单位进行,可以将针对一个分条单元的不连续的扇区的运算简化成一个运算过程,减少运算次数,提高了读写速度。As can be seen from the above method, when the present invention performs read and write operations on the striping unit, it is not for each sector, so the reading and writing of a plurality of discontinuous sectors of a striping unit can be read and written at one time, reducing the The number of reads and writes to the disk. On the other hand, the calculation is also carried out in units of stripe units, which can simplify the operation for discontinuous sectors of a stripe unit into one operation process, reduce the number of operations, and increase the read and write speed.

另一方面,相对于RAID现有技术的读写并行时无论何种情况均加锁来说,采用本发明提供的基于写数据过程中的数据读取方法和基于正常读数据过程中的数据写方法,仅仅在降级读过程中出现回写时需要进行分条加锁来禁止回写,其他情况下的读写都可以并行发生,不需要进行加锁。也就是说,使用本发明,在读写数据的并行过程中,当写数据过程中出现正常读或降级读;或者正常读数据过程中出现写数据,均无需加锁,这里的写包括大写、小写、降级写、重建写。On the other hand, when reading and writing in the existing technology of RAID in parallel, no matter what the situation is, the data reading method based on the data writing process provided by the present invention and the data writing method based on the normal reading data process are adopted. method, only when writeback occurs during the downgraded read process, stripe lock is required to prohibit writeback. In other cases, read and write can occur in parallel without locking. That is to say, using the present invention, in the parallel process of reading and writing data, when normal reading or degraded reading occurs in the process of writing data; or when writing data occurs in the process of normal reading data, no lock is required. Lowercase, downgrade write, rebuild write.

由于可以尽量的实现不加锁,使得读/写数据请求尽量不受写/读数据的命令影响,加快了读写并行时的数据的读写速度,提高了读写性能。Since the lock can be realized as much as possible, the read/write data request is not affected by the command to write/read data as far as possible, which speeds up the read and write speed of data when reading and writing in parallel, and improves the read and write performance.

附图说明Description of drawings

图1为RAID5示意图。Figure 1 is a schematic diagram of RAID5.

图2为RAID5中的读写规则算法示意图。FIG. 2 is a schematic diagram of an algorithm for reading and writing rules in RAID5.

图3为本发明读数据流程。Fig. 3 is the process of reading data in the present invention.

图4为本发明写数据流程。Fig. 4 is the process of writing data in the present invention.

图5为本发明写数据中的读数据流程。Fig. 5 is the process of reading data in writing data according to the present invention.

图6为本发明读数据中的写数据流程。FIG. 6 is a flow chart of writing data in reading data according to the present invention.

具体实施方式Detailed ways

本发明采用了以分条单元为单位进行读写操作,而不是以扇区为单位进行读写操作,也就是说,在对某扇区进行读写操作时,会读写该扇区所在的整个分条单元。基于分条单元为单位的读写方法,可以简化读写过程,提高读写速度。下面通过具体实施例和附图,对本发明进一步详细说明。The present invention adopts the reading and writing operation in the unit of the stripe unit instead of the reading and writing operation in the unit of the sector, that is to say, when performing the reading and writing operation on a certain sector, it will read and write the The entire strip unit. The reading and writing method based on the strip unit can simplify the reading and writing process and improve the reading and writing speed. The present invention will be further described in detail below through specific embodiments and accompanying drawings.

本发明提供的读数据方法,可应用于RADI5的正常读、降级读,参见图3所示的流程图,包括以下步骤:The method for reading data provided by the present invention can be applied to normal reading and degraded reading of RADI5, referring to the flow chart shown in Figure 3, comprising the following steps:

步骤301:根据当前的读规则,确定要读取的扇区。也就是根据是正常读还是降级读来确定所要读取的扇区。如图2,正常读,确定的扇区位于D0;若为降级读,确定出的扇区位于D1、D2、P。这个步骤和现有的技术一样。Step 301: Determine the sector to be read according to the current read rule. That is, the sector to be read is determined according to whether it is a normal read or a degraded read. As shown in Figure 2, for normal reading, the determined sector is located at D0; for degraded reading, the determined sectors are located at D1, D2, and P. This step is the same as the existing technology.

步骤302:确定出要读取的数据所属的分条单元,以分条单元为单位,读取确定出的各个分条单元或/和校验数据单元存入缓存。如图2,为正常读时,仅读取数据所属的分条单元D0存入缓存;当为降级读时,要读取分条单元D1、D2、校验数据单元P存入缓存。Step 302: Determine the stripe unit to which the data to be read belongs, and use the stripe unit as a unit, read each determined stripe unit or/and verify the data unit and store it in the cache. As shown in Figure 2, when it is a normal read, only the stripe unit D0 to which the read data belongs is stored in the cache; when it is a degraded read, the stripe units D1, D2, and the check data unit P are read and stored in the cache.

步骤303:根据读规则,计算出所要读取数据所在分条单元。当正常读时,其实这个步骤为空,跳过直接执行步骤D;当为降级读时,根据降级读的规则,利用读取出的分条单元和校验数据单元计算出所要读的数据所在的分条单元,存于缓存。其中,计算的算法规则与图2中示出的相同,只是这里以分条单元为单位进行计算。Step 303: Calculate the stripe unit where the data to be read is located according to the read rule. When reading normally, this step is actually empty, skip and directly execute step D; when reading downgrade, according to the rules of downgrade read, use the read strip unit and check data unit to calculate the location of the data to be read The stripe units are stored in the cache. Wherein, the calculation algorithm rule is the same as that shown in FIG. 2 , except that the calculation is performed in units of strip units.

步骤304:从缓存中的分条单元读取出所需要的扇区数据,提供给用户。这里所述的缓存中的分条单元,包括步骤B和C所缓存的分条单元。Step 304: Read out the required sector data from the stripe unit in the cache, and provide it to the user. The stripe units in the cache mentioned here include the stripe units cached in steps B and C.

本发明提供的RAID写数据方法,可应用于大写、小写、降级写、重建写,参见图4示出的流程图,包括以下步骤:The RAID write data method provided by the present invention can be applied to uppercase, lowercase, downgraded write, and rebuilt write, referring to the flow chart shown in Figure 4, comprising the following steps:

步骤401:根据当前的写规则,确定出要预读(Preread)的扇区,也就是根据是大写、小写、降级写、重建写来确定要读取的扇区。对于小写,确定出的扇区为将要回写的数据所在扇区和对应的校验数据的扇区;这个步骤和现有的技术一样。而对于大写和重建写,本发明确定出的扇区不仅包括要预读的扇区,也要包括将要回写的数据所在扇区。对于降级写,本发明确定的扇区包括要回写的数据所在扇区和校验数据所在扇区。Step 401: According to the current writing rule, determine the sector to be preread (Preread), that is, determine the sector to be read according to whether it is uppercase, lowercase, downgraded write, or reconstructed write. For lowercase, the determined sector is the sector where the data to be written back is located and the corresponding verification data sector; this step is the same as the existing technology. For capitalization and reconstruction, the sector determined by the present invention includes not only the sector to be pre-read, but also the sector where the data to be written back is located. For degraded writing, the sector determined by the present invention includes the sector where the data to be written back is located and the sector where the verification data is located.

如图2,对于小写,确定出的扇区位于D0、P;对于大写,确定出的扇区位于D0、D1、D2;对于重建写,确定出的扇区位于D0、D1、D2;对于降级写,确定出的扇区位于D1、D2、P。As shown in Figure 2, for lowercase, the determined sectors are located at D0, P; for uppercase, the determined sectors are located at D0, D1, D2; for reconstruction writing, the determined sectors are located at D0, D1, D2; for degraded Write, the determined sectors are located in D1, D2, P.

步骤402:确定出要预读扇区所属分条单元或校验数据单元,以分条单元为单位,读取确定出的各个分条单元及校验数据单元,存入缓存。Step 402: Determine the stripe unit or verification data unit to which the sector to be pre-read belongs, take the stripe unit as a unit, read each determined stripe unit and verification data unit, and store them in the cache.

步骤403:将要写入的数据与缓存中的分条单元进行处理,生成含有要写入数据的分条单元,作为要回写的分条单元,存于缓存。由于这个处理过程可以看作是将要写入的数据补满成一个分条单元,因此这个过程本发明中称为补满过程。如图2,也正是因为存在这个补满过程,因此,本发明中在步骤401~402,对于大写,要将D0、D1、D2分条单元读取到缓存;对于重建写,要将D0、D1分条单元读取到缓存;以及对于降级写,要一同读取校验数据单元P,以使用降级读算法计算出分条单元D0,相当于读取D0。Step 403: Process the data to be written and the stripe units in the cache to generate the stripe units containing the data to be written, and store them in the cache as the stripe units to be written back. Since this processing process can be regarded as filling up the data to be written into a stripe unit, this process is called a filling process in the present invention. As shown in Figure 2, it is precisely because of this filling process, therefore, in steps 401 to 402 in the present invention, for capitalization, D0, D1, D2 stripe units should be read into the cache; for reconstruction writing, D0 , the D1 stripe unit is read into the cache; and for downgraded writing, the parity data unit P is read together to calculate the stripe unit D0 by using the downgraded read algorithm, which is equivalent to reading D0.

步骤404:根据当前的写规则,利用缓存的读取出的分条单元、补满后的要回写的分条单元和/或校验数据单元计算出要回写的校验数据单元,存于缓存。其中,计算的算法规则与图2中示出的相同,只是这里以分条单元为单位进行计算。例如图2中的小写,则要利用步骤402读出缓存的分条单元D0、P、补满后要回写的分条单元D0来计算出要回写的校验数据单元P。Step 404: According to the current write rule, calculate the check data unit to be written back by using the cached read stripe unit, the filled stripe unit to be written back and/or the check data unit, and store in cache. Wherein, the calculation algorithm rule is the same as that shown in FIG. 2 , except that the calculation is performed in units of strip units. For example, for lowercase in FIG. 2 , it is necessary to use step 402 to read out the cached stripe units D0 and P, and the stripe unit D0 to be written back after filling up to calculate the check data unit P to be written back.

步骤405:以分条单元为单位,将所要回写的分条单元、校验数据单元回写入相应的磁盘中。Step 405: Taking the stripe unit as a unit, write back the stripe unit and the verification data unit to be written back into the corresponding disk.

下面结合具体的实施例来分析采用分条单元为读写单位的优点。仍以背景技术中的例子对本发明的读写进行说明:当前磁盘0故障的情况下,写入数据9、10的过程。为了与背景技术所述的过程进行对比,下面的步骤没有与图4示出的写流程进行对照写,但是,其处理流程仍然是依照图4示出的步骤。包括以下步骤:The advantages of using the stripe unit as the read/write unit are analyzed below in combination with specific embodiments. The reading and writing of the present invention will be described with an example in the background art: the process of writing data 9 and 10 in the case of a failure of the current disk 0 . In order to compare with the process described in the background technology, the following steps are not compared with the writing process shown in FIG. 4 , but the processing flow is still in accordance with the steps shown in FIG. 4 . Include the following steps:

步1:判断9、10所在分条单元,读取分条单元10~19、20~29,校验数据单元P0~P9;异或生成旧数据0~9,存于缓存;Step 1: Determine the striping units where 9 and 10 are located, read the striping units 10~19, 20~29, and verify the data units P0~P9; XOR generates old data 0~9 and store them in the cache;

步2:利用缓存中的分条单元数据,以及要写入的数据,补满SU0、SU1在Cache中的要回写的分条单元。本例中,补满后的SU0为:0~8是旧数据,9是要写入的新数据;补满后的SU1为:10是要写入的新数据,11~19为旧数据。Step 2: Use the stripe unit data in the cache and the data to be written to fill up the stripe units to be written back in SU0 and SU1 in the Cache. In this example, SU0 after filling up is: 0~8 are old data, 9 is new data to be written; SU1 after filling up is: 10 is new data to be written, and 11~19 are old data.

步3:按照大写方式,利用Cache中补满后的分条单元SU0、SU1,以及SU2,异或生成新校验数据单元P;然后回写补满的分条单元SU1、回写生成的新校验数据单元P到磁盘。Step 3: Use the full stripe units SU0, SU1, and SU2 in the Cache to XOR to generate a new verification data unit P according to the capitalization method; then write back the filled stripe unit SU1 and write back the generated new Verify data unit P to disk.

以上可以分析出,该写过程包括:三次对磁盘读,两次异或运算,两次对磁盘写。相比背景技术中的做法,少了一次对磁盘读、一次对磁盘写简化了处理流程,提高了写性能。From the analysis above, it can be seen that the writing process includes: three reads to the disk, two XOR operations, and two writes to the disk. Compared with the method in the background technology, one less read and one write to the disk simplifies the processing flow and improves the write performance.

尤其是相对于背景技术中提到的对一个SU的不相邻的扇区进行读/写时,由于扇区不连续,背景技术中会分开两次进行读/写,但是使用本发明,由于读是针对分条单元,而写采用了补满技术,因而写也是针对分条单元,均是针对连续扇区进行作,因此读/写也会看作一次读/写处理,大大减小了对磁盘的读写次数,简化了处理步,提高了读写的性能。Especially when reading/writing non-adjacent sectors of an SU mentioned in the background technology, because the sectors are not continuous, the background technology will separate the reading/writing twice, but using the present invention, due to Reading is for the striping unit, and writing uses the fill-up technology, so writing is also for the striping unit, and both operate on continuous sectors, so reading/writing will also be regarded as a reading/writing process, which greatly reduces The number of reads and writes to the disk simplifies the processing steps and improves the read and write performance.

由于采用了以分条单位进行读写,降低了读写的复杂性,因此,本发明提供了读写并行的可能性。下面进行分析:Since reading and writing is performed in strip units, the complexity of reading and writing is reduced. Therefore, the present invention provides the possibility of parallel reading and writing. Analyze as follows:

首先分析RAID5正常读与写过程。如图1所示,假设需要写扇区8、11~18、P1;要读取10、19、20~29。在读写并行发生时,可能存在以下情况:First analyze the normal read and write process of RAID5. As shown in FIG. 1 , it is assumed that sectors 8, 11-18, and P1 need to be written; sectors 10, 19, 20-29 need to be read. When reading and writing occur in parallel, the following situations may exist:

情况1:正常读时,预读启动;或预读时,正常读又下发:Case 1: During normal reading, pre-reading is enabled; or during pre-reading, normal reading is issued again:

预读步为:The read-ahead step is:

①、根据要写的数据,判断出并读取数据所在的分条单元SU0、SU1、校验数据单元P,存于Cache;①. According to the data to be written, determine and read the stripe units SU0, SU1 and the verification data unit P where the data is located, and store them in the Cache;

使用补满技术处理缓存中的分条单元,生成要回写的补满后的分条单元,存于Cache。本例中,用缓存的0~7和9补满要写的数据8生成要回写的SU0,用缓存的10和19补满要回写的数据11~18生成要回写的SU1;Use the fill-up technology to process the stripe units in the cache, generate the filled stripe units to be written back, and store them in the Cache. In this example, use the cached 0~7 and 9 to fill up the data 8 to be written to generate SU0 to be written back, and use the cached 10 and 19 to fill up the data 11 to 18 to be written back to generate SU1 to be written back;

②、根据小写算法,利用补满后的SU0、补满后的SU1、旧的校验数据单元P进行异或运算生成新的校验数据单元P,存于Cache。②. According to the lowercase algorithm, use the filled SU0, the filled SU1, and the old check data unit P to perform an XOR operation to generate a new check data unit P and store it in the Cache.

不难理解,由于预读仅有读请求下发,与正常读不会出现任何冲突。It is not difficult to understand that since only read requests are issued for pre-reading, there will be no conflict with normal reading.

情况2:正常读完成前,回写启动,也就是在读过程中出现回写:Case 2: Before the normal reading is completed, write-back starts, that is, write-back occurs during the reading process:

在本例中,所读取和回写的扇区并不存在交集,因此实际上,虽然回写过程中会将还没有读取的分条单元进行更新,造成读出的一些分条单元是旧分条单元,一些是新分条单元,但由于最终提供给用户的数据对应的扇区数据没有变化,因此,回写造成影响也只是过程中的影响,而对于最终的读出给用户的结果是没有影响的,因此,当如本例所读取和回写的扇区并不存在交集的情况,可以不对写进行加锁,允许该写进行。In this example, there is no intersection between the sectors read and written back, so in fact, although the stripe units that have not been read will be updated during the write-back process, some stripe units read are Old striping units, some are new striping units, but because the sector data corresponding to the data finally provided to the user has not changed, the impact of writing back is only the impact of the process, and the final readout to the user The result is irrelevant. Therefore, when the sectors read and written back do not overlap as in this example, the write may not be locked and the write is allowed.

但是,若所读取和回写的扇区存在交集的话,例如,回写的数据还包括10,则当读SU1的时候,若发现针对该单元的回写存在,则表示预读已经完成,可使用启动回写动作前所生成的、保存在缓存中的SU1来取代要读取的SU1。这样,读取提供给用户的数据将是最新的数据,也就是更新的要回写的10,因此这种情况下不会出现读写冲突,可以不对写进行加锁,允许该写进行;当然,也可以采用启动回写前所预读的SU1来取代要正常读的SU1,只是最终提供给用户数据是写操作启动前的数据。However, if there is an intersection between the read and write-back sectors, for example, the write-back data also includes 10, then when reading SU1, if it is found that the write-back exists for this unit, it means that the read-ahead has been completed. The SU1 to be read can be replaced by the SU1 generated before the write-back operation is started and stored in the cache. In this way, the data read and provided to the user will be the latest data, that is, the updated 10 to be written back, so there will be no read-write conflicts in this case, and the write can not be locked and the write can be allowed; of course , the pre-read SU1 before starting the write-back can also be used to replace the SU1 to be read normally, but the data finally provided to the user is the data before the start of the write operation.

情况3:回写完成前,正常读又下发,也就是在写的过程中,出现的读:Situation 3: Before the write-back is completed, the normal read is issued again, that is, during the writing process, the read occurs:

由于回写开始,表示预读已结束,根据预读的步骤,10~19的数据已在Cache中,可直接从Cache读出数据;数据20~29 Cache中没有,则下发请求到磁盘读取SU2,将数据读取到缓存后,再提取出数据发送给用户。这种情况下不会出现读写冲突,可以不对写进行加锁,允许该写进行。并且当采用的是预读时计算后的SU1时,最终读取提供给用户的数据是最新数据。Since the write-back starts, it means that the pre-reading has ended. According to the pre-reading steps, the data of 10~19 are already in the Cache, and the data can be read directly from the Cache; if the data 20~29 is not in the Cache, a request is sent to the disk for reading Take SU2, read the data into the cache, and then extract the data and send it to the user. In this case, there will be no read-write conflict, and the write may not be locked, allowing the write to proceed. And when SU1 calculated during pre-reading is used, the data provided to the user for final reading is the latest data.

下面再分析RAID5降级读与写并行出现的过程。Next, we will analyze the process of parallel occurrence of RAID5 degraded read and write.

仍以图1为例,假设磁盘0坏,要读数据0~10,要写数据11~18。在读写同时发生时,可能存在以下情况:Still taking Figure 1 as an example, assuming that disk 0 is damaged, data 0-10 needs to be read, and data 11-18 needs to be written. When reading and writing happen at the same time, the following situations may exist:

情况1:降级读时,预读又启动;或预读时,降级读又下发:Case 1: During downgraded reading, read-ahead is enabled again; or during pre-reading, downgraded reading is issued again:

降级读步为:The downgrade read step is:

①:根据要读的数据,判断并读取分条单元SU1、SU2、校验数据单元P,存于Cache;①: According to the data to be read, judge and read the striping units SU1, SU2, and the verification data unit P, and store them in the Cache;

根据降级读算法,异或生成SU0,存于Cache,从缓存中将数据0~10提供给用户。According to the degraded read algorithm, XOR generates SU0, stores it in the cache, and provides data 0 to 10 from the cache to the user.

预读步为:The read-ahead step is:

①:根据要写的数据,判断出并读取数据所在的分条单元SU1;读取校验数据单元P,存于Cache;①: According to the data to be written, determine and read the stripe unit SU1 where the data is located; read the verification data unit P and store it in the Cache;

使用补满技术处理缓存中的分条单元,生成要回写的补满后的分条单元,本例中,用缓存的10和19补满要写的数据11~18生成要回写的SU1,存于Cache;Use the fill-up technique to process the stripe units in the cache to generate the filled stripe units to be written back. In this example, use the cached 10 and 19 to fill up the data 11-18 to be written to generate the SU1 to be written back , stored in Cache;

②:根据小写算法,利用新的SU1、旧的P生成新的校验数据单元P,存于Cache。②: According to the lowercase algorithm, use the new SU1 and the old P to generate a new verification data unit P, and store it in the Cache.

不难理解,降级读和预读是两个读命令,因此不会产生冲突,不需要进行加锁,即只要读完成前,回写没有开始,非命中读和预读间就不可能冲突。It is not difficult to understand that downgraded read and read-ahead are two read commands, so there will be no conflicts and no locking is required. That is, as long as write-back does not start before the read is completed, there is no conflict between non-hit read and read-ahead.

情况2:降级读完成前,回写启动,即降级读过程中,出现回写:Case 2: Before the downgrade read is completed, the write-back starts, that is, during the downgrade read process, write-back occurs:

由于回写将修改P1,而降级读又要读取P1旧数据,因此降级读和回写间存在冲突,需要  加“分条锁”以确保数据的一致性。即在降级读开始时,降级读会对该分条加“分条锁”禁止回写,回写命令将暂停执行,以确保数据一致性。Since write-back will modify P1, and downgraded read will read the old data of P1, there is a conflict between downgraded read and write-back, and a "stripe lock" needs to be added to ensure data consistency. That is, when the downgraded read starts, the downgraded read will add a "stripe lock" to the stripe to prohibit writeback, and the execution of the writeback command will be suspended to ensure data consistency.

情况3:回写开始后,降级读又下发,即在回写的过程中出现降级读:Case 3: After the write-back starts, the degraded read is issued again, that is, the degraded read occurs during the write-back process:

根据回写算法,在回写开始时,已经完成预读步骤,SU1及校验数据单元P经预读步骤必定已存于Cache中,因此,降级读可以从Cache中读取到新SU1、新校验数据单元P,而通过读取磁盘获得SU2,异或生成SU0。不难理解,降级读也可以从Cache中读取到旧SU1、旧校验数据单元P,而通过读取磁盘获得SU2,同样异或生成SU0。而后从缓存中将生成的0~9及10提供给用户。可以看出,这种情况下也可以不用加锁,实现降级读。According to the write-back algorithm, when the write-back starts, the read-ahead step has been completed, and SU1 and the verification data unit P must have been stored in the Cache after the read-ahead step. Therefore, the degraded read can read the new SU1, the new The data unit P is checked, and SU2 is obtained by reading the disk, and SU0 is generated by XOR. It is not difficult to understand that the degraded read can also read the old SU1 and the old parity data unit P from the cache, and obtain SU2 by reading the disk, and also XOR to generate SU0. Then the generated 0-9 and 10 are provided to the user from the cache. It can be seen that in this case, it is also possible to realize degraded reading without locking.

本例中的情况3是以小写为例,在降级读的情况下也可能出现降级写,从本发明图4对应的写方法来看,降级写的预读过程在进行补满操作前,必然首先生成故障磁盘的分条单元,因此,在进行降级写的回写启动时,缓存中必然已经存在着一个分条的所有分条单元和校验单元,因此若出现任何读,都可以从缓存中找到所要读取的数据,因此可以实现这种情况下的写。Situation 3 in this example is lowercase as an example. In the case of downgraded reading, downgraded writing may also occur. Judging from the writing method corresponding to Figure 4 of the present invention, the read-ahead process of downgraded writing must necessarily First generate the stripe unit of the faulty disk. Therefore, when the write-back of the degraded write is started, all the stripe units and parity units of a stripe must already exist in the cache. Therefore, if any read occurs, it can be read from the cache. The data to be read is found in , so writing in this case can be realized.

通过以上的分析,使用基于分条单元的读写方法,不需要和现有的RAIDFrame一样,对于任何情况都要加锁,仅在降低读过程中,出现的回写才需要加锁。其余情况,读写间不存在任何互斥,都不需要进行加锁,可以实现读写的并行,缩短的等待时延,因此提高了数据读写速度,提高了性能。Through the above analysis, using the read and write method based on the striped unit does not need to be locked for any situation like the existing RAIDFrame, and only needs to be locked for writing back during the reduction of reading. In other cases, there is no mutual exclusion between reading and writing, and no locking is required, which can realize parallel reading and writing and shorten the waiting delay, thus improving the speed of data reading and writing and improving performance.

基于以上的分析,在本发明所述的RAID的写方法、读方法的基础上,本发明又提供了在写的过程中的读的方法,和在读的过程中的写的方法,以实现所述的RAID尽量不需要加锁的读写并行过程的方法,如下:Based on the above analysis, on the basis of the RAID writing method and reading method described in the present invention, the present invention provides a reading method in the writing process and a writing method in the reading process, so as to realize the The method of parallel process of reading and writing that does not require locking as far as possible in the above-mentioned RAID is as follows:

本发明提供的基于写数据的过程中的读数据方法,应用于所述的读为正常读(Fault-Free Read),或者降级读(Degraded Read),写可以为任意写的情况。其中,写过程包括预读和回写过程,所述写过程中的读包括以下步骤:The method of reading data based on the process of writing data provided by the present invention is applied to the situation where the reading is normal reading (Fault-Free Read) or degraded reading (Degraded Read), and writing can be arbitrary writing. Wherein, the writing process includes read-ahead and write-back processes, and the reading in the writing process includes the following steps:

步骤501:根据读规则,首先判断缓存中是否存储有所有要读数据所在分条单元,是,则对缓存的分条单元进行操作,执行步骤503;否则,执行步骤502。以图2为例说明,当为正常读时,则判断缓存中是否存在分条单元D0;当是降级读时,首先判断是否存在分条D0,若无,则进一步判断是否存在D1、D2和P。Step 501: According to the read rule, first judge whether all the stripe units of the data to be read are stored in the cache, if yes, operate on the cache stripe units, and execute step 503; otherwise, execute step 502. Taking Figure 2 as an example, when it is a normal read, it is judged whether there is a stripe unit D0 in the cache; when it is a degraded read, it is first judged whether there is a stripe D0, if not, it is further judged whether there are D1, D2 and p.

步骤502:确定出未保存在缓存中的、要读取的数据所在的分条单元,非命中读取数据所在分条单元,存入缓存。这里说的非命中读是指直接从磁盘中读取数据,对应的命中读则指直接从缓存中读取数据。Step 502: Determine the stripe unit where the data to be read that is not stored in the cache is located, and store the stripe unit where the read data is located in the cache. The non-hit read mentioned here refers to reading data directly from the disk, and the corresponding hit read refers to reading data directly from the cache.

步骤503:根据当前的读规则,从缓存的分条单元中取出或计算出所需要的数据,提供给用户。如图4所示,对于正常读来说,直接从缓存的分条单元D0中读取出所需数据提供给用户即可;对于降级读来说,则需要将缓存中的D1、D2和P进行异或运算出分条单元D0,然后再从缓存的分条单元D0中读取出所需数据提供给用户。Step 503: According to the current read rule, the required data is fetched or calculated from the cached stripe unit, and provided to the user. As shown in Figure 4, for normal reading, it is enough to directly read the required data from the stripe unit D0 in the cache and provide it to the user; The striping unit D0 is obtained by XOR operation, and then the required data is read from the cached striping unit D0 and provided to the user.

本发明还提供了基于正常读(Fault-Free Read)数据过程中的写数据方法,应用所有写的情况,其中,正常读数据包括将所需数据所在分条单元读取到缓存中,从缓存的分条单元中取出所需数据提供给用户;所述正常读数据过程中的写包括以下步骤:The present invention also provides a method for writing data based on a normal read (Fault-Free Read) data process, applying all situations of writing, wherein, reading data normally includes reading the striping unit where the required data is located into the cache, from the cache The required data is taken out from the striping unit and provided to the user; the writing in the normal read data process includes the following steps:

步骤601:在写规则的预读(Preread)过程,判断缓存中是否存有所有需要预读的数据所在的分条单元,是,则执行步骤603;否则步骤602;这里的写规则包括大写、小写、降级写的规则。其中,在确定哪些数据是需要读取的时候,可以参见步骤401。Step 601: In the prereading (Preread) process of writing rules, judge whether there are all the striping units where the data that needs to be read in advance are stored in the cache, if yes, then perform step 603; otherwise step 602; the writing rules here include capitalization, Rules for lowercase and downgraded writing. Wherein, when determining which data needs to be read, refer to step 401 .

步骤602:确定出未保存在缓存中的、需要预读取数据所在的分条单元;然后非命中读取所述确定出的数据所在分条单元,存入缓存;Step 602: Determine the stripe unit where the data that needs to be pre-read is located that is not stored in the cache; then read the stripe unit where the determined data is located by non-hit, and store it in the cache;

步骤603-604:将要回写的数据与缓存中的分条单元进行处理,生成含有要回写数据的、补满后的分条单元,作为要回写的分条单元,存于缓存,然后根据所采用的写规则,以分条单元为单位进行运算,计算出要回写的校验数据单元。其中,计算校验单元的规则可以参考图2所示,只不过本发明是以分条单元为单元进行计算。Steps 603-604: Process the data to be written back with the stripe units in the cache, generate a filled stripe unit containing the data to be written back, store it in the cache as the stripe unit to be written back, and then According to the adopted write rule, the operation is performed in units of stripe units, and the verification data unit to be written back is calculated. Wherein, the rules for calculating the verification unit can be referred to as shown in FIG. 2 , except that the present invention uses the strip unit as the unit for calculation.

步骤605:将计算出的需要回写的分条单元、校验数据单元回写入相应的磁盘中。若当回写时,回写的分条单元恰为正常读数据当前正在读取的分条单元时,则继续回写,而对于这个正常读,则使用该写操作时所缓存的分条或者是补满计算后的分条单元作为要读取的分条单元即可,也就是说,当用磁盘读出的数据存入缓存时,若与写操作缓存中的数据存在交集部分,则须以写操作过程中已经缓存在缓存中的数据为准。Step 605: Write back the calculated stripe units and check data units that need to be written back into corresponding disks. If when writing back, the write-back stripe unit is exactly the stripe unit that the normal read data is currently reading, then continue to write back, and for this normal read, use the cached stripe or It is enough to fill up the calculated stripe unit as the stripe unit to be read. That is to say, when the data read from the disk is stored in the cache, if there is an intersection with the data in the write operation cache, it must be The data already cached in the cache during the write operation shall prevail.

通过以上可以看出,仅仅在降级读过程中出现回写时需要分条锁禁止写,其他情况下的读写都可以使用上面的步骤进行,不需要进行加锁。From the above, it can be seen that only when writing back occurs during the degraded reading process, stripe locks are required to prohibit writing. In other cases, reading and writing can be performed using the above steps without locking.

由于RAID0(RAID LEVEL 0)、RAID1(RAID LEVEL 1)没有校验单元,仅存在对磁盘的直接读、直接写的步骤,没有使用校验的计算过程(具体可参见背景技术中提到的CMU大学出版的两本书),因此本发明所述的以分条单元为单位进行读写,也适用于RAID0、RAID1,其读方法和写方法和本发明所述方法相似,不同点在于将所述的按照规则计算的过程省去。并且依照本发明读方法、写方法,就可以实现RAID0、RAID1所读写并行的情况,读写均无需加锁。Since RAID0 (RAID LEVEL 0) and RAID1 (RAID LEVEL 1) do not have a verification unit, there are only steps of direct reading and direct writing to the disk, and there is no calculation process for using verification (for details, please refer to the CMU mentioned in the background technology. Two books published by the university), so the reading and writing in units of stripe units described in the present invention is also applicable to RAID0 and RAID1, and its reading method and writing method are similar to the method described in the present invention, and the difference is that all The process of calculating according to the rules described above is omitted. And according to the reading method and the writing method of the present invention, the parallel reading and writing of RAID0 and RAID1 can be realized, and no locking is required for reading and writing.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.

Claims (10)

1, the method for reading data of a kind of disk array RAID may further comprise the steps:
A, according to the current rule of reading, determine the sector, data place that will read;
B, determine stripe unit or checking data unit under the sector that to read, read each stripe unit and the checking data unit of determining, deposit buffer memory in from disk;
C, judge whether current reading is normal read, if, execution in step D then; Otherwise, according to the current rule of reading, use the stripe unit of buffer memory and checking data unit to calculate and generate the affiliated stripe unit of institute's reading of data of wanting, be stored in buffer memory;
D, the stripe unit from buffer memory read out needed data.
2, the data write method of a kind of disk array RAID may further comprise the steps:
A, according to the current rule of writing, determine the sector, data place that will read in advance;
B, determine and to read stripe unit or checking data unit under the sector in advance, read each stripe unit and the checking data unit of determining, deposit buffer memory in from disk;
Stripe unit corresponding in C, the data that will write and the buffer memory is handled, and generates and contains the stripe unit that will write data, and the stripe unit as wanting write-back is stored in buffer memory;
D, according to the current rule of writing, utilize the stripe unit of wanting write-back of the stripe unit that is read out of buffer memory and checking data unit, generation to calculate and generate the checking data unit of wanting write-back, be stored in buffer memory;
E, with the stripe unit of want write-back, want the checking data unit of write-back to be written back in the corresponding disk.
3, method according to claim 2 is characterized in that, steps A is described according to the current rule of writing, and determines the sector, data place that will read in advance and comprises:
Judge that the described sector of determining comprises: pairing sector of the data that will write and sector, corresponding check data place when being written as small letter;
Judge that the described sector of determining comprises: will write the pairing sector of data when being written as capitalization;
Judge to be written as and rebuild when writing that the described sector of determining comprises: rebuild write write rule the sector of reading in advance that requires and will write the pairing sector of data;
When judging that be written as degradation writes, the described sector of determining comprises: degradation is write writes rule and requires the sector and the sector, checking data place of reading in advance.
4, a kind of disk array RAID's based on the method for reading data in the write data process, wherein, write data comprises that the data place stripe unit that will will write reads in the buffer memory, computing generates and contains reading in advance of the stripe unit that will write data and checking data unit, the write-back that the stripe unit that generates and checking data unit are write disk; Described method for reading data may further comprise the steps:
A, according to the current rule of reading, judge that whether storing all in the buffer memory wants stripe unit under the reading of data, if, execution in step C then; Otherwise, execution in step B;
B, determine the stripe unit under the reading of data wanted that is not stored in the buffer memory; From disk, read the described stripe unit of determining, deposit buffer memory in;
C, judge whether current reading is normal read, if, execution in step D then; Otherwise, according to the current rule of reading, use the stripe unit of buffer memory and checking data unit to calculate and generate the affiliated stripe unit of institute's reading of data of wanting, be stored in buffer memory;
D, from the stripe unit of buffer memory, take out needed data.
5, method according to claim 4 is characterized in that, describedly is written as capitalization, small letter, reconstruction is write or demote and write.
6, method according to claim 4 is characterized in that, the described stripe unit of step D is the stripe unit of reading in advance of writing process, perhaps the stripe unit of wanting write-back for calculating after reading in advance.
7, a kind of disk array RAID based on the data write method in the normal read data procedures, wherein, the normal read data comprise desired data place stripe unit are read in the buffer memory, take out/calculate desired data and offer the user from the stripe unit of buffer memory; Described data write method may further comprise the steps:
A, judge whether to store in the buffer memory and write all stripe units under that rule is determined, the data that will read in advance or/and the checking data unit according to current, if, execution in step C then; Otherwise execution in step B;
B, determine stripe unit under the data that are not stored in the buffer memory or/and the checking data unit; From disk, read the described stripe unit of determining or/and the checking data unit deposits buffer memory in;
Stripe unit corresponding in C, the data that will write and the buffer memory is handled, and generates and contains the stripe unit that will write data, and the stripe unit as wanting write-back is stored in buffer memory;
Then according to the rule of writing that is adopted, utilize the stripe unit of wanting write-back of the stripe unit that is read out of buffer memory and checking data unit, generation to calculate and generate the checking data unit of wanting write-back;
D, will need write-back stripe unit, want the checking data unit of write-back to be written back in the corresponding disk.
8, method according to claim 7 is characterized in that, steps A described according to current write under that rule is determined, the data that will read in advance all stripe units or/and the checking data unit comprise:
Judge that described stripe unit comprises when being written as small letter: stripe unit and checking data unit under the data that will write;
Judge that described stripe unit comprises when being written as capitalization: will write the affiliated stripe unit of data;
Judge to be written as and rebuild when writing that described stripe unit comprises: rebuild the affiliated stripe unit of writing of data of writing stripe unit under the rule institute pre-read data that requires and will writing;
When judging that be written as degradation writes, described stripe unit comprises: degradation is write writes rule and requires described stripe unit of data and the checking data unit read in advance.
9, method according to claim 7 is characterized in that, step D further comprises:
When the stripe unit that needs write-back is written back into corresponding disk, the stripe unit of write-back is during just for the current stripe unit that is reading of normal read data manipulation, use described write back operations to issue before this stripe unit of buffer memory as the current stripe unit that reads of described normal read data manipulation.
10, method according to claim 9 is characterized in that, described stripe unit is to write the stripe unit that process is read in advance, perhaps calculates the stripe unit of wanting write-back after reading in advance.
CNB2004100585825A 2004-08-18 2004-08-18 Read-write method for disc array data and parallel read-write method Expired - Lifetime CN1306381C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100585825A CN1306381C (en) 2004-08-18 2004-08-18 Read-write method for disc array data and parallel read-write method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100585825A CN1306381C (en) 2004-08-18 2004-08-18 Read-write method for disc array data and parallel read-write method

Publications (2)

Publication Number Publication Date
CN1737745A true CN1737745A (en) 2006-02-22
CN1306381C CN1306381C (en) 2007-03-21

Family

ID=36080550

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100585825A Expired - Lifetime CN1306381C (en) 2004-08-18 2004-08-18 Read-write method for disc array data and parallel read-write method

Country Status (1)

Country Link
CN (1) CN1306381C (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100451993C (en) * 2006-12-21 2009-01-14 威盛电子股份有限公司 Multi-source data processing method
CN101349979B (en) * 2008-09-05 2010-06-09 清华大学 Double-head user data update method for large-scale fault-tolerant disk array storage system
CN101976179A (en) * 2010-08-19 2011-02-16 北京同有飞骥科技有限公司 Construction method of vertical-type grouping parallel-distributed and checked disk array
CN101620517B (en) * 2009-08-04 2012-05-30 成都市华为赛门铁克科技有限公司 Data writing method and device
WO2012122915A1 (en) * 2011-03-14 2012-09-20 成都市华为赛门铁克科技有限公司 Method and apparatus for reading and writing data in file system
CN102902729A (en) * 2012-09-07 2013-01-30 大唐移动通信设备有限公司 Method and device for processing matrix data
CN103530068A (en) * 2013-10-22 2014-01-22 中经云数据存储科技(北京)有限公司 Data reading-writing method and control device for light storage array network
CN104021806A (en) * 2014-05-16 2014-09-03 华为技术有限公司 Data processing method and data processing equipment
CN104035830A (en) * 2014-06-24 2014-09-10 浙江宇视科技有限公司 Method and device for recovering data
CN104102594A (en) * 2014-07-15 2014-10-15 上海龙晶科技有限公司 System and method for controlling caching, reading and writing of image data
CN104778015A (en) * 2015-02-04 2015-07-15 北京神州云科数据技术有限公司 Disk array performance optimization method and system
CN106681939A (en) * 2017-01-03 2017-05-17 北京华胜信泰数据技术有限公司 Reading method and device for disk page
CN108958660A (en) * 2018-07-02 2018-12-07 深圳市茁壮网络股份有限公司 Distributed memory system and its data processing method and device
CN109032522A (en) * 2018-07-25 2018-12-18 浪潮电子信息产业股份有限公司 Data reading method of solid-state hard disk and solid-state hard disk
CN110196687A (en) * 2019-05-20 2019-09-03 杭州宏杉科技股份有限公司 Data read-write method, device, electronic equipment
CN111708485A (en) * 2020-05-24 2020-09-25 苏州浪潮智能科技有限公司 A method for reading and writing data in a storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210335A (en) * 1993-12-30 1995-08-11 Internatl Business Mach Corp <Ibm> Method for readout, write and change of data and storage apparatus
JP3431581B2 (en) * 2000-06-29 2003-07-28 株式会社東芝 Disk control system and data relocation method
US6928515B2 (en) * 2002-11-09 2005-08-09 International Business Machines Corporation Integrated sector format-error correction code system and method for efficient writing in a disk array system
US7010645B2 (en) * 2002-12-27 2006-03-07 International Business Machines Corporation System and method for sequentially staging received data to a write cache in advance of storing the received data

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100451993C (en) * 2006-12-21 2009-01-14 威盛电子股份有限公司 Multi-source data processing method
CN101349979B (en) * 2008-09-05 2010-06-09 清华大学 Double-head user data update method for large-scale fault-tolerant disk array storage system
CN101620517B (en) * 2009-08-04 2012-05-30 成都市华为赛门铁克科技有限公司 Data writing method and device
CN101976179A (en) * 2010-08-19 2011-02-16 北京同有飞骥科技有限公司 Construction method of vertical-type grouping parallel-distributed and checked disk array
US9116638B2 (en) 2011-03-14 2015-08-25 Huawei Technologies Co., Ltd. Method and apparatus for reading and writing data in file system
WO2012122915A1 (en) * 2011-03-14 2012-09-20 成都市华为赛门铁克科技有限公司 Method and apparatus for reading and writing data in file system
CN102902729A (en) * 2012-09-07 2013-01-30 大唐移动通信设备有限公司 Method and device for processing matrix data
CN103530068A (en) * 2013-10-22 2014-01-22 中经云数据存储科技(北京)有限公司 Data reading-writing method and control device for light storage array network
CN103530068B (en) * 2013-10-22 2017-02-08 中经云数据存储科技(北京)有限公司 Data reading-writing method and control device for light storage array network
CN104021806A (en) * 2014-05-16 2014-09-03 华为技术有限公司 Data processing method and data processing equipment
CN104035830B (en) * 2014-06-24 2017-12-15 浙江宇视科技有限公司 A kind of data reconstruction method and device
CN104035830A (en) * 2014-06-24 2014-09-10 浙江宇视科技有限公司 Method and device for recovering data
CN104102594A (en) * 2014-07-15 2014-10-15 上海龙晶科技有限公司 System and method for controlling caching, reading and writing of image data
CN104102594B (en) * 2014-07-15 2017-10-13 上海龙晶科技有限公司 Realize that view data caches the system and method for Read-write Catrol
CN104778015A (en) * 2015-02-04 2015-07-15 北京神州云科数据技术有限公司 Disk array performance optimization method and system
CN104778015B (en) * 2015-02-04 2018-02-16 深圳神州数码云科数据技术有限公司 A kind of performance of disk arrays optimization method and system
CN106681939A (en) * 2017-01-03 2017-05-17 北京华胜信泰数据技术有限公司 Reading method and device for disk page
CN106681939B (en) * 2017-01-03 2019-08-23 北京华胜信泰数据技术有限公司 Reading method and device for disk page
CN108958660A (en) * 2018-07-02 2018-12-07 深圳市茁壮网络股份有限公司 Distributed memory system and its data processing method and device
CN109032522A (en) * 2018-07-25 2018-12-18 浪潮电子信息产业股份有限公司 Data reading method of solid-state hard disk and solid-state hard disk
CN109032522B (en) * 2018-07-25 2021-06-29 浪潮电子信息产业股份有限公司 Data reading method of solid-state hard disk and solid-state hard disk
CN110196687A (en) * 2019-05-20 2019-09-03 杭州宏杉科技股份有限公司 Data read-write method, device, electronic equipment
CN111708485A (en) * 2020-05-24 2020-09-25 苏州浪潮智能科技有限公司 A method for reading and writing data in a storage medium

Also Published As

Publication number Publication date
CN1306381C (en) 2007-03-21

Similar Documents

Publication Publication Date Title
CN1306381C (en) Read-write method for disc array data and parallel read-write method
CN1191518C (en) Converted Redundant Array of Inexpensive Disks for Hierarchical Storage Management Systems
US10459808B2 (en) Data storage system employing a hot spare to store and service accesses to data having lower associated wear
US8560881B2 (en) FLASH-based memory system with static or variable length page stripes including data protection information and auxiliary protection stripes
JP6855102B2 (en) Recovery from multi-page failure in non-volatile memory systems
KR101445025B1 (en) Efficient raid scheme for reliable ssd
US9990263B1 (en) Efficient use of spare device(s) associated with a group of devices
US20180165169A1 (en) Data storage system employing a hot spare to proactively store array data in absence of a failure or pre-failure event
US10942849B2 (en) Use of a logical-to-logical translation map and a logical-to-physical translation map to access a data storage device
CN1679000A (en) Using file system information in raid data reconstruction and migration
US20140379990A1 (en) Cache node processing
US20140325262A1 (en) Controlling data storage in an array of storage devices
US20110264949A1 (en) Disk array
US20110040927A1 (en) Method and Apparatus for Performing Enhanced Read and Write Operations in a FLASH Memory System
US20140195725A1 (en) Method and system for data storage
CN1728076A (en) Logical disk management method and apparatus
CN1512353A (en) Performance improved data storage and method
US9921913B2 (en) Flushing host cache data before rebuilding degraded redundant virtual disk
US20170277450A1 (en) Lockless parity management in a distributed data storage system
CN1950801A (en) Method and system for storing data in an array of storage devices with additional and autonomic protection
CN1624670A (en) Method of local data migration
US20140173223A1 (en) Storage controller with host collaboration for initialization of a logical volume
CN1655127A (en) Media scanning operation method and device for storage system
CN1815455A (en) Storage system and method for maintaining bad storage device data
US10162573B2 (en) Storage management system, storage management method, storage medium and information processing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term
CX01 Expiry of patent term

Granted publication date: 20070321