CN105718209A - Method and device for naming multipath device, host and communication system - Google Patents
Method and device for naming multipath device, host and communication system Download PDFInfo
- Publication number
- CN105718209A CN105718209A CN201410734783.6A CN201410734783A CN105718209A CN 105718209 A CN105718209 A CN 105718209A CN 201410734783 A CN201410734783 A CN 201410734783A CN 105718209 A CN105718209 A CN 105718209A
- Authority
- CN
- China
- Prior art keywords
- title
- lun
- multipath device
- corresponding relation
- relation record
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for naming a multipath device, a host and a communication system. The method comprises the following steps: acquiring a logical unit (LUN) number of an LUN corresponding to the multipath device in a magnetic array; and naming the multipath device according to the LUN number and a preset corresponding relationship record, and updating the corresponding relationship record, wherein one-to-one corresponding relationships between names of created multipath devices or LUN numbers of LUNs corresponding to the created multipath devices in the magnetic array and worldwide identifiers of the corresponding LUNs are recorded in the corresponding relationship record. Through the technical scheme, the problem of duplication of the names of the multipath devices in one host can be solved. In an environment in which a plurality of hosts are connected with the same magnetic array, the hosts name the multipath devices according to the naming method, and generate names according to the LUN numbers on the basis of a same name generation rule, so that the consistency of the names of the multipath devices mapped to the same LUN in different hosts can be ensured.
Description
Technical field
The present invention relates to electronic device field, particularly relate to the naming method of a kind of multipath device, device, main frame and communication system.
Background technology
Multi-path software is to operate on main frame for merging image disc, realizing failover and the application software of load balancing.When main frame is connected with magnetic battle array, same LUN (LogicalUnit from main frame to magnetic battle array, logical block) each path, capital forms a paths, every paths shows as a disk unit in linux system, present with a device file, but actually these disk units point to the same LUN in magnetic battle array.
Due to identical WWID (WorldWideIdentifier corresponding for LUN, global identifier) also identical, multi-path software is by comparing the WWID of these disk units, disk unit identical for WWID is merged and creates into a multipath device (MultipathDevice), the logical device being about to point to the path merging of same LUN in magnetic battle array and create, for upper layer application.
The multipath device generated needs name, existing naming method is rigorous not, perfect, existing naming method is adopted to there are problems after being named, such as there will be the title of the different multipath devices on same main frame to repeat, or connecting in the environment of same magnetic battle array at multiple host, the title of the multipath device that same LUN maps in different main frames is inconsistent.
Summary of the invention
The present invention provides the naming method of a kind of multipath device, device, main frame and communication system, solves the problem that existing naming method is perfect not.
For solving above-mentioned technical problem, the present invention by the following technical solutions:
A kind of naming method of multipath device, described multipath device is merge, by pointing to the path of same logical block in magnetic battle array, the logical device created, and the naming method of described multipath device includes:
Obtain the LUN of described multipath device logical block corresponding in magnetic battle array;
According to described LUN and default corresponding relation record, described multipath device is named, and update described corresponding relation record, described corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in described magnetic battle array.
In certain embodiments, according to described LUN and default corresponding relation record, described multipath device is named, and updates described corresponding relation record, including:
Title is generated according to described LUN according to default title create-rule;
Corresponding relation record according to described name query;
If there is described title in described corresponding relation record, then comparing the global identifier that title described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;If consistent, then described name is referred to as the title of described multipath device;If inconsistent, then described name be referred to as the title of described multipath device, and global identifier corresponding for title described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;
If described corresponding relation record is absent from described title, then described name is referred to as the title of described multipath device, and by the global identifier of logical block corresponding in magnetic battle array to described title, described multipath device, and both corresponding relations, add in described corresponding relation record.
In certain embodiments, according to described LUN and default corresponding relation record, described multipath device is named, and updates described corresponding relation record, including:
Described corresponding relation record is inquired about according to described LUN;
If there is described LUN in described corresponding relation record, then comparing the global identifier that LUN described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;If consistent, then generate title according to default title create-rule according to described LUN, as the title of described multipath device;If it is inconsistent, then generate title according to default title create-rule according to described LUN, as the title of described multipath device, and global identifier corresponding for LUN described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;
If described corresponding relation record is absent from described LUN, then generate title according to default title create-rule according to described LUN, title as described multipath device, and by the global identifier of logical block corresponding in magnetic battle array to described LUN, described multipath device, and both corresponding relations, add in described corresponding relation record.
In certain embodiments, generate title according to default title create-rule according to described LUN to include:
According to described LUN, and the one-to-one relationship of the LUN preset and English alphabet, generate English alphabet;
Spath is combined with the English alphabet of generation, and spath be positioned at generation English alphabet before, generate title.
In certain embodiments, if deleting the multipath device created, also include: the title according to the multipath device deleted, or the LUN of its logical block corresponding in magnetic battle array inquires about described corresponding relation record;If described corresponding relation record exists the title of the multipath device of this deletion, or the LUN of its logical block corresponding in magnetic battle array, then delete the title of the multipath device of this deletion in described corresponding relation record, or the LUN of its logical block corresponding in magnetic battle array, and the global identifier of correspondence.
A kind of name device of multipath device, the name device of described multipath device includes:
Acquisition module, for obtaining the LUN of described multipath device logical block corresponding in magnetic battle array;
Name processing module, for the LUN obtained according to described acquisition module and the corresponding relation record of presetting, described multipath device is named, and update described corresponding relation record, described corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in described magnetic battle array.
In certain embodiments, described name processing module includes:
First generates submodule, for generating title according to default title create-rule according to described LUN, the described name generated is referred to as the title of described multipath device;
First inquiry submodule, for generating corresponding relation record described in the described name query that submodule generates according to described first;
First comparison sub-module, when being that described corresponding relation record exists described title for the described first Query Result inquiring about submodule, then comparing the global identifier that title described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;
First updates submodule, it is global identifier corresponding to title described in described corresponding relation record for the comparative result of described first comparison sub-module, when the global identifier of the logical block corresponding in magnetic battle array with described multipath device is inconsistent, global identifier corresponding for title described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;And the Query Result of described first inquiry submodule is when being be absent from described title in described corresponding relation record, global identifier by logical block corresponding in magnetic battle array to described title, described multipath device, and both corresponding relations, add in described corresponding relation record.
In further embodiments, described name processing module includes:
Second inquiry submodule, for inquiring about described corresponding relation record according to described LUN;
Second comparison sub-module, when being that described corresponding relation record exists described LUN for the described second Query Result inquiring about submodule, the global identifier that relatively LUN described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;
Second generates submodule, for generating title according to default title create-rule according to described LUN, the described name generated is referred to as the title of described multipath device;
Second updates submodule, it is global identifier corresponding to LUN described in described corresponding relation record for the comparative result of described second comparison sub-module, when the global identifier of the logical block corresponding in magnetic battle array with described multipath device is inconsistent, global identifier corresponding for LUN described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;And the Query Result of described second inquiry submodule is when being be absent from described LUN in described corresponding relation record, global identifier by logical block corresponding in magnetic battle array to described LUN, described multipath device, and both corresponding relations, add in described corresponding relation record.
In certain embodiments, the name device of this multipath device also includes:
3rd inquiry submodule, during for deleting the multipath device created, the title according to the multipath device deleted, or the LUN described corresponding relation record of inquiry of its logical block corresponding in magnetic battle array;
3rd updates submodule, for the described 3rd title that Query Result is the multipath device that there is deletion in described corresponding relation record inquiring about submodule, or the LUN of its logical block corresponding in magnetic battle array, then delete the title of the multipath device deleted in described corresponding relation record, or the LUN of its logical block corresponding in magnetic battle array, and the global identifier of correspondence.
A kind of main frame, described main frame includes the name device of the multipath device described in any of the above-described item.
A kind of communication system, including at least one main frame described above connecting same magnetic battle array, in each main frame, the name device of multipath device generates title according to identical title create-rule according to LUN.
The naming method of multipath device provided by the invention, device, main frame and communication system, LUN according to the logical block corresponding in magnetic battle array of multipath device and the corresponding relation record preset, this multipath device is named, and update this corresponding relation record, this corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in described magnetic battle array.It is named according to above-mentioned naming method so that the title of the corresponding multipath device of same global identifier, i.e. the title of the corresponding multipath device of same logical block, it is possible to get rid of the synonym of multipath device in same main frame;Connect in the environment of same magnetic battle array at multiple host, each main frame is named according to above-mentioned naming method, and generate title according to identical title create-rule according to LUN, then can ensure title consistent of the same LUN multipath device mapped in different main frames.
Accompanying drawing explanation
The flow chart of the naming method of the multipath device that Fig. 1 provides for one embodiment of the invention;
The flow chart of the naming method of the multipath device that Fig. 2 provides for another embodiment of the present invention;
The flow chart of the naming method of the multipath device that Fig. 3 provides for another embodiment of the present invention;
The schematic diagram of the name device of the multipath device that Fig. 4 provides for one embodiment of the invention;
The schematic diagram of the communication system that Fig. 5 provides for one embodiment of the invention.
Detailed description of the invention
In order to improve the naming method of existing multipath device, avoiding the duplication of name of multipath device in same main frame, avoid connecting the problems such as the title of the multipath device that same LUN maps in different main frames in the environment of same magnetic battle array is inconsistent at multiple host, the present invention provides a kind of new technical scheme, when multipath device is named by needs, such as multi-path software creates a new multipath device, the multipath device to being newly added now just is needed to be named, as shown in Figure 1, as a kind of embodiment, including following flow process:
S101, obtaining the LUN of this multipath device logical block corresponding in magnetic battle array, LUN is usually the integer between 0 to 511.
S102, LUN according to the corresponding logical block obtained in above-mentioned steps S101, and the corresponding relation record preset, be named this multipath device, and update this corresponding relation record.
This corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in this magnetic battle array.It is named according to above-mentioned naming method, the synonym of multipath device in same main frame can be got rid of based on the corresponding relation of record in corresponding relation record;Connect in the environment of same magnetic battle array at multiple host, each main frame is named according to above-mentioned naming method, and generate title according to identical title create-rule according to LUN, then can ensure title consistent of the same LUN multipath device mapped in different main frames.
The flow chart of the naming method of the multipath device that Fig. 2 provides for one embodiment of the invention, as in figure 2 it is shown, include following flow process:
S201, obtain the LUN of this multipath device logical block corresponding in magnetic battle array.
S202, according to default title create-rule according to described LUN generate title.
This step has numerous embodiments, it is preferred that different according to the title that different LUN generates.Two kind title create-rules are set forth below:
One is, according to LUN, and the one-to-one relationship of the LUN preset and English alphabet, generate English alphabet, so ensure that the English alphabet generated according to different LUN is different, then spath is combined with the English alphabet of generation, and spath be positioned at generation English alphabet before, generate title, on the basis of previous step, so ensure that the title generated according to different LUN is different.Preferably, the LUN preset includes with the one-to-one relationship of English alphabet: LUN0 is corresponding with letter a, LUN1 is corresponding with letter b, LUN2 is corresponding with letter c, LUN3 is corresponding with letter d, LUN4 is corresponding with letter e ... LUN25 is corresponding with letter z, LUN26 is corresponding with letter aa ... the rest may be inferred.
Another kind is, according to LUN, and the one-to-one relationship of the LUN preset and title, match title, preferably, the LUN preset includes with the one-to-one relationship of title: LUN0 and spatha is corresponding, LUN1 and spathb is corresponding, LUN2 and spathc is corresponding, LUN3 and spathd is corresponding, LUN4 and spathe is corresponding ... LUN25 and spathz is corresponding, LUN26 and spathaa is corresponding ... the rest may be inferred.
S203, the corresponding relation record preset according to the step S202 name query generated, if there is this title in this corresponding relation record, then enter step S204, if being absent from this title, then enters step S207.
S204, comparing the global identifier that in this corresponding relation record, this title is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with this multipath device is consistent;If consistent, then enter step S205, if inconsistent, then enter step S206.
S205, this is referred to as the title of this multipath device.
S206, this is referred to as the title of this multipath device, and global identifier corresponding for this title in this corresponding relation record is changed to the global identifier of this multipath device logical block corresponding in magnetic battle array.
S207, this is referred to as the title of this multipath device, and by the global identifier of logical block corresponding in magnetic battle array to this title, this multipath device, and both corresponding relations, add in this corresponding relation record.
Mr. the present embodiment becomes title, further according to the name query corresponding relation record generated, and compare the global identifier that in this corresponding relation record, this title is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with this multipath device is consistent, make the title of the corresponding multipath device of same global identifier, the i.e. title of the corresponding multipath device of same logical block, it is possible to get rid of the synonym of multipath device in same main frame;Connect in the environment of same magnetic battle array at multiple host, each main frame is named according to above-mentioned naming method, and generate title according to identical title create-rule according to LUN, then can ensure title consistent of the same LUN multipath device mapped in different main frames.
The flow chart of the naming method of the multipath device that Fig. 3 provides for another embodiment of the present invention, as it is shown on figure 3, include following flow process:
S301, obtain the LUN of this multipath device logical block corresponding in magnetic battle array.
S302, the corresponding relation record preset according to the inquiry of this LUN, if there is this LUN in this corresponding relation record, then enter step S303, if being absent from, then enters step S306.
S303, comparing the global identifier that in this corresponding relation record, this LUN is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with this multipath device is consistent;If consistent, then enter step S304, if inconsistent, then enter step S305.
S304, according to default title create-rule according to this LUN generate title, as the title of this multipath device.
This step has numerous embodiments, it is preferred that different according to the title that different LUN generates.Two kind title create-rules are set forth below:
One is, according to LUN, and the one-to-one relationship of the LUN preset and English alphabet, generate English alphabet, so ensure that the English alphabet generated according to different LUN is different, then spath is combined with the English alphabet of generation, and spath be positioned at generation English alphabet before, generate title, on the basis of previous step, so ensure that the title generated according to different LUN is different.Preferably, the LUN preset includes with the one-to-one relationship of English alphabet: LUN0 is corresponding with letter a, LUN1 is corresponding with letter b, LUN2 is corresponding with letter c, LUN3 is corresponding with letter d, LUN4 is corresponding with letter e ... LUN25 is corresponding with letter z, LUN26 is corresponding with letter aa ... the rest may be inferred.
Another kind is, according to LUN, and the one-to-one relationship of the LUN preset and title, match title, preferably, the LUN preset includes with the one-to-one relationship of title: LUN0 and spatha is corresponding, LUN1 and spathb is corresponding, LUN2 and spathc is corresponding, LUN3 and spathd is corresponding, LUN4 and spathe is corresponding ... LUN25 and spathz is corresponding, LUN26 and spathaa is corresponding ... the rest may be inferred.
S305, according to default title create-rule according to this LUN generate title, as the title of this multipath device, and global identifier corresponding for this LUN in this corresponding relation record is changed to the global identifier of this multipath device logical block corresponding in magnetic battle array.
S306, according to default title create-rule according to this LUN generate title, title as this multipath device, and by the global identifier of logical block corresponding in magnetic battle array to this LUN, this multipath device, and both corresponding relations, add in this corresponding relation record.
The present embodiment and a upper embodiment the difference is that, the LUN inquiry corresponding relation record of the direct logical block corresponding in magnetic battle array according to multipath device, and compare the global identifier that in this corresponding relation record, this LUN is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with this multipath device is consistent, the equally possible title making the corresponding multipath device of same global identifier, the i.e. title of the corresponding multipath device of same logical block, it is possible to get rid of the synonym of multipath device in same main frame;Connect in the environment of same magnetic battle array at multiple host, each main frame is named according to above-mentioned naming method, and generate title according to identical title create-rule according to LUN, then can ensure title consistent of the same LUN multipath device mapped in different main frames.
In some embodiments, when deleting the multipath device created, also include: the title according to the multipath device deleted, or the LUN inquiry corresponding relation record of its logical block corresponding in magnetic battle array;If corresponding relation record exists the title of the multipath device of this deletion, or the LUN of its logical block corresponding in magnetic battle array, then delete the title of the multipath device of this deletion in this corresponding relation record, or the LUN of its logical block corresponding in magnetic battle array, and the global identifier of correspondence.So it is prevented from corresponding relation record storage and has unnecessary, invalid record.
The present invention also provides for the name device of a kind of multipath device, and as shown in Figure 4, the name device 4 of this multipath device includes acquisition module 41 and name processing module 42,
Acquisition module 41 is for obtaining the LUN of multipath device logical block corresponding in magnetic battle array;
Name processing module 42 is for the LUN obtained according to acquisition module 41 and the corresponding relation record of presetting, described multipath device is named, and update described corresponding relation record, described corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in described magnetic battle array.
In certain embodiments, name processing module 42 includes: first generates submodule, the first inquiry submodule, the first comparison sub-module and the first renewal submodule, wherein,
First generates submodule generates title for the LUN obtained according to acquisition module 41 according to default title create-rule, and the described name generated is referred to as the title of described multipath device;
First inquiry submodule is for generating corresponding relation record described in the described name query that submodule generates according to described first;
When first comparison sub-module is there is described title in described corresponding relation record for the described first Query Result inquiring about submodule, then comparing the global identifier that title described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;
First updates submodule, it is global identifier corresponding to title described in described corresponding relation record for the comparative result of described first comparison sub-module, when the global identifier of the logical block corresponding in magnetic battle array with described multipath device is inconsistent, global identifier corresponding for title described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;And the Query Result of described first inquiry submodule is when being be absent from described title in described corresponding relation record, global identifier by logical block corresponding in magnetic battle array to described title, described multipath device, and both corresponding relations, add in described corresponding relation record.
In further embodiments, name processing module 42 includes: the second inquiry submodule, the second comparison sub-module, the second generation submodule and second update submodule, wherein,
Second inquiry submodule inquires about described corresponding relation record for the LUN obtained according to acquisition module 41;
When second comparison sub-module is there is described LUN in described corresponding relation record for the described second Query Result inquiring about submodule, the global identifier that relatively LUN described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;
Second generates submodule for generating title according to default title create-rule according to described LUN, and the described name generated is referred to as the title of described multipath device;
Second to update submodule for the comparative result of described second comparison sub-module be global identifier corresponding to LUN described in described corresponding relation record, when the global identifier of the logical block corresponding in magnetic battle array with described multipath device is inconsistent, global identifier corresponding for LUN described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;And the Query Result of described second inquiry submodule is when being be absent from described LUN in described corresponding relation record, global identifier by logical block corresponding in magnetic battle array to described LUN, described multipath device, and both corresponding relations, add in described corresponding relation record.
In certain embodiments, the name device 4 of this multipath device also includes: the 3rd inquiry submodule and the 3rd updates submodule, wherein,
When 3rd inquiry submodule is for deleting the multipath device created, the title according to the multipath device deleted, or the LUN described corresponding relation record of inquiry of its logical block corresponding in magnetic battle array;
3rd updates the submodule title that Query Result is the multipath device that there is deletion in described corresponding relation record for described 3rd inquiry submodule, or the LUN of its logical block corresponding in magnetic battle array, then delete the title of the multipath device deleted in described corresponding relation record, or the LUN of its logical block corresponding in magnetic battle array, and the global identifier of correspondence.
The present invention also provides for a kind of main frame, and this main frame includes the name device of the multipath device described in any of the above-described item.The present invention also provides for a kind of communication system, including at least one main frame, each main frame connects same magnetic battle array, each main frame includes the name device of the multipath device described in any of the above-described item, the name device of the multipath device in each main frame, generate title according to identical title create-rule according to LUN, so ensure that in magnetic battle array, the title of the multipath device that same logical block maps in different main frames is consistent.
It is connected as example respectively through two paths and magnetic battle array below with the first main frame 51 and the second main frame 52, communication system as shown in Figure 5, magnetic battle array exists four logical blocks, LUN is LUN0 respectively, LUN1, LUN2 and LUN3, first main frame 51 passes through two paths through switch 53, first controller 54 is connected with magnetic battle array, second main frame 52 passes through two paths through switch 53, second controller 55 is connected with magnetic battle array, main frame all can generate a disk unit to each path of logical block in magnetic battle array in main frame, therefore, first main frame 51 and the second main frame 52 all can generate following 8 disk unit: sda, sdb, sdc, sdd, sde, sdf, sdg, sdh, assume:
LUN0, WWID in sda, sdc correspondence magnetic battle array are 35000000000000000;
LUN1, WWID in sdb, sdd correspondence magnetic battle array are 35000000000000001;
LUN2, WWID in sde, sdg correspondence magnetic battle array are 35000000000000002;
LUN3, WWID in sdf, sdh correspondence magnetic battle array are 35000000000000003;
After starting multi-path software, respectively sda and sdc can be merged into a multipath device, sdb and sdd is merged into a multipath device, sde and sdg is merged into a multipath device, sdf and sdh is merged into a multipath device;
The title create-rule unification assuming the first main frame 51 and the second main frame 52 is:
According to LUN, and the one-to-one relationship of the LUN preset and title, matching title, this LUN preset includes with the one-to-one relationship of title: LUN0 and spatha is corresponding, LUN1 and spathb is corresponding, LUN2 and spathc is corresponding, LUN3 and spathd is corresponding, LUN4 and spathe is corresponding ... LUN25 and spathz is corresponding, LUN26 and spathaa is corresponding ... the rest may be inferred;
The method adopting the present invention, the detailed process creating, deleting multipath device in the first main frame 51 and the second main frame 52 is as follows:
Starting stage, read LUN0, title spatha is generated according to LUN0 according to above-mentioned title create-rule, spatha is searched from corresponding relation record, do not find (time initial corresponding relation record empty), using the spatha title as multipath device corresponding for LUN0, and by the WWID of the logical block represented by spatha, LUN0, namely 35000000000000000, and both corresponding relation records are in this corresponding relation record;Read LUN1, generate name according to above-mentioned title create-rule according to LUN1 and be called spathb, spathb is searched from corresponding relation record, do not find, using the spathb title as multipath device corresponding for LUN1, and by the WWID of the logical block represented by spathb, LUN1, namely 35000000000000001, and both corresponding relation records are in this corresponding relation record;Read LUN2, generate name according to above-mentioned title create-rule according to LUN2 and be called spathc, spathc is searched from corresponding relation record, do not find, using the spathc title as multipath device corresponding for LUN2, and by the WWID of the logical block represented by spathc, LUN2, namely 35000000000000002, and both corresponding relation records are in this corresponding relation record;Read LUN3, generate name according to above-mentioned title create-rule according to LUN3 and be called spathd, spathd is searched from corresponding relation record, do not find, using the spathd title as multipath device corresponding for LUN3, and by the WWID of the logical block represented by spathd, LUN3, namely 35000000000000003, and both corresponding relation records are in this corresponding relation record;Assume that this corresponding relation is recorded as list, then such as table one of list now:
Table one
The title of multipath device | WWID |
spatha | 35000000000000000 |
spathb | 35000000000000001 |
spathc | 35000000000000002 |
spathd | 35000000000000003 |
After above-mentioned steps completes, it is assumed that delete logical block represented by LUN0 in magnetic battle array, then the detailed process in the first main frame 51 and the second main frame 52 is as follows:
Searching above-mentioned list according to title spatha corresponding for LUN0, lookup result is there is spatha in above-mentioned list, deletes this record of the spatha in above-mentioned list and 35000000000000000, and now above-mentioned list is updated to table two:
Table two
The title of multipath device | WWID |
spathb | 35000000000000001 |
spathc | 35000000000000002 |
spathd | 35000000000000003 |
That assumes to delete in magnetic battle array logical block represented by LUN0 is simultaneously introduced a new logical block, step owing to deleting and add carries out simultaneously, above-mentioned list also has not enough time to delete corresponding record, and according to the definition rule of existing LUN, the LUN of the logical block being newly added is newly defined as LUN0, and in the first main frame 51 and the second main frame 52, to this, to be newly added the name process of the mapped multipath device of logical block as follows:
Read LUN0, title spatha is generated according to LUN0 according to above-mentioned title create-rule, spatha is searched from corresponding relation record, owing to above-mentioned list also having not enough time to delete old record, therefore, spatha can be found, compare in above-mentioned list corresponding with spatha 35000000000000000 with the WWID being newly added logical block so again, owing to the WWID of logical block has uniqueness, therefore, comparison result is inconsistent, then it is newly added the title of the mapped multipath device of logical block using spatha as this, and then to change in above-mentioned list corresponding with spatha 35000000000000000 be the WWID being newly added logical block, assume that the WWID being newly added logical block is 35000000000000004, then such as table three of list now:
Table three
The title of multipath device | WWID |
spatha | 35000000000000004 |
spathb | 35000000000000001 |
spathc | 35000000000000002 |
spathd | 35000000000000003 |
The present embodiment, first main frame 51 and the second main frame 52 can create LUN0 successively, LUN1, LUN2, multipath device spathba corresponding for LUN3, spathb, spathc, spathd, and in these two different main frames, for identical logical block, the title of the multipath device generated is identical, even if deleting a logical block from magnetic battle array and not deleting respective record in corresponding relation record in time, and the LUN of the logical block being newly added is when being defined as this LUN of logical block being deleted, without the duplication of name situation that multipath device occurs, and still can ensure that the concordance of multipath device title in the different main frames connecting same magnetic battle array.
Above content is in conjunction with specific embodiment further description made for the present invention, it is impossible to assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, it is also possible to make some simple deduction or replace, protection scope of the present invention all should be considered as belonging to.
Claims (11)
1. the naming method of a multipath device, it is characterised in that described multipath device is merge, by pointing to the path of same logical block in magnetic battle array, the logical device created, and the naming method of described multipath device includes:
Obtain the LUN of described multipath device logical block corresponding in magnetic battle array;
According to described LUN and default corresponding relation record, described multipath device is named, and update described corresponding relation record, described corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in described magnetic battle array.
2. the naming method of multipath device as claimed in claim 1, it is characterised in that according to described LUN and default corresponding relation record, described multipath device is named, and updates described corresponding relation record, including:
Title is generated according to described LUN according to default title create-rule;
Corresponding relation record according to described name query;
If there is described title in described corresponding relation record, then comparing the global identifier that title described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;If consistent, then described name is referred to as the title of described multipath device;If inconsistent, then described name be referred to as the title of described multipath device, and global identifier corresponding for title described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;
If described corresponding relation record is absent from described title, then described name is referred to as the title of described multipath device, and by the global identifier of logical block corresponding in magnetic battle array to described title, described multipath device, and both corresponding relations, add in described corresponding relation record.
3. the naming method of multipath device as claimed in claim 1, it is characterised in that according to described LUN and default corresponding relation record, described multipath device is named, and updates described corresponding relation record, including:
Described corresponding relation record is inquired about according to described LUN;
If there is described LUN in described corresponding relation record, then comparing the global identifier that LUN described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;If consistent, then generate title according to default title create-rule according to described LUN, as the title of described multipath device;If it is inconsistent, then generate title according to default title create-rule according to described LUN, as the title of described multipath device, and global identifier corresponding for LUN described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;
If described corresponding relation record is absent from described LUN, then generate title according to default title create-rule according to described LUN, title as described multipath device, and by the global identifier of logical block corresponding in magnetic battle array to described LUN, described multipath device, and both corresponding relations, add in described corresponding relation record.
4. the naming method of multipath device as claimed in claim 2 or claim 3, it is characterised in that generate title according to default title create-rule according to described LUN and include:
According to described LUN, and the one-to-one relationship of the LUN preset and English alphabet, generate English alphabet;
Spath is combined with the English alphabet of generation, and spath be positioned at generation English alphabet before, generate title.
5. the naming method of multipath device as claimed in claim 1, it is characterised in that if deleting the multipath device created, also include:
Title according to the multipath device deleted, or the LUN described corresponding relation record of inquiry of its logical block corresponding in magnetic battle array;
If described corresponding relation record exists the title of the multipath device of this deletion, or the LUN of its logical block corresponding in magnetic battle array, then delete the title of the multipath device of this deletion in described corresponding relation record, or the LUN of its logical block corresponding in magnetic battle array, and the global identifier of correspondence.
6. the name device of a multipath device, it is characterised in that described multipath device is merge, by pointing to the path of same logical block in magnetic battle array, the logical device created, and the name device of described multipath device includes:
Acquisition module, for obtaining the LUN of described multipath device logical block corresponding in magnetic battle array;
Name processing module, for the LUN obtained according to described acquisition module and the corresponding relation record of presetting, described multipath device is named, and update described corresponding relation record, described corresponding relation record records the title having the multipath device created or the multipath device the created LUN of the logical block of correspondence, the one-to-one relationship between the global identifier of the logical block corresponding with this in described magnetic battle array.
7. the name device of multipath device as claimed in claim 6, it is characterised in that described name processing module includes:
First generates submodule, for generating title according to default title create-rule according to described LUN, the described name generated is referred to as the title of described multipath device;
First inquiry submodule, for generating corresponding relation record described in the described name query that submodule generates according to described first;
First comparison sub-module, when being that described corresponding relation record exists described title for the described first Query Result inquiring about submodule, then comparing the global identifier that title described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;
First updates submodule, it is global identifier corresponding to title described in described corresponding relation record for the comparative result of described first comparison sub-module, when the global identifier of the logical block corresponding in magnetic battle array with described multipath device is inconsistent, global identifier corresponding for title described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;And the Query Result of described first inquiry submodule is when being be absent from described title in described corresponding relation record, global identifier by logical block corresponding in magnetic battle array to described title, described multipath device, and both corresponding relations, add in described corresponding relation record.
8. the name device of multipath device as claimed in claim 6, it is characterised in that described name processing module includes:
Second inquiry submodule, for inquiring about described corresponding relation record according to described LUN;
Second comparison sub-module, when being that described corresponding relation record exists described LUN for the described second Query Result inquiring about submodule, the global identifier that relatively LUN described in described corresponding relation record is corresponding, whether the global identifier of the logical block corresponding in magnetic battle array with described multipath device is consistent;
Second generates submodule, for generating title according to default title create-rule according to described LUN, the described name generated is referred to as the title of described multipath device;
Second updates submodule, it is global identifier corresponding to LUN described in described corresponding relation record for the comparative result of described second comparison sub-module, when the global identifier of the logical block corresponding in magnetic battle array with described multipath device is inconsistent, global identifier corresponding for LUN described in described corresponding relation record is changed to the global identifier of described multipath device logical block corresponding in magnetic battle array;And the Query Result of described second inquiry submodule is when being be absent from described LUN in described corresponding relation record, global identifier by logical block corresponding in magnetic battle array to described LUN, described multipath device, and both corresponding relations, add in described corresponding relation record.
9. the name device of multipath device as claimed in claim 6, it is characterised in that also include:
3rd inquiry submodule, during for deleting the multipath device created, the title according to the multipath device deleted, or the LUN described corresponding relation record of inquiry of its logical block corresponding in magnetic battle array;
3rd updates submodule, for the described 3rd title that Query Result is the multipath device that there is deletion in described corresponding relation record inquiring about submodule, or the LUN of its logical block corresponding in magnetic battle array, then delete the title of the multipath device deleted in described corresponding relation record, or the LUN of its logical block corresponding in magnetic battle array, and the global identifier of correspondence.
10. a main frame, it is characterised in that described main frame includes the name device of above-mentioned multipath device as described in any one of claim 6 to 9.
11. a communication system, it is characterised in that include at least one the above-mentioned main frame as claimed in claim 10 connecting same magnetic battle array, in each main frame, the name device of multipath device generates title according to identical title create-rule according to LUN.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410734783.6A CN105718209A (en) | 2014-12-05 | 2014-12-05 | Method and device for naming multipath device, host and communication system |
PCT/CN2015/088783 WO2016086695A1 (en) | 2014-12-05 | 2015-09-01 | Multipath device naming method, device, host and communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410734783.6A CN105718209A (en) | 2014-12-05 | 2014-12-05 | Method and device for naming multipath device, host and communication system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105718209A true CN105718209A (en) | 2016-06-29 |
Family
ID=56090961
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410734783.6A Withdrawn CN105718209A (en) | 2014-12-05 | 2014-12-05 | Method and device for naming multipath device, host and communication system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105718209A (en) |
WO (1) | WO2016086695A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107566547A (en) * | 2017-09-27 | 2018-01-09 | 郑州云海信息技术有限公司 | The processing method named when on multiple servers is mapped to for same memory |
CN109766542A (en) * | 2018-12-14 | 2019-05-17 | 中国电力科学研究院有限公司 | A component naming method and system for automatic modeling of electromagnetic transients in large-scale power grids |
CN111625193A (en) * | 2020-05-22 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Configuration method, device, equipment and medium of multipath alias |
CN113625944A (en) * | 2021-06-25 | 2021-11-09 | 济南浪潮数据技术有限公司 | Disaster recovery method and system based on multipath and remote copy technology |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107247672A (en) * | 2017-05-03 | 2017-10-13 | 深圳市同泰怡信息技术有限公司 | Pass through the method for udev and expander relevant interface hyperdisks |
CN111290915A (en) * | 2020-02-13 | 2020-06-16 | 苏州浪潮智能科技有限公司 | Multipath equipment shielding system, method, equipment and readable storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7162575B2 (en) * | 2002-12-20 | 2007-01-09 | Veritas Operating Corporation | Adaptive implementation of requested capabilities for a logical volume |
US7191260B2 (en) * | 2004-01-15 | 2007-03-13 | International Business Machines Corporation | Multiple connection management system |
CN101387957B (en) * | 2008-09-12 | 2011-04-20 | 成都市华为赛门铁克科技有限公司 | Multi-path software implementing apparatus and method |
-
2014
- 2014-12-05 CN CN201410734783.6A patent/CN105718209A/en not_active Withdrawn
-
2015
- 2015-09-01 WO PCT/CN2015/088783 patent/WO2016086695A1/en active Application Filing
Non-Patent Citations (1)
Title |
---|
KITSNAIL: "《Linux 公社》", 21 January 2014 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107566547A (en) * | 2017-09-27 | 2018-01-09 | 郑州云海信息技术有限公司 | The processing method named when on multiple servers is mapped to for same memory |
CN109766542A (en) * | 2018-12-14 | 2019-05-17 | 中国电力科学研究院有限公司 | A component naming method and system for automatic modeling of electromagnetic transients in large-scale power grids |
CN111625193A (en) * | 2020-05-22 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Configuration method, device, equipment and medium of multipath alias |
CN113625944A (en) * | 2021-06-25 | 2021-11-09 | 济南浪潮数据技术有限公司 | Disaster recovery method and system based on multipath and remote copy technology |
CN113625944B (en) * | 2021-06-25 | 2024-02-02 | 济南浪潮数据技术有限公司 | A disaster recovery method and system based on multi-path and remote replication technology |
Also Published As
Publication number | Publication date |
---|---|
WO2016086695A1 (en) | 2016-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105718209A (en) | Method and device for naming multipath device, host and communication system | |
US10152377B2 (en) | Layering a distributed storage system into storage groups and virtual chunk spaces for efficient data recovery | |
US7484056B2 (en) | Partitioning of a storage array into N-storage arrays using full array non-disruptive data migration | |
US8880793B2 (en) | Storage management systems and methods | |
US7484059B1 (en) | Full array non-disruptive migration of extended storage functionality | |
US7484057B1 (en) | Consolidating N-storage arrays into one storage array using full array non-disruptive data migration | |
US8806157B2 (en) | Online volume migration using multi-path input / output masquerading | |
US9766833B2 (en) | Method and apparatus of storage volume migration in cooperation with takeover of storage area network configuration | |
EP2863310B1 (en) | Data processing method and apparatus, and shared storage device | |
US7596658B2 (en) | Method for expanding capacity of replication volume | |
US7779082B2 (en) | Address management device | |
US8386707B2 (en) | Virtual disk management program, storage device management program, multinode storage system, and virtual disk managing method | |
KR101912728B1 (en) | Data processing method and apparatus | |
US20190278770A1 (en) | Time Series Data Management Method, Device, And Apparatus | |
JP2017527911A (en) | Scalable data storage pool | |
CN106815218A (en) | Data bank access method, device and Database Systems | |
CN104023246A (en) | Private video data cloud-storage system and method | |
US8589504B1 (en) | Full array non-disruptive management data migration | |
CN104331344A (en) | Data backup method and device | |
CN106528830A (en) | Method and device for recovering file index catalogue | |
CN110765190B (en) | Automatic database cluster capacity expansion method and device and electronic equipment | |
CN104951528A (en) | Data migration method and terminal | |
CN107124346A (en) | Dynamically distributes void port VPLS forwards error-preventing method and system | |
US8904141B2 (en) | Merging a storage cluster into another storage cluster | |
CN104699720A (en) | Merging and storing method and system for massive data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20160629 |