[go: up one dir, main page]

CN104407815A - Method and device for bad sector processing in RAID5 disk array - Google Patents

Method and device for bad sector processing in RAID5 disk array Download PDF

Info

Publication number
CN104407815A
CN104407815A CN201410683240.6A CN201410683240A CN104407815A CN 104407815 A CN104407815 A CN 104407815A CN 201410683240 A CN201410683240 A CN 201410683240A CN 104407815 A CN104407815 A CN 104407815A
Authority
CN
China
Prior art keywords
bitmap
bad sector
raid5
disk
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410683240.6A
Other languages
Chinese (zh)
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.)
IEIT Systems Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201410683240.6A priority Critical patent/CN104407815A/en
Publication of CN104407815A publication Critical patent/CN104407815A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

本发明提供一种RAID5磁盘阵列中坏扇区处理的方法和装置,属于数据容错存储技术领域,本发明RAID5磁盘阵列增加一块预留盘,阵列位图标示磁盘的坏扇区。读写遇到坏扇区,将坏扇区数据转移到预留盘的同等位置,并置位位图;位图扫描遇到坏扇区,读写操作从预留盘的同等位置上读取。由此提高RAID5阵列的存储性能和可靠性。

The invention provides a method and device for processing bad sectors in a RAID5 disk array, belonging to the technical field of data fault-tolerant storage. The RAID5 disk array of the invention adds a reserved disk, and the array bitmap indicates the bad sectors of the disk. When reading and writing encounter a bad sector, transfer the bad sector data to the same position on the reserved disk, and set the bitmap; when the bitmap scan encounters a bad sector, read and write operations read from the same position on the reserved disk . This improves the storage performance and reliability of the RAID5 array.

Description

一种RAID5磁盘阵列中坏扇区处理的方法和装置Method and device for bad sector processing in RAID5 disk array

技术领域 technical field

本发明涉及数据容错存储技术,尤其涉及到RAID5磁盘阵列中坏扇区掉盘修复和快速重构的方法和装置。  The invention relates to a data fault-tolerant storage technology, in particular to a method and a device for repairing bad sector lost disks and fast reconstruction in a RAID5 disk array. the

背景技术 Background technique

RAID技术就是利用容量比较小的磁盘按一定的规则组成一个大容量的磁盘阵列向外提供存储资源,RAID(Redundant Array of Independent Disks)就被称为独立冗余磁盘阵列。 RAID technology is to use relatively small-capacity disks to form a large-capacity disk array according to certain rules to provide external storage resources. RAID (Redundant Array of Independent Disks) is called an independent redundant disk array.

使用RAID的主要目有: The main purposes of using RAID are:

(1)对磁盘上的数据进行冗余存储,实现容错功能; (1) Redundant storage of data on the disk to achieve fault tolerance;

(2)有I/O请求时,可以对磁盘进行并发访问,提高吞吐率。 (2) When there is an I/O request, the disk can be accessed concurrently to improve the throughput.

RAID5支持冗余,在阵列中的所有磁盘上都存储检验信息,其校验和技术是在磁盘条带中采用异或校验,被称作为“采用块交叉访问及校验信息均匀分布”模式。 RAID5 supports redundancy, and stores verification information on all disks in the array. Its verification and technology uses XOR verification in disk stripes, which is called "using block cross access and uniform distribution of verification information" mode .

条带是RAID成员盘的存储空间被划分为大小相等的小空间。 A stripe is the division of the storage space of a RAID member disk into smaller spaces of equal size.

异或运算特征为A⊕B = C  ==>  B⊕C = A,A⊕C = B; XOR operation is characterized by A⊕B = C ==> B⊕C = A, A⊕C = B;

因此如果A、B为数据块,C为校验块,当B所在的盘失效后,能够通过A和C异或校验计算出B。这是RAID5容错的最基本原理,可以容忍一块磁盘故障。 Therefore, if A and B are data blocks, and C is a check block, when the disk where B is located fails, B can be calculated through the XOR check of A and C. This is the most basic principle of RAID5 fault tolerance, which can tolerate a disk failure.

RAID5读写操作是以条带为基本单位,条带的宽度为4KB,条带的长度为成员磁盘个数。对于条带中磁盘数据的写操作,都要更新校验盘数据,以确保条带数据的一致性。 RAID5 read and write operations take stripes as the basic unit, the width of the stripe is 4KB, and the length of the stripe is the number of member disks. For the write operation of the disk data in the stripe, the parity disk data must be updated to ensure the consistency of the stripe data.

目前RAID5读写操作遇到坏扇区的时候,将有坏扇区的磁盘从RAID5磁盘阵列中剔除,RAID5降级失去容错能力,此时热备盘顶上去,整个RAID5阵列全盘做重构操作,通过其他数据盘的异或校验得到被剔除盘上的数据,写入热备盘中,重构完成后,热备盘替换剔除盘,整个RAID5阵列又恢复了容错机制。但是,RAID5阵列在做全盘重构的时候,相当于将整个阵列空间的数据全部做了一遍同步校验,整个工作比较耗时耗力,不但影响阵列的读写性能,如果在重构过程中,又遇到一块磁盘有坏扇区,会将此坏扇区的磁盘从RAID5阵列中剔除,导致RAID5掉两块盘,整个阵列失效,所有的数据会丢失。 At present, when a RAID5 read and write operation encounters a bad sector, the disk with the bad sector will be removed from the RAID5 disk array, and the RAID5 will lose its fault tolerance when it is downgraded. The data on the deleted disk is obtained through the XOR check of other data disks, and written into the hot spare disk. After the reconstruction is completed, the hot spare disk replaces the deleted disk, and the fault tolerance mechanism of the entire RAID5 array is restored. However, when a RAID5 array is fully reconfigured, it is equivalent to performing a synchronous check on all the data in the entire array space. The whole work is time-consuming and labor-intensive, which not only affects the read and write performance of the array, , When another disk has a bad sector, the disk with the bad sector will be removed from the RAID5 array, resulting in the loss of two disks in RAID5, the entire array will fail, and all data will be lost.

RAID5的热备盘全盘重构操作,不但影响阵列读写性能,而且影响阵列的可靠性。  The full-disk reconstruction operation of the hot spare disk in RAID5 not only affects the read and write performance of the array, but also affects the reliability of the array. the

发明内容 Contents of the invention

本发明实施提出一种RAID5磁盘阵列中坏扇区处理的方法和装置,可有效的减少RAID5热备盘全盘重构带来的性能影响,和快速的恢复出坏扇区上的数据。本发明实施例还提供了相应的装置。 The implementation of the present invention proposes a method and device for processing bad sectors in a RAID5 disk array, which can effectively reduce the performance impact caused by the reconstruction of the entire disk of the RAID5 hot spare disk, and quickly restore the data on the bad sectors. The embodiment of the invention also provides a corresponding device.

本发明第一方面提供一种RAID5磁盘阵列中坏扇区处理的方法,包括: The first aspect of the present invention provides a kind of method of bad sector processing in RAID5 disk array, comprising:

1、RAID5磁盘阵列支持(X+1)块硬盘,X为数据盘的数量,1为坏扇数据转移预留盘。 1. The RAID5 disk array supports (X+1) hard disks, where X is the number of data disks, and 1 is the disk reserved for bad sector data transfer.

2、RAID5位图标记记录磁盘中哪块区域是坏扇区。 2. The RAID5 bitmap mark records which area in the disk is a bad sector.

3、对RAID5进行读写操作之前,先检查此区域的位图标示,如果位图无标示,就进入正常读写操作。 3. Before performing read and write operations on RAID5, first check the bitmap indication of this area. If there is no indication on the bitmap, enter normal read and write operations.

4、当读操作遇到一磁盘坏扇区,用位图标记此区域为坏扇区,通过RAID5的条带异或运算,校验出坏扇区上的数据,将此数据写入预留盘的同等位置。 4. When the read operation encounters a bad sector of the disk, mark this area as a bad sector with a bitmap, and verify the data on the bad sector through the stripe XOR operation of RAID5, and write this data into the reserved the same position on the disk.

5、当写操作遇到一磁盘坏扇区,用位图标记此区域为坏扇区,将要写的数据写入预留盘的同等位置。 5. When the write operation encounters a bad sector of the disk, mark this area as a bad sector with a bitmap, and write the data to be written into the same position on the reserved disk.

6、当检查位图区域有标示,就从预留盘同位置读取进行读写操作。 6. When the bitmap area is checked, read and write from the same position on the reserved disk.

本发明第二方面提供一种RAID5磁盘阵列中坏扇区处理的装置,包括: A second aspect of the present invention provides a device for bad sector processing in a RAID5 disk array, including:

1)、RAID5磁盘阵列由数据盘和预留盘组成; 1), RAID5 disk array is composed of data disk and reserved disk;

2)、位图扫描单元,负责在读写操作之前,扫描位图标示,当遇到坏扇区的时候,置位位图标示; 2) The bitmap scanning unit is responsible for scanning the bitmap indication before reading and writing operations, and setting the bitmap indication when encountering a bad sector;

3)、数据迁移单元,当读写遇到坏扇区的时候,将校验的到的数据或者将要写的数据迁移到预留盘同等位置。  3) The data migration unit, when reading and writing encounters a bad sector, migrates the verified data or the data to be written to the same position on the reserved disk. the

附图说明 Description of drawings

图1是RAID5结构图。 Figure 1 is a RAID5 structure diagram.

图2是RAID5坏扇区处理方法示意图。 FIG. 2 is a schematic diagram of a RAID5 bad sector processing method.

具体实施方式 Detailed ways

下面对本发明的内容进行更加详细的阐述: The content of the present invention is described in more detail below:

本发明实施例提供一种RAID5磁盘阵列中坏扇区处理的方法,可在RAID5阵列遇到坏扇区的时候,不剔除坏扇区的硬盘,不进行热备盘重构,将坏扇区数据转移到预留盘的同等位置,并屏蔽次坏扇区操作,减少了RAID5热备盘重构带来的性能损耗和增加了阵列的可靠性。 The embodiment of the present invention provides a method for processing bad sectors in a RAID5 disk array. When the RAID5 array encounters a bad sector, the hard disk with the bad sector will not be removed, and the hot spare disk will not be reconfigured, and the bad sector will be removed. The data is transferred to the same position on the reserved disk, and the second bad sector operation is shielded, which reduces the performance loss caused by the reconstruction of the RAID5 hot spare disk and increases the reliability of the array.

其操作步骤为: Its operation steps are:

RAID5磁盘阵列在创建的时候,加入一块用于坏扇区转移的预留磁盘,位图区域用于标示RAID5磁盘阵列的坏扇区,当对RAID5进行读写的时候,位图扫描单元先扫描位图区域,查看标示: When the RAID5 disk array is created, a reserved disk for bad sector transfer is added. The bitmap area is used to mark the bad sectors of the RAID5 disk array. When reading and writing to RAID5, the bitmap scanning unit first scans Bitmap area, check the mark:

1、如果此读写区域没有标示,就直接读写操作; 1. If the read-write area is not marked, read and write directly;

当读操作遇到坏扇区的时候,位图扫描单元将此区域对应的位图置位,并通过条带校验得到坏扇区上的数据,并将数据写入预留盘的同等位置上。当写操作遇到扇区的时候,位图扫描单元将此区域对应的位图置位,并将要写的数据写入预留盘同等位置上; When a read operation encounters a bad sector, the bitmap scanning unit sets the bitmap corresponding to this area, and obtains the data on the bad sector through stripe verification, and writes the data to the same position on the reserved disk superior. When a write operation encounters a sector, the bitmap scanning unit sets the bitmap corresponding to this area, and writes the data to be written to the same position on the reserved disk;

2、如果此读写区域有标示,就从预留磁盘的同等位置上读写数据。 2. If the read-write area is marked, read and write data from the same position on the reserved disk.

Claims (7)

1. a method for bad sector process in RAID5 disk array, is characterized in that, comprising:
The reserved dish of data batchmove is fanned containing 1 piece for bad in RAID5 disk array;
In RAID5 bitmap label record disk, which block region is bad sector;
Before read-write operation is carried out to RAID5, first check that the bitmap in this region indicates, if bitmap is without sign, just enter normal read-write operation;
When read operation runs into a disk bad sector, marking this region with bitmap is bad sector, by the band XOR of RAID5, verifies out the data in bad sector, by the equivalent locations of reserved for the write of these data dish;
When write operation runs into a disk bad sector, marking this region with bitmap is bad sector, the equivalent locations of the reserved dish of the data that will write write;
When inspection bitmap region has sign, just read from reserved dish co-located and carry out read-write operation.
2. method according to claim 1, is characterized in that,
RAID5 disk array containing X+1 block hard disk, X is data disks quantity, and 1 fans data batchmove for bad
Reserved dish.
3. according to the requirement of right 1, it is characterized in that, also comprise:
RAID5 bitmap is present in the end of each member dish, coils corresponding bad sector for indicating this member.
4. method according to claim 1, is characterized in that,
First sweep bitmap region before RAID5 read-write operation, the bitmap reading and writing region corresponding is 1, shows that this region is bad sector, if bitmap is 0, shows that this region is normal sector.
5. method according to claim 1, is characterized in that,
The treatment scheme of bad sector is met in read-write: running into bad sector when reading RAID5 operation, indicating the bitmap of corresponding region, and the data in exclusive or check bad sector, and by this data batchmove to reserved disk peer area; When write operation runs into a disk bad sector, marking this region with bitmap is bad sector, the peer area of the reserved dish of the data that will write write.
6. method according to claim 1, is characterized in that,
Bitmap scans the treatment scheme of bad sector: when inspection bitmap region has sign, just reads from reserved dish co-located and carries out read-write operation.
7. a device for bad sector process in RAID5 disk array, is characterized in that, comprising:
(1), RAID5 disk array, be made up of data disks and reserved dish;
(2), bitmap scanning element, be responsible for before read-write operation, sweep bitmap indicate, in time running into bad sector, set bitmap indicate;
(3), data migration unit, when read and write run into bad sector time, by verification to data or the Data Migration that will write coil equivalent locations to reserved.
CN201410683240.6A 2014-11-25 2014-11-25 Method and device for bad sector processing in RAID5 disk array Pending CN104407815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410683240.6A CN104407815A (en) 2014-11-25 2014-11-25 Method and device for bad sector processing in RAID5 disk array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410683240.6A CN104407815A (en) 2014-11-25 2014-11-25 Method and device for bad sector processing in RAID5 disk array

Publications (1)

Publication Number Publication Date
CN104407815A true CN104407815A (en) 2015-03-11

Family

ID=52645448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410683240.6A Pending CN104407815A (en) 2014-11-25 2014-11-25 Method and device for bad sector processing in RAID5 disk array

Country Status (1)

Country Link
CN (1) CN104407815A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183623A (en) * 2015-08-25 2015-12-23 浙江宇视科技有限公司 Method and apparatus for improving VDG reconstruction performance based on hot standby VD
CN106610788A (en) * 2015-10-26 2017-05-03 华为技术有限公司 Hard disk array control method and device
CN106933490A (en) * 2015-12-29 2017-07-07 伊姆西公司 The method and apparatus that control is written and read operation to disk array
CN107562569A (en) * 2016-06-30 2018-01-09 杭州海康威视数字技术股份有限公司 A kind of data reconstruction method and device
CN109634768A (en) * 2018-12-10 2019-04-16 浪潮(北京)电子信息产业有限公司 A kind of disk failure processing method, system and electronic equipment and storage medium
CN109725835A (en) * 2017-10-27 2019-05-07 伊姆西Ip控股有限责任公司 For managing the method, equipment and computer program product of disk array

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929795A (en) * 2012-10-31 2013-02-13 飞天诚信科技股份有限公司 NandFlash bad block management method
CN103678025A (en) * 2013-12-02 2014-03-26 创新科软件技术(深圳)有限公司 Method for processing disk failures of redundant arrays of independent disks
JP2014137702A (en) * 2013-01-16 2014-07-28 Toshiba Corp Disk array control device and disk array device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929795A (en) * 2012-10-31 2013-02-13 飞天诚信科技股份有限公司 NandFlash bad block management method
JP2014137702A (en) * 2013-01-16 2014-07-28 Toshiba Corp Disk array control device and disk array device
CN103678025A (en) * 2013-12-02 2014-03-26 创新科软件技术(深圳)有限公司 Method for processing disk failures of redundant arrays of independent disks

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183623A (en) * 2015-08-25 2015-12-23 浙江宇视科技有限公司 Method and apparatus for improving VDG reconstruction performance based on hot standby VD
CN105183623B (en) * 2015-08-25 2018-12-07 浙江宇视科技有限公司 A kind of method and apparatus that VDG reconstruction performance is improved based on hot standby VD
CN106610788A (en) * 2015-10-26 2017-05-03 华为技术有限公司 Hard disk array control method and device
CN106933490A (en) * 2015-12-29 2017-07-07 伊姆西公司 The method and apparatus that control is written and read operation to disk array
US10613770B2 (en) 2015-12-29 2020-04-07 EMC IP Holding Company LLC Method and apparatus for controlling access to a disk array
CN107562569A (en) * 2016-06-30 2018-01-09 杭州海康威视数字技术股份有限公司 A kind of data reconstruction method and device
CN109725835A (en) * 2017-10-27 2019-05-07 伊姆西Ip控股有限责任公司 For managing the method, equipment and computer program product of disk array
CN109725835B (en) * 2017-10-27 2022-04-29 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing disk array
CN109634768A (en) * 2018-12-10 2019-04-16 浪潮(北京)电子信息产业有限公司 A kind of disk failure processing method, system and electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN104484251B (en) A kind of processing method and processing device of hard disk failure
CN102708019B (en) Method, device and system for hard disk data recovery
CN103164298B (en) Produce the data storage device of the redundancy protected for the data path of even-odd check sector
CN104035830B (en) A kind of data reconstruction method and device
CN103718162B (en) Method and apparatus for flexible RAID in SSD
CN104407815A (en) Method and device for bad sector processing in RAID5 disk array
CN101984400B (en) RAID control method, device and system
CN102799533B (en) Method and apparatus for shielding damaged sector of disk
CN103513942B (en) The reconstructing method of raid-array and device
CN101840360A (en) Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
CN103870352B (en) Method and system for data storage and reconstruction
CN103186438A (en) Method of improving disk array data reconstruction efficiency
CN101916173A (en) RAID (Redundant Array of Independent Disks) based data reading and writing method and system thereof
CN101609420A (en) Realize method and the redundant arrays of inexpensive disks and the controller thereof of rebuilding of disc redundant array
CN104246708A (en) Architecture for storage of data on nand flash memory
CN103544082B (en) The method of storage device data recovery is realized based on flash chip
CN107885620B (en) Method and system for improving performance and reliability of solid-state disk array
JP4114877B2 (en) Apparatus, method, and program for detecting illegal data
CN102981936A (en) Method for reconstructing disk array data
CN103530069A (en) Method for processing bad sectors of RAID5 disk array
EP2889751B1 (en) Method and apparatus for determining redundant array of independent disks
KR20140086223A (en) Parity re-synchronization sturcture of disk array and the method thereof
CN102789370A (en) Method and device for synchronizing redundant array of independent disks (RAID)
CN102945191B (en) A kind of method of RAID5 data batchmove
CN102609223B (en) Redundant array of independent disk system and initializing method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150311