CN102023812B - RAID (redundant array of inexpensive disk) level transformation method and transformation device - Google Patents

RAID (redundant array of inexpensive disk) level transformation method and transformation device Download PDF

Info

Publication number
CN102023812B
CN102023812B CN 200910174224 CN200910174224A CN102023812B CN 102023812 B CN102023812 B CN 102023812B CN 200910174224 CN200910174224 CN 200910174224 CN 200910174224 A CN200910174224 A CN 200910174224A CN 102023812 B CN102023812 B CN 102023812B
Authority
CN
China
Prior art keywords
raid level
raid
level transforming
unit
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.)
Expired - Fee Related
Application number
CN 200910174224
Other languages
Chinese (zh)
Other versions
CN102023812A (en
Inventor
郭楠
林宇
Original Assignee
Huawei Symantec Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN 200910174224 priority Critical patent/CN102023812B/en
Publication of CN102023812A publication Critical patent/CN102023812A/en
Application granted granted Critical
Publication of CN102023812B publication Critical patent/CN102023812B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides an RAID (redundant array of inexpensive disk) level transformation method. The method comprises: when the fact that the system residual available space meets the space variation required by RAID level transformation of the current LUN (logical unit number) is judged, the original mapping table of the current LUN and a distribution table after the RAID level transformation are read; and the fact that data occupation in a disc unit reflected by the original mapping table is empty or non-empty is judged, if the data occupation is empty, corresponding logical unit items in a new mapping table after the RAID level transformation of the current LUN are set to be a specified value, and otherwise, whether the position of the data to be copied in the disc unit after the RAID level transformation and the position before the RAID level transformation are in the same physical disc or not is judged according to the distribution table after the RAID level transformation and the original mapping table, and mapping table modification or data shift is carried out according to the judging result. The invention enhances the flexibility of the RAID level transformation, reduces data processing quantity and improves utilization factor of the disc space in an RAID.

Description

A kind of RAID level transforming method and converting means
Technical field
The embodiment of the invention relates to the disk storage field, relates in particular to a kind of RAID level transforming method and converting means.
Background technology
Raid-array (RAID, Redundant Array of Independent Disks) or Redundant Arrays of Inexpensive Disks (RAID, Redundant Array of Independent Disks) is the disk system of simultaneously storage and reading out data on a kind of a plurality of physical disks combining through certain way in essence, its objective is to be to reduce mistake, to improve fiduciary level and to increase considerably the data throughout of storage system.According to the difference of implementation or function, RAID has different rank (level).For example, if adopt Data Segmentation technology (Data Striping) to realize simultaneously a plurality of disks being carried out read-write operation, can consist of rank and be 0 RAID(RAID 0); For another example, be 1 RAID(RAID 1 if adopt disk mirroring (Disk Mirror) technology to realize content synchronization backup copy with a disk in another disk, can consist of rank); Perhaps, be 10 RAID(RAID 10 or RAID 1+0 with realizing the technology combination of RAID 0 and RAID 1, can consisting of rank) etc.
In order to satisfy user's different demands, adopt the storage system of RAID should have other function of the RAID of change level, i.e. RAID level transforming; In case RAID rank generation conversion, logical unit number wherein (LUN, Logic Unit Number) takes up space and may change.The method of a kind of RAID of realization level transforming of prior art is: calculate the remaining space of whole RAID, judge requisite space when whether this remaining space is enough to support to carry out this RAID level transforming; If satisfy, then from first LUN, judge in turn the remaining space of each single LUN, if the remaining space of current certain LUN satisfies this LUN when carrying out level transforming requisite space is then implemented level transforming to this LUN; If the remaining space of current LUN does not satisfy requisite space when carrying out level transforming, then the remaining space of accumulation calculating N LUN from this current LUN obtains an accumulated value, requisite space when enough this N LUN of this accumulated value carry out level transforming, then backward is carried out level transforming successively with this N LUN.
The inventor to above-mentioned prior art study for a long period of time and put into practice in find, be subject to many conditions when realizing the RAID level transforming, lack dirigibility; Simultaneously, prior art is still carried out level transforming for its allocation space when data are sky, and resource and the time of obviously having expended system when specific implementation are larger.
Summary of the invention
The embodiment of the invention provides a kind of RAID level transforming method, solves prior art lacks dirigibility, expends system resource and time when carrying out the RAID level transforming problem.
A kind of RAID level transforming method comprises:
Judge spatial variations amount required when whether the system spare free space satisfies current logical unit number and carry out the RAID level transforming; If satisfy, then read the former mapping table of current logical unit number and the layout table behind the RAID level transforming; Judging that data take in the disc unit of described former mapping table reflection is sky or non-NULL, if data take and are sky in the described disc unit, then corresponding logical block item is set to setting in the new mapping table behind the RAID level transforming of current logical unit number; Otherwise, according to the layout table behind the RAID level transforming and described former mapping table, judge whether carry out behind the RAID level transforming the required duplicating position of data in the described disc unit belongs to the Same Physical disk with the position of carrying out before the RAID level transforming, and carry out mapping table according to judged result and revise or data-moving; Describedly carry out according to judged result that mapping table is revised or data-moving comprises: if judge that carrying out behind the RAID level transforming the required duplicating position of data in the described disc unit belongs to the Same Physical disk with the position of carrying out before the RAID level transforming, then revise the value of the new mapping table logical block of RAID under the current logical unit number; Otherwise, for described data are redistributed the physical disk unit and are carried out data and move.
A kind of RAID level transforming device comprises: judge module is used for judging spatial variations amount required when whether the system spare free space satisfies current logical unit number and carry out the RAID level transforming; The table read module, when being used for described judge module and judging spatial variations amount required when the system spare free space satisfies current logical unit number and carries out the RAID level transforming, read the layout table after the former mapping table of described current logical unit number and RAID structure change; The mapping processing unit, corresponding logical block item is set to data in setting or the described disc unit to take judged result for non-NULL and judging unit is to carry out behind the RAID level transforming the required duplicating position of data in the described disc unit and carry out position before the RAID level transforming when belonging to the Same Physical disk in the new mapping table when being used for described disc unit data and taking as sky behind the RAID level transforming of current logical unit number, revise RAID under the current logical unit number the value of new mapping table logical block; Judging unit judges when being used for described disc unit data and taking as non-NULL whether carry out behind the RAID level transforming the required duplicating position of data in the described disc unit belongs to the Same Physical disk with the position of carrying out before the RAID level transforming; Allocation units, after being used for described judgment unit judges and carrying out the RAID level transforming, the required duplicating position of data is that described data are redistributed the physical disk unit and carried out data and move when carrying out not belonging to the Same Physical disk before the RAID level transforming in the described disc unit.
When the embodiment of the invention can satisfy current logical unit number and carries out the RAID level transforming by judging the system spare free space after the required spatial variations amount, layout table after changing according to the former mapping table of this current LUN and RAID structure, respectively data in the disc unit of described former mapping table reflection are taken as sky or non-NULL carry out different processing and create new mapping table as LUN with this, thereby finish the RAID level transforming.Because the embodiment of the invention can be carried out the RAID level transforming for any LUN, has strengthened the dirigibility of RAID level transforming; Simultaneously, the identical data that is in the Same Physical disk is not moved, reduced data processing amount, and, data are taken disc unit for sky no longer carries out physical space in RAID level transforming process distribution also improved the utilization factor of disk space among the RAID.
Description of drawings
Fig. 1 is the RAID level transforming method basic flow sheet that the embodiment of the invention provides;
Fig. 2 be the embodiment of the invention provide whole physical disk space is divided into discrete physical disk cell schematics;
Fig. 3 A is the layout table synoptic diagram of the RAID 10 that provides of the embodiment of the invention;
Fig. 3 B is the layout table synoptic diagram of the RAID 0 that provides of the embodiment of the invention;
Fig. 4 is the mapping table synoptic diagram of the RAID 0 that provides of the embodiment of the invention;
Fig. 5 is the mapping table synoptic diagram of LUN before the RAID level transforming that provides of the embodiment of the invention;
Fig. 6 is the RAID level transforming device basic logical structure synoptic diagram that the embodiment of the invention provides.
Embodiment
The embodiment of the invention provides RAID level transforming method, when judging that the system spare free space can satisfy current single LUN and carries out the RAID level transforming after the required spatial variations amount, layout table after changing according to the former mapping table of this LUN and RAID structure, respectively data in the disc unit of described former mapping table reflection are taken as sky or non-NULL carry out different processing and create the new mapping table of current LUN with this, thereby finish the RAID level transforming.The embodiment of the invention also provides corresponding RAID level transforming device.Below be elaborated respectively.
See also Fig. 1, the RAID level transforming method basic flow sheet that the embodiment of the invention provides comprises:
Step S101 judges spatial variations amount required when whether the system spare free space satisfies current LUN and carry out the RAID level transforming.
As previously mentioned, the rank of RAID changes or during conversion RAID rank, and the LUN take up space among this RAID and the rank of the RAID front institute that changes takes up space and compares and can change, and for example, institute takes up space and increases or institute takes up space and reduces.If the space that increases or the space that reduces be not within the system spare free space, then the system spare free space is not enough to support the RAID level transforming one time, namely may cause the failure of RAID level transforming.Therefore, be necessary when implementing the RAID level transforming, to judge spatial variations amount required when whether the system spare free space satisfies current single LUN and carry out the RAID level transforming.
In embodiments of the present invention, the method for judgement can be:
S1011 inquires about the untapped disc unit of each physical disk to obtain the system spare free space.
The untapped disc unit of each physical disk can exist with the form of formation (queue), therefore, in fact can know the untapped disc unit of each physical disk by access queue, the summation of these untapped disc units has consisted of the system spare free space.
S1012, space required when calculating current LUN and carrying out the RAID level transforming increases or reduction.This is known technology, does not do and gives unnecessary details.
S1013 if LUN takes up space and increases or reduction remains free space less than said system, judges that then required space increased or reduction when the system spare free space satisfied current LUN and carries out the RAID level transforming, thereby can carry out the RAID level transforming; Otherwise, judge that required space did not increase or reduction when the system spare free space did not satisfy current LUN and carries out the RAID level transforming, the RAID level transforming may failure.
Still it should be noted that herein the embodiment of the invention is to carry out RAID for LUN to carry out level transforming (when carrying out for all LUN after the RAID level transforming finishes, the RAID level transforming is finished thereupon), needn't calculate whole RAID level transforming requisite space.Therefore, the embodiment of the invention is not limited to judge whether the system spare free space satisfies whole RAID level transforming requisite space, and compared with prior art, the dirigibility of carrying out the RAID level transforming significantly strengthens.
Step S102 is if the system spare free space satisfies current LUN when carrying out the RAID level transforming required spatial variations amount then reads the layout table after the former mapping table of current LUN and RAID structure change.
In embodiment provided by the invention, need at least to safeguard the layout table of two class table: RAID and the mapping table of LUN, wherein, the interior perhaps structure of mapping table depends on layout table, namely can generate the mapping table corresponding with LUN according to layout table.Below respectively this two classes table is explained.
The structure of layout table or content depend on physical disk and the logic magnetic disc (or virtual disk) in the storage system, and, when storage system powers on or plug the generation of disk etc. event, can regenerate layout table corresponding to RAID rank.Physical disk among the structure of layout table or content and the RAID and logic magnetic disc be close association in fact, below illustrates it.
In embodiment provided by the invention, whole physical disk space can be divided into discrete physical disk unit (DU, Disk Unit) and form Buffer Pool with this.Each physics DU namely represent the affiliated physical disk of this DU and the skew of this DU in affiliated physical disk for DU number, and physical disk represents with the disk identification card number with DU number sign.As shown in Figure 2, in x+1 the physical disk that consists of RAID, suppose the 2nd physical disk (the disk identification card number is 2) is divided into m+1 physics DU, then DU number for the DU of 2:0 represents that it is 2 physical disk that this DU belongs to the disk identification card number, and its skew in this physical disk is 0; For another example, DU number for the DU of 2:5 represents that it is 2 physical disk that this DU belongs to the disk identification card number, and its skew in this physical disk is 5 etc.
The user can be as required, and the physical disk that consists of RAID is set to several logic magnetic discs, and after this, the physical disk that consists of RAID is just presented to the user with logic magnetic disc, and the user can know actual physical disk.Further, each logic magnetic disc has the logic magnetic disc unit, i.e. logic DU, and certain logic DU is always corresponding to certain physics DU, and like this, logic magnetic disc is just corresponding with whole physical disk space.
The below take 6 physical disks (the disk identification card number as 0,1 ..., 4,5) and 4 logic magnetic discs (LD, Logic Disk) LD0, LD1, LD2 and LD3 be the layout table that example illustrates RAID.
See also Fig. 3 A and Fig. 3 B, show respectively rank and be 10 RAID(RAID 10) layout table and rank be 0 or 5 RAID(RAID 0 or RAID 5) layout table.A logic magnetic disc is shown in each tabulation in the layout table of Fig. 3 A or Fig. 3 B, a logic magnetic disc band of each line display (LDS, Logic Disk Stripe), and each lattice represents a logic DU, disc unit under the corresponding physics DU of this logic of numeral wherein DU.
Please continue to consult Fig. 4, the mapping table of the LUN of the RAID 0 that the embodiment of the invention provides.The mapping table of a LUN has recorded the affiliated physical disk of physics DU and this physics DU skew in the physical disk under it that each logic DU is corresponding among this LUN.For example, for Fig. 4, by logic magnetic disc 2(LD2) and logic magnetic disc band 2(LDS2) definite logic DU, its record value is DU 4:1, represent that namely it is 4 physical disk that physics DU corresponding to this logic DU belongs to the physical disk identification card number, and to be in this physical disk bias internal be 1 position.Because in embodiments of the present invention, adopting distribution technique (allocate-on-write) when writing, when a logic DU has I O write request, just is that this logic DU distributes a physics DU namely.So, in the mapping table of LUN, when a logic DU not yet distributes corresponding with it physics DU, the record value of this logic DU can be initialized as a setting, for example, be initialized as 0xffffffff etc.
In embodiment provided by the invention, in order to realize the RAID level transforming, should read the layout table after the former mapping table of current single LUN and RAID structure change.
Step S103, take for data in the disc unit of the former mapping table reflection of current LUN and to be sky or non-NULL, layout table and described former mapping table after changing according to the RAID structure take as sky or non-NULL data in the disc unit respectively and carry out different processing and create the new mapping table of current LUN with this.
In embodiments of the present invention, should create the new mapping table of a current single LUN.During layout table after the former mapping table that has obtained current single LUN and RAID structure change, can be according to the content in two tables, logic DU in the former mapping table is as unit, list item to new mapping table is composed record value, be divided into again two kinds of situations herein, below the difference of its processing mode be described respectively.
Situation one:
If data take and are sky in certain disc unit of the former mapping table reflection of current single LUN, for example, the logic DU that LD2 shown in Figure 4 and LDS1 determine, its record value is 0xffffffff, showing that data take in disc unit corresponding to this logic DU is sky, then composing record value at list item corresponding to new mapping table is a setting, for example, and 0xffffffff etc.
Situation two:
If data take not for empty in certain disc unit of the former mapping table reflection of current single LUN, for example, the logic DU that the logic DU that LD1 shown in Figure 4 and LDS2 determine or LD0 and LDS1 determine etc., then further judge and carry out in this logic DU is corresponding behind the RAID level transforming the physical disk unit the required duplicating position of data and carry out whether belonging to the Same Physical disk before the RAID level transforming, if, then do not need to move data wherein, only need the relevant position in the new mapping table of the direct current single LUN of modification, give a record value; If carry out in this logic DU is corresponding behind the RAID level transforming the physical disk unit the required duplicating position of data and carry out not belonging to the Same Physical disk before the RAID level transforming, then redistribute the physical disk unit for these data and carry out data and move, correspondingly, also need to revise the relevant position in the new mapping table of current single LUN, give a record value.
With prior art indistinguishably to pending data for empty and data be these two kinds of basic conditions of non-NULL data during for sky still allocation space carry out level transforming and compare, the scheme of the embodiment of the invention is actual only to take disc unit allocation space for non-NULL to carry out level transforming for data, therefore saved resource and time, improved the utilization factor of disk space.
Below in conjunction with the mapping table of LUN before Fig. 3 A, Fig. 3 B and the RAID level transforming shown in Figure 5, illustrate above-mentioned situation two corresponding processing schemes.
Suppose that the storage system in the embodiment of the invention is made of 6 physical disks (4 logic magnetic discs), need to carry out a LUN from the level transforming of RAID 0 to RAID10.As shown in Figure 5, if the determined logic DU(of LD0 and LDS0 is hereinafter to be referred as logic DU0) data take and be non-NULL owing to be to transform to RAID10, then in the time will carrying out the RAID level transforming, need to the data among this logic DU0 be backuped.That is to say that the data of this logic DU0 need to be moved 10 grades of other layout table logics of RAID DU0(and be determined by LD0 and LDS0) and logic DU1(determined by LD1 and LDS0) the physics DU of correspondence.
By Fig. 3 A as can be known, because the identification card number of the affiliated physical disk of physics DU that 10 grades of other layout table logics of RAID DU0 is corresponding is 0, and can be known by Fig. 5, the identification card number of physical disk also is 0 under the physics DU that logic DU0 is corresponding in the mapping table of LUN before the RAID level transforming, be in the mapping table of LUN before the RAID level transforming among the logic DU0 the required duplicating position of data with carry out belonging to the Same Physical disk before the RAID level transforming, therefore, in carrying out the level transforming process, the data of 10 grades of other layout table logics of RAID DU0 do not need to move, and only need the record value of the relevant position of logic DU0 in new mapping table of modification RAID 10 rank layout table to get final product.Here suppose that logic DU0 is corresponding in the mapping table of LUN before the RAID level transforming physics DU is that skew in 0 the physical disk is 0 at identification card number, then the record value of the relevant position of the logic DU0 of 10 grades of other layout table of RAID in new mapping table is revised as DU 0:0.
But the identification card number of the affiliated physical disk of physics DU that 10 grades of other layout table logics of RAID DU1 is corresponding is 1, and the identification card number of physical disk is 0 under the physics DU that logic DU0 is corresponding in the mapping table of LUN before the RAID level transforming.Obviously, before the RAID level transforming in the mapping table of LUN the required duplicating position of data of logic DU0 with carry out not belonging to the Same Physical disk before the RAID level transforming, then when transforming to the RAID10 rank, need to redistribute a physics DU and data-moving is arrived this physics DU for the data of logic DU0 in the mapping table of LUN before the RAID level transforming, simultaneously, revise the record value of the relevant position of logic DU0 in new mapping table in 10 grades of other layout table of RAID.Here the physics DU that redistributes of hypothesis is that skew in 1 the physical disk is 0 at identification card number, and then the record value of the relevant position of the logic DU0 in the layout table of RAID 10 rank LUN in new mapping table is revised as DU 1:0.
For LD1 in the mapping table of LUN before the RAID level transforming and the determined logic DU(of LDS0 hereinafter to be referred as logic DU1), at the level transforming of RAID during to RAID 10, because LD2 in 10 grades of other layout table of RAID, the determined logic DU(of LDS0 is hereinafter to be referred as logic DU2) and LD3, the determined logic DU(of LDS0 is hereinafter to be referred as logic DU3) under the corresponding physics DU physical disk all not with the RAID level transforming before under logic DU1 is corresponding in the mapping table of LUN the physics DU physical disk identical, therefore, need to be that the data of logic DU1 in the mapping table of LUN of RAID 0 are redistributed two physics DU(as previously mentioned for rank, a usefulness of doing data backup) and carry out data and move, simultaneously, revise the record value of RAID 10 rank layout table logic DU2 and the logic DU3 relevant position in new mapping table.Here two physics DU redistributing of hypothesis are that 2 physical disk and identification card number are that skew in 3 the physical disk is respectively 1 and 2 at identification card number, and then the record value of the relevant position of 10 grades of other layout table logics of RAID DU0 in new mapping table is revised as respectively DU 2:1 and DU 3:2.
When carrying out the RAID level transforming, redistribute physical space, carry out the modification etc. of the new mapping table relevant position record value of data-moving and/or LUN for other logics DU in the mapping table of LUN before the RAID level transforming, the modification of new mapping table relevant position record value of redistribute physical space with logic DU0 and logic DU1 in the above-mentioned RAID 0 rank LUN mapping table when carrying out the RAID level transforming, carrying out data-moving and/or RAID 10 rank LUN is similar, repeats no more.
Can find out from above-mentioned processing scheme for situation two, the embodiment of the invention has been saved the required duplicating position of data that carries out in the prior art behind the RAID level transforming and has been carried out data before the RAID level transforming Data duplication when belonging to the Same Physical disk and move, reduce data processing amount, simplified the flow process of RAID rank conversion.
In embodiments of the present invention, again manage for the resource of carrying out discharging behind the data-moving, for example, be classified to untapped disc unit formation (queue), to replace the disk fragments arrangement in the traditional approach.
The data of each logic DU are carried out different being disposed in single LUN, then reclaim the former mapping table of current LUN, for example, discharge shared memory source of former mapping table etc., and so far, the RAID level transforming of this LUN is finished.
See also Fig. 5, a kind of RAID level transforming device basic logical structure synoptic diagram that the embodiment of the invention provides.For convenience of explanation, only show the part relevant with the embodiment of the invention.The functional module of this device or unit are hardware units/modules, software unit/module or the software and hardware units/modules that combines, below one by one explanation.
Judge module 601 is used for judging spatial variations amount required when whether the system spare free space satisfies current single LUN and carry out the RAID level transforming, and it comprises query unit 6011, computing unit 6012 and comparing unit 6013.
As embodiments of the invention, query unit 6011 is at first inquired about the untapped disc unit of each physical disk to obtain the system spare free space, wherein, the untapped disc unit of each physical disk can be with the format management of formation (queue), therefore, in fact query unit 6011 can know the untapped disc unit of each physical disk by access queue, and the summation of these untapped disc units has consisted of the system spare free space.Required space increased or reduction when afterwards, the current single LUN of computing unit 6012 calculating carried out the RAID level transforming.This is known technology, does not do and gives unnecessary details.
Required space increase or reduction when the comparing unit 6013 comparison query unit 6011 inquiry institute system spare free space that obtains carries out the RAID level transforming with the current LUN of computing unit 6012 calculating gained, increase or reduction remain free space less than said system if LUN takes up space, then judge module 601 is judged spatial variations amount required when the system spare free spaces satisfy current LUN and carry out the RAID level transforming, thereby can carry out the RAID level transforming; Otherwise judge module 601 is judged spatial variations amount required when the system spare free spaces do not satisfy current LUN and carry out the RAID level transforming, and the RAID level transforming may failure.
Because judge module 601 required spatial variations amount when judging that the system spare free space satisfies current LUN and carries out the RAID level transforming can begin current LUN is carried out the RAID level transforming, rather than carry out take the RAID group as unit, reduce the suffered restriction of RAID level transforming, strengthened dirigibility.
Table read module 602 when being used for spatial variations amount required when judge module 601 judges that the system spare free spaces satisfy current LUN and carry out the RAID level transforming, reads the layout table after the former mapping table of current LUN and RAID structure change.
Data processing module 603, layout table after changing according to the former mapping table of the current LUN that reads of table read module 602 and RAID structure, logical block item corresponding in the new mapping table when data take as sky in described disc unit behind the RAID level transforming of current logical unit number is set to setting; Otherwise, according to the layout table behind the RAID level transforming and described former mapping table, judge whether carry out behind the RAID level transforming the required duplicating position of data in the described disc unit belongs to the Same Physical disk with the position of carrying out before the RAID level transforming, and carry out mapping table according to judged result and revise or data-moving, it comprises mapping table processing unit 6031, judging unit 6032 and allocation units 6033.
Mapping table processing unit 6031, the corresponding list item of new mapping table with current LUN when taking as sky for the disc unit data is set to the corresponding list item of new mapping table of revising current single LUN when data take as non-NULL in a setting or the described disc unit.
Judging unit 6032, judge when being used for the disc unit data and taking as non-NULL and carry out behind the RAID level transforming in the described disc unit the required duplicating position of data and carry out whether belonging to the Same Physical disk before the RAID level transforming, if, then do not need to move data wherein, only need mapping table processing unit 6031 directly to revise relevant position in the new mapping table of current LUN, give a record value.
Allocation units 6033, being used for judging unit 6032 judges and carries out behind the RAID level transforming the required duplicating position of described disc unit data and carry out not belonging to the Same Physical disk before the RAID level transforming, then redistribute the physical disk unit for these data and carry out data and move, correspondingly, also need mapping table processing unit 6031 to revise relevant position in the new mapping table of current LUN, give a record value.
In addition, described RAID level transforming device also comprises:
The disc unit module 604 of rejoining one's unit is used for that described allocation units 6033 are carried out the left disc unit of data-moving and is included into untapped disc unit formation;
Pretreatment module 605, be used for physical disk space is divided into discrete disc unit and forms logic magnetic disc, according to described physical disk and logic magnetic disc, generate the layout table of current logical unit number and according to the layout table of RAID under the described current logic magnetic disc, generate the mapping table of current logical unit number, the logic magnetic disc unit in the described logic magnetic disc is corresponding one by one with the disc unit that described physical disk space is divided into.
Can learn from embodiment, because data take as sky or non-NULL and treat with a certain discrimination in 603 pairs of disc units of data processing module, namely, the in fact unpromising data of allocation units 6033 take disc unit allocation space for sky to carry out level transforming, therefore saved resource and time, improved the utilization factor of disk space.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the relevant hardware of instruction finish by program, this program can be stored in the computer-readable recording medium, storage medium can comprise: ROM (read-only memory) (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
More than RAID level transforming method and corresponding RAID level transforming device that the embodiment of the invention is provided be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a RAID level transforming method is characterized in that, comprising:
Judge spatial variations amount required when whether the system spare free space satisfies current logical unit number and carry out the RAID level transforming;
If satisfy, then read the former mapping table of current logical unit number and the layout table behind the RAID level transforming;
Judging that data take in the disc unit of described former mapping table reflection is sky or non-NULL, if data take and are sky in the described disc unit, then corresponding logical block item is set to setting in the new mapping table behind the RAID level transforming of current logical unit number; Otherwise, according to the layout table behind the RAID level transforming and described former mapping table, judge whether carry out behind the RAID level transforming the required duplicating position of data in the described disc unit belongs to the Same Physical disk with the position of carrying out before the RAID level transforming, and carry out mapping table according to judged result and revise or data-moving;
Describedly carry out according to judged result that mapping table is revised or data-moving comprises: if judge that carrying out behind the RAID level transforming the required duplicating position of data in the described disc unit belongs to the Same Physical disk with the position of carrying out before the RAID level transforming, then revise the value of the new mapping table logical block of RAID under the current logical unit number; Otherwise, for described data are redistributed the physical disk unit and are carried out data and move.
2. RAID level transforming method as claimed in claim 1 is characterized in that, describedly judges required spatial variations amount comprised when whether the system spare free space satisfied current logical unit number and carry out the RAID level transforming:
The untapped disc unit of inquiry physical disk is to obtain the system spare free space;
Space required when calculating described current logical unit number and carrying out the RAID level transforming increases or reduction;
If the increase of described space or reduction are less than described system spare free space, judge that then space required when the system spare free space satisfies current logical unit number and carries out the RAID level transforming increases or reduction, otherwise, judge that required space did not increase or reduction when the system spare free space did not satisfy current logical unit number and carries out the RAID level transforming.
3. RAID level transforming method as claimed in claim 2 is characterized in that, also comprises:
The described left disc unit of data-moving that carries out is included into untapped disc unit formation.
4. RAID level transforming method as claimed in claim 1 or 2 is characterized in that, describedly also comprises before judging spatial variations amount required when whether the system spare free space satisfies current logical unit number and carry out the RAID level transforming:
Physical disk space is divided into discrete disc unit and forms logic magnetic disc, and the logic magnetic disc unit in the described logic magnetic disc is corresponding one by one with the disc unit that described physical disk space is divided into;
According to described physical disk and logic magnetic disc, generate the layout table of current logical unit number;
According to the layout table of RAID under the described current logic magnetic disc, generate the mapping table of current logical unit number.
5. RAID level transforming device is characterized in that described device comprises:
Judge module is used for judging spatial variations amount required when whether the system spare free space satisfies current logical unit number and carry out the RAID level transforming;
The table read module, when being used for described judge module and judging spatial variations amount required when the system spare free space satisfies current logical unit number and carries out the RAID level transforming, read the layout table after the former mapping table of described current logical unit number and RAID structure change;
The mapping table processing unit, the corresponding list item of new mapping table that will described current logic magnetic disc when being used for the disc unit data and taking as sky is set to data in a setting or the described disc unit, and to take judged result for non-NULL and judging unit be to carry out behind the RAID level transforming the required duplicating position of data in the described disc unit and carry out position before the RAID level transforming when belonging to the Same Physical disk, revise the affiliated RAID of current logical unit number the value of new mapping table logical block;
Judging unit is judged when being used for described disc unit data and taking as non-NULL and is carried out behind the RAID level transforming in the described disc unit the required duplicating position of data and carry out whether belonging to the Same Physical disk before the RAID level transforming;
Allocation units, after being used for described judgment unit judges and carrying out the RAID level transforming, the required duplicating position of data is that described data are redistributed the physical disk unit and carried out data and move when carrying out not belonging to the Same Physical disk before the RAID level transforming in the described disc unit.
6. RAID level transforming device as claimed in claim 5 is characterized in that described RAID level transforming device also comprises:
The disc unit module of rejoining one's unit is used for that described allocation units are carried out the left disc unit of data-moving and is included into untapped disc unit formation.
7. RAID level transforming device as claimed in claim 5 is characterized in that described judge module comprises:
Query unit is used for the untapped disc unit of inquiry physical disk to obtain the system spare free space;
Computing unit, required space increases or reduction when being used for calculating described current logical unit number and carrying out the RAID level transforming;
Comparing unit, be used for the space increase of described computing unit calculating gained or reduction less than described system spare free space, judge that then space required when the system spare free space satisfies current logical unit number and carries out the RAID level transforming increases or reduction, otherwise, judge that required space did not increase or reduction when the system spare free space did not satisfy current logical unit number and carries out the RAID level transforming.
8. RAID level transforming device as claimed in claim 5, it is characterized in that, described RAID level transforming device also comprises pretreatment module, be used for physical disk space is divided into discrete disc unit and forms logic magnetic disc, according to described physical disk and logic magnetic disc, generate the layout table of current logical unit number and according to the layout table of RAID under the described current logic magnetic disc, generate the mapping table of current logical unit number, the logic magnetic disc unit in the described logic magnetic disc is corresponding one by one with the disc unit that described physical disk space is divided into.
CN 200910174224 2009-09-23 2009-09-23 RAID (redundant array of inexpensive disk) level transformation method and transformation device Expired - Fee Related CN102023812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910174224 CN102023812B (en) 2009-09-23 2009-09-23 RAID (redundant array of inexpensive disk) level transformation method and transformation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910174224 CN102023812B (en) 2009-09-23 2009-09-23 RAID (redundant array of inexpensive disk) level transformation method and transformation device

Publications (2)

Publication Number Publication Date
CN102023812A CN102023812A (en) 2011-04-20
CN102023812B true CN102023812B (en) 2013-01-23

Family

ID=43865148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910174224 Expired - Fee Related CN102023812B (en) 2009-09-23 2009-09-23 RAID (redundant array of inexpensive disk) level transformation method and transformation device

Country Status (1)

Country Link
CN (1) CN102023812B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677733B (en) * 2013-12-16 2017-04-12 华为技术有限公司 Method and device for changing RAID attributes
CN106371950B (en) * 2015-07-20 2020-11-03 中兴通讯股份有限公司 Method and device for realizing RAID level conversion
CN113986128A (en) * 2021-10-26 2022-01-28 杭州宏杉科技股份有限公司 LUN data copying method and device

Also Published As

Publication number Publication date
CN102023812A (en) 2011-04-20

Similar Documents

Publication Publication Date Title
CN1327330C (en) Logical disk management method and apparatus
CN104049907B (en) Dynamic memory automatically configures
US11016674B2 (en) Method, device, and computer program product for reading data
CN102317925B (en) Memory system and method of controlling memory system
CN102023809B (en) Storage system, method for reading data from storage system and method for writing data to storage system
JP3778980B2 (en) How to use a reserved amount of unused storage space
CN101971168B (en) Dynamically quantifying and improving the reliability of distributed data storage systems
US9189389B2 (en) Memory controller and memory system
CN102096557B (en) Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID)
US8832356B2 (en) Apparatus and method for flash memory address translation
US20100306466A1 (en) Method for improving disk availability and disk array controller
CN101458613A (en) Method for implementing mixed hierarchical array, the hierarchical array and storage system
CN101539842A (en) Data wiring method of disk array system and disk array system
CN101382873A (en) Management method and system of storage location
CN106843773A (en) Storage method and distributed storage system
CN105138292A (en) Disk data reading method
CN102945207A (en) Cache management method and system for block-level data
JP2001067187A (en) Storage sub-system and its control method
CN110032521A (en) For enhancing flash translation layer (FTL) mapping flexibility to obtain performance and service life improved method and system
CN101911207A (en) Semiconductor storage device, controlling apparatus and controlling method
CN101467122A (en) Data progression disk locality optimization system and method
CN104182176A (en) Rapid dilatation method for RAID 5 (redundant array of independent disks)
CN101556802A (en) RAID array transposing method and device thereof
CN102023812B (en) RAID (redundant array of inexpensive disk) level transformation method and transformation device
CN103942161A (en) Redundancy elimination system and method for read-only cache and redundancy elimination method for cache

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: Huawei Symantec Technologies Co., Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: Chengdu Huawei Symantec Technologies Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130123

Termination date: 20190923