CN103530069A - Method for processing bad sectors of RAID5 disk array - Google Patents

Method for processing bad sectors of RAID5 disk array Download PDF

Info

Publication number
CN103530069A
CN103530069A CN201310542533.8A CN201310542533A CN103530069A CN 103530069 A CN103530069 A CN 103530069A CN 201310542533 A CN201310542533 A CN 201310542533A CN 103530069 A CN103530069 A CN 103530069A
Authority
CN
China
Prior art keywords
sector
record
disk
bad
internal memory
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
CN201310542533.8A
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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing 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 Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201310542533.8A priority Critical patent/CN103530069A/en
Publication of CN103530069A publication Critical patent/CN103530069A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method for processing bad sectors of an RAID5 disk array. A 4KB bad block recording space is added to a super block of each RAID member disk to record the positions of the bad sectors in all the member disks when the RAID5 disk array is set up. When the RAID5 disk array is started, data of the recording space of bad blocks in each member disk are mapped to a memory, a bad block table is set up in the memory, and the corresponding operation is conducted according to the record of a disc sector in the memory bad block table when the write operation of the disk sector is executed and when errors occur in the process of executing the read operation of the disk sector. According to the method, when the bad sectors appear in the disks, the disks do not need to be removed, only the bad sectors need to be marked, the bad sectors do not need to be read or written, stability of the RAID5 disk array is greatly improved, the service life of the disk array is prolonged, the use ratio of stored resources is improved, and reliability of data is ensured.

Description

A kind of RAID5 disk array bad sector disposal route
Technical field
The present invention relates to disk array technology field, be specifically related to a kind of RAID5 disk array bad sector disposal route.
Background technology
RAID technology is exactly to utilize the smaller disk of capacity to form a jumbo disk array by certain rule outwards to provide storage resources, and RAID (Redundant Array of Independent Disks) is just called as raid-array.
Use the fundamental purpose of RAID to have:
(1) data on disk are carried out to redundant storage, realize fault tolerance.
(2) while having I/O request, can carry out Concurrency Access to disk, improve throughput.
As shown in Figure 1, RAID5 supports redundancy, memory check information all on all disks in array, and its verification and technology are to adopt exclusive or check in disk band, are called " adopting piece interleaving access and check information to be uniformly distributed " pattern.Band is that the storage space of RAID member's dish is divided into equal-sized little space.XOR is characterized as A ⊕ B=C==> B ⊕ C=A, A ⊕ C=B.Therefore, if A, B are data block, C is check block, after the dish at B place lost efficacy, can calculate B by A and C exclusive or check.This is the fault-tolerant ultimate principle of RAID5, can tolerate a disk failure.
RAID5 read-write operation is to take band as base unit, and the width of band is 4KB, and the length of band is member's disk number.For the write operation of data in magnetic disk in band, all to upgrade check disk data, to guarantee the consistance of strip data.
When RAID5 read-write operation runs into bad sector at present, will there is the disk of bad sector to reject from RAID5 disk array, RAID5 degradation, the RAID5 after degradation has lost fault-tolerant ability, but can also carry out read-write operation, and its read-write operation is as shown in Figures 2 and 3.If its member's dish of the RAID5 after degradation runs into bad sector again, the disk of this bad sector can be rejected from RAID5 array, because RAID5 falls two dishes, whole array lost efficacy, and all data can be lost.
While there is bad sector in two disks of current RAID5 technology in disk array, will cause whole array unavailable, loss of data, has wasted storage resources greatly, is also unfavorable for data security.
Summary of the invention
In order to solve the problems of the technologies described above, the present invention proposes a kind of RAID5 disk array bad sector disposal route, can improve reliability, the stability of RAID5 disk array, extend the life-span of array, improve utilization ratio of storage resources.
A disk array bad sector disposal route, comprising:
S1: when creating RAID5 disk array, increase the bad piece record space of 4KB in the superblock of each RAID member's disk, for recording the bad sector position of each member's disk;
S2: when RAID5 disk array starts, the data-mapping of the bad piece record space of each member's disk, in internal memory, is set up to a bad block table in internal memory;
S3: when carrying out disk sector write operation, according in described internal memory bad block table, the record of this disk sector being carried out to corresponding operation;
S4: when carrying out disk sector read operation, if run into sector read error, according in described internal memory bad block table, the record of this disk sector being carried out to corresponding operation.
Especially, corresponding operation described in described step S3 is specially and first in internal memory bad block table, checks whether described sector has left record, if confirm to have the record of described sector, just skips this sector, and data are write to other sector; If there is no the record of target sector in internal memory bad block table, data are write to this sector.
Especially, described in described step S4, corresponding operation is specially: first in internal memory bad block table, check whether target sector has left record, if there is record, skips and read other sector; If there is no record, the data exclusive or check by all the other disks in band obtains the data in this piece bad sector.
The invention has the beneficial effects as follows: the RAID5 bad sector disposal route that adopts the present invention to propose, while there is bad sector in disk, need not reject this disk, just mark bad sector, to it, need not read and write, improve greatly the stability of RAID5 disk array, extend disk array serviceable life, improve utilization ratio of storage resources, guarantee data reliability.
Accompanying drawing explanation
Fig. 1 is RAID5 structural drawing of the prior art.
Fig. 2 be in prior art after RAID5 degradation, the read operation of target sector on low-quality disk.
Fig. 3 be in prior art after RAID5 degradation, the write operation of target sector on low-quality disk.
Fig. 4 is that bad sector disposal route schematic diagram is met in the RAID5 read-write that the present invention proposes.
Embodiment
With reference to the accompanying drawings 4, content of the present invention is described to described method provided by the invention with an instantiation.
When creating RAID5 disk array, in the superblock of each RAID member's dish, increase the bad piece record space of 4KB, for recording the bad sector position of each member's dish.Every bad piece record represents with 64bit, and most significant digit represents whether this record is confirmed, if most significant digit set, the sector that this record is described is that bad sector is unavailable, otherwise is not; Low 9 is the size of the bad sector of this record expression; The start address that 54 of centres are bad sector.
When RAID5 disk array starts, the data-mapping of the bad piece record space of each member's disk, in internal memory, is set up to a bad block table in internal memory.In the time of RAID5 write operation, first in internal memory bad block table, check whether target sector has left record, if confirm to have the record of target sector, just skip this sector, data are write to other sector.If there is no the record of target sector in bad block table, just illustrate that this sector is normal, directly write with a brush dipped in Chinese ink.If write sector failure, this sector record is added in internal memory bad block table, indicate that this sector is that bad sector is unavailable.Add bad sector record and adopt binary chop insertion, bad piece record, according to the sector-size sequence of bad piece, can improve and search recall precision.In the time of RAID5 read operation, run into sector read error, first in internal memory bad block table, check whether target sector has left record, if there is record, skips and read other sector; If there is no record, illustrate on this piece sector and write data, can obtain by the data exclusive or check of all the other disks in band the data in this piece bad sector, and the data of acquisition are write on the sector that read operation mistake occurs again, if write operation is also failed, just this bad sector is added in bad block table.
The internal memory bad block table of each member's dish of RAID5 can, when RAID5 upgrades superblock, together be write with a brush dipped in Chinese ink with superblock in the bad piece record space of member's disk.
Certainly; the present invention also can have other various embodiments; in the situation that not deviating from spirit of the present invention and essence thereof; those of ordinary skill in the art are when making according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection domain of claim of the present invention.

Claims (6)

1. a RAID5 disk array bad sector disposal route, is characterized in that comprising:
S1: when creating RAID5 disk array, increase the bad piece record space of 4KB in the superblock of each RAID member's disk, for recording the bad sector position of each member's disk;
S2: when RAID5 disk array starts, the data-mapping of the bad piece record space of each member's disk, in internal memory, is set up to a bad block table in internal memory;
S3: when carrying out disk sector write operation, according in described internal memory bad block table, the record of this disk sector being carried out to corresponding operation;
S4: when carrying out disk sector read operation, if run into sector read error, according in described internal memory bad block table, the record of this disk sector being carried out to corresponding operation.
2. the method for claim 1, is characterized in that:
Corresponding operation described in described step S3 is specially and first in internal memory bad block table, checks whether described sector has left record, if confirm to have the record of described sector, just skips this sector, and data are write to other sector; If there is no the record of target sector in internal memory bad block table, data are write to this sector.
3. method as claimed in claim 1 or 2, is characterized in that:
Described step S3 also comprises, if current sector record is added in write operation failure in internal memory bad block table.
4. method as claimed in claim 3, is characterized in that:
Adopt binary chop insertion to add current sector record, and the sector of sorting in internal memory bad block table according to the size of sector.
5. the method for claim 1, is characterized in that:
Corresponding operation described in described step S4 is specially: first in internal memory bad block table, check whether target sector has left record, if there is record, skips and read other sector; If there is no record, the data exclusive or check by all the other disks in band obtains the data in this piece bad sector.
6. method as claimed in claim 5, is characterized in that:
Write operation failure the data of acquisition write on the sector that read operation mistake occurs again, if just will be added the record of this sector in internal memory bad block table.
CN201310542533.8A 2013-11-05 2013-11-05 Method for processing bad sectors of RAID5 disk array Pending CN103530069A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310542533.8A CN103530069A (en) 2013-11-05 2013-11-05 Method for processing bad sectors of RAID5 disk array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310542533.8A CN103530069A (en) 2013-11-05 2013-11-05 Method for processing bad sectors of RAID5 disk array

Publications (1)

Publication Number Publication Date
CN103530069A true CN103530069A (en) 2014-01-22

Family

ID=49932122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310542533.8A Pending CN103530069A (en) 2013-11-05 2013-11-05 Method for processing bad sectors of RAID5 disk array

Country Status (1)

Country Link
CN (1) CN103530069A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035840A (en) * 2014-06-12 2014-09-10 浙江宇视科技有限公司 Method and device for restoring stripe with read errors
CN105468479A (en) * 2015-11-18 2016-04-06 浙江大华技术股份有限公司 Method and device for processing bad blocks of redundant array of independent disk (RAID)
CN106250058A (en) * 2016-07-27 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of RAID maintaining method based on variable band and system
CN108804045A (en) * 2018-06-28 2018-11-13 郑州云海信息技术有限公司 A kind of bad block table method for building up and relevant apparatus
CN109634768A (en) * 2018-12-10 2019-04-16 浪潮(北京)电子信息产业有限公司 A kind of disk failure processing method, system and electronic equipment and storage medium
CN110289023A (en) * 2018-03-19 2019-09-27 株式会社东芝 Disk device and medium scanning method
CN110399247A (en) * 2019-07-19 2019-11-01 苏州浪潮智能科技有限公司 A kind of data reconstruction method, device, equipment and computer readable storage medium
CN110471625A (en) * 2019-08-15 2019-11-19 深圳忆联信息系统有限公司 Bad block message guard method, device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5088081A (en) * 1990-03-28 1992-02-11 Prime Computer, Inc. Method and apparatus for improved disk access
US5913927A (en) * 1995-12-15 1999-06-22 Mylex Corporation Method and apparatus for management of faulty data in a raid system
US6094317A (en) * 1996-12-31 2000-07-25 Samsung Electronics Co., Ltd. Method for controlling data reading/writing on random data section containing defective sector
CN102508620A (en) * 2011-12-01 2012-06-20 浪潮电子信息产业股份有限公司 Method for processing RAID5 (Redundant Array of Independent Disks) bad sector
CN102508724A (en) * 2011-10-25 2012-06-20 北京同有飞骥科技股份有限公司 Disk bad block processing method based on soft RAID (redundant array of independent disks)
CN102945191A (en) * 2012-11-15 2013-02-27 浪潮电子信息产业股份有限公司 RAID5 (redundant array of independent disk 5) data transfer method
CN103309775A (en) * 2013-07-03 2013-09-18 苏州科达科技股份有限公司 Fault-tolerance method for high-reliability disk array

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5088081A (en) * 1990-03-28 1992-02-11 Prime Computer, Inc. Method and apparatus for improved disk access
US5913927A (en) * 1995-12-15 1999-06-22 Mylex Corporation Method and apparatus for management of faulty data in a raid system
US6094317A (en) * 1996-12-31 2000-07-25 Samsung Electronics Co., Ltd. Method for controlling data reading/writing on random data section containing defective sector
CN102508724A (en) * 2011-10-25 2012-06-20 北京同有飞骥科技股份有限公司 Disk bad block processing method based on soft RAID (redundant array of independent disks)
CN102508620A (en) * 2011-12-01 2012-06-20 浪潮电子信息产业股份有限公司 Method for processing RAID5 (Redundant Array of Independent Disks) bad sector
CN102945191A (en) * 2012-11-15 2013-02-27 浪潮电子信息产业股份有限公司 RAID5 (redundant array of independent disk 5) data transfer method
CN103309775A (en) * 2013-07-03 2013-09-18 苏州科达科技股份有限公司 Fault-tolerance method for high-reliability disk array

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035840A (en) * 2014-06-12 2014-09-10 浙江宇视科技有限公司 Method and device for restoring stripe with read errors
CN105468479B (en) * 2015-11-18 2018-06-26 浙江大华技术股份有限公司 A kind of disk array RAID bad block processing methods and device
CN105468479A (en) * 2015-11-18 2016-04-06 浙江大华技术股份有限公司 Method and device for processing bad blocks of redundant array of independent disk (RAID)
CN106250058B (en) * 2016-07-27 2019-05-10 浪潮(北京)电子信息产业有限公司 A kind of RAID maintaining method and system based on variable bar band
CN106250058A (en) * 2016-07-27 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of RAID maintaining method based on variable band and system
CN110289023A (en) * 2018-03-19 2019-09-27 株式会社东芝 Disk device and medium scanning method
CN110289023B (en) * 2018-03-19 2021-06-01 株式会社东芝 Disk device and medium scanning method
CN108804045A (en) * 2018-06-28 2018-11-13 郑州云海信息技术有限公司 A kind of bad block table method for building up and relevant apparatus
CN108804045B (en) * 2018-06-28 2021-10-15 郑州云海信息技术有限公司 Bad block table establishing method and related device
CN109634768A (en) * 2018-12-10 2019-04-16 浪潮(北京)电子信息产业有限公司 A kind of disk failure processing method, system and electronic equipment and storage medium
CN110399247A (en) * 2019-07-19 2019-11-01 苏州浪潮智能科技有限公司 A kind of data reconstruction method, device, equipment and computer readable storage medium
CN110471625A (en) * 2019-08-15 2019-11-19 深圳忆联信息系统有限公司 Bad block message guard method, device, computer equipment and storage medium
CN110471625B (en) * 2019-08-15 2021-04-20 深圳忆联信息系统有限公司 Bad block information protection method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103530069A (en) Method for processing bad sectors of RAID5 disk array
CN101276302B (en) Magnetic disc fault processing and data restructuring method in magnetic disc array system
US7917803B2 (en) Data conflict resolution for solid-state memory devices
CN100530125C (en) Safety storage method for data
CN101124639B (en) System and method of accessing non-volatile computer memory
CN101916173B (en) RAID (Redundant Array of Independent Disks) based data reading and writing method and system thereof
CN104035830A (en) Method and device for recovering data
CN102508733B (en) A kind of data processing method based on disk array and disk array manager
US10467074B2 (en) Conditional journal for storage class memory devices
US9367254B2 (en) Enhanced data verify in data storage arrays
CN104881370B (en) Collaboration uses correcting and eleting codes and the reliable flash-memory storage system construction method of error correcting code
CN103699337B (en) Writing control method and system based on independent redundant array of independent disks (RAID)
CN101609420A (en) Realize method and the redundant arrays of inexpensive disks and the controller thereof of rebuilding of disc redundant array
CN103034458A (en) Method and device for realizing redundant array of independent disks in solid-state drive
WO2010051002A1 (en) A loose coupling between raid volumes and drive groups for improved performance
CN111782439B (en) Double-disk circulation verification method based on horizontal coding
US20140164695A1 (en) Method and system for storing and rebuilding data
CN102968361A (en) RAID (Redundant Array of Independent Disk) data self-repairing method
CN102799533A (en) Method and apparatus for shielding damaged sector of disk
CN104503781A (en) Firmware upgrading method for hard disk and storage system
CN104407815A (en) Method and device for treating bad sector in RAID5 disk array
CN105302665A (en) Improved copy-on-write snapshot method and system
CN104407821A (en) Method and device for achieving RAID reconstitution
CN102495680A (en) Reconstruction method of RAID (Redundant Array of Independent Disks) system
CN105183590A (en) Disk array fault tolerance processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140122