CN116719484A - Method, device, equipment and medium for processing write data of disk array - Google Patents

Method, device, equipment and medium for processing write data of disk array Download PDF

Info

Publication number
CN116719484A
CN116719484A CN202310995030.XA CN202310995030A CN116719484A CN 116719484 A CN116719484 A CN 116719484A CN 202310995030 A CN202310995030 A CN 202310995030A CN 116719484 A CN116719484 A CN 116719484A
Authority
CN
China
Prior art keywords
data
write data
disk
stripe
target
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
CN202310995030.XA
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310995030.XA priority Critical patent/CN116719484A/en
Publication of CN116719484A publication Critical patent/CN116719484A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1076Parity data used in redundant arrays of independent storages, e.g. in RAID systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention relates to the technical field of data storage, and discloses a method, a device, equipment and a medium for processing write data of a disk array, wherein when a disk starts a reconstruction task, a target stripe corresponding to the write data is determined according to a logical address of the write data issued by a host and a set stripe width; and when the target stripe has the writing identification, judging whether the landing position of the writing data and the verification data hits the fault disc or not. And when the drop disc position of the write data or the verification data hits the fault disc, reconstructing the target strip, and then writing the write data into the target strip. By adding algorithm filtering to the reconstruction before writing of the written data, the identification is written to the stripe mark, and the record is recorded on which stripes have been written with the data. For the target stripe marked with the writing identification, the reconstruction before writing is executed only when the position of the writing data is on the fault disk or the corresponding check data is on the fault disk, so that the number of the reconstructions before writing is reduced, and the processing speed of storing the writing data is improved.

Description

Method, device, equipment and medium for processing write data of disk array
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method, an apparatus, a device, and a medium for processing write data of a disk array.
Background
Redundant array of independent disks (Redundant Array of Independent Disks, RAID) is a large capacity disk set made up of many disks. When there is no disk failure in the redundant array of independent disks, RAID will stripe data when the host writes to the IO (Input/Output), that is, the IO data is divided into one or more blocks according to the size of 256K of each disk, then the IO data and the data stored on the disk are used to calculate the check data P, Q through exclusive or, and finally the host IO data and the calculated check data P, Q are written to the disk at the same time. When one disk data of RAID is damaged, the damaged data can be recovered by utilizing IO data recorded on the rest data blocks and check data recorded on the check blocks.
In the RAID reconstruction process, when the host write IO is processed, if the stripe where the IO is detected is not reconstructed, the stripe is firstly reconstructed, and then the host write IO is processed, and the operation is called reconstruction before writing.
Because of the existence of reconstruction before writing, it is necessary to reconstruct the stripe before the RAID processes the host write IO, and then process the host write IO. Typically, it takes about 1 millisecond to process a host write IO and about 3 milliseconds to reconstruct a stripe. However, since there is reconstruction before writing, it takes about 4 milliseconds to write IO to the host after the original 1 millisecond has been processed. The processing speed of the write IO is reduced by about 75% compared with the original processing speed, the IOPS (Input/Output Operations Per Second number of processing IOs per second) performance of the storage device is greatly reduced, and the use experience of a user is seriously affected.
It can be seen how to increase the processing speed of write IOs is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, equipment and a computer readable storage medium for processing write data of a disk array, which can solve the problem of low write IO processing speed.
In order to solve the above technical problems, an embodiment of the present invention provides a write data processing method for a disk array, including:
under the condition that a disk starts a reconstruction task, determining a target stripe corresponding to write data according to a logical address of the write data issued by a host and a set stripe width;
judging whether the disk drop position of the write data and the check data thereof hits a fault disk or not under the condition that the target stripe has a write-in identifier; wherein the write identification is used to characterize that the target stripe has written data;
and under the condition that the drop disc position of the write data or the verification data hits the fault disc, the write data is written into the target strip after the target strip is reconstructed.
In one aspect, the method further comprises:
under the condition that a reconstruction task is not started, after receiving data to be written transmitted by a host, carrying out striping processing on the data to be written, and writing the data to be written after the striping processing into a disk;
Judging whether the stripe where the data to be written is located has a writing identification or not;
and setting a writing identifier for the stripe where the data to be written is located under the condition that the stripe where the data to be written is located does not have the writing identifier.
In one aspect, the method further comprises:
applying for metadata when creating a disk array, and setting all bits of the metadata as initial values; wherein one bit corresponds to one stripe;
correspondingly, the setting the writing identification for the stripe where the data to be written is located includes:
and adjusting bits corresponding to the stripe where the data to be written are located in the metadata to be a writing value.
In one aspect, the determining, according to the logical address of the write data issued by the host and the set stripe width, the target stripe corresponding to the write data includes:
receiving a logic address of write data issued by a host;
dividing the logical address with the set stripe width, and determining a target stripe corresponding to the write data based on the obtained quotient; wherein different businesses are used to characterize different strips.
On the one hand, after determining the target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width, the method further includes:
And under the condition that the target stripe does not have the writing identification, writing the striped writing data into the disk according to the logic address of the writing data.
In one aspect, the determining whether the landing position of the write data and the check data hits the failed disk includes:
determining a target data block corresponding to the write data according to the logical address of the write data issued by the host, the set stripe width and the number of the data blocks;
judging whether the disk to which the target data block belongs is a fault disk or not;
and judging whether the disk where the verification data of the write data is located is a fault disk or not under the condition that the disk where the target data block is not located is the fault disk.
In one aspect, the determining, according to the logical address of the write data issued by the host, the set stripe width and the number of data blocks, the target data block corresponding to the write data includes:
determining the data block width of each data block based on the stripe width and the number of the data blocks;
and dividing the logical address and the data block width, and determining a target data block corresponding to the write data based on the obtained quotient.
In one aspect, when the drop position of the write data or the check data hits the failed disk, the reconstructing the target stripe and then writing the write data into the target stripe includes:
And under the condition that the disk to which the target data block belongs is a fault disk or the disk to which the verification data of the write data belongs is a fault disk, the write data is written into the target stripe after the target stripe is reconstructed.
In one aspect, the writing the write data to the target stripe after the reconstructing the target stripe includes:
reconstructing data of a failed disk based on non-failed data on the target stripe; wherein the non-failure data includes data remaining on the target stripe other than data of the failed disk;
and writing the striped write data into the disk according to the logical address of the write data and the reconstructed data of the fault disk.
In one aspect, the method further comprises:
and writing the striped write data into the disk according to the logical address of the write data under the condition that the disk to which the target data block belongs is not a fault disk and the disk to which the check data of the write data belongs is not a fault disk.
In one aspect, writing the striped write data to the disk according to the logical address of the write data includes:
reading the original data on the target data block and the original verification data on the target stripe;
Determining new check data based on the original data, the original check data and the write data;
and writing the write data and the new check data into the corresponding positions of the target stripes.
In one aspect, the writing the write data and the new parity data to corresponding locations of the target stripe includes:
and writing the write data into the target data block, and writing the new check data into the check block of the target stripe.
On the one hand, after determining the target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width, the method further includes:
writing the striped write data into a disk according to the logic address of the write data under the condition that the data volume ratio of the write data on the target stripe meets the set ratio condition;
and executing the step of judging whether the landing positions of the write data and the verification data thereof hit a fault disc or not under the condition that the target stripe has a write-in identifier under the condition that the data volume ratio of the write data on the target stripe does not meet the set ratio condition.
In one aspect, when the data amount ratio of the write data on the target stripe satisfies a set ratio condition, writing the striped write data to the disk according to the logical address of the write data includes:
Judging whether the write data covers the whole target stripe or not;
and under the condition that the write data covers the whole target stripe, writing the striped write data into the disk according to the logic address of the write data.
In one aspect, the method further comprises:
judging whether the data amount of the write data is larger than a set threshold value or not under the condition that the write data does not cover the whole target stripe; wherein the threshold is set based on a swath width of the target swath;
and under the condition that the data volume of the write data is larger than or equal to a set threshold value, the write data and the original data in the target stripe are pieced together and then written into a disk.
In one aspect, the step of determining whether the landing position of the write data and the check data thereof hits the failed disk in the case that the target stripe has the write identifier is performed in the case that the data amount ratio of the write data on the target stripe does not satisfy the set ratio condition, includes:
and executing the step of judging whether the landing position of the write data and the verification data thereof hits the fault disc or not under the condition that the target stripe has the write identification under the condition that the data volume of the write data is smaller than a set threshold value.
In one aspect, when the data amount of the write data is greater than or equal to a set threshold, writing the write data and the original data in the target stripe to the disk after the data amount is pieced together includes:
and under the condition that the data volume of the write data is greater than or equal to one half of the stripe width of the target stripe, the write data and the original data in the target stripe are pieced together and then written into a disk.
In one aspect, the writing the write data and the original data in the target stripe to the disk after the stitching includes:
reading the original data in the target strip;
performing exclusive OR operation on the original data and the write data to obtain new check data;
and writing the write data and the new check data into the corresponding positions of the target stripes.
In one aspect, the reading the original data in the target stripe includes:
and reserving the original data in the target strip in the disk, and reading the original data in the target strip to a memory space.
The embodiment of the invention also provides a write data processing device of the disk array, which comprises a stripe determining unit, a fault disk judging unit and a reconstruction writing unit;
the stripe determining unit is used for determining a target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width under the condition that the disk starts the reconstruction task;
The fault disc judging unit is used for judging whether the disc falling position of the write data and the check data thereof hits a fault disc or not under the condition that the target strip has a write-in identifier; wherein the write identification is used to characterize that the target stripe has written data;
the reconstruction writing unit is used for writing the writing data into the target strip after reconstructing the target strip under the condition that the drop position of the writing data or the verification data hits the fault disk.
On the one hand, the device also comprises a banding processing unit, a first writing unit, an identification judging unit and a setting unit;
the striping processing unit is used for executing striping processing on the data to be written after receiving the data to be written transmitted by the host under the condition that the reconstruction task is not started;
the first writing unit is used for writing the data to be written after the striping treatment into a disk;
the identification judging unit is used for judging whether the stripe where the data to be written is located has a writing identification or not;
the setting unit is configured to set a write identifier for a stripe where the data to be written is located, if the stripe where the data to be written is located does not have the write identifier.
On the one hand, the system also comprises an application unit and an initialization unit;
the application unit is used for applying metadata when the disk array is created;
the initialization unit is used for setting all bits of the metadata to an initial value; wherein one bit corresponds to one stripe;
correspondingly, the setting unit is used for adjusting bits corresponding to the stripe where the data to be written in the metadata are located to be writing values.
In one aspect, the stripe determination unit includes a receiving subunit and an operation subunit;
the receiving subunit is used for receiving the logic address of the write data issued by the host;
the operation subunit is used for dividing the logical address and the set stripe width, and determining a target stripe corresponding to the write data based on the obtained quotient; wherein different businesses are used to characterize different strips.
In one aspect, the memory further comprises a second writing unit;
the second writing unit is configured to write the striped write data to the disk according to the logical address of the write data when the target stripe does not have the write identifier.
In one aspect, the judging unit includes a data block determining subunit, a first judging subunit and a second judging subunit;
The data block determining subunit is used for determining a target data block corresponding to the write data according to the logical address of the write data issued by the host, the set stripe width and the number of the data blocks;
the first judging subunit is configured to judge whether a disk to which the target data block belongs is a failed disk;
and the second judging subunit is used for judging whether the disk where the check data of the write data is located is a fault disk or not under the condition that the disk where the target data block is located is not the fault disk.
In one aspect, the data block determining subunit is configured to determine a data block width of each data block based on a stripe width and a number of data blocks;
and dividing the logical address and the data block width, and determining a target data block corresponding to the write data based on the obtained quotient.
In one aspect, the reconstruction writing unit is configured to, when the disk to which the target data block belongs is a failed disk or the disk to which the check data of the write data belongs is a failed disk, reconstruct the target stripe, and then write the write data into the target stripe.
In one aspect, the reconstruction write unit includes a reconstruction subunit and a write subunit;
The reconstruction subunit is used for reconstructing data of a fault disk based on the non-fault data on the target stripe; wherein the non-failure data includes data remaining on the target stripe other than data of the failed disk;
the writing subunit is used for writing the striped write data into the disk according to the logical address of the write data and the reconstructed data of the fault disk.
In one aspect, the memory further comprises a third writing unit;
and the third writing unit is used for writing the write data after striping processing into the disk according to the logical address of the write data when the disk to which the target data block belongs is not a fault disk and the disk to which the verification data of the write data belongs is not a fault disk.
In one aspect, the third writing unit includes a reading subunit, a verification data determination subunit, and a stripe writing subunit;
the reading subunit is used for reading the original data on the target data block and the original verification data on the target stripe;
the verification data determining subunit is configured to determine new verification data based on the original data, the original verification data, and the write data;
the stripe writing subunit is configured to write the write data and the new verification data into corresponding positions of the target stripe.
In one aspect, the stripe write subunit is configured to write the write data to the target data block and write the new parity data to a parity block of the target stripe.
In one aspect, the memory further comprises a fourth writing unit;
the fourth writing unit is configured to write the striped write data into a disk according to a logical address of the write data when the data amount duty ratio of the write data on the target stripe meets a set duty ratio condition; and triggering the fault disc judging unit to execute the step of judging whether the disc falling position of the write data and the verification data thereof hits the fault disc or not under the condition that the target strip has the writing identification under the condition that the data volume ratio of the write data on the target strip does not meet the set ratio condition.
In one aspect, the fourth writing unit is configured to determine whether the write data covers the entire target stripe;
and under the condition that the write data covers the whole target stripe, writing the striped write data into the disk according to the logic address of the write data.
On the one hand, the system also comprises a data quantity judging unit and a piecing unit;
the data amount judging unit is used for judging whether the data amount of the write data is larger than a set threshold value or not under the condition that the write data does not cover the whole target stripe; wherein the threshold is set based on a swath width of the target swath;
And the splicing unit is used for splicing the write data and the original data in the target strip and writing the spliced write data and the original data into a disk under the condition that the data volume of the write data is larger than or equal to a set threshold value.
In one aspect, the fourth writing unit is configured to trigger the failed disk determining unit to execute the step of determining whether the landing position of the write data and the verification data thereof hits the failed disk if the target stripe has the write identifier, if the data amount of the write data is smaller than the set threshold.
In one aspect, the stitching unit is configured to, when the data amount of the write data is greater than or equal to one half of the stripe width of the target stripe, stitch the write data and the original data in the target stripe and write the write data and the original data into the disk.
In one aspect, the piecing unit includes a reading subunit, an exclusive or operation subunit and a data writing subunit;
the reading subunit is used for reading the original data in the target strip;
the exclusive-or operation subunit is configured to perform exclusive-or operation on the original data and the write data to obtain new check data;
the data writing subunit is configured to write the write data and the new verification data into corresponding positions of the target stripe.
In one aspect, the reading subunit is configured to reserve, in the disk, original data in the target stripe, and read the original data in the target stripe to the memory space.
The embodiment of the invention also provides electronic equipment, which comprises:
a memory for storing a computer program;
and a processor for executing the computer program to implement the steps of the write data processing method of the disk array.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the data writing processing method of the disk array when being executed by a processor.
According to the technical scheme, under the condition that the disk starts the reconstruction task, a target stripe corresponding to the write data is determined according to the logical address of the write data issued by the host and the set stripe width; in the case that the target stripe has the write identification, it is explained that the target stripe has been written with data before, at this time, it may be further judged whether the landing position of the write data and the check data thereof hits the failed disk. In the case where the write data or the check data thereof hits the failed disk at the disk-drop position, in order to maintain the consistency of the stripe data, it is necessary to reconstruct the target stripe first, and then write the write data into the target stripe after the reconstruction is completed. The method has the advantages that during the disk reconstruction process, the identification is written to the stripe mark through screening the reconstruction adding algorithm before writing the data, and the data which are already written to the stripe is recorded. And continuing to execute the screening of the landing positions for the target strip marked with the written identification. The reconstruction before writing is performed only if the write data is located on the failed disk or the corresponding check data is on the failed disk. By means of double detection, the aim of reducing the number of reconstruction before writing can be achieved, the influence of reconstruction on the writing performance of a host is reduced, and the processing speed of storing writing data is effectively improved.
Drawings
For a clearer description of embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flowchart of a method for processing write data of a disk array according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a mapping relationship between a disk array and metadata bits according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for processing write data based on a landing position according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method for writing write data to a disk based on a write data duty cycle according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a write data processing apparatus of a disk array according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
The terms "comprising" and "having" in the description of the invention and the claims and in the above-mentioned figures, as well as any variations thereof that relate to "comprising" and "having", are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description.
Next, a method for processing write data of a disk array provided by the embodiment of the present invention is described in detail. Fig. 1 is a flowchart of a write data processing method of a disk array according to an embodiment of the present invention, where the method includes:
s101: under the condition that the disk starts the reconstruction task, determining a target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width.
After the disk starts the reconstruction task, if data needs to be written into the disk, the position where the data is written can be determined, and the data needs to be written into one or more stripes. For ease of distinction, the data currently written may be referred to as write data, and the stripe to which the write data is to be written may be referred to as a target stripe.
In practical application, after receiving write data and a logic address of the write data issued by a host, the RAID can divide the logic address with a set stripe width, and determine a target stripe corresponding to the write data based on the obtained quotient; wherein different businesses are used to characterize different strips.
For example, assume that each stripe has a width of 768K, the first stripe has a logical address of 0 to 767K, the second stripe has a logical address of 768K to 1535K, and the third stripe has a logical address of 1536K to 2303K. If the logical address of the write data is 700K, the quotient of 700 divided by 768 is 0, indicating that the write data needs to be written to the first stripe. If the logical address of the write data is 1500K, the quotient of 1500 divided by 768 is 1, indicating that the write data needs to be written to the second stripe.
S102: and judging whether the landing positions of the write data and the verification data of the write data hit a fault disc or not under the condition that the target stripe has the write identification.
Wherein the write flag is used to characterize that the target stripe has written data.
When the RAID does not start the reconstruction task, after receiving the data to be written transmitted by the host, the RAID can execute striping processing on the data to be written, and write the data to be written after the striping processing into the disk. And judging whether the stripe where the data to be written is positioned has a writing identification.
After the data to be written after the striping process is written to the disk, since the stripe where the data to be written is located has already been written at this time, a write flag may be set for the stripe. In case the stripe already has a written identity, it is sufficient to preserve the written identity of the stripe without re-marking.
In the embodiment of the invention, the condition that each stripe is written with data can be recorded by metadata.
Applying for metadata when creating a disk array, and setting all bits of the metadata as initial values; wherein one bit corresponds to one stripe. The initial value may be set to 0.
Correspondingly, after the data to be written after the striping processing is written into the disk, whether the stripe where the data to be written is located in the metadata has a writing value can be judged. If the stripe of the metadata where the data to be written is still the initial value, the bit corresponding to the stripe of the metadata where the data to be written is located can be adjusted to be the writing value. The write value may be set to 1. If the stripe where the data to be written in the metadata is already the written value, the metadata does not need to be marked.
In practical applications, the identifier "1" may be used as the writing identifier. The identification of a stripe as "0" indicates that the stripe is not writing data, and the identification of "1" indicates that the stripe is already writing data.
Fig. 2 is a schematic diagram of a correspondence relationship between a disk array and metadata bits provided in an embodiment of the present invention, in fig. 2, a disk array made up of 5 disks is taken as an example, and is respectively from disk 1 to disk 5, fig. 2 includes 5 stripes, respectively from stripe 1 to stripe 5, each stripe includes three data blocks and two check blocks, where the three data blocks may be represented as D1, D2 and D3, and the two check blocks may be represented as P and Q. One bit in the metadata corresponds to one stripe, and in order, a first bit may correspond to stripe 1, a second bit may correspond to stripe 2, a third bit may correspond to stripe 3, a fourth bit may correspond to stripe 4, and a fifth bit may correspond to stripe 5. In fig. 2, metadata "11001" is taken as an example, where "1" indicates that the corresponding stripe has written data, and "0" indicates that the corresponding stripe has not written data. "11001" means that stripe 1, stripe 2, and stripe 5 have written data, and stripe 3 and stripe 4 have not written data.
When the target stripe does not have the writing identifier, it is indicated that the target stripe is not written with data, and the stripe not written with data does not need to perform reconstruction before writing, and at this time, the striped writing data can be written into the disk directly according to the logical address of the writing data.
In the case where the target stripe has a write flag, indicating that the target stripe has written data, in order to reduce the number of reconstructions before performing writing, it may be further determined whether the landing position of the write data and its verification data hits the failed disk.
Under the condition that the positions of the write data and the check data of the write data are not hit on the fault disk, the data on the fault disk are described not to affect the correctness of the write data and the check data of the write data, so that reconstruction before writing is not needed to be executed, the write data is directly striped, and then the write data is written into the disk.
In the case that the drop position of the write data or the check data hits the failed disk, it is explained that the data on the failed disk will affect the correctness of the write data and the check data thereof, so that the reconstruction before writing is performed before writing the write data into the target stripe, that is, the S103 is performed.
S103: and after reconstructing the target strip, writing the write data into the target strip.
In order to facilitate distinguishing between data on different disks, in embodiments of the present invention, data stored on a failed disk may be referred to as failed data, and data stored on other disks may be referred to as non-failed data.
In practical application, the data of the failed disk can be reconstructed based on the non-failed data on the target strip; wherein the non-failed data may include data remaining on the target stripe other than the data of the failed disk. And writing the striped write data into the disk according to the logical address of the write data and the reconstructed data of the fault disk.
According to the technical scheme, under the condition that the disk starts the reconstruction task, a target stripe corresponding to the write data is determined according to the logical address of the write data issued by the host and the set stripe width; in the case that the target stripe has the write identification, it is explained that the target stripe has been written with data before, at this time, it may be further judged whether the landing position of the write data and the check data thereof hits the failed disk. In the case where the write data or the check data thereof hits the failed disk at the disk-drop position, in order to maintain the consistency of the stripe data, it is necessary to reconstruct the target stripe first, and then write the write data into the target stripe after the reconstruction is completed. The method has the advantages that during the disk reconstruction process, the identification is written to the stripe mark through screening the reconstruction adding algorithm before writing the data, and the data which are already written to the stripe is recorded. And continuing to execute the screening of the landing positions for the target strip marked with the written identification. The reconstruction before writing is performed only if the write data is located on the failed disk or the corresponding check data is on the failed disk. By means of double detection, the aim of reducing the number of reconstruction before writing can be achieved, the influence of reconstruction on the writing performance of a host is reduced, and the processing speed of storing writing data is effectively improved.
Fig. 3 is a flowchart of a method for processing write data based on a landing position according to an embodiment of the present invention, where the method includes:
s301: and determining a target data block corresponding to the write data according to the logical address of the write data issued by the host, the set stripe width and the number of the data blocks.
The stripe width may be the size of the amount of data on the stripe used to store user data.
A stripe includes data blocks and check blocks, the number of data blocks referring to the total number of data blocks contained on a stripe.
In practical applications, the data block width of each data block may be determined based on the stripe width and the number of data blocks. And dividing the logical address and the data block width, and determining the data block corresponding to the write data based on the obtained quotient. For ease of distinction, the data block to which the write data corresponds may be referred to as a target data block.
The logical address of the write data is used to represent the starting address of the data write location.
The quotient obtained by dividing the logical address and the data block width is N, which indicates that the data needs to be written from the (n+1) th data block.
Assuming that the stripe width of each stripe is 768K and the number of data blocks is 3, the data block width is 768/3=256K. If the logical address of the write data is 700K, and the quotient of 700 divided by 256 is 2, the position where the write data starts to be written is the 3 rd data block of the first stripe. If the logical address of the write data is 1500K and the quotient of 1500 divided by 256 is 5, this indicates that the write data begins to be written at the 6 th data block of the second stripe.
After determining the position where the write data starts to be written, it can be determined which data blocks the write data needs to occupy based on the total data size of the write data.
S302: and judging whether the disk to which the target data block belongs is a fault disk or not.
Since write data needs to be added to the stripe, the parity data of the stripe where the write data is located also changes. In order to ensure the correctness of the write data and the check data thereof, if the disk to which the target data block belongs is not a failed disk, the disk to which the check data belongs needs to be judged, that is, S303 is executed.
In the case where the disk to which the target data block belongs is a failed disk, the target stripe needs to be reconstructed before writing the write data to the target stripe, so S304 can be performed.
S303: and judging whether the disk where the check data of the write data is located is a fault disk or not.
If the disk on which the check data of the write data is located is a failed disk, the target stripe needs to be reconstructed before writing the write data to the target stripe, and thus S304 can be executed.
When the disk to which the target data block belongs is not a failed disk and the disk to which the check data of the write data belongs is not a failed disk, it is indicated that the data on the failed disk does not affect the write data and the check data thereof, and at this time, the reconstruction before writing is not required, and S305 can be directly executed.
S304: and after reconstructing the target strip, writing the write data into the target strip.
The specific operation manner of writing the write data into the target stripe after the reconstruction of the target stripe can be referred to the description of S103, and will not be described herein.
S305: and writing the striped write data into the disk according to the logical address of the write data.
In practical application, when write data issued by a host is obtained and it is determined that reconstruction before writing is not required to be executed, original data on a target data block and original verification data on a target strip can be read; determining new check data based on the original data, the original check data and the write data; writing the write data and the new verification data into the corresponding positions of the target stripes.
According to the logical address of the write data issued by the host, the set stripe width and the number of data blocks, the target data block corresponding to the write data can be determined, so that the write data can be written into the target data block, and the new check data can be written into the check block of the target stripe.
In combination with the schematic diagram of the disk array shown in fig. 2, it is assumed that the disk 4 is a failed disk, if the write data falls on the D1 position of the stripe 3, the D1 of the stripe 3 is the target data block, and at this time, the disk that the target data block belongs to is the failed disk, and reconstruction before writing is required. If the check data corresponding to the write data falls on the P position of the stripe 1 or the check data corresponding to the write data falls on the Q position of the stripe 2, the disk where the check data satisfying the write data is located is a failed disk, and under these conditions, reconstruction before writing is required. As shown in fig. 2, as long as the write data and the verification data thereof do not fall on the failed disk 4, it is not necessary to perform the reconstruction before writing.
The effect of reconstruction on host write IOPS can be as high as 40% or more. In the embodiment of the invention, the writing task which does not need to execute the reconstruction operation before writing can be effectively screened out by judging the disk drop position of the writing data and the disk drop position of the verification data, the number of the reconstruction before writing is reduced, the influence of the reconstruction on the host writing IOPS is reduced, and the processing performance of storing and writing IO is effectively improved.
In practical application, when the write data occupies most of the capacity of the stripe, in order to improve the processing efficiency of the write data, the write data can be written into the disk in an overwriting manner, and reconstruction before writing is not required.
Therefore, when the data volume ratio of the write data on the target stripe satisfies the set ratio condition, the write data after the stripe processing is written into the disk according to the logical address of the write data. And executing the step of judging whether the landing position of the write data and the check data thereof hits the fault disc or not under the condition that the target stripe has the write identification under the condition that the data volume ratio of the write data on the target stripe does not meet the set ratio condition.
In practical applications, the duty condition may be set based on a set threshold, such as determining whether the data amount of the write data is greater than or equal to the set threshold.
When the data amount of the write data is greater than or equal to a set threshold value, the condition of the duty ratio is satisfied; when the data amount of the write data is smaller than the set threshold value, it is indicated that the duty condition is not satisfied. Therefore, in the case where the data amount of the write data is smaller than the set threshold value, the step of judging whether the landing position of the write data and the verification data thereof hit the failed disk in the case where the target stripe has the write flag may be performed.
FIG. 4 is a flowchart of a method for writing write data to a disk based on a write data duty cycle according to an embodiment of the present invention, the method comprising:
s401: it is determined whether the write data covers the entire target stripe.
Under the condition that the write data covers the whole target stripe, it is indicated that the write data and the verification data thereof are not affected by the original data and the original verification data in the target stripe, and at this time, the write data can be directly overwritten into the target stripe without performing the reconstruction before writing, that is, S402 is performed.
In the case where the write data does not cover the entire target stripe, further judgment of the duty ratio condition of the write data may be performed, that is, S403 is performed.
S402: and writing the striped write data into the disk according to the logical address of the write data.
Taking a data block as 256K as an example, in practical application, RAID will stripe write data issued by a host: dividing write data into one or more blocks according to the size of each disk 256K, calculating a check block P, Q by exclusive OR by utilizing the write data after the blocks, and finally writing the write data issued by the host and the calculated P, Q check data into the disk at the same time.
S403: it is determined whether the data amount of the write data is greater than a set threshold.
Wherein the threshold is set based on the swath width of the target swath.
In the embodiment of the invention, the value of the set threshold value can be determined according to 1/2 of the width of the strip. For example, the stripe width is 768K, and the set threshold may be 768×1/2=384.
In the case where the data amount of the write data is greater than or equal to the set threshold, the execution specification write data is relatively high, at which point S404 may be executed.
In the case where the data amount of the write data is smaller than the set threshold, the write data may be processed in accordance with the operations of S102 and S103 described above.
S404: and splicing the written data and the original data in the target stripe, and writing the spliced data and the original data into a disk.
Taking the case that the set threshold is 1/2 of the stripe width as an example, when the data amount of the write data is greater than or equal to one half of the stripe width of the target stripe, the write data and the original data in the target stripe can be pieced together and written into the disk.
The data stitching comprises reading the original data in the target strip; and performing exclusive OR operation on the original data and the write data to obtain new check data.
After the new parity data is obtained, the write data and the new parity data may be written to corresponding locations of the target stripe. Reading the original data in the target stripe refers to retaining the original data in the target stripe in the disk, and reading the original data in the target stripe to the memory space.
In the embodiment of the invention, by evaluating the duty ratio of the write data on the stripe, the write data can be directly overwritten into the stripe without performing reconstruction before writing under the condition of completely overwriting the whole stripe. Under the condition of high occupation, the write data can be written into the strip by splicing the write data with the original data on the strip, and the reconstruction before writing is not needed, so that the processing efficiency of the write data is greatly improved.
FIG. 5 is a schematic structural diagram of a write data processing apparatus of a disk array according to an embodiment of the present invention, including a stripe determining unit 51, a failed disk judging unit 52, and a reconstruction writing unit 53;
the stripe determining unit 51 is configured to determine, when the disk starts the reconstruction task, a target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width;
A failed disk judging unit 52 for judging whether the landing position of the write data and the check data thereof hits the failed disk in the case that the target stripe has the write flag; wherein the write identifier is used to characterize that the target stripe has written data;
and a reconstruction writing unit 53 for writing the write data into the target stripe after reconstructing the target stripe in case that the landing position of the write data or the verification data thereof hits the failed disk.
In some embodiments, the method further comprises a banding processing unit, a first writing unit, an identification judging unit and a setting unit;
the striping processing unit is used for executing striping processing on the data to be written after receiving the data to be written transmitted by the host under the condition that the reconstruction task is not started;
the first writing unit is used for writing the data to be written after the striping processing into the disk;
the identification judging unit is used for judging whether the stripe where the data to be written is located has a writing identification or not;
and the setting unit is used for setting the writing identification of the strip where the data to be written is located under the condition that the strip where the data to be written is located does not have the writing identification.
In some embodiments, the system further comprises an application unit and an initialization unit;
An application unit for applying metadata when creating a disk array;
an initialization unit for setting all bits of the metadata to an initial value; wherein one bit corresponds to one stripe;
correspondingly, the setting unit is used for adjusting bits corresponding to the stripes where the data to be written in the metadata are located to be writing values.
In some embodiments, the stripe determination unit comprises a receiving subunit and an operating subunit;
the receiving subunit is used for receiving the logic address of the write data issued by the host;
an operation subunit, configured to divide the logical address by the set stripe width, and determine a target stripe corresponding to the write data based on the obtained quotient; wherein different businesses are used to characterize different strips.
In some embodiments, a second write unit is also included;
and the second writing unit is used for writing the striped write data into the disk according to the logical address of the write data under the condition that the target stripe does not have the write identification.
In some embodiments, the determination unit includes a data block determination subunit, a first determination subunit, and a second determination subunit;
the data block determining subunit is used for determining a target data block corresponding to the write data according to the logical address of the write data issued by the host, the set stripe width and the number of the data blocks;
The first judging subunit is used for judging whether the magnetic disk to which the target data block belongs is a fault disk or not;
and the second judging subunit is used for judging whether the disk where the check data of the write data is located is a fault disk or not under the condition that the disk where the target data block is located is not the fault disk.
In some embodiments, the data block determining subunit is configured to determine a data block width for each data block based on the stripe width and the number of data blocks;
and dividing the logic address and the data block width, and determining a target data block corresponding to the write data based on the obtained quotient.
In some embodiments, the reconstruction writing unit is configured to, when the disk to which the target data block belongs is a failed disk or the disk to which the check data of the write data belongs is a failed disk, reconstruct the target stripe and then write the write data into the target stripe.
In some embodiments, the reconstruction write unit includes a reconstruction subunit and a write subunit;
a reconstruction subunit, configured to reconstruct data of the failed disk based on non-failed data on the target stripe; wherein the non-failure data includes data remaining on the target stripe other than the data of the failed disk;
and the writing subunit is used for writing the striped write data into the disk according to the logical address of the write data and the reconstructed data of the fault disk.
In some embodiments, a third write unit is further included;
and the third writing unit is used for writing the write data after the striping processing into the disk according to the logic address of the write data when the disk to which the target data block belongs is not a fault disk and the disk to which the verification data of the write data belongs is not a fault disk.
In some embodiments, the third write unit includes a read subunit, a parity data determination subunit, and a stripe write subunit;
the reading subunit is used for reading the original data on the target data block and the original verification data on the target strip;
the verification data determining subunit is used for determining new verification data based on the original data, the original verification data and the write data;
and the strip writing subunit is used for writing the writing data and the new verification data into the corresponding positions of the target strip.
In some embodiments, the stripe write subunit is configured to write data to the target data block and write new parity data to the parity block of the target stripe.
In some embodiments, a fourth write unit is also included;
a fourth writing unit for writing the striped write data into the disk according to the logical address of the write data when the data amount duty ratio of the write data on the target stripe satisfies the set duty ratio condition; and triggering the fault disc judging unit to execute the step of judging whether the disc falling position of the writing data and the verification data thereof hits the fault disc or not under the condition that the writing identification is provided on the target strip under the condition that the data volume ratio of the writing data on the target strip does not meet the set ratio condition.
In some embodiments, the fourth writing unit is configured to determine whether the write data covers the entire target stripe;
and under the condition that the write data covers the whole target stripe, writing the striped write data into the disk according to the logic address of the write data.
In some embodiments, the method further comprises a data quantity judging unit and a piecing unit;
a data amount judgment unit configured to judge whether the data amount of the write data is greater than a set threshold value, in a case where the write data does not cover the entire target stripe; wherein the threshold is set based on a swath width of the target swath;
and the splicing unit is used for splicing the write data and the original data in the target stripe and writing the spliced write data and the original data into the disk under the condition that the data volume of the write data is larger than or equal to a set threshold value.
In some embodiments, the fourth writing unit is configured to trigger the failed disk determining unit to perform the step of determining whether the landing position of the write data and the verification data thereof hits the failed disk if the target stripe has the write flag, in the case that the data amount of the write data is smaller than the set threshold.
In some embodiments, the stitching unit is configured to stitch the write data and the original data in the target stripe and write the data to the disk when the data amount of the write data is greater than or equal to one half of the stripe width of the target stripe.
In some embodiments, the stitching unit includes a read subunit, an exclusive or operator subunit, and a data write subunit;
a reading subunit, configured to read the original data in the target stripe;
the exclusive OR operation subunit is used for carrying out exclusive OR operation on the original data and the write data so as to obtain new check data;
and the data writing subunit is used for writing the writing data and the new verification data into the corresponding positions of the target strip.
In some embodiments, the read subunit is configured to retain the raw data in the target stripe in the disk, and read the raw data in the target stripe to the memory space.
The description of the features of the embodiment corresponding to fig. 5 may be referred to the related description of the embodiment corresponding to fig. 1 to 4, and will not be repeated here.
According to the technical scheme, under the condition that the disk starts the reconstruction task, a target stripe corresponding to the write data is determined according to the logical address of the write data issued by the host and the set stripe width; in the case that the target stripe has the write identification, it is explained that the target stripe has been written with data before, at this time, it may be further judged whether the landing position of the write data and the check data thereof hits the failed disk. In the case where the write data or the check data thereof hits the failed disk at the disk-drop position, in order to maintain the consistency of the stripe data, it is necessary to reconstruct the target stripe first, and then write the write data into the target stripe after the reconstruction is completed. The method has the advantages that during the disk reconstruction process, the identification is written to the stripe mark through screening the reconstruction adding algorithm before writing the data, and the data which are already written to the stripe is recorded. And continuing to execute the screening of the landing positions for the target strip marked with the written identification. The reconstruction before writing is performed only if the write data is located on the failed disk or the corresponding check data is on the failed disk. By means of double detection, the aim of reducing the number of reconstruction before writing can be achieved, the influence of reconstruction on the writing performance of a host is reduced, and the processing speed of storing writing data is effectively improved.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 6, where the electronic device includes: a memory 60 for storing a computer program;
a processor 61 for implementing the steps of the write data processing method of the disk array of the above embodiment when executing the computer program.
The electronic device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 61 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 61 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 61 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 60 may include one or more computer-readable storage media, which may be non-transitory. Memory 60 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used for storing a computer program 601, where the computer program, when loaded and executed by the processor 61, can implement the relevant steps of the write data processing method of a disk array disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may further include an operating system 602, data 603, and the like, where the storage manner may be transient storage or permanent storage. The operating system 602 may include Windows, unix, linux, among other things. The data 603 may include, but is not limited to, stripe width, written identification, and the like.
In some embodiments, the electronic device may further include a display 62, an input-output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.
Those skilled in the art will appreciate that the structure shown in fig. 6 is not limiting of the electronic device and may include more or fewer components than shown.
It will be appreciated that if the write data processing method of the disk array in the above-described embodiment is implemented in the form of a software functional unit and sold or used as a separate product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in part or in whole or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), an electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, etc. various media capable of storing program codes.
Based on this, the embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the steps of the write data processing method of the disk array as described above.
The method, the device, the equipment and the medium for processing write data of the disk array provided by the embodiment of the invention are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The method, the device, the equipment and the medium for processing the write data of the disk array provided by the invention are described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (22)

1. A write data processing method for a disk array, comprising:
under the condition that a disk starts a reconstruction task, determining a target stripe corresponding to write data according to a logical address of the write data issued by a host and a set stripe width;
judging whether the disk drop position of the write data and the check data thereof hits a fault disk or not under the condition that the target stripe has a write-in identifier; wherein the write identification is used to characterize that the target stripe has written data;
and under the condition that the drop disc position of the write data or the verification data hits the fault disc, the write data is written into the target strip after the target strip is reconstructed.
2. The method of processing write data for a disk array according to claim 1, further comprising:
under the condition that a reconstruction task is not started, after receiving data to be written transmitted by a host, carrying out striping processing on the data to be written, and writing the data to be written after the striping processing into a disk;
judging whether the stripe where the data to be written is located has a writing identification or not;
and setting a writing identifier for the stripe where the data to be written is located under the condition that the stripe where the data to be written is located does not have the writing identifier.
3. The method of processing write data for a disk array according to claim 2, further comprising:
applying for metadata when creating a disk array, and setting all bits of the metadata as initial values; wherein one bit corresponds to one stripe;
correspondingly, the setting the writing identification for the stripe where the data to be written is located includes:
and adjusting bits corresponding to the stripe where the data to be written are located in the metadata to be a writing value.
4. The method for processing write data of a disk array according to claim 1, wherein determining the target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width comprises:
Receiving a logic address of write data issued by a host;
dividing the logical address with the set stripe width, and determining a target stripe corresponding to the write data based on the obtained quotient; wherein different businesses are used to characterize different strips.
5. The method for processing write data of a disk array according to claim 1, further comprising, after determining a target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width:
and under the condition that the target stripe does not have the writing identification, writing the striped writing data into the disk according to the logic address of the writing data.
6. The method according to claim 1, wherein determining whether the landing position of the write data and the check data thereof hit the failed disk comprises:
determining a target data block corresponding to the write data according to the logical address of the write data issued by the host, the set stripe width and the number of the data blocks;
judging whether the disk to which the target data block belongs is a fault disk or not;
and judging whether the disk where the verification data of the write data is located is a fault disk or not under the condition that the disk where the target data block is not located is the fault disk.
7. The method for processing write data of a disk array according to claim 6, wherein determining the target data block corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width and number of data blocks comprises:
determining the data block width of each data block based on the stripe width and the number of the data blocks;
and dividing the logical address and the data block width, and determining a target data block corresponding to the write data based on the obtained quotient.
8. The method according to claim 6, wherein, in the case where the landing position of the write data or the check data thereof hits the failed disk, the writing the write data to the target stripe after the reconstruction of the target stripe includes:
and under the condition that the disk to which the target data block belongs is a fault disk or the disk to which the verification data of the write data belongs is a fault disk, the write data is written into the target stripe after the target stripe is reconstructed.
9. The method of claim 8, wherein the reconstructing the target stripe and then writing the write data to the target stripe comprises:
Reconstructing data of a failed disk based on non-failed data on the target stripe; wherein the non-failure data includes data remaining on the target stripe other than data of the failed disk;
and writing the striped write data into the disk according to the logical address of the write data and the reconstructed data of the fault disk.
10. The method of processing write data for a disk array according to claim 9, further comprising:
and writing the striped write data into the disk according to the logical address of the write data under the condition that the disk to which the target data block belongs is not a fault disk and the disk to which the check data of the write data belongs is not a fault disk.
11. The method for processing write data of a disk array according to claim 10, wherein writing the striped write data to the disk according to the logical address of the write data comprises:
reading the original data on the target data block and the original verification data on the target stripe;
determining new check data based on the original data, the original check data and the write data;
and writing the write data and the new check data into the corresponding positions of the target stripes.
12. The method of claim 11, wherein writing the write data and the new parity data to corresponding locations of the target stripe comprises:
and writing the write data into the target data block, and writing the new check data into the check block of the target stripe.
13. The method for processing write data of a disk array according to claim 1, further comprising, after determining a target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width:
writing the striped write data into a disk according to the logic address of the write data under the condition that the data volume ratio of the write data on the target stripe meets the set ratio condition;
and executing the step of judging whether the landing positions of the write data and the verification data thereof hit a fault disc or not under the condition that the target stripe has a write-in identifier under the condition that the data volume ratio of the write data on the target stripe does not meet the set ratio condition.
14. The method according to claim 13, wherein writing the striped write data to the disk according to the logical address of the write data in the case where the data amount duty ratio of the write data on the target stripe satisfies a set duty ratio condition comprises:
Judging whether the write data covers the whole target stripe or not;
and under the condition that the write data covers the whole target stripe, writing the striped write data into the disk according to the logic address of the write data.
15. The method of processing write data for a disk array of claim 14, further comprising:
judging whether the data amount of the write data is larger than a set threshold value or not under the condition that the write data does not cover the whole target stripe; wherein the threshold is set based on a swath width of the target swath;
and under the condition that the data volume of the write data is larger than or equal to a set threshold value, the write data and the original data in the target stripe are pieced together and then written into a disk.
16. The method according to claim 15, wherein the step of determining whether the landing position of the write data and the check data thereof hit the failed disk in the case where the target stripe has the write flag is performed in the case where the data amount duty of the write data on the target stripe does not satisfy a set duty condition, comprises:
and executing the step of judging whether the landing position of the write data and the verification data thereof hits the fault disc or not under the condition that the target stripe has the write identification under the condition that the data volume of the write data is smaller than a set threshold value.
17. The method according to claim 15, wherein writing the write data and the original data in the target stripe to the disk after the splicing in the case where the data amount of the write data is greater than or equal to a set threshold value comprises:
and under the condition that the data volume of the write data is greater than or equal to one half of the stripe width of the target stripe, the write data and the original data in the target stripe are pieced together and then written into a disk.
18. The method of claim 15, wherein the writing the write data to the disk after the splicing the write data and the original data in the target stripe comprises:
reading the original data in the target strip;
performing exclusive OR operation on the original data and the write data to obtain new check data;
and writing the write data and the new check data into the corresponding positions of the target stripes.
19. The method of claim 18, wherein the reading the original data in the target stripe comprises:
and reserving the original data in the target strip in the disk, and reading the original data in the target strip to a memory space.
20. A write data processing apparatus of a disk array is characterized by comprising a stripe determining unit, a fault disk judging unit and a reconstruction writing unit;
the stripe determining unit is used for determining a target stripe corresponding to the write data according to the logical address of the write data issued by the host and the set stripe width under the condition that the disk starts the reconstruction task;
the fault disc judging unit is used for judging whether the disc falling position of the write data and the check data thereof hits a fault disc or not under the condition that the target strip has a write-in identifier; wherein the write identification is used to characterize that the target stripe has written data;
the reconstruction writing unit is used for writing the writing data into the target strip after reconstructing the target strip under the condition that the drop position of the writing data or the verification data hits the fault disk.
21. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the write data processing method of a disk array according to any one of claims 1 to 19.
22. A computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, which when executed by a processor, implements the steps of the write data processing method of a disk array according to any one of claims 1 to 19.
CN202310995030.XA 2023-08-09 2023-08-09 Method, device, equipment and medium for processing write data of disk array Pending CN116719484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310995030.XA CN116719484A (en) 2023-08-09 2023-08-09 Method, device, equipment and medium for processing write data of disk array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310995030.XA CN116719484A (en) 2023-08-09 2023-08-09 Method, device, equipment and medium for processing write data of disk array

Publications (1)

Publication Number Publication Date
CN116719484A true CN116719484A (en) 2023-09-08

Family

ID=87864680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310995030.XA Pending CN116719484A (en) 2023-08-09 2023-08-09 Method, device, equipment and medium for processing write data of disk array

Country Status (1)

Country Link
CN (1) CN116719484A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117008845A (en) * 2023-09-27 2023-11-07 苏州元脑智能科技有限公司 Method and device for dividing read-write instruction, storage medium and electronic device
CN117472292A (en) * 2023-12-27 2024-01-30 苏州元脑智能科技有限公司 Data reconstruction method for redundant array of independent disk, storage system and controller

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5208813A (en) * 1990-10-23 1993-05-04 Array Technology Corporation On-line reconstruction of a failed redundant array system
GB9823460D0 (en) * 1998-10-28 1998-12-23 Ibm Data storage array rebuild
US6105103A (en) * 1997-12-19 2000-08-15 Lsi Logic Corporation Method for mapping in dynamically addressed storage subsystems
US20060156059A1 (en) * 2005-01-13 2006-07-13 Manabu Kitamura Method and apparatus for reconstructing data in object-based storage arrays
CN110413205A (en) * 2018-04-28 2019-11-05 伊姆西Ip控股有限责任公司 Method, equipment and computer readable storage medium for being written to disk array
CN113342279A (en) * 2021-06-24 2021-09-03 苏州浪潮智能科技有限公司 Disk array access method, device, equipment and storage medium
CN115168249A (en) * 2022-06-21 2022-10-11 阿里巴巴(中国)有限公司 Address translation method, memory system, electronic device, and storage medium
CN115202575A (en) * 2022-06-22 2022-10-18 联想(北京)有限公司 Data processing method and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5208813A (en) * 1990-10-23 1993-05-04 Array Technology Corporation On-line reconstruction of a failed redundant array system
US6105103A (en) * 1997-12-19 2000-08-15 Lsi Logic Corporation Method for mapping in dynamically addressed storage subsystems
GB9823460D0 (en) * 1998-10-28 1998-12-23 Ibm Data storage array rebuild
US20060156059A1 (en) * 2005-01-13 2006-07-13 Manabu Kitamura Method and apparatus for reconstructing data in object-based storage arrays
CN110413205A (en) * 2018-04-28 2019-11-05 伊姆西Ip控股有限责任公司 Method, equipment and computer readable storage medium for being written to disk array
CN113342279A (en) * 2021-06-24 2021-09-03 苏州浪潮智能科技有限公司 Disk array access method, device, equipment and storage medium
CN115168249A (en) * 2022-06-21 2022-10-11 阿里巴巴(中国)有限公司 Address translation method, memory system, electronic device, and storage medium
CN115202575A (en) * 2022-06-22 2022-10-18 联想(北京)有限公司 Data processing method and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117008845A (en) * 2023-09-27 2023-11-07 苏州元脑智能科技有限公司 Method and device for dividing read-write instruction, storage medium and electronic device
CN117008845B (en) * 2023-09-27 2024-01-26 苏州元脑智能科技有限公司 Method and device for dividing read-write instruction, storage medium and electronic device
CN117472292A (en) * 2023-12-27 2024-01-30 苏州元脑智能科技有限公司 Data reconstruction method for redundant array of independent disk, storage system and controller
CN117472292B (en) * 2023-12-27 2024-03-12 苏州元脑智能科技有限公司 Data reconstruction method for redundant array of independent disk, storage system and controller

Similar Documents

Publication Publication Date Title
CN116719484A (en) Method, device, equipment and medium for processing write data of disk array
CN103019888B (en) Backup method and device
US11243706B2 (en) Fragment management method and fragment management apparatus
EP2983087A1 (en) Junk data recycling method and storage device
CN105843749B (en) A kind of NAND Flash fault-tolerance approach based on FPGA
CN109358809B (en) RAID data storage system and method
CN112513804B (en) Data processing method and device
CN110413454B (en) Data reconstruction method and device based on storage array and storage medium
JP6715334B2 (en) GPU resource reconstruction method, user device, system and storage medium
CN110673789A (en) Metadata storage management method, device, equipment and storage medium of solid state disk
CN112463036B (en) Method, system, terminal and storage medium for calculating block stripes by disk
CN112835528A (en) Dirty page refreshing method and device, electronic equipment and storage medium
CN105183583A (en) Method for data reconstruction of disk array, and disk array system
CN116339644B (en) Method, device, equipment and medium for creating redundant array of independent disk
CN104899158A (en) Memory access optimization method and memory access optimization device
CN116795295A (en) Data processing method and device in disk array, storage medium and electronic equipment
CN111142787A (en) Storage-layered data exchange testing method, system, terminal and storage medium
CN114756523A (en) Distributed storage method, device and medium
CN110688242A (en) Method for recovering block information after abnormal power failure of SSD and related components
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system
CN114924923A (en) Method, system, equipment and medium for verifying correctness of hard disk write-in point
CN113986599A (en) Application processing method, terminal, server, equipment and storage medium
CN112269535A (en) Space resource allocation method and device of storage system and readable storage medium
CN109584943B (en) Method and device for evaluating storage medium
CN111597066A (en) SSD (solid State disk) repairing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination