CN109542687A - A kind of RAID level conversion method and device - Google Patents
A kind of RAID level conversion method and device Download PDFInfo
- Publication number
- CN109542687A CN109542687A CN201811405206.7A CN201811405206A CN109542687A CN 109542687 A CN109542687 A CN 109542687A CN 201811405206 A CN201811405206 A CN 201811405206A CN 109542687 A CN109542687 A CN 109542687A
- Authority
- CN
- China
- Prior art keywords
- raid level
- disk array
- level conversion
- switching motion
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1474—Saving, restoring, recovering or retrying in transactions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
- G06F3/0634—Configuration or reconfiguration of storage systems by changing the state or mode of one or more devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk arrays, e.g. RAID, JBOD
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)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application provides a kind of RAID level conversion method and device, and RAID level conversion method includes: first to carry out the first RAID level conversion to the storage region determined;During executing the conversion of the first RAID level, when determining generation first kind failure according to log chain, shelves operation is carried out back to the conversion of the first RAID level, and continue to execute the conversion of the first RAID level;After having executed the conversion of the first RAID level, the second RAID level conversion is carried out to other regions in disk array in addition to storage region.Pass through the technical program; RAID level conversion first is carried out to a part of storage region in disk array; and the troubleshooting that will occur during this; in this way; the incidence of failure can be reduced during carrying out RAID level conversion again to other regions in disk array in addition to storage region again, reinforce the protection to data in disk array.
Description
Technical field
This application involves technical field of data storage, more particularly to a kind of RAID (Redundant Arrays of
Independent Disks, redundant array of independent disks) rank conversion method and device.
Background technique
RAID is the disk array being managed for data storage, and a disk array includes multiple hard disks, disk battle array
The combination of hard disk is different in column, will form different RAID level.Common RAID level have RAID0, RAID1,
RAID5, RAID6 etc..The advantage and disadvantage of different RAID level are not identical, for example, RAID0 uses deblocking technology, advantage is
Throughput height, load balancing, and the disadvantage is that reliability and safety are poor;RAID5 uses distributed parity technology, school
It tests data to be uniformly distributed in the shape of a spiral on each disk array driver, advantage is that read or write speed is fast, highly-safe and empty
Between utilization rate it is high, the disadvantage is that if having system performance after one piece of disk failures that can reduce.
Because different RAID level have different advantage and disadvantage, on the basis of existing RAID level, can also will have
RAID level be combined, and then construct more RAID level, constructed RAID level can balance existing each
The advantage and disadvantage of RAID level.For example, RAID01 is the combination of RAID0 and RAID1, RAID01 has RAID0's and RAID1 simultaneously
Advantage.RAID50 is the combination of RAID5 and RAID0, and RAID50 has the advantages that RAID5 and RAID0 simultaneously.
For the disk array of RAID level has been arranged, the disk battle array can also be changed in such a way that RAID level is converted
The RAID level of column.RAID level conversion includes structural transfer and Data Migration, and structural transfer refers to hard disk in disk array
Combination converted, Data Migration refers to weight in the internal data stored in disk array hard disk after conversion
Newly stored.
By taking Fig. 1 as an example, Fig. 1 show the process that disk array is converted to RAID5 by migrating from RAID01.Disk array
Hard disk number be 4, the capacity of each hard disk is 2T, the mirror-image structure based on RAID1, therefore the disk array is in RAID01
Capacity when rank is 4T.In RAID level conversion process, 4 hard disks start to convert two-by-two, the hard disk point of RAID1 rank
Change, release mirror image pattern, then RAID0, which starts to break up, is converted into Simple volume mode.Complete RAID0 and RAID1 conversion it
Afterwards, one of hard disk is converted into check disk, the other three hard disk is converted into data disks, and will stored in disk array
Data carry out striping storage, and the RAID level of disk array is changed to RAID5 at this time.
However, if break down, will lead to the number in disk array in the RAID level conversion process of disk array
According to loss.Therefore, how to reduce the incidence of the failure in disk array RAID level conversion process and then enhance disk array
The protection of middle data is a problem to be solved.
Summary of the invention
The embodiment of the present application is designed to provide a kind of RAID level conversion method and device, is reduced with realizing in disk
The incidence of failure in array RAID level conversion process, and then reinforce the protection to data in disk array.Particular technique side
Case is as follows:
In a first aspect, the embodiment of the present application provides a kind of RAID level conversion method, which comprises
From the disk array that pending RAID level is converted, the storage region of preset capacity is determined, and deposit to described
Storage area domain carries out the first RAID level conversion;
During executing first RAID level conversion, however, it is determined that first kind failure occurs, then stops executing institute
State the conversion of the first RAID level;
Corresponding log chain is converted according to the time of origin of the first kind failure and first RAID level, to described
The conversion of first RAID level carries out back shelves operation, and after determining the first kind Failure elimination, continues to execute described first
RAID level conversion;
After having executed the first RAID level conversion, to its in the disk array in addition to the storage region
He carries out the second RAID level conversion in region.
Optionally, when the storage region is idle memory region;When the generation according to the first kind failure
Between and first RAID level convert corresponding log chain, shelves are carried out back to first RAID level conversion and are operated, comprising:
The first time that the determining time of origin with the first kind failure matches from log chain, wherein the day
Will chain is used to record the execution time started of each switching motion in RAID level conversion process, executes the deadline and each conversion is dynamic
Make to execute the disc format of disk array when completion;
It determines before the first time, switching motion has executed the first object switching motion of completion;
The disc format of the disk array is restored to the first object switching motion to execute disk when completing
The disc format of array.
Optionally, when the storage region is busy storage region;The generation according to the first kind failure
Time and first RAID level convert corresponding log chain, carry out back shelves operation, packet to first RAID level conversion
It includes:
The second time that the determining time of origin with the first kind failure matches from log chain, wherein the day
Will chain is used to record the execution time started of each switching motion in RAID level conversion process, executes the deadline and each conversion is dynamic
Make to execute the disc format and state data memory of disk array when completion;
It determines before second time, switching motion has executed the second target switching motion of completion;
The disc format of the disk array is restored to the second target switching motion to execute disk when completing
The disc format of array, and will be migrated in the execution deadline of the second target switching motion to during second time
Data restore to the second target switching motion execute complete when state data memory.
Optionally, the method also includes:
During executing first RAID level conversion, however, it is determined that the second class failure occurs, then judges described the
Whether the number that two class failures occur is more than or equal to the first preset threshold;
If so, reporting the second class failure and being alerted.
Optionally, the method also includes:
During executing RAID level conversion, if monitoring, client writes data into the behaviour of the disk array
Make, be then written into data and be stored in specified hard disk, wherein the specified hard disk is the hard disk in addition to the disk array;
It, will be described in the data write-in to be written in the specified hard disk after completing the second RAID level conversion
Disk array.
Optionally, the method also includes:
During executing RAID level conversion, if monitoring behaviour of the client from RAID Read access evidence
Make, then judge whether be stored with data to be read in the specified hard disk, wherein is stored in the specified hard disk in setting week
The data that number is more than or equal to the second preset threshold are read in phase;
If it is not, reading the data to be read from the disk array, and return to the client;
If so, then reading the data to be read from the specified hard disk, and return to the client.
Second aspect, the embodiment of the present application provide a kind of RAID level conversion equipment, and described device includes:
First conversion module, for determining depositing for preset capacity from the disk array that pending RAID level is converted
Storage area domain, and the first RAID level conversion is carried out to the storage region;
Stopping modular, for during executing first RAID level conversion, however, it is determined that first kind failure occurs,
Then stop executing the first RAID level conversion;
Shelves module is returned, for corresponding according to the time of origin of the first kind failure and first RAID level conversion
Log chain carries out back shelves operation to first RAID level conversion, and after determining the first kind Failure elimination, continues
Execute the first RAID level conversion;
Second conversion module, for after having executed first RAID level conversion, in the disk array except institute
It states other regions other than storage region and carries out the second RAID level conversion.
Optionally, when the storage region is idle memory region;Described time shelves module is specifically used for:
The first time that the determining time of origin with the first kind failure matches from log chain, wherein the day
Will chain is used to record the execution time started of each switching motion in RAID level conversion process, executes the deadline and each conversion is dynamic
Make to execute the disc format of disk array when completion;
It determines before the first time, switching motion has executed the first object switching motion of completion;
The disc format of the disk array is restored to the first object switching motion to execute disk when completing
The disc format of array.
Optionally, when the storage region is busy storage region;Described time shelves module is specifically used for:
The second time that the determining time of origin with the first kind failure matches from log chain, wherein the day
Will chain is used to record the execution time started of each switching motion in RAID level conversion process, executes the deadline and each conversion is dynamic
Make to execute the disc format and state data memory of disk array when completion;
It determines before second time, switching motion has executed the second target switching motion of completion;
The disc format of the disk array is restored to the second target switching motion to execute disk when completing
The disc format of array, and will be migrated in the execution deadline of the second target switching motion to during second time
Data restore to the second target switching motion execute complete when state data memory.
Optionally, described device further include:
First judgment module, for during executing first RAID level conversion, however, it is determined that the second class occurs
Whether failure, the then number for judging that the second class failure occurs are more than or equal to the first preset threshold;
Reporting module, for when the judging result of the first judgment module, which is, is, then reporting the second class failure
And it is alerted.
Optionally, described device further include:
Memory module is used for during executing RAID level conversion, if it is described to monitor that client writes data into
The operation of disk array is then written into data and is stored in specified hard disk, wherein the specified hard disk is except the disk array
Hard disk in addition;
Writing module is used for after completing the second RAID level conversion, will be described to be written in the specified hard disk
Enter data and the disk array is written.
Optionally, described device further include:
Second judgment module is used for during executing RAID level conversion, if monitoring client from the disk
Array reads the operation of data, then judges whether be stored with data to be read in the specified hard disk, wherein the specified hard disk
In be stored with setting the period in be read number be more than or equal to the second preset threshold data;
First read module, for when the judging result of second judgment module be it is no when, then from the disk array
It is middle to read the data to be read, and return to the client;
Second read module, for when the judging result of second judgment module be when, then from the specified hard disk
It is middle to read the data to be read, and return to the client.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including processor and machine readable storage medium,
The machine readable storage medium is stored with the machine-executable instruction that can be executed by the processor, and the processor is by institute
It states machine-executable instruction to promote: realizing any of the above-described RAID level conversion method step.
Fourth aspect, the embodiment of the present application provide a kind of machine readable storage medium, are stored with machine-executable instruction,
When being called and being executed by processor, the machine-executable instruction promotes the processor: described in realization is any of the above-described
RAID level conversion method step.
In technical solution provided by the embodiments of the present application, from the disk array that pending RAID level is converted, determine pre-
If the storage region of capacity;RAID level conversion is carried out to storage region, and converted in the RAID level for storage region
It monitors whether to break down in journey;If occurring, pause is converted and is debugged for the RAID level of storage region, and is continued
RAID level conversion is carried out to storage region;After completing for the RAID level conversion of storage region, to being removed in disk array
Other regions other than storage region carry out RAID level conversion.By technical solution provided by the embodiments of the present application, to whole
Before a disk array carries out RAID level conversion, RAID level first is carried out to a part of storage region in disk array and is turned
It changes, and the process is monitored, the failure is excluded if breaking down in the RAID level conversion process in storage region, and
RAID level conversion is carried out continuing with storage region, until completing to convert the RAID level of storage region, in this way, again to magnetic
Other regions in disk array in addition to storage region carry out the generation that failure can be reduced during RAID level conversion again
Rate, and then reinforce the protection to data in disk array.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is RAID level conversion process schematic diagram provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of RAID level conversion method provided by the embodiments of the present application;
Fig. 3 is a kind of system structure diagram of disk array provided by the embodiments of the present application;
Fig. 4 is a kind of flow diagram of RAID level provided by the embodiments of the present application conversion;
Fig. 5 is a kind of structural schematic diagram of RAID level conversion equipment provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
In order to realize the incidence for reducing the failure in disk array RAID level conversion process, and then reinforce to disk battle array
The protection of data in column, the embodiment of the present application provide a kind of RAID level conversion method and device, wherein the RAID level turns
The method of changing includes:
From the disk array that pending RAID level is converted, the storage region of preset capacity is determined, and to memory block
Domain carries out the first RAID level conversion;
During executing the conversion of the first RAID level, however, it is determined that first kind failure occurs, then stops execution first
RAID level conversion;
Corresponding log chain is converted according to the time of origin of first kind failure and the first RAID level, to the first RAID level
Conversion carries out back shelves operation, and after determining first kind Failure elimination, continues to execute the conversion of the first RAID level;
After having executed the conversion of the first RAID level, the is carried out to other regions in disk array in addition to storage region
The conversion of two RAID level.
In technical solution provided by the embodiments of the present application, from the disk array that pending RAID level is converted, determine pre-
If the storage region of capacity;RAID level conversion is carried out to storage region, and converted in the RAID level for storage region
It monitors whether to break down in journey;If occurring, pause is converted and is debugged for the RAID level of storage region, and is continued
RAID level conversion is carried out to storage region;After completing for the RAID level conversion of storage region, to being removed in disk array
Other regions other than storage region carry out RAID level conversion.By technical solution provided by the embodiments of the present application, to whole
Before a disk array carries out RAID level conversion, RAID level first is carried out to a part of storage region in disk array and is turned
It changes, and the process is monitored, the failure is excluded if breaking down in the RAID level conversion process in storage region, and
RAID level conversion is carried out continuing with storage region, until completing to convert the RAID level of storage region, in this way, again to magnetic
Other regions in disk array in addition to storage region carry out the generation that failure can be reduced during RAID level conversion again
Rate, and then reinforce the protection to data in disk array.
A kind of RAID level conversion method provided by the embodiments of the present application is introduced first below.The embodiment of the present application
The RAID level conversion method of offer can be applied to disk array controller, disk array controller can to disk array into
The processing such as storage, forwarding of data in row management and disk array, disk array controller can also be performed RAID level and turn
The operation changed.
As shown in Fig. 2, the RAID level conversion method includes the following steps.
S201 determines the storage region of preset capacity from the disk array that pending RAID level is converted, and to depositing
Storage area domain carries out the first RAID level conversion.
Wherein, preset capacity can be customized setting.In a kind of implementation, when there is multiple needs in disk array
When carrying out the hard disk of RAID level conversion, the storage region of preset capacity can be chosen from each hard disk.For example, disk array
The hard disk for needing to carry out RAID level conversion including 4, being respectively as follows: hard disk 1, hard disk 2, hard disk 3 and hard disk 4, preset capacity is
512M can then choose the storage region of 512M from hard disk 1 respectively, the storage region of 512M be chosen from hard disk 2, from hard disk
The storage region of 512M is chosen in 3, and the storage region of 512M is chosen from hard disk 4.
Wherein, identified storage region can be idle memory region, i.e. the not no storage region of storing data;May be used also
To be non-idle memory region, i.e., data have been stored in the storage region.
When the storage region determined is idle memory region, need when the conversion of the first RAID level to disk
The disc format of array is converted.When the storage region determined is busy storage region, the first RAID level is carried out
Not Zhuan Huan when need to carry out the disc format of disk array convert and the data stored in the storage region are migrated.
After determining storage region, the first RAID level conversion first can be carried out to the storage region, that is to say, that
The first RAID level conversion at this time just for the storage region determined, will not to other regions other than the storage region into
The processing of row RAID level conversion.
S202, during executing the conversion of the first RAID level, however, it is determined that first kind failure occurs, then stops execution the
The conversion of one RAID level.
Wherein, the failure that may occur in RAID level conversion process can carry out customized division according to severity,
The higher failure of severity is larger to RAID level transformer effect, in some instances it may even be possible to will lead to RAID level convert failed, seriously
The lower failure of degree is smaller to RAID level transformer effect, it might even be possible to ignore.
It, can be using the higher failure of severity as first on the basis of being divided to failure according to severity
Class failure.During executing the conversion of the first RAID level, however, it is determined that first kind failure occurs, that is, indicates that serious shadow has occurred
The failure for ringing RAID level conversion then needs to stop to execute the conversion of the first RAID level, excludes to the first kind failure.
In a kind of embodiment, during executing the conversion of the first RAID level, however, it is determined that the second class failure occurs, then
Whether the number for judging that the second class failure occurs is more than or equal to the first preset threshold;If so, reporting the second class failure simultaneously
It is alerted.
Wherein, the second class failure can be that severity is lower, other class failures in addition to above-mentioned first kind failure,
Second class failure is smaller to RAID level transformer effect, will not even convert and have an impact to RAID level.Therefore, when the second class
After failure occurs, even if being not excluded for the second class failure, the process for executing the conversion of the first RAID level can continue to.
Second class failure may include various faults, be remembered when belonging to any failure generation of the second class failure
Record, and the number recorded is added up.For example, the second class failure includes failure 1, failure 2 and failure 3, when failure 1 occurs
1 time, after failure 2 occurs 2 times, the number recorded is 3 times, and after failure 3 occurs, the number recorded is updated to 4 times.
If judging, the number that the second class failure occurs is more than or equal to the first preset threshold, above-mentioned second class event
Barrier, and alerted;If judging, the number of the second class failure generation less than the first preset threshold, can not be dealt with.
Wherein, the first preset threshold can be customized setting.For example, the first preset threshold is 5, the second class failure packet
Failure 1, failure 2 and failure 3 are included, when failure 1 occurs 2 times, failure 2 occurs 2 times, after failure 3 occurs 1 time, it can be determined that goes out the
The number that two class failures occur is 5 times, then failure 1, failure 2 and failure 3 is reported and alerted.
In a kind of implementation, failure can be divided into prompt, general, serious and fatal 4 etc. according to severity
Grade will lead to RAID level convert failed when the failure of fatal grade occurs.The failure of fatal grade can be determined as to
A kind of failure, the failure that will be prompted to grade are determined as the second class failure.During executing the conversion of the first RAID level, if really
Surely first kind failure occurs, indicates the failure that fatal grade occurs, then stops executing the conversion of the first RAID level.If it is determined that occurring
Second class failure indicates the failure that cue scale occurs, then the second class failure is reported and alarmed.
It is of course also possible to regard failure 1 as a second class failure, it regard failure 2 as another the second class failure, for
Failure 1, failure 2 is respectively arranged with corresponding preset threshold, and is directed to failure 1, and failure 2 records the number of its generation respectively,
It when the number for determining that failure 1 occurs is greater than or equal to corresponding preset threshold, reports and alerts, in time for determining that failure 2 occurs
When number is greater than or equal to corresponding preset threshold, reports and alert.
S203 converts corresponding log chain according to the time of origin of first kind failure and the first RAID level, to first
RAID level conversion carries out back shelves operation, and after determining first kind Failure elimination, continues to execute the conversion of the first RAID level.
In the embodiment of the present application, during executing RAID level conversion, using log monitoring (generating log chain)
Mode records the execution information of each switching motion, fault message etc. in RAID level conversion process.Executing RAID level conversion
In the process, the execution time started of each switching motion is recorded, the deadline is executed, when a failure occurs it, records failure ID, failure
Priority, failure occur number, the information such as time broken down, if break down carry out back shelves operation when, will time
Shelves operation behavior is recorded in log chain, and adds label, is that shelves behaviour is performed back after breaking down to characterize the log recording
The record of work.
Optionally, in the embodiment of the present application, which be can store in the specified hard disk in addition to disk array.
In a kind of embodiment, in the case that storage region is idle memory region, log chain can be used for recording RAID
The execution time started of each switching motion in rank conversion process executes the deadline and each switching motion executes disk when completing
The information such as the disc format of array.It is believed that log chain is to execute sequence in chronological order come record each switching motion, with
The relevant information of each switching motion.
Start to execute switching motion 1 for example, recording 8:00 on log chain, the 8:10 switching motion 1 executes completion, at this time magnetic
Disk format is format 1;And start to execute switching motion 2 in 8:10, the 8:20 switching motion 2 executes completion, at this time disc format
For format 2.
Wherein, an instruction in RAID level conversion process may be considered a switching motion.For example, client is sent out
An instruction is sent to migrate the data A in disk array to position 2 from position 1, it may be considered that the instruction is that a conversion is dynamic
Make.
Wherein, the disc format of disk array can be different according to the difference of RAID level.For example, when disk array
When RAID level is RAID1, the disc format of disk array is striping format;When the RAID level of disk array is RAID5
When, there are three the disc format of disk it is striping format in disk array, is check code there are one the disc format of disk
Format.
After the generation of first kind failure, the time of origin of the first kind failure can be determined, and determine from log chain
The first time to match with the time of origin of the first kind failure.It is determined before the first time from log chain, conversion
Movement has executed the first object switching motion of completion.
When first time before executed completion switching motion only have a switching motion when, then can directly by this
It executes the switching motion completed and is determined as first object switching motion.
For example, RAID level conversion includes switching motion 1, switching motion 2, switching motion 3 and switching motion 4, wherein first
Switching motion 1 is executed since 20:00, and completes to execute in 20:10 points, i.e. the execution time started of switching motion 1 is 20:
00, the execution end time is 20:10.Start to execute switching motion 2 in 20:10, first kind event occurs when determining in 20:15
Barrier, then identified first time is 20:15 from log chain, and before 20:15, the switching motion for having executed completion only turns
Movement 1, then be directly determined as first object switching motion for the switching motion 1.
When the switching motion for having executed completion before first time has at least two, in a kind of implementation, Ke Yicong
It has executed at least two switching motion of completion and has arbitrarily chosen a switching motion, as first object switching motion.
For example, RAID level conversion includes switching motion 1, switching motion 2, switching motion 3 and switching motion 4, wherein first
Switching motion 1 is executed since 20:00, and completes to execute in 20:10 points, i.e. the execution time started of switching motion 1 is 20:
00, the execution end time is 20:10.Start to execute switching motion 2 in 20:10, and complete to execute in 20:20 points, is i.e. conversion is dynamic
The execution time started for making 2 is 20:10, and the execution end time is 20:20.Start to execute switching motion 3 in 20:20, and in 20:
30 points of completions execute, i.e. the execution time started of switching motion 3 is 20:20, and the execution end time is 20:30.Start in 20:30
Switching motion 4 is executed, first kind failure occurs when determining in 20:35, then identified first time is 20 from log chain:
35, before 20:35, the switching motion for having executed completion includes switching motion 1, switching motion 2 and switching motion 3, then can be with
A switching motion is arbitrarily chosen from switching motion 1, switching motion 2 and switching motion 3 is determined as first object switching motion.
In another implementation, it can choose from least two switching motion for having executed completion and execute completion
Time from nearest switching motion at the first time, as first object switching motion.
For example, RAID level conversion includes switching motion 1, switching motion 2, switching motion 3 and switching motion 4, wherein first
Switching motion 1 is executed since 20:00, and completes to execute in 20:10 points, i.e. the execution time started of switching motion 1 is 20:
00, the execution end time is 20:10.Start to execute switching motion 2 in 20:10, and complete to execute in 20:20 points, is i.e. conversion is dynamic
The execution time started for making 2 is 20:10, and the execution end time is 20:20.Start to execute switching motion 3 in 20:20, and in 20:
30 points of completions execute, i.e. the execution time started of switching motion 3 is 20:20, and the execution end time is 20:30.Start in 20:30
Switching motion 4 is executed, first kind failure occurs when determining in 20:35, then identified first time is 20 from log chain:
35, before 20:35, the switching motion for having executed completion includes switching motion 1, switching motion 2 and switching motion 3, and wherein
The execution deadline of switching motion 3 and first time are closest, therefore switching motion 3 is determined as first object conversion and is moved
Make.
After determining first object switching motion, determine that the first object switching motion executes completion from log chain
When disk array disc format, and restore the current disc format of disk array to execute completion to first object switching motion
When disk array disc format.
For example, the disc format that the first object switching motion of log chained record executes disk array when completing is striping
Format, when first kind failure occurs, the disc format of disk array is check code format, then by the disc format of disk array
Restore from current check code format to striping format.
In a kind of embodiment, in the case that storage region is busy storage region, i.e., it is stored in storage region
Data have executed at this point, log chain can be used for recording the execution time started of each switching motion in RAID level conversion process
The disc format and state data memory of disk array when completing are executed at time and each switching motion.
Wherein, the state data memory of log chained record includes the information such as the mark of institute's storing data, size, data storage
Position etc..
Start to execute switching motion 1 for example, recording 8:00 on log chain, the 8:10 switching motion 1 executes completion, at this time magnetic
Disk format is format 1, and data A is stored in position 1 in disk array.Start to execute switching motion 2 in 8:10, the 8:20 conversion is dynamic
Make 2 and execute completion, disc format is format 2 at this time, and data A is stored in position 2 in disk array.
Wherein, different switching motion executes when completing, the state data memory in disk array can be it is different,
The storage location of data may change i.e. in disk array.For example, when switching motion 1 executes completion in disk array
Data 1 are stored in position 1, and switching motion 2 execute complete when disk array in data 1 be stored in position 2 (data 1 be from position
It sets 1 to migrate to position 2).
After the generation of first kind failure, the time of origin of the first kind failure can be determined, and determine from log chain
The second time to match with the time of origin of the first kind failure.It is determined before second time from log chain, conversion
Movement has executed the second target switching motion of completion.
When the switching motion that completion has been executed before the second time only has a switching motion, then can directly by this
It executes the switching motion completed and is determined as the second target switching motion.
When the switching motion that completion has been executed before the second time has at least two, in a kind of implementation, Ke Yicong
It has executed at least two switching motion of completion and has arbitrarily chosen a switching motion, as the second target switching motion.Separately
In a kind of implementation, it can choose from least two switching motion for having executed completion and execute the deadline from second
Time nearest switching motion, as the second target switching motion.
After determining the second target switching motion, determine that the second target switching motion executes completion from log chain
When disk array disc format, and the current disc format of disk array is restored to execute completion to the second target switching motion
When disk array disc format.Also, it will be moved in the execution deadline of the second target switching motion to during the second time
The data of shifting are restored to the second target switching motion to execute state data memory when completing.
For example, it is 8:20 that the second target switching motion of log chained record, which executes the deadline, first kind failure occurs
Second time was 8:25, then within the period of 8:20 to 8:25, the data A in disk array is migrated from position 1 to position 2,
Data B is migrated from position 3 to position 4.That is, data A is located at position 2 in 8:25, data B is located at position 4.Then into
When shelves of going back operate, data A is restored to position 1 to store, data B is restored to position 3 to store.
RAID level conversion process is recorded by the way that log chain is arranged, RAID level can be re-started by returning shelves
Conversion is avoided interrupting RAID level conversion because of failure, and then is played a protective role to data.And user can check day
The content that will chain is recorded, and then RAID level conversion process can be known more about.
S204, after having executed the conversion of the first RAID level, to other in disk array in addition to above-mentioned storage region
Region carries out the second RAID level conversion.
Certainly, during executing the conversion of the second RAID level, still using the above-mentioned first RAID level conversion of execution
Mode carries out, i.e., using the execution information etc. of each switching motion in the second RAID level of log chained record conversion process, in determination
When first kind failure occurs, stop executing the conversion of the second RAID level, and according to the time of origin of the first kind failure and second
RAID level converts corresponding log chain, carries out back shelves operation to second RAID level conversion, and determining first kind event
After barrier is eliminated, the conversion of the second RAID level is continued to execute.After completing the conversion of the second RAID level, that is, complete to entire
The RAID level of disk array is converted.
In a kind of embodiment, the hard disk quantity as needed for different RAID level is different.For example, as shown in figure 1,
The hard disk quantity of RAID01 is 4, and hard disk quantity needed for RAID5 is 3 more than or equal to 3.Therefore, if disk array RAID level
Not Zhuan Huan before hard disk quantity be unsatisfactory for conversion after RAID level needed for requirement, then need execute RAID level convert it
Before, new hard disk is accessed in disk array.
Specifically, needing to judge whether the state parameter of the hard disk meets when having detected that hard disk accesses disk array
Preset RAID level switch condition.Wherein, the hard disk for accessing disk array is converted for RAID level, including the first RAID level
It Zhuan Huan not be with the conversion of the second RAID level.
Wherein, above-mentioned RAID level switch condition can wrap at least one of the capacity of hard disk, disk state etc., RAID
The capacity of set hard disk can be the case where converting according to RAID level customized setting in rank switch condition.Example
Such as, the capacity of hard disk set in RAID level switch condition is 1G, then it represents that carries out newly accessing for RAID level conversion
The free memory of hard disk at least 1G.
Disk state includes available mode, malfunction and will submit an expense account state etc., in general, RAID level conversion
Disk state is available mode in condition.
When RAID level switch condition has multiple, if the state parameter of the hard disk of access disk array is unsatisfactory for RAID level
At least one of other switch condition can think that the hard disk is unsatisfactory for RAID level switch condition.
When judging to be unsatisfactory for RAID level switch condition, then ungratified state parameter can wherein will report, with
User is allowed to replace the hard disk for meeting RAID level switch condition in time according to the state parameter reported.When judging to meet
When RAID level switch condition, then the hard disk can be determined as to the hard disk of disk array.In the first RAID level of subsequent progress
The hard disk is used in conversion and the second RAID level conversion process.
In a kind of embodiment, during executing RAID level conversion, if monitoring, client writes data into magnetic
The operation of disk array is then written into data and is stored in specified hard disk (such as SSD).The specified hard disk can be above-mentioned for storing
The hard disk of log chain, is also possible to other hard disks, in the embodiment of the present application, is not specifically limited herein.
Wherein, during executing the conversion of the first RAID level and/or the second RAID level is converted, if monitoring client
Write data into the operation of disk array.The data of client write-in disk array are the data other than disk array.
For example, user will be modified new by client when user needs to modify to the data in disk array
Data are written in disk array, to complete the modification to corresponding data in disk array.
Wherein, the mode being monitored to the write operation of client includes a variety of, for example, when client is needed data
When being written in disk array, write request first is sent to disk array controller.It is asked when disk array controller receives write-in
When asking, that is, monitor that client writes data into the operation of disk array.
Wherein, the hard disk other than specified hard disk is in disk array, that is to say, that the conversion of the first RAID level and second
RAID level conversion will not relate to specify hard disk to this.
Specified hard disk is the hard disk for being not involved in RAID level and converting connecting with disk array.The type of specified hard disk is held
The attributes such as amount may each be customized.Wherein, the type of hard disk can be SSD (Solid State Drives, solid-state be hard
Disk), HDD (Hard Disk Drive, mechanical hard disk), SSHD (solid-state hybrid hard disk) etc., the capacity of hard disk can be 64M,
128M, 512M etc., it is not limited here.
After completing the conversion of the second RAID level, that is, complete the RAID level conversion to entire disk array.It will specify
In data to be written write-in disk array in hard disk.
In a kind of implementation, disk array may include multiple hard disks, then, can will after completing RAID level conversion
In data to be written write-in disk array in specified hard disk in corresponding hard disk.
For example, the data to be written in specified hard disk are data A, write-in disk battle array in need is also stored other than data A
Data B, data C and the data D of column, then, the specified hard disk has been executed and then will be stored in the conversion of entire RAID level
In data A, data B, data C and data D write-in disk array in, such as, it is assumed that disk array include 4 hard disks, be respectively as follows:
Hard disk 1, hard disk 2, hard disk 3 and hard disk 4, wherein hard disk 1 need to be written in data A, and hard disk 2 need to be written in data B, and data C need to be written firmly
Hard disk 4 need to be written in disk 3, data D, then after completing the RAID level conversion of disk array, hard disk 1, data B is written in data A
Hard disk 2 is written, hard disk 3 is written in data C, and hard disk 4 is written in data D.
It is converted in the conversion of the first RAID level and the second RAID level by technical solution provided by the embodiments of the present application
Cheng Zhong, the operation that disk array can also be write data into client are monitored, once monitoring, are then written into data
It is first stored in specified hard disk, magnetic is written after completing the conversion of the second RAID level, then by the data to be written in specified hard disk
In disk array.In this way, not only write operation will not have an impact RAID level conversion, but also in RAID level conversion process
It realizes and the data other than disk array is subjected to normal write operation, improve user experience.
In a kind of embodiment, during executing RAID level conversion, if monitoring client from RAID Read
The operation of a certain data is taken, then judges the data stored in specified hard disk with the presence or absence of a certain data.It if it exists, then can be straight
It connects to specify from this and reads a certain data in hard disk, if it does not exist, then need to read a certain data from disk array.
Wherein, by the data that store in disk array, the client monitored is read data to be read from disk array
The operation of data is that client will be outside the reading data to disk array in disk array.
The mode that is monitored of operation to client from RAID Read access evidence includes a variety of, for example, working as client
When reading data to be read from disk array, read requests first are sent to disk array controller.Work as disk array controller
When receiving read requests, that is, monitor the operation of client from RAID Read access evidence.
Wherein, it specifies to be stored in hard disk and is read number within the setting period more than or equal to the second preset threshold
Data.Wherein, the setting period can be customized setting, turn for example, the setting period can be comprising the first RAID level
Change the whole process with the conversion of the second RAID level.
Wherein, the second preset threshold can be customized setting.For example, preset threshold is 3, then it represents that data to be read
When being read number more than or equal to 3 times, which can be stored in specified hard disk.That is, when this continues
The data to be read will not be stored in specified hard disk according to being read and being read out for the first time for the second time by access.
In specified hard disk in a kind of acquisition modes of storing data, data to be read are read from disk array in client
Later, the data to be read can be determined from reading record is read number.Wherein, it reads record and is used for recording disc battle array
Each data are read into the number outside disk array in column.That is, client reads the data in disk array each time
Getting can be recorded in reading record outside disk array, and reading record can recorde the time read each time, be read
The data informations such as store path, the size of data.
Determine data to be read be read number after, be read whether number is greater than or equal to determined by judgement
Second preset threshold;If it is, data to be read are stored in specified hard disk, if it is not, then can be to the data to be read
Without processing.
If it is determined that not stored in specified hard disk there are data to be read, then data to be read are read from disk array, and
Return to client;If it is determined that being stored with data to be read in specified hard disk, then data to be read are read from specified hard disk,
And return to client.
In the case where being stored with data to be read in specified hard disk, then the access of continuing can be read from specified hard disk
According to.In this way, will not convert and have an impact to RAID level when executing operation of the client from RAID Read access evidence.And
RAID level conversion will not influence the operation of client from RAID Read access evidence, accelerate the reading speed of client.
In technical solution provided by the embodiments of the present application, from the disk array that pending RAID level is converted, determine pre-
If the storage region of capacity;RAID level conversion is carried out to storage region, and converted in the RAID level for storage region
It monitors whether to break down in journey;If occurring, pause is converted and is debugged for the RAID level of storage region, and is continued
RAID level conversion is carried out to storage region;After completing for the RAID level conversion of storage region, to being removed in disk array
Other regions other than storage region carry out RAID level conversion.By technical solution provided by the embodiments of the present application, to whole
Before a disk array carries out RAID level conversion, RAID level first is carried out to a part of storage region in disk array and is turned
It changes, and the process is monitored, the failure is excluded if breaking down in the RAID level conversion process in storage region, and
RAID level conversion is carried out continuing with storage region, until completing to convert the RAID level of storage region, in this way, again to magnetic
Other regions in disk array in addition to storage region carry out the generation that failure can be reduced during RAID level conversion again
Rate, and then reinforce the protection to data in disk array.
The embodiment of the present application also provides a kind of system structure diagram of disk array, as shown in figure 3, depositing in disk array
The hard disk for storing up data includes HDD1 and HDD2, and new hard disk is in addition accessed in the disk array, i.e., newly access HDD.HDD1,
HDD2 and new access HDD are used to carry out RAID level conversion.
Wherein, the storage region marked off from HDD1 is region 1, and the storage region in addition to region 1 is region 4.From
The storage region marked off in HDD2 is region 2, and the storage region in addition to region 2 is region 5.It is divided from new access HDD1
Storage region out is region 3, and the storage region in addition to region 3 is region 6.First is carried out to region 1, region 2 and region 3
RAID level conversion.It completes the conversion of the first RAID level and then the second RAID level is carried out to region 4, region 5 and region 6
It does not convert.
In addition, disk array is connected with SSD, wherein the storage region marked off in the SSD is region A, and region A is used
In storage log chain, other storage regions in addition to the A of region are to be written during execution RAID level is converted for being stored in
Enter the data of disk array and meets the data to be read of preset condition.I.e. during executing RAID level conversion, if really
Surely there are data to need to be written disk array, be then stored in SSD to by the data, and determining that RAID level converts it
Afterwards, it writes the data into disk array, however, it is determined that needs read data from disk array, if the data meet preset condition
The data, then can be stored in SSD, to next time by (number is read within the setting period more than or equal to given threshold)
When having the operation for reading the data, then the data can be directly read from SSD.
The embodiment of the present application also provides a kind of flow diagram that RAID level conversion is carried out to disk array, wherein magnetic
Disk array has accessed the new hard disk for RAID level conversion before carrying out RAID level conversion, and has inserted use
In the SSD for storing data and data to be read to be written.Log chain also is stored in SSD.
As shown in figure 4, the relevant parameter of setting RAID level conversion first.Specifically, setting carries out the first RAID level
The storage region of conversion divides storage region for storing log chain from SSD, and when time to log chain and system
Between synchronize, it is inconsistent with system time to prevent conversion action time.
Then, it is pre-processed.Specifically, the available storage for detecting each hard disk and new access hard disk in disk array is empty
Between, disk state, quantity etc. whether meet the condition of RAID level conversion, if so, subsequent process could be continued, if
It is no, then the parameter for the condition that is unsatisfactory for is reported.
Third step carries out the first RAID level conversion to set storage region when pre-processing smoothly, and
It monitors whether to break down during the conversion of the first RAID level.Specifically, the disc format of storage region is turned
It changes, also, the data stored is migrated in the case where storage region is stored with data.If turning in the first RAID level
Middle generation first kind failure is changed, stops executing the conversion of the first RAID level, and the first kind failure is reported to log chain, according to
The time of origin of the first kind failure and the first RAID level convert corresponding log chain, convert and carry out to first RAID level
Shelves operation is returned, and after determining the first kind Failure elimination, the conversion of the first RAID level is continued to execute, until the first RAID level
Subsequent operation is continued to execute after not converting.
After the first RAID level converts, second is carried out to other regions in disk array in addition to storage region
RAID level conversion.It monitors whether to break down in the second RAID level conversion process, when determining generation first kind failure,
Stop executing the conversion of the second RAID level, and the first kind failure is reported into log chain, according to the generation of the first kind failure
Time and the second RAID level convert corresponding log chain, carry out back shelves operation to second RAID level conversion, and in determination
After the first kind Failure elimination, the conversion of the second RAID level is continued to execute.Until the second RAID level converts, that is, complete
RAID level conversion to disk array.
Corresponding to above-mentioned RAID level conversion method embodiment, the embodiment of the present application also provides a kind of RAID level converting means
It sets, as shown in figure 5, the RAID level conversion equipment includes:
First conversion module 510, for determining preset capacity from the disk array that pending RAID level is converted
Storage region, and the first RAID level conversion is carried out to storage region;
Stopping modular 520, for during executing the conversion of the first RAID level, however, it is determined that first kind failure occurs,
Then stop executing the conversion of the first RAID level;
Shelves module 530 is returned, for converting corresponding log according to the time of origin of first kind failure and the first RAID level
Chain carries out back shelves operation to the conversion of the first RAID level, and after determining first kind Failure elimination, continues to execute the first RAID
Rank conversion;
Second conversion module 540, for after having executed the conversion of the first RAID level, in disk array except storage region
Other regions in addition carry out the second RAID level conversion.
In a kind of embodiment, when storage region is idle memory region;Shelves module 530 is returned to be specifically used for:
The first time that the determining time of origin with first kind failure matches from log chain, wherein log chain is used for
The execution time started of each switching motion in RAID level conversion process is recorded, the deadline is executed and each switching motion has executed
At when disk array disc format;
Determine that switching motion has executed the first object switching motion of completion before the first time;
The disk lattice of disk array when restoring the disc format of disk array to execute completion to first object switching motion
Formula.
In a kind of embodiment, when storage region is busy storage region;Shelves module 530 is returned to be specifically used for:
The second time that the determining time of origin with first kind failure matches from log chain, wherein log chain is used for
The execution time started of each switching motion in RAID level conversion process is recorded, the deadline is executed and each switching motion has executed
At when disk array disc format and state data memory;
It determines before the second time, switching motion has executed the second target switching motion of completion;
The disk lattice of disk array when restoring the disc format of disk array to execute completion to the second target switching motion
Formula, and will restore in execution deadline to the data migrated during the second time of the second target switching motion to the second target
Switching motion executes state data memory when completing.
In a kind of embodiment, device can also include:
First judgment module, for during executing the conversion of the first RAID level, however, it is determined that the second class failure occurs,
Whether the number for then judging that the second class failure occurs is more than or equal to the first preset threshold;
Reporting module, for when the judging result of first judgment module, which is, is, then reporting the second class failure and being accused
It is alert.
In a kind of embodiment, device can also include:
Memory module, for during executing RAID level conversion, client to write data into disk if monitoring
The operation of array is then written into data and is stored in specified hard disk, wherein specified hard disk is the hard disk in addition to disk array;
Writing module, for after completing the conversion of the second RAID level, magnetic to be written in the data to be written in specified hard disk
Disk array.
In a kind of embodiment, device can also include:
Second judgment module is used for during executing RAID level conversion, if monitoring client from disk array
The operation of data is read, then judges whether be stored with data to be read in specified hard disk, wherein be stored with and setting in specified hard disk
The data that number is more than or equal to the second preset threshold are read in fixed cycle;
First read module, for when the judging result of the second judgment module be it is no when, then from disk array read to
Data are read, and return to client;
Second read module, for when the judging result of the second judgment module be when, then from specified hard disk read to
Data are read, and return to client.
In technical solution provided by the embodiments of the present application, from the disk array that pending RAID level is converted, determine pre-
If the storage region of capacity;RAID level conversion is carried out to storage region, and converted in the RAID level for storage region
It monitors whether to break down in journey;If occurring, pause is converted and is debugged for the RAID level of storage region, and is continued
RAID level conversion is carried out to storage region;After completing for the RAID level conversion of storage region, to being removed in disk array
Other regions other than storage region carry out RAID level conversion.By technical solution provided by the embodiments of the present application, to whole
Before a disk array carries out RAID level conversion, RAID level first is carried out to a part of storage region in disk array and is turned
It changes, and the process is monitored, the failure is excluded if breaking down in the RAID level conversion process in storage region, and
RAID level conversion is carried out continuing with storage region, until completing to convert the RAID level of storage region, in this way, again to magnetic
Other regions in disk array in addition to storage region carry out the generation that failure can be reduced during RAID level conversion again
Rate, and then reinforce the protection to data in disk array.
The embodiment of the present application also provides a kind of electronic equipment, as shown in fig. 6, including processor 610 and machine readable depositing
Storage media 620, machine readable storage medium 620 are stored with the machine-executable instruction that can be executed by processor 610.
In addition, as shown in fig. 6, electronic equipment can also include: communication interface 630 and communication bus 640;Wherein, it handles
Device 610, machine readable storage medium 620, communication interface 630 complete mutual communication, communication interface by communication bus 640
630 for the communication between above-mentioned electronic equipment and other equipment.
Processor 610 promotes to execute the embodiment of any of the above-described kind of RAID level conversion method, wherein RAID level conversion
Method includes:
From the disk array that pending RAID level is converted, the storage region of preset capacity is determined, and deposit to described
Storage area domain carries out the first RAID level conversion;
During executing first RAID level conversion, however, it is determined that first kind failure occurs, then stops executing institute
State the conversion of the first RAID level;
Corresponding log chain is converted according to the time of origin of the first kind failure and first RAID level, to described
The conversion of first RAID level carries out back shelves operation, and after determining the first kind Failure elimination, continues to execute described first
RAID level conversion;
After having executed the first RAID level conversion, to its in the disk array in addition to the storage region
He carries out the second RAID level conversion in region.
By technical solution provided by the embodiments of the present application, before carrying out RAID level conversion to entire disk array,
RAID level conversion first is carried out to a part of storage region in disk array, and the process is monitored, if in memory block
It breaks down in the RAID level conversion process in domain, excludes the failure, and carry out RAID level continuing with storage region and turn
It changes, until completing to convert the RAID level of storage region, in this way, again to other areas in disk array in addition to storage region
Domain carries out the incidence that failure can be reduced during RAID level conversion again, and then reinforces the guarantor to data in disk array
Shield.
Above-mentioned communication bus 640 can be PCI, and (Peripheral Component Interconnect, external components are mutual
Even standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) be total
Line etc..The communication bus 640 can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, only with one in Fig. 6
Bar thick line indicates, it is not intended that an only bus or a type of bus.
Machine readable storage medium 620 may include RAM (Random Access Memory, random access memory),
It also may include NVM (Non-Volatile Memory, nonvolatile memory), for example, at least a magnetic disk storage.Separately
Outside, machine readable storage medium 620 can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor 610 can be general processor, including CPU (Central Processing Unit, centre
Manage device), NP (Network Processor, network processing unit) etc.;It can also be DSP (Digital Signal
Processing, digital signal processor), ASIC (Application Specific Integrated Circuit, it is dedicated
Integrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable patrol
Collect device, discrete gate or transistor logic, discrete hardware components.
Corresponding to the embodiment of above-mentioned RAID level conversion method, machine readable deposited the embodiment of the present application also provides a kind of
Storage media is stored with machine-executable instruction, and when being called and being executed by processor, machine-executable instruction promotes processor real
Existing above-mentioned RAID level conversion method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for RAID level
For other conversion equipment, electronic equipment and machine readable storage medium embodiment, turn since it is substantially similar to RAID level
Embodiment of the method is changed, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all
Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application
It is interior.
Claims (14)
1. a kind of redundant array of independent disks RAID level conversion method, which is characterized in that the described method includes:
From the disk array that pending RAID level is converted, the storage region of preset capacity is determined, and to the memory block
Domain carries out the first RAID level conversion;
During executing first RAID level conversion, however, it is determined that first kind failure occurs, then stops executing described the
The conversion of one RAID level;
Corresponding log chain is converted according to the time of origin of the first kind failure and first RAID level, to described first
RAID level conversion carries out back shelves operation, and after determining the first kind Failure elimination, continues to execute the first RAID
Rank conversion;
After having executed the first RAID level conversion, to other areas in the disk array in addition to the storage region
Domain carries out the second RAID level conversion.
2. the method according to claim 1, wherein when the storage region is idle memory region;It is described
Corresponding log chain is converted according to the time of origin of the first kind failure and first RAID level, to the first RAID
Rank conversion carries out back shelves operation, comprising:
The first time that the determining time of origin with the first kind failure matches from log chain, wherein the log chain
For recording the execution time started of each switching motion in RAID level conversion process, executes the deadline and each switching motion is held
The disc format of row disk array when completing;
It determines before the first time, switching motion has executed the first object switching motion of completion;
The disc format of the disk array is restored to the first object switching motion to execute disk array when completing
Disc format.
3. the method according to claim 1, wherein when the storage region is busy storage region;Institute
It states and corresponding log chain is converted according to the time of origin of the first kind failure and first RAID level, to described first
RAID level conversion carries out back shelves operation, comprising:
The second time that the determining time of origin with the first kind failure matches from log chain, wherein the log chain
For recording the execution time started of each switching motion in RAID level conversion process, executes the deadline and each switching motion is held
The disc format and state data memory of row disk array when completing;
It determines before second time, switching motion has executed the second target switching motion of completion;
The disc format of the disk array is restored to the second target switching motion to execute disk array when completing
Disc format, and will be in the execution deadline of the second target switching motion to the number migrated during second time
According to the state data memory restored when executing completion to the second target switching motion.
4. the method according to claim 1, wherein the method also includes:
During executing first RAID level conversion, however, it is determined that the second class failure occurs, then judges second class
Whether the number that failure occurs is more than or equal to the first preset threshold;
If so, reporting the second class failure and being alerted.
5. the method according to claim 1, wherein the method also includes:
During executing RAID level conversion, if monitoring, client writes data into the operation of the disk array,
It is written into data and is stored in specified hard disk, wherein the specified hard disk is the hard disk in addition to the disk array;
After completing the second RAID level conversion, the disk is written into the data to be written in the specified hard disk
Array.
6. the method according to claim 1, wherein the method also includes:
During executing RAID level conversion, if monitoring the operation of client from RAID Read access evidence,
Judge whether be stored with data to be read in the specified hard disk, wherein be stored within the setting period in the specified hard disk
It is read the data that number is more than or equal to the second preset threshold;
If it is not, reading the data to be read from the disk array, and return to the client;
If so, then reading the data to be read from the specified hard disk, and return to the client.
7. a kind of RAID level conversion equipment, which is characterized in that described device includes:
First conversion module, for determining the memory block of preset capacity from the disk array that pending RAID level is converted
Domain, and the first RAID level conversion is carried out to the storage region;
Stopping modular, for during executing first RAID level conversion, however, it is determined that first kind failure occurs, then stops
Only execute the first RAID level conversion;
Shelves module is returned, for converting corresponding log according to the time of origin of the first kind failure and first RAID level
Chain carries out back shelves operation to first RAID level conversion, and after determining the first kind Failure elimination, continues to execute
The first RAID level conversion;
Second conversion module, for being deposited in the disk array except described after having executed the first RAID level conversion
Other regions other than storage area domain carry out the second RAID level conversion.
8. device according to claim 7, which is characterized in that when the storage region is idle memory region;It is described
Shelves module is returned to be specifically used for:
The first time that the determining time of origin with the first kind failure matches from log chain, wherein the log chain
For recording the execution time started of each switching motion in RAID level conversion process, executes the deadline and each switching motion is held
The disc format of row disk array when completing;
It determines before the first time, switching motion has executed the first object switching motion of completion;
The disc format of the disk array is restored to the first object switching motion to execute disk array when completing
Disc format.
9. device according to claim 7, which is characterized in that when the storage region is busy storage region;Institute
Shelves module is stated back to be specifically used for:
The second time that the determining time of origin with the first kind failure matches from log chain, wherein the log chain
For recording the execution time started of each switching motion in RAID level conversion process, executes the deadline and each switching motion is held
The disc format and state data memory of row disk array when completing;
It determines before second time, switching motion has executed the second target switching motion of completion;
The disc format of the disk array is restored to the second target switching motion to execute disk array when completing
Disc format, and will be in the execution deadline of the second target switching motion to the number migrated during second time
According to the state data memory restored when executing completion to the second target switching motion.
10. device according to claim 7, which is characterized in that described device further include:
First judgment module, for during executing first RAID level conversion, however, it is determined that the second class failure occurs,
Whether the number for then judging that the second class failure occurs is more than or equal to the first preset threshold;
Reporting module, for when the judging result of the first judgment module, which is, is, then the second class failure being reported to go forward side by side
Row alarm.
11. device according to claim 7, which is characterized in that described device further include:
Memory module, for during executing RAID level conversion, client to write data into the disk if monitoring
The operation of array is then written into data and is stored in specified hard disk, wherein the specified hard disk is in addition to the disk array
Hard disk;
Writing module is used for after completing the second RAID level conversion, by the number to be written in the specified hard disk
According to the write-in disk array.
12. device according to claim 7, which is characterized in that described device further include:
Second judgment module is used for during executing RAID level conversion, if monitoring client from the disk array
The operation for reading data, then judge whether be stored with data to be read in the specified hard disk, wherein deposit in the specified hard disk
It contains and is read the data that number is more than or equal to the second preset threshold within the setting period;
First read module, for when the judging result of second judgment module is no, then being read from the disk array
The data to be read are taken, and return to the client;
Second read module, for when the judging result of second judgment module, which is, is, then being read from the specified hard disk
The data to be read are taken, and return to the client.
13. a kind of electronic equipment, which is characterized in that including processor and machine readable storage medium, the machine readable storage
Media storage has the machine-executable instruction that can be executed by the processor, and the processor is by the machine-executable instruction
Promote: realizing any method and step of claim 1-6.
14. a kind of machine readable storage medium, which is characterized in that be stored with machine-executable instruction, by processor call and
When execution, the machine-executable instruction promotes the processor: realizing any method and step of claim 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811405206.7A CN109542687B (en) | 2018-11-23 | 2018-11-23 | RAID level conversion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811405206.7A CN109542687B (en) | 2018-11-23 | 2018-11-23 | RAID level conversion method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109542687A true CN109542687A (en) | 2019-03-29 |
CN109542687B CN109542687B (en) | 2020-12-25 |
Family
ID=65849388
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811405206.7A Active CN109542687B (en) | 2018-11-23 | 2018-11-23 | RAID level conversion method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109542687B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112084061A (en) * | 2019-06-15 | 2020-12-15 | 国际商业机器公司 | Reducing data loss events in RAID arrays of the same RAID level |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7213166B2 (en) * | 2001-04-11 | 2007-05-01 | Broadcom Corporation | In-place data transformation for fault-tolerant disk storage systems |
CN101369217A (en) * | 2008-08-30 | 2009-02-18 | 成都市华为赛门铁克科技有限公司 | RAID level transforming method and apparatus |
CN101482800A (en) * | 2008-01-10 | 2009-07-15 | 芯发威达电子(上海)有限公司 | Rank conversion method and system for redundant array of independent disks |
CN101556802A (en) * | 2009-05-25 | 2009-10-14 | 杭州华三通信技术有限公司 | RAID array transposing method and device thereof |
US8392654B2 (en) * | 2009-04-17 | 2013-03-05 | Lsi Corporation | Raid level migration for spanned arrays |
CN104238952A (en) * | 2013-06-06 | 2014-12-24 | 鸿富锦精密工业(武汉)有限公司 | Magnetic disk partition format switching method and system |
CN106371950A (en) * | 2015-07-20 | 2017-02-01 | 中兴通讯股份有限公司 | Method and device for achieving RAID level conversion |
CN107209547A (en) * | 2015-02-13 | 2017-09-26 | 国际商业机器公司 | Disk in RAID array retains and trouble-saving |
CN107479836A (en) * | 2017-08-29 | 2017-12-15 | 郑州云海信息技术有限公司 | Disk failure monitoring method, device and storage system |
-
2018
- 2018-11-23 CN CN201811405206.7A patent/CN109542687B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7213166B2 (en) * | 2001-04-11 | 2007-05-01 | Broadcom Corporation | In-place data transformation for fault-tolerant disk storage systems |
CN101482800A (en) * | 2008-01-10 | 2009-07-15 | 芯发威达电子(上海)有限公司 | Rank conversion method and system for redundant array of independent disks |
CN101369217A (en) * | 2008-08-30 | 2009-02-18 | 成都市华为赛门铁克科技有限公司 | RAID level transforming method and apparatus |
US8392654B2 (en) * | 2009-04-17 | 2013-03-05 | Lsi Corporation | Raid level migration for spanned arrays |
CN101556802A (en) * | 2009-05-25 | 2009-10-14 | 杭州华三通信技术有限公司 | RAID array transposing method and device thereof |
CN104238952A (en) * | 2013-06-06 | 2014-12-24 | 鸿富锦精密工业(武汉)有限公司 | Magnetic disk partition format switching method and system |
CN107209547A (en) * | 2015-02-13 | 2017-09-26 | 国际商业机器公司 | Disk in RAID array retains and trouble-saving |
CN106371950A (en) * | 2015-07-20 | 2017-02-01 | 中兴通讯股份有限公司 | Method and device for achieving RAID level conversion |
CN107479836A (en) * | 2017-08-29 | 2017-12-15 | 郑州云海信息技术有限公司 | Disk failure monitoring method, device and storage system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112084061A (en) * | 2019-06-15 | 2020-12-15 | 国际商业机器公司 | Reducing data loss events in RAID arrays of the same RAID level |
Also Published As
Publication number | Publication date |
---|---|
CN109542687B (en) | 2020-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7870345B2 (en) | Systems and methods for managing stalled storage devices | |
CN102880522B (en) | Hardware fault-oriented method and device for correcting faults in key files of system | |
US7984324B2 (en) | Systems and methods for managing stalled storage devices | |
CN102591591B (en) | Disk detection system, disk detection method and network store system | |
CN103246478B (en) | A kind of based on the disc array system of software PLC support without packet type overall situation HotSpare disk | |
TW201324130A (en) | Data storage method for a plurality of RAID systems and data storage system thereof | |
CN105224888B (en) | A kind of data of magnetic disk array protection system based on safe early warning technology | |
CN109710456B (en) | Data recovery method and device | |
CN102164165B (en) | Management method and device for network storage system | |
CN103136075A (en) | Disk system, data retaining device, and disk device | |
CN110750213A (en) | Hard disk management method and device | |
JP6965626B2 (en) | Storage controller and control program | |
CN110187841A (en) | A kind of method, apparatus and storage server of system management memory disk | |
CN106980468A (en) | Trigger the method and device that RAID array is rebuild | |
CN109542687A (en) | A kind of RAID level conversion method and device | |
CN106990918A (en) | Trigger the method and device that RAID array is rebuild | |
CN104484135A (en) | Method and device for quickly reading data | |
JP5440073B2 (en) | Information processing apparatus, information processing apparatus control method, and control program | |
CN116414661B (en) | Processing method and device for solid state disk of distributed storage | |
CN112084097B (en) | Disk alarm method and device | |
JP5273185B2 (en) | Recording medium control system, recording medium control method, and recording medium control program | |
CN103116474B (en) | A kind of raid card method for designing for data recovery and selfreparing | |
CN102147773A (en) | Method, device and system for managing high-end disk array data | |
CN112306815B (en) | Method, device, equipment and medium for monitoring IO information between OSD side and master slave in Ceph | |
JP4605374B2 (en) | Storage device testing method and apparatus |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |