CN102622315A - Method, device and system for controlling disc visiting - Google Patents

Method, device and system for controlling disc visiting Download PDF

Info

Publication number
CN102622315A
CN102622315A CN201210044510XA CN201210044510A CN102622315A CN 102622315 A CN102622315 A CN 102622315A CN 201210044510X A CN201210044510X A CN 201210044510XA CN 201210044510 A CN201210044510 A CN 201210044510A CN 102622315 A CN102622315 A CN 102622315A
Authority
CN
China
Prior art keywords
disk
current location
sequence number
judge
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210044510XA
Other languages
Chinese (zh)
Other versions
CN102622315B (en
Inventor
杜开田
凌华兵
罗荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Liancheng Technology Hebei Co ltd
Original Assignee
Huawei 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 Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210044510.XA priority Critical patent/CN102622315B/en
Priority to PCT/CN2012/079121 priority patent/WO2013123758A1/en
Publication of CN102622315A publication Critical patent/CN102622315A/en
Application granted granted Critical
Publication of CN102622315B publication Critical patent/CN102622315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention is applicable to the technical field of discs, and provides a method, a device and a system for controlling disc visiting. The method comprises judging whether a disc is a new one or not according to disc serial number of the current position and the congruent relationship between preset stored current position and specific disc serial number, or according to the disc serial number of the current position and the congruent relationship among the preset stored current position, equipment number of equipment of the disc and the specific disc serial number; on yes judgment, the congruent relationship between the current position originally stored on a metadata disc and an old disc inserted in the current position is refreshed; and on no judgment, the congruent relationship between the current position originally stored on a metadata disc and an old disc inserted in the current position is stored. According to the disc serial number of the disc at the current position, the file control information of the disc recorded on the metadata disc is deleted or retained, and the condition that users cannot visit the data on the original disc due to the fact of disc data loss is avoided.

Description

A kind of disk access control method, Apparatus and system
Technical field
The invention belongs to the disk technical field, relate in particular to a kind of disk access control method, Apparatus and system.
Background technology
File system is the bibliographic structure that is included in a disk or subregion, and wherein, disk can comprise CD, floppy disk, flash memory disk, hard disk and other memory device, is that example describes with hard disk commonly used here.There is second extended file system (Second Extended File System in the traditional document system; Ext2), the 3rd extended file system (Third Extended File System; Ext3) and NT file system (NT File System; NTFS) etc., the access rights to file system only limit to this accessing.In order also to realize visit to file system at far-end; Usually adopt Network File System protocol to share server, user or application access to local file system, thereby realize that storage space and data are shared between multiple servers and a plurality of application to other.But the access efficiency of this file system is lower; This moment, cluster distributed storage file system was arisen at the historic moment; In cluster distributed storage file system, with the metadata and the file separate storage of file system, wherein; Metadata is used for the data of description document system file attribute and set, make file search and visit more efficient.
The flow process of prior art application access file system is generally: the disk file system access request is sent in application access; The file system access agency obtains the document control information of disk file system to be visited from metadata controller; Wherein, Document control information is the operation information that the file to disk carries out access control etc., and initiates the visit to this disk file system according to said document control information.By existing file system access mechanism; When the identical disk to same position carries out plug; Though store file data is not lost on this disk,, therefore cause data in magnetic disk to be lost because the document control information of this disk of metadata disc recording is deleted; Can't visit the data on the original disk, this disk can only be used the dish that was plugged as new building; In like manner, when with a plurality of disk integral body during, if one of them disk failure when changing failed disk, equally also can cause on the same unit other data in magnetic disk to lose and can't visit as a hot plug unit.In the above-mentioned file system access process, when extracting owing to disk, the document control information of this disk of metadata disc recording is deleted, and therefore causes data in magnetic disk to be lost, and can't visit the data on the original disk.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of disk access control method; Be intended to solve prior art because disk when extracting; The document control information of this disk of metadata disc recording is deleted, and therefore causes data in magnetic disk to be lost, and can't visit the problem of the data on the original disk.
The embodiment of the invention is achieved in that a kind of disk access control method, is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and said method comprises the steps:
When disk inserts, obtain the disk sequence number of the disk that is inserted into current location;
According to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is new disk; Perhaps, according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is new disk;
If new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
If not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
The embodiment of the invention also provides a kind of disk access control device, is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and said device comprises:
Acquiring unit is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
The embodiment of the invention also provides a kind of disk access control system, and said system comprises a plurality of disks and disk access control device, and said disk access control device links to each other with said a plurality of disks;
Said a plurality of disk is used for the metadata and the file of storing metadata;
Said disk access control device comprises:
Acquiring unit is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
The embodiment of the invention compared with prior art; Beneficial effect is: realize the disk sequence number according to the disk of current location; The document control information of this disk of metadata disc recording is deleted or kept, avoid losing, and can't visit the data on the original disk because of data in magnetic disk.Make that in cluster distributed storage system the disk that inserts when the identification current location is the original disk in this position, owing to do not lose the document control information data, so can continue the data in this disk are conducted interviews; And when with a plurality of disk integral body during, if one of them disk failure when changing failed disk, still can conduct interviews to other the data of dish of unit, place, plug unit as a hot plug unit; Further; For the situation of disk in the exchange device more behind the electricity under the equipment,, therefore can carry out correct visit to the disk of changing owing to can discern to the disk position of changing; Avoid because the replacing of disk can't be known in following charged renewal disk management system; Thereby after device power starts, can't discern this disk, and the situation that causes disk access to be made mistakes.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention; The accompanying drawing of required use is done to introduce simply in will describing embodiment below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of the realization of the disk access control method that provides of the embodiment of the invention one;
Fig. 2 is the process flow diagram of the realization of the disk access control method that provides of the embodiment of the invention two;
Fig. 3 is the process flow diagram of the realization of the disk access control method that provides of the embodiment of the invention three;
Fig. 4 is the structural drawing that the present invention implements the six disk access control device that provide;
Fig. 5 is the structural drawing that the present invention implements the seven disk access control system that provide.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the invention provides a kind of disk access control method, is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and said method comprises the steps:
When disk inserts, obtain the disk sequence number of the disk that is inserted into current location;
According to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is new disk; Perhaps, according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is new disk;
If new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
If not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
The embodiment of the invention also provides a kind of disk access control device, is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and said device comprises:
Acquiring unit is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
The embodiment of the invention also provides a kind of disk access control system, and said system comprises a plurality of disks and disk access control device, and said disk access control device links to each other with said a plurality of disks;
Said a plurality of disk is used for the metadata and the file of storing metadata;
Said disk access control device comprises:
Acquiring unit is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
Below in conjunction with specific embodiment realization of the present invention is described in detail:
Embodiment one
In the present embodiment, in the disk access control procedure, when the detection disk is extracted; Extract the document control information of disk on the preserve metadata dish; And keep or deletion according to following steps decisions, thereby make things convenient for disk to use, Fig. 1 shows the process flow diagram of the realization of the disk access control method that the embodiment of the invention one provides; This method is applied to cluster distributed storage file system; Said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and details are as follows for said method:
In step S101, when disk inserts, obtain the disk sequence number of the disk that is inserted into current location.
In the present embodiment, except the disk sequence number, other the disc information that can characterize disk characteristics also can be used in also this enforcement, all belongs to protection scope of the present invention.
In addition; As those skilled in the art, the mode of obtaining the disk sequence number has a lot, for example; Windows management regulation (Windows Management Instrumentation; WMI) (Application Programming Interface, API) mode etc. repeats no more at this for mode, application programming interfaces.
In step S102,, judge whether the disk that is inserted into current location is new disk according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number; Perhaps; According to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number; Judge whether the disk that is inserted into current location is new disk, if new disk, execution in step S103; If not new disk, execution in step S104.
In the present embodiment, for the ease of understanding, below through a realization example to according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number; Judge that whether the disk be inserted into current location is that the process of new disk describes, but exceed with the situation of this realization example: suppose that the hard disk location number when the front disk insertion that obtains is 1, sequence number is num1; Can be expressed as (1; Num1), be that the sequence number of 1 position is num2 if store this hard disk location number in advance, can be expressed as (1; Num2); Variation has taken place in the sequence number of the insertion disk of then current hard disk position 1, judges that then the disk that current location 1 is inserted is new disk, execution in step S103; The sequence number of storing this hard disk location number in advance and be 1 position is num1, can be expressed as that (1, num1), the sequence number of the insertion disk of then current hard disk position 1 does not change, and judges that then the disk that current location 1 is inserted is not new disk, execution in step S104.In addition; According to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number; Judge that whether the disk be inserted into current location is that the process of new disk is similar to the above process, repeats no more at this.
What be worth explanation is that in the present embodiment, new disk can be a new disk physically; New disk can also be to use in this position; But the used disk in other position again after extract this position, at this moment, the information of disk changes; If continue to use in this position, think that then this disk is new disk.
In step S103, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
In the present embodiment; The current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish; At this moment, deleted the document control information of current location on the metadata dish, the document control information of the old disk of metadata disk storage can't be controlled the file on this new disk; Then need be according to the document control information of new disk, to the control that conducts interviews of new disk.
In step S104, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
In the present embodiment, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish, therefore, and still can be according to the document control information of current location on the metadata dish, to the control that conducts interviews of this old disk.
In the present embodiment; According to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number; Perhaps according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number; Judge whether the disk that is inserted into current location is new disk; If new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish; If not new disk; The current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish; Realization is according to the disk sequence number of the disk of current location; The document control information of this disk of metadata disc recording is deleted or kept, avoid losing, and can't visit the data on the original disk because of data in magnetic disk.Make that in cluster distributed storage system the disk that inserts when the identification current location is the original disk in this position, owing to do not lose the document control information data, so can continue the data in this disk are conducted interviews; And when with a plurality of disk integral body during, if one of them disk failure when changing failed disk, still can conduct interviews to other the data of dish of unit, place, plug unit as a hot plug unit; Further; For the situation of disk in the exchange device more behind the electricity under the equipment,, therefore can carry out correct visit to the disk of changing owing to can discern to the disk position of changing; Avoid because the replacing of disk can't be known in following charged renewal disk management system; Thereby after device power starts, can't discern this disk, and the situation that causes disk access to be made mistakes.
Embodiment two
Present embodiment; On the basis of embodiment one; Also obtain the number of times that powers on of the disk that is inserted into current location, and the number of times that powers on that on the basis of embodiment one, combines to be inserted into the disk of current location judges whether the disk that is inserted into current location is new disk, Fig. 2 shows the process flow diagram of the realization of the disk access control method that the embodiment of the invention two provides; This method is applied to cluster distributed storage file system; Said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and details are as follows for said method:
In step S201, when disk inserts, obtain the disk sequence number of the disk that is inserted into current location and be inserted into the number of times that powers on of the disk of current location.
In step S202; Whether the current location according to the disk sequence number of the said said current location of obtaining and storage in advance is consistent with the particular disk sequence number; If consistent, if execution in step S203 is inconsistent; Judge that the disk that is inserted into current location is new disk, execution in step S204.
In step S203; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, execution in step S204; If be not more than, judge that the disk that is inserted into current location is to be not new disk, execution in step S205.
In step S204, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
In step S205, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
Present embodiment further obtains the number of times that powers on of disk on the basis of embodiment one; Whether the disk sequence number of the said current location of obtaining through judgement is consistent with the disk sequence number of the current location of storage in advance; If inconsistent, judge that the disk that is inserted into current location is new disk, then needn't judge again; If it is consistent; Then continue to judge judge that through the number of times that powers on of disk the disk that is inserted into current location is new disk, realization can effectively discern use, extract in current location originally the back to data carried out change, the disk that continues to use in current location again is new disk, and can this type of disk be identified as old dish; Thereby make a mistake visit, improved the accuracy of identification.
Embodiment three
Present embodiment; On the basis of embodiment one; Also obtain the number of times that powers on of the disk that is inserted into current location, and the number of times that powers on that on the basis of embodiment one, combines to be inserted into the disk of current location judges whether the disk that is inserted into current location is new disk, Fig. 3 shows the process flow diagram of the realization of the disk access control method that the embodiment of the invention three provides; This method is applied to cluster distributed storage file system; Said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and details are as follows for said method:
In step S301, when disk inserts, obtain the disk sequence number of the disk that is inserted into current location and be inserted into the number of times that powers on of the disk of current location.
In step S302; Whether the device number according to current location, the disk place equipment of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number; If consistent, if execution in step S303 is inconsistent; Judge that the disk that is inserted into current location is new disk, execution in step S304.
In step S303; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, execution in step S304; If be not more than, judge that the disk that is inserted into current location is to be not new disk, execution in step S305.
In step S304, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
In step S305, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
Present embodiment further obtains the number of times that powers on of disk on the basis of embodiment one; Whether the device number of the current location of the disk sequence number of the said current location of obtaining through judgement and storage in advance, disk place equipment is consistent with the particular disk sequence number; If inconsistent, judge that the disk that is inserted into current location is new disk, then needn't judge again; If it is consistent; Then continue to judge judge that through the number of times that powers on of disk the disk that is inserted into current location is new disk, realization can effectively discern use, extract in current location originally the back to data carried out change, the disk that continues to use in current location again is new disk, and can this type of disk be identified as old dish; Thereby make a mistake visit, improved the accuracy of identification.
Embodiment four
Fig. 4 shows the structural drawing of the disk access control device that the embodiment of the invention four provides; For the ease of explanation; Only show the part relevant with the embodiment of the invention, this disk access control device is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata; And the disk that is used for storage file, said device comprises: acquiring unit 41, judging unit 42, updating block 43 and stick unit 44.
Acquiring unit 41 is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit 42 is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block 43 is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit 44 is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
Optional, acquiring unit 51 also is used to obtain the number of times that powers on of the disk that is inserted into current location.
Optional, judging unit 42 can comprise: first judge module, first starts module and second and starts module.
First judge module is used to judge whether the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number;
First starts module; Judge that the current location and the particular disk sequence number of the disk sequence number of the said current location of obtaining and storage in advance are inconsistent if be used for first judge module; Judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 43;
Second starts module; Judge that the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number if be used for first judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 43; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start above-mentioned updating block 43;
Optional, judging unit 42 can comprise: second judge module, the 3rd starts module and the 4th and starts module.
Second judge module; Whether the device number that is used for current location, disk place equipment according to the disk sequence number of the said current location obtained and storage in advance is consistent with the particular disk sequence number, and whether the disk that judgement is inserted into current location is new disk;
The 3rd starts module; Judge that the device number and the particular disk sequence number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment are inconsistent if be used for second judge module; Judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 43;
The 4th starts module; Judge that the device number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment is consistent with the particular disk sequence number if be used for second judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start the updating block 43 in the claim 3; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start above-mentioned updating block 43.
Among the method embodiment one to three that the disk access control device that the embodiment of the invention provides can use in aforementioned correspondence, details repeat no more at this referring to the description of the foregoing description one to three.
Embodiment five
Fig. 5 shows the structural drawing that the present invention implements the five disk access control system that provide; For the ease of explanation; Only show the part relevant with the embodiment of the invention; Said system comprises a plurality of disks 51 and disk access control device 52, and said disk access control device 52 links to each other with said a plurality of disks 51;
Said a plurality of disk 51 is used for the metadata and the file of storing metadata;
Said disk access control device 52 comprises: acquiring unit 521, judging unit 522, updating block 523 and stick unit 524.
Acquiring unit 521 is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit 522 is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block 523 is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit 524 is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
Optional, said acquiring unit 521 also is used to obtain the number of times that powers on of the disk that is inserted into current location;
Optional, said judging unit 522 comprises: first judge module, first starts module and second and starts module.
First judge module is used to judge whether the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number;
First starts module; Judge that the current location and the particular disk sequence number of the disk sequence number of the said current location of obtaining and storage in advance are inconsistent if be used for first judge module; Judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 523;
Second starts module; Judge that the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number if be used for first judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 523; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start above-mentioned updating block 523;
Optional, said judging unit comprises: second judge module, the 3rd starts module and the 4th and starts module.
Second judge module; Whether the device number that is used for current location, disk place equipment according to the disk sequence number of the said current location obtained and storage in advance is consistent with the particular disk sequence number, and whether the disk that judgement is inserted into current location is new disk;
The 3rd starts module; Judge that the device number and the particular disk sequence number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment are inconsistent if be used for second judge module; Judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 523;
The 4th starts module; Judge that the device number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment is consistent with the particular disk sequence number if be used for second judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start above-mentioned updating block 523; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start above-mentioned updating block 523.
It should be noted that in said apparatus and the system embodiment that each included unit is just divided according to function logic, but is not limited to above-mentioned division, as long as can realize function corresponding; In addition, the concrete title of each functional unit also just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In addition; One of ordinary skill in the art will appreciate that all or part of step that realizes in above-mentioned each embodiment method is to instruct relevant hardware to accomplish through program; Corresponding program can be stored in the computer read/write memory medium; Described storage medium is like ROM/RAM, disk or CD etc.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a disk access control method is characterized in that, is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and said method comprises:
When disk inserts, obtain the disk sequence number of the disk that is inserted into current location;
According to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is new disk; Perhaps, according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is new disk;
If new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
If not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
2. the method for claim 1 is characterized in that, said method also comprises:
Obtain the number of times that powers on of the disk that is inserted into current location;
The current location of the disk sequence number of the said current location that said basis is obtained and storage in advance and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is that new disk comprises:
Whether the current location according to the disk sequence number of the said said current location of obtaining and storage in advance is consistent with the particular disk sequence number, judges whether the disk that is inserted into current location is new disk;
If the current location and the particular disk sequence number of the disk sequence number of the said current location of obtaining and storage in advance are inconsistent; Judge that the disk be inserted into current location is new disk, and enforcement of rights requires in 1 the step after disk that judgement is inserted into current location is new disk;
If the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than; Judge to judge that then the disk that is inserted into current location is new disk, and enforcement of rights requires in 1 the step after disk that judgement is inserted into current location is new disk; If be not more than, judge the disk be inserted into current location for being not new disk, and enforcement of rights requires in 1 when judging that the disk that is inserted into current location is the step after not being new disk.
Perhaps, the current location of the disk sequence number of the said current location that said basis is obtained and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number, judge whether the disk that is inserted into current location is that new disk comprises:
Whether the device number according to current location, the disk place equipment of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number, and whether the disk that judgement is inserted into current location is new disk;
If the device number and the particular disk sequence number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment are inconsistent; Judge that the disk be inserted into current location is new disk, and enforcement of rights requires in 1 the step after disk that judgement is inserted into current location is new disk;
If the device number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment is consistent with the particular disk sequence number; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than; Judge to judge that then the disk that is inserted into current location is new disk, and enforcement of rights requires in 1 the step after disk that judgement is inserted into current location is new disk; If be not more than, judge the disk be inserted into current location for being not new disk, and enforcement of rights requires in 1 when judging that the disk that is inserted into current location is the step after not being new disk.
3. a disk access control device is characterized in that, is applied to cluster distributed storage file system, and said system comprises the metadata dish that is used for storing metadata, and the disk that is used for storage file, and said device comprises:
Acquiring unit is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
4. device as claimed in claim 3 is characterized in that, said acquiring unit also is used to obtain the number of times that powers on of the disk that is inserted into current location;
Said judging unit comprises:
First judge module is used to judge whether the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number;
First starts module; Judge that the current location and the particular disk sequence number of the disk sequence number of the said current location of obtaining and storage in advance are inconsistent if be used for first judge module; Judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3;
Second starts module; Judge that the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number if be used for first judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start the stick unit in the claim 3;
Perhaps said judging unit comprises:
Second judge module; Whether the device number that is used for current location, disk place equipment according to the disk sequence number of the said current location obtained and storage in advance is consistent with the particular disk sequence number, and whether the disk that judgement is inserted into current location is new disk;
The 3rd starts module; Judge that the device number and the particular disk sequence number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment are inconsistent if be used for second judge module; Judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3;
The 4th starts module; Judge that the device number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment is consistent with the particular disk sequence number if be used for second judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start the stick unit in the claim 3.
5. a disk access control system is characterized in that, said system comprises a plurality of disks and disk access control device, and said disk access control device links to each other with said a plurality of disks;
Said a plurality of disk is used for the metadata and the file of storing metadata;
Said disk access control device comprises:
Acquiring unit is used for when disk inserts, and obtains the disk sequence number of the disk that is inserted into current location;
Judging unit is used for judging according to the disk sequence number of the said current location of obtaining and the current location of storage in advance and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk; Perhaps, judge according to the current location of the disk sequence number of the said current location of obtaining and storage in advance, the device number of disk place equipment and the corresponding relation of particular disk sequence number whether the disk that is inserted into current location is new disk;
Updating block is used for if new disk, the current location of original preservation and to be inserted in corresponding relation between the old disk of current location be the corresponding relation between current location and the new disk on the update metadata dish;
Stick unit is used for if not new disk, the current location of original preservation and be inserted in the corresponding relation between the disk of current location on the preserve metadata dish.
6. disk access control system as claimed in claim 5 is characterized in that, said acquiring unit also is used to obtain the number of times that powers on of the disk that is inserted into current location;
Said judging unit comprises:
First judge module is used to judge whether the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number;
First starts module; Judge that the current location and the particular disk sequence number of the disk sequence number of the said current location of obtaining and storage in advance are inconsistent if be used for first judge module; Judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3;
Second starts module; Judge that the current location of the disk sequence number of the said current location of obtaining and storage in advance is consistent with the particular disk sequence number if be used for first judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start the stick unit in the claim 3;
Perhaps said judging unit comprises:
Second judge module; Whether the device number that is used for current location, disk place equipment according to the disk sequence number of the said current location obtained and storage in advance is consistent with the particular disk sequence number, and whether the disk that judgement is inserted into current location is new disk;
The 3rd starts module; Judge that the device number and the particular disk sequence number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment are inconsistent if be used for second judge module; Judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3;
The 4th starts module; Judge that the device number of the current location of the disk sequence number of the said current location of obtaining and storage in advance, disk place equipment is consistent with the particular disk sequence number if be used for second judge module; Whether the number of times that powers on of judging the disk of the said current location obtain adds 1 greater than the number of times that powers on of the disk of the current location of storage in advance; If greater than, then judge and judge that the disk that is inserted into current location is new disk, and start the updating block in the claim 3; If be not more than, judge that the disk that is inserted into current location is to be not new disk, and start the stick unit in the claim 3.
CN201210044510.XA 2012-02-24 2012-02-24 Method, device and system for controlling disc visiting Active CN102622315B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210044510.XA CN102622315B (en) 2012-02-24 2012-02-24 Method, device and system for controlling disc visiting
PCT/CN2012/079121 WO2013123758A1 (en) 2012-02-24 2012-07-25 Disk access control method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210044510.XA CN102622315B (en) 2012-02-24 2012-02-24 Method, device and system for controlling disc visiting

Publications (2)

Publication Number Publication Date
CN102622315A true CN102622315A (en) 2012-08-01
CN102622315B CN102622315B (en) 2014-08-13

Family

ID=46562241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210044510.XA Active CN102622315B (en) 2012-02-24 2012-02-24 Method, device and system for controlling disc visiting

Country Status (2)

Country Link
CN (1) CN102622315B (en)
WO (1) WO2013123758A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373549A (en) * 2014-08-25 2016-03-02 浙江大华技术股份有限公司 Data migration method and device and data node server
WO2016110004A1 (en) * 2015-01-05 2016-07-14 中兴通讯股份有限公司 Management method and apparatus for disk storage space, and storage device
CN106528005A (en) * 2017-01-12 2017-03-22 郑州云海信息技术有限公司 Disk adding method and device for distributed type storage system
WO2020107403A1 (en) * 2018-11-30 2020-06-04 唐山曹妃甸联城科技有限公司 Disk access control method, apparatus and system
CN111880751A (en) * 2020-09-28 2020-11-03 浙江大华技术股份有限公司 Hard disk migration method, distributed storage cluster system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004044722A1 (en) * 2002-11-05 2004-05-27 First Internet Alliance Hot pluggable drive detection
CN1641610A (en) * 2004-01-08 2005-07-20 英业达股份有限公司 Hard disk replacement control and management method for network storage system
CN102326141A (en) * 2011-08-08 2012-01-18 华为技术有限公司 Processing method and apparatus for raid configuration information and raid controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004044722A1 (en) * 2002-11-05 2004-05-27 First Internet Alliance Hot pluggable drive detection
CN1641610A (en) * 2004-01-08 2005-07-20 英业达股份有限公司 Hard disk replacement control and management method for network storage system
CN102326141A (en) * 2011-08-08 2012-01-18 华为技术有限公司 Processing method and apparatus for raid configuration information and raid controller

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373549A (en) * 2014-08-25 2016-03-02 浙江大华技术股份有限公司 Data migration method and device and data node server
CN105373549B (en) * 2014-08-25 2019-02-12 浙江大华技术股份有限公司 Data migration method, equipment and back end server
WO2016110004A1 (en) * 2015-01-05 2016-07-14 中兴通讯股份有限公司 Management method and apparatus for disk storage space, and storage device
CN105824572A (en) * 2015-01-05 2016-08-03 中兴通讯股份有限公司 Disk storage space managing method, apparatus and storage device
CN105824572B (en) * 2015-01-05 2019-06-04 中兴通讯股份有限公司 A kind of disk storage space management method, device and storage equipment
CN106528005A (en) * 2017-01-12 2017-03-22 郑州云海信息技术有限公司 Disk adding method and device for distributed type storage system
CN106528005B (en) * 2017-01-12 2019-12-31 苏州浪潮智能科技有限公司 Disk adding method and device of distributed storage system
WO2020107403A1 (en) * 2018-11-30 2020-06-04 唐山曹妃甸联城科技有限公司 Disk access control method, apparatus and system
CN111880751A (en) * 2020-09-28 2020-11-03 浙江大华技术股份有限公司 Hard disk migration method, distributed storage cluster system and storage medium
CN111880751B (en) * 2020-09-28 2020-12-25 浙江大华技术股份有限公司 Hard disk migration method, distributed storage cluster system and storage medium

Also Published As

Publication number Publication date
CN102622315B (en) 2014-08-13
WO2013123758A1 (en) 2013-08-29

Similar Documents

Publication Publication Date Title
CN105144142B (en) Use the information storage object of the multiple dimensions of object
CN106548789B (en) Method and apparatus for operating stacked tile type magnetic recording equipment
CN104850358B (en) A kind of magneto-optic electricity mixing storage system and its data acquisition and storage method
CN105260270B (en) A kind of Dynamic- Recovery method and device of Flash memory space
CN102096561B (en) Hierarchical data storage processing method, device and storage equipment
CN102622315B (en) Method, device and system for controlling disc visiting
CN103226965B (en) Based on the audio/video data access method of time bitmap
CN102902709B (en) The document storage system of a kind of fixed space distribution and implementation method
CN106844583B (en) Optimization method for establishing FAT file system on NOR Flash
CN105786401A (en) Data management method and device in server cluster system
CN101673192A (en) Method for time-sequence data processing, device and system therefor
CN105339903A (en) Restoring a file system object
CN104516471A (en) Method and device for managing power supply of storage system
CN104570063A (en) Parallel extraction method of seismic channel set of seismic data
CN101315613A (en) Apparatus and method of processing data of non-volatile memory
CN102945208B (en) Multiuser hard disk system and its implementation
CN106201652A (en) A kind of data processing method and virtual machine
US20100058015A1 (en) Backup apparatus, backup method and computer readable medium having a backup program
US10042570B2 (en) Tape backup and restore in a disk storage environment with intelligent data placement
CN102142010A (en) Method and equipment for inputting data to multimedia service database on embedded equipment
CN111124303A (en) Data storage method, device and system
CN103902468B (en) The data clearing method and device of storage system
US20140297596A1 (en) Home appliance storage virtualization method and apparatus
CN102841894A (en) Data storage method of file allocation table
CN103631682A (en) Data backup implement method and device

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
TR01 Transfer of patent right

Effective date of registration: 20170527

Address after: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

CB03 Change of inventor or designer information

Inventor after: Yu Xiangdong

Inventor before: Du Kaitian

Inventor before: Ling Huabing

Inventor before: Luo Rong

CB03 Change of inventor or designer information
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170914

Address after: 062550 Cangzhou City, Hebei city in Renqiu province of South North China Petroleum hydropower District 19 Building 4 unit 201 room

Patentee after: Yu Xiangdong

Address before: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

CP02 Change in the address of a patent holder

Address after: 541199 Lingui County, Guilin, Lingui County, Lingui Town, Xinglin Road, No. 1, unit 202, Room 202

Patentee after: Yu Xiangdong

Address before: 062550 Cangzhou City, Hebei city in Renqiu province of South North China Petroleum hydropower District 19 Building 4 unit 201 room

Patentee before: Yu Xiangdong

CP02 Change in the address of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20181207

Address after: 063000 Tangshan City, Hebei Province, Caofeidian Industrial Zone, Sanjia Municipal Service Building, Block B, 709

Patentee after: Tangshan Caofeidian Liancheng Technology Co.,Ltd.

Address before: 541199 room 2, unit 8, Xinglin Road, Lingui Town, Lingui, the Guangxi Zhuang Autonomous Region, 202, Guilin, 202

Patentee before: Yu Xiangdong

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: 063299 C2 training building, science and Technology Innovation Industrial Park, Caofeidian new city, Tangshan City, Hebei Province

Patentee after: Tangshan Caofeidian Liancheng Technology Co.,Ltd.

Address before: 063000 Tangshan City, Hebei Province, Caofeidian Industrial Zone, Sanjia Municipal Service Building, Block B, 709

Patentee before: Tangshan Caofeidian Liancheng Technology Co.,Ltd.

CP03 Change of name, title or address
CP01 Change in the name or title of a patent holder

Address after: 063299 C2 training building, Caofeidian new town science and Technology Innovation Industrial Park, Tangshan City, Hebei Province

Patentee after: Liancheng Technology (Hebei) Co.,Ltd.

Address before: 063299 C2 training building, Caofeidian new town science and Technology Innovation Industrial Park, Tangshan City, Hebei Province

Patentee before: Tangshan Caofeidian Liancheng Technology Co.,Ltd.

CP01 Change in the name or title of a patent holder