CN108549550A - A kind of hard disk hanging method and device - Google Patents

A kind of hard disk hanging method and device Download PDF

Info

Publication number
CN108549550A
CN108549550A CN201810330667.6A CN201810330667A CN108549550A CN 108549550 A CN108549550 A CN 108549550A CN 201810330667 A CN201810330667 A CN 201810330667A CN 108549550 A CN108549550 A CN 108549550A
Authority
CN
China
Prior art keywords
hard disk
target
carry
directory
device number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810330667.6A
Other languages
Chinese (zh)
Inventor
赵赞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810330667.6A priority Critical patent/CN108549550A/en
Publication of CN108549550A publication Critical patent/CN108549550A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (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 discloses a kind of hard disk hanging methods, including:Detect the target directory that whether there is carry target hard disk in target storage system;If so, the second device number in obtaining the parent directory of the first device number and the target directory in the target directory, when first device number is identical with second device number, by the target hard disk carry to the target directory.Thus, it is possible to ensure the successful carry of hard disk, also good preparatory condition is provided for the repetition grafting carry of hard disk;Meanwhile also improving the stability and robustness of storage system.Correspondingly, a kind of hard disk carry device, equipment and computer readable storage medium disclosed by the invention, similarly have above-mentioned technique effect.

Description

A kind of hard disk hanging method and device
Technical field
The present invention relates to field of computer technology, more specifically to a kind of hard disk hanging method, device, equipment and Computer readable storage medium.
Background technology
In linux operating systems, carry refer to by an equipment (be typically storage device) be articulated to one it is existing Catalogue on, then access the storage device by accessing this catalogue.
Currently, in distributed memory system, it, may be due to previous hard disk when needing grafting again after hard disk is pulled out OSD processes do not discharge mount directory, and the hard disk carry of grafting again is caused to fail;And when previous hard disk is discharging extension When carrying catalogue, the hard disk of grafting can cause carry to fail due to can not find corresponding mount directory again.
Therefore, after pulling out the hard disk in storage system, how for the grafting again of hard disk good preparatory condition is provided, The successful carry for ensureing hard disk, improves the stability and robustness of storage system, is that those skilled in the art need what is solved to ask Topic.
Invention content
The purpose of the present invention is to provide a kind of hard disk hanging method, device, equipment and computer readable storage medium, with Realize after pulling out the hard disk in storage system, provide good preparatory condition for the grafting again of hard disk, ensure hard disk at Work(carry improves the stability and robustness of storage system.
To achieve the above object, an embodiment of the present invention provides following technical solutions:
A kind of hard disk hanging method, including:
Detect the target directory that whether there is carry target hard disk in target storage system;
If so, second in obtaining the parent directory of the first device number and the target directory in the target directory sets Standby number, when first device number is identical with second device number, by the target hard disk carry to the target directory.
Wherein, when the target directory of target hard disk described in carry is not present in the target storage system, further include:
Create the target directory, and execute it is described by the target hard disk carry to the target directory the step of.
Wherein, it is described by the target hard disk carry to the target directory, including:
Judge that the corresponding UUID of the target hard disk whether there is;
If so, record the corresponding UUID of the target hard disk, and execute it is described by the target hard disk carry to described The step of target directory.
Wherein, it is described by the target hard disk carry to the target directory, including:
By preset disk service by the target hard disk carry to temp directory, and obtains the target hard disk and correspond to OSD ID;
By the target hard disk carry to the target directory, and from the temp directory forced unloading.
Wherein, described by after the target hard disk carry to the target directory, further include:
Detecting the target hard disk, whether carry is successful;
If so, the file destination detected in the target directory whether there is, in the presence of the file destination, start The corresponding OSD processes of the target hard disk.
Wherein, the corresponding OSD processes of the startup target hard disk, including:
Start the OSD processes according to the instruction input by user for starting the OSD processes, and cancels and wait for the OSD Process executes the delay completed.
Wherein, after the corresponding OSD processes of the startup target hard disk, further include:
When terminating the OSD processes using abnormal escape mechanism, and again before carry hard disk, by the OSD processes weight The number zero setting opened.A kind of hard disk carry device, including:
Detection module, for detecting the target directory that whether there is carry target hard disk in target storage system;
Execution module, for when, there are when the target directory of carry target hard disk, obtaining the mesh in target storage system The first device number in heading record and the second device number in the parent directory of the target directory, when first device number and institute State the second device number it is identical when, by the target hard disk carry to the target directory.
A kind of hard disk carry equipment, including:
Memory, for storing computer program;
Processor realizes the step of the hard disk hanging method described in above-mentioned any one when for executing the computer program Suddenly.
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, described The step of hard disk hanging method described in above-mentioned any one is realized when computer program is executed by processor.
By above scheme it is found that a kind of hard disk hanging method provided in an embodiment of the present invention, including:Detect target storage It whether there is the target directory of carry target hard disk in system;If so, obtain the first device number in the target directory and The second device number in the parent directory of the target directory will when first device number is identical with second device number The target hard disk carry is to the target directory.
As it can be seen that the method whether there is the catalogue of carry hard disk by detecting in storage system, when being deposited in storage system In the catalogue, then the second device number in the parent directory of the first device number and the catalogue in the catalogue is obtained, if the One device number and the second device number are identical, then show that catalogue has been released, by the direct carry of the hard disk to the catalogue; If the first device number and the second device number differ, show that catalogue is not released, it is hard described in carry again after catalogue is released Disk.Thus, it is possible to ensure the successful carry of hard disk, also good preparatory condition is provided for the repetition grafting carry of hard disk;Together When, also improve the stability and robustness of storage system.
Correspondingly, a kind of hard disk carry device, equipment and computer readable storage medium provided in an embodiment of the present invention, Equally have above-mentioned technique effect.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of hard disk hanging method flow chart disclosed by the embodiments of the present invention;
Fig. 2 is another hard disk hanging method flow chart disclosed by the embodiments of the present invention;
Fig. 3 is a kind of hard disk carry schematic device disclosed by the embodiments of the present invention;
Fig. 4 is a kind of hard disk carry equipment schematic diagram disclosed by the embodiments of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of hard disk hanging method, device, equipment and computer readable storage mediums, with reality Now after pulling out the hard disk in storage system, good preparatory condition is provided for the grafting again of hard disk, ensures the success of hard disk Carry improves the stability and robustness of storage system.
Referring to Fig. 1, a kind of hard disk hanging method provided in an embodiment of the present invention, including:
It whether there is the target directory of carry target hard disk in S101, detection target storage system;If so, executing S102;If it is not, then executing S103;
Specifically, in carry hard disk, the case where carry fails is frequently encountered, the present embodiment is carried for two kinds of failure causes The processing method of optimization is gone out.First, when needing grafting again after hard disk is pulled out, may due to previous hard disk OSD into Cheng Wei discharges mount directory, and the hard disk carry of grafting again is caused to fail;Second, when previous hard disk is discharging carry mesh When record, the hard disk of grafting can cause carry to fail due to can not find corresponding mount directory again.
The second equipment in the parent directory of S102, the first device number in the acquisition target directory and the target directory Number, and execute S104;
In the present embodiment, for the first situation, by obtaining the first device number and target directory in target directory Parent directory in the second device number show that target directory has been released, then if the first device number and the second device number are identical Direct carry hard disk;If the first device number and the second device number differ, shows that target directory is not released, then need The carry hard disk again after target directory release.
S103, the target directory is created, and executes S105;
In the present embodiment, for the second situation mesh is no longer waiting for by creating target directory come carry target hard disk The release of heading record.
Whether S104, detection first device number and second device number are identical;If so, executing S105;If it is not, Then execute S106;
S105, by the target hard disk carry to the target directory;
S106, judge whether current detection number is more than preset first threshold;If so, exiting flow;If it is not, then executing S102。
In the present embodiment, can be to detect target directory by detecting the device number in target directory and its parent directory It is no to be discharged by previous OSD processes;Meanwhile in order to reserve the sufficient end time to previous OSD processes, spy can be preset The number of fixed detection device number then obtains the device number of the two again when detecting number not less than preset first threshold And be detected, until when detection number is more than preset first threshold, just exit flow.Wherein it is possible to according to it is preset when Between interval carry out repeat detection.
It should be noted that since the end of OSD processes needs period regular hour, and in nowadays ever-changing number According to the epoch, each millisecond will all generate huge value.Therefore, it repeats grafting for the hard disk in storage system and excellent elder generation is provided Certainly condition is indispensable.Meanwhile the reason of hard disk carry failure, is varied, the present embodiment is carried for both the above situation Simple and convenient and enforceable technical solution has been supplied, the success rate of hard disk carry can be improved.
As it can be seen that a kind of hard disk hanging method provided in this embodiment, whether the method is deposited by detecting in storage system In the catalogue of carry hard disk, when there are the first device numbers when catalogue, then obtained in the catalogue and described in storage system The second device number in the parent directory of catalogue shows that the catalogue has been released if the first device number and the second device number are identical, By the direct carry of the hard disk to the catalogue;If the first device number and the second device number differ, show the catalogue It is not released, the hard disk described in carry again after the catalogue is released.Also it is hard disk thus, it is possible to ensure the successful carry of hard disk It repeats grafting carry and good preparatory condition is provided;Meanwhile also improving the stability and robustness of storage system.
The embodiment of the invention discloses another hard disk hanging methods, and relative to a upper embodiment, the present embodiment is to technology Scheme has made further instruction and optimization.
Referring to Fig. 2, another kind hard disk hanging method provided in an embodiment of the present invention, including:
It whether there is the target directory of carry target hard disk in S201, detection target storage system;If so, executing S202;If it is not, then executing S203;
The second equipment in the parent directory of S202, the first device number in the acquisition target directory and the target directory Number, and execute S204;
S203, the target directory is created, and executes S205;
Whether S204, detection first device number and second device number are identical;If so, executing S205;If it is not, Then execute S206;
It should be noted that when target hard disk carry is completed, need to detect hard disk and whether succeeded carry, when detecting When hard disk success carry, follow-up process is just carried out;When detecting the failed carry of hard disk, then carry target hard disk again, and Carry success is detected whether again;So cycle exits flow until when beyond preset detection number.
After the success of hard disk carry, the file destination detected in target directory whether there is, storage in the file destination The information such as the ID of the corresponding OSD of target hard disk.Wherein, the ID of OSD be fixed when creating OSD existing for, be it is artificial controllable, This is different from the ID of OSD processes, and the ID of OSD processes is that operating system is randomly assigned, and is artificial uncontrollable.Wherein, described File destination is the associated profile after the success of hard disk carry, such as:Whoami files etc.;If the mesh in the target directory It marks file to exist, then shows that corresponding OSD processes can be started;If after repeating detection file destination, in the target directory File destination is still not present and has been more than preset judgement number, just exits flow.
S205, by the target hard disk carry to the target directory, and execute S207;
S206, judge whether current detection number is more than preset first threshold;If so, exiting flow;If it is not, then executing S202。
Whether carry is successful for S207, the detection target hard disk;If so, executing S208;If it is not, then executing S205;
File destination in S208, detection target directory whether there is;If so, executing S210;If it is not, then executing S211;
S209, judge whether current detection number is more than preset second threshold;If so, exiting flow;If it is not, then holding Row S205;
S210, start the corresponding OSD processes of the target hard disk;
S211, judge whether current detection number is more than preset third threshold value;If so, exiting flow;If it is not, then executing S208。
In the present embodiment, in order to reserve enough mounting times to the carry of target hard disk, detection can be repeated Whether device number, detection hard disk carry success and detect whether the execution step there are file destination, respectively each detection step Corresponding detection threshold value is set suddenly, when detecting number more than preset threshold value, exits flow;When detection number be less than it is default Threshold value when, then repeat detect.
It should be noted that when executing arbitrary repetition detecting step provided in this embodiment, between can presetting accordingly Every the time.Such as:In detection device, if the device number of detection target directory and its parent directory differs, interval is default Time after, again obtain target directory and its parent directory device number, judge again the two it is whether identical.Wherein, technology people Member can preset different time intervals according to actual demand.Accordingly for detection hard disk whether carry success and detection be No there are the repetition of file destination detections, can also preset the time interval for meeting actual demand, the present embodiment is no longer superfluous to this It states.
Start the corresponding OSD processes of the target hard disk it should be noted that described, including:It is opened according to input by user The instruction for moving the OSD processes starts the OSD processes, and cancels and the OSD processes is waited for execute the delay completed.
Specifically, since the startup of OSD processes is than relatively time-consuming, when multiple hard disks carry simultaneously, the same lock can be shared It is unlocked startup, and is serial operation;Due to time restriction, a part of hard disk time-out when waiting for unlock can be caused, it can not Normal carry also can not normally start OSD processes.Therefore, in order to reduce time loss when OSD process initiations, when user inputs When starting the instruction of OSD processes, start corresponding OSD processes immediately, and cancels and the OSD processes is waited for execute the delay completed.
Such as:When the grafting simultaneously of multiple hard disks within the storage system when, it is assumed that these hard disks have succeeded carry, then using Family starts the corresponding OSD processes of these hard disks by enabled instruction is inputted, at this point, after first OSD process initiation, storage System front end is no longer waiting for the process and executes the return message completed, and starts second OSD process immediately, other and so on. After these OSD processes are started, it is made to operate in storage system rear end.Thus the time of OSD process initiations has been saved.If depositing In the OSD processes for starting failure, technical staff can check corresponding hard disk and catalogue file, to find to start the original of failure Cause, timely processing.
As it can be seen that another kind hard disk hanging method provided in this embodiment, the method by detect in storage system whether There are the catalogue of carry hard disk, when there are when the catalogue, then obtaining the first device number in the catalogue and institute in storage system The second device number in the parent directory of catalogue is stated, if the first device number and the second device number are identical, shows that the catalogue is released It puts, by the direct carry of the hard disk to the catalogue;If the first device number and the second device number differ, show the mesh Record is not released, the hard disk described in carry again after the catalogue is released.Also it is hard disk thus, it is possible to ensure the successful carry of hard disk Repetition grafting carry good preparatory condition is provided.
Meanwhile the present embodiment additionally provides the method for judging whether to start the corresponding OSD processes of target hard disk, passes through Judge that the specific file in catalogue whether there is to differentiate whether the corresponding OSD processes of hard disk can normally start;When in catalogue Specific file in the presence of, then show that the corresponding OSD processes of the target hard disk can start;Specific file in the catalogue In the absence of, then described the step of judging in the target directory with the presence or absence of file destination is repeated, until more than default The presence for judging number or detecting file destination.It is possible thereby to carry out the startup of the corresponding OSD processes of hard disk in time;Work as inspection When not detecting corresponding file destination, technical staff can detect corresponding configuration file and interface, to improve storage system Stability and robustness.
Based on above-mentioned any embodiment, it should be noted that it is described by the target hard disk carry to the target directory, Including:
Judge that the corresponding UUID of the target hard disk whether there is;
If so, record the corresponding UUID of the target hard disk, and execute it is described by the target hard disk carry to described The step of target directory.
Specifically, UUID (Universally Unique Identifier) is Universally Unique Identifier, the mesh of UUID , it is all elements in allowing distributed memory system, there can be unique identification information, without penetrating central control terminal To do the specified of identification information.Thus, which everyone could set up the UUID not conflicted with other people.In such situation Under, just it is not required to consider title replication problem when Database.Therefore, do not allow that there are identical UUID in storage system.
It, may be due to the corresponding UUID of the hard disk when needing grafting again after hard disk is pulled out but in hard disk carry It is not cleared up away from kernel, when by the hard disk again grafting, storage system can report an error because UUID is repeated, and then cause hard Disk carry fails.Therefore, in order to avoid causing hard disk carry to fail due to this reason, during hard disk carry, work as detection In the presence of being repeated to UUID, then the corresponding UUID of recording disk, and the carry step that hard disk will be continued to execute.Certainly, in reality In implementation process, the carry of hard disk can be directly carried out, without detecting whether that there are identical UUID.
Based on above-mentioned any embodiment, it should be noted that it is described by the target hard disk carry to the target directory, Including:
By preset disk service by the target hard disk carry to temp directory, and obtains the target hard disk and correspond to OSD ID;
By the target hard disk carry to the target directory, and the target hard disk is unloaded from temp directory pressure It carries.
Specifically, the detailed process of hard disk carry is:When storage system has detected hard disk grafting, triggering udev rule Then, and by ceph-disk services hard disk is first mounted to temp directory, after obtaining the information such as the ID of OSD, then is mounted to target Catalogue, finally from temp directory forced unloading, and then by calling ceph-osd services to start OSD processes.
Based on above-mentioned any embodiment, it should be noted that it is described start the corresponding OSD processes of the target hard disk it Afterwards, further include:
When terminating the OSD processes using abnormal escape mechanism, and again before carry hard disk, by the OSD processes weight The number zero setting opened.
If specifically, by the corresponding OSD processes of abnormal escape mechanism target end hard disk, which can be immediately Reporting fault message is conducive to storage system so that storage system knows specific hard disk, specific running state of a process immediately Storing system information timely updates.
But after terminating OSD processes by abnormal escape mechanism, exited since storage system is provided with OSD process exceptions Automatically the protection mechanism restarted, when the number restarted is more than the setting of storage system, just can not restart OSD under the interface into Journey.Therefore, when passing through the corresponding OSD processes of abnormal escape mechanism target end hard disk, after pulling out target hard disk, the OSD processes It can attempt to restart, and due to the above-mentioned presence for restarting protection mechanism, it is likely that cause the target hard disk of grafting again or other are hard Disk cannot achieve carry.
Therefore, after terminating the OSD processes by abnormal escape mechanism, in grafting hard disk again, start hard disk pair Before the OSD processes answered, the number zero setting for first restarting the OSD processes is restarted to avoid since storage system is preset Hard disk carry fails caused by protection mechanism.
Based on above-mentioned any embodiment, it should be noted that the process of OSD can also be fallen by the direct core of assert Mode terminates OSD processes, when using such mode, due to only when other OSD process checks are to the OSD process exceptions, Reporting fault message so needs certain detection report cycle to make storage system processing slow.And exit machine by abnormal System terminates OSD processes, understands reporting fault message immediately, is conducive to timely updating for storing system information.
Based on above-mentioned any embodiment, it should be noted that the hard disk hanging method that this specification provides has extensive Versatility is suitable for any distributed memory system, can significantly improve the efficiency and success rate of hard disk carry, improve storage The stability and robustness of system.
A kind of hard disk carry device provided in an embodiment of the present invention is introduced below, a kind of hard disk described below is hung Carry that set can be cross-referenced with a kind of above-described hard disk hanging method.
Referring to Fig. 3, a kind of hard disk carry device provided in an embodiment of the present invention, which is characterized in that including:
Detection module 301, for detecting the target directory that whether there is carry target hard disk in target storage system;
Execution module 302, for when in target storage system there are when the target directory of carry target hard disk, described in acquisition The first device number in target directory and the second device number in the parent directory of the target directory, when first device number and When second device number is identical, by the target hard disk carry to the target directory.
Wherein, further include:
Creation module is used for when the target directory of target hard disk described in carry is not present in the target storage system, Create the target directory, and by the target hard disk carry to the target directory.
Wherein, the execution module includes:
Judging unit, for judging that the corresponding UUID of the target hard disk whether there is;
Recording unit, for recording the corresponding UUID of the target hard disk, and by the target hard disk carry to the mesh Heading is recorded.
Wherein, the execution module includes:
Interim carry unit, is used for the target hard disk carry through preset disk service to temp directory, and obtain Take the ID of the corresponding OSD of the target hard disk;
Carry unit, for by the target hard disk carry to the target directory, and by the target hard disk from described Temp directory forced unloading.
Wherein, further include:
Correction verification module, for detecting the target hard disk, whether carry is successful;
Starting module, for when the target hard disk carry is successful, the file destination detected in the target directory to be No presence starts the corresponding OSD processes of the target hard disk in the presence of the file destination.
Wherein, the starting module is specifically used for:
Start the OSD processes according to the instruction input by user for starting the OSD processes, and cancels and wait for the OSD Process executes the delay completed.
Wherein, further include:
Zero setting module terminates the OSD processes for working as using abnormal escape mechanism, and again before carry hard disk, will The number zero setting that the OSD processes are restarted.
A kind of hard disk carry equipment provided in an embodiment of the present invention is introduced below, a kind of hard disk described below is hung Support method equipment can be cross-referenced with a kind of above-described hard disk hanging method and device.
Referring to Fig. 4, a kind of hard disk carry equipment provided in an embodiment of the present invention, including:
Memory 401, for storing computer program;
Processor 402 realizes the hard disk carry side described in above-mentioned any embodiment when for executing the computer program The step of method.
A kind of computer readable storage medium provided in an embodiment of the present invention is introduced below, one kind described below Computer readable storage medium can be cross-referenced with a kind of above-described hard disk hanging method, device and equipment.
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, described The step of hard disk hanging method as described in above-mentioned any embodiment is realized when computer program is executed by processor.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other The difference of embodiment, just to refer each other for identical similar portion between each embodiment.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest range caused.

Claims (10)

1. a kind of hard disk hanging method, which is characterized in that including:
Detect the target directory that whether there is carry target hard disk in target storage system;
If so, the second equipment in obtaining the parent directory of the first device number and the target directory in the target directory Number, when first device number is identical with second device number, by the target hard disk carry to the target directory.
2. hard disk hanging method according to claim 1, which is characterized in that when there is no hang in the target storage system When carrying the target directory of the target hard disk, further include:
Create the target directory, and execute it is described by the target hard disk carry to the target directory the step of.
3. hard disk hanging method according to claim 1 or 2, which is characterized in that it is described by the target hard disk carry extremely The target directory, including:
Judge that the corresponding UUID of the target hard disk whether there is;
If so, recording the corresponding UUID of the target hard disk, and execute described by the target hard disk carry to the target The step of catalogue.
4. hard disk hanging method according to claim 3, which is characterized in that it is described by the target hard disk carry to described Target directory, including:
By preset disk service by the target hard disk carry to temp directory, and it is corresponding to obtain the target hard disk The ID of OSD;
By the target hard disk carry to the target directory, and from the temp directory forced unloading.
5. hard disk hanging method according to claim 3, which is characterized in that it is described by the target hard disk carry to described After target directory, further include:
Detecting the target hard disk, whether carry is successful;
If so, the file destination detected in the target directory whether there is, in the presence of the file destination, described in startup The corresponding OSD processes of target hard disk.
6. hard disk hanging method according to claim 5, which is characterized in that the startup target hard disk is corresponding OSD processes, including:
Start the OSD processes according to the instruction input by user for starting the OSD processes, and cancels and wait for the OSD processes Execute the delay completed.
7. hard disk hanging method according to claim 5, which is characterized in that the startup target hard disk is corresponding After OSD processes, further include:
When terminating the OSD processes using abnormal escape mechanism, and again before carry hard disk, the OSD processes are restarted Number zero setting.
8. a kind of hard disk carry device, which is characterized in that including:
Detection module, for detecting the target directory that whether there is carry target hard disk in target storage system;
Execution module, for when, there are when the target directory of carry target hard disk, obtaining the target mesh in target storage system The first device number in record and the second device number in the parent directory of the target directory, when first device number and described When two device numbers are identical, by the target hard disk carry to the target directory.
9. a kind of hard disk carry equipment, which is characterized in that including:
Memory, for storing computer program;
Processor realizes the hard disk carry side as described in claim 1-7 any one when for executing the computer program The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the hard disk hanging method as described in claim 1-7 any one when the computer program is executed by processor The step of.
CN201810330667.6A 2018-04-13 2018-04-13 A kind of hard disk hanging method and device Pending CN108549550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810330667.6A CN108549550A (en) 2018-04-13 2018-04-13 A kind of hard disk hanging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810330667.6A CN108549550A (en) 2018-04-13 2018-04-13 A kind of hard disk hanging method and device

Publications (1)

Publication Number Publication Date
CN108549550A true CN108549550A (en) 2018-09-18

Family

ID=63515078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810330667.6A Pending CN108549550A (en) 2018-04-13 2018-04-13 A kind of hard disk hanging method and device

Country Status (1)

Country Link
CN (1) CN108549550A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117344A (en) * 2018-08-29 2019-01-01 郑州云海信息技术有限公司 Method of calibration and device before a kind of starting of storage unit
CN110321077A (en) * 2019-06-17 2019-10-11 浩云科技股份有限公司 A kind of management method and device of centrally stored file
CN110365839A (en) * 2019-07-04 2019-10-22 Oppo广东移动通信有限公司 Closedown method, device, medium and electronic equipment
CN111722879A (en) * 2020-06-19 2020-09-29 浪潮电子信息产业股份有限公司 USB flash disk identification method, Linux system, Linux equipment and readable storage medium
CN112328363A (en) * 2020-11-05 2021-02-05 北京金山云网络技术有限公司 Cloud hard disk mounting method and device
CN113791925A (en) * 2021-08-24 2021-12-14 杭州迪普科技股份有限公司 Memory mapping file storage method and device
CN112540881B (en) * 2019-09-20 2023-11-14 深圳宏芯宇电子股份有限公司 Storage device test management method and storage device test management system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847101A (en) * 2009-03-24 2010-09-29 Tcl集团股份有限公司 Method for automatically mounting USB storage device under embedded Linux
CN102722342A (en) * 2012-05-23 2012-10-10 北京百纳威尔科技有限公司 Method and device for expanding internal storage space and terminal
US20130086585A1 (en) * 2011-09-30 2013-04-04 International Business Machines Corporation Managing the Persistent Data of a Pre-Installed Application in an Elastic Virtual Machine Instance
CN104049914A (en) * 2014-05-30 2014-09-17 青岛海信移动通信技术股份有限公司 Method and device for executing write operation on protected partition
CN104731915A (en) * 2015-03-24 2015-06-24 上海爱数软件有限公司 Magnetic disk device mapping method in distributed memory system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847101A (en) * 2009-03-24 2010-09-29 Tcl集团股份有限公司 Method for automatically mounting USB storage device under embedded Linux
US20130086585A1 (en) * 2011-09-30 2013-04-04 International Business Machines Corporation Managing the Persistent Data of a Pre-Installed Application in an Elastic Virtual Machine Instance
CN102722342A (en) * 2012-05-23 2012-10-10 北京百纳威尔科技有限公司 Method and device for expanding internal storage space and terminal
CN104049914A (en) * 2014-05-30 2014-09-17 青岛海信移动通信技术股份有限公司 Method and device for executing write operation on protected partition
CN104731915A (en) * 2015-03-24 2015-06-24 上海爱数软件有限公司 Magnetic disk device mapping method in distributed memory system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佚名: ""How to check whether a particular directory is mounted?"", 《HTTPS://UNIX.STACKEXCHANGE.COM/QUESTIONS/151390/HOW-TO-CHECK-WHETHER-A-PARTICULAR-DIRECTORY-IS-MOUNTED 》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117344A (en) * 2018-08-29 2019-01-01 郑州云海信息技术有限公司 Method of calibration and device before a kind of starting of storage unit
CN110321077A (en) * 2019-06-17 2019-10-11 浩云科技股份有限公司 A kind of management method and device of centrally stored file
CN110365839A (en) * 2019-07-04 2019-10-22 Oppo广东移动通信有限公司 Closedown method, device, medium and electronic equipment
CN110365839B (en) * 2019-07-04 2020-08-28 Oppo广东移动通信有限公司 Shutdown method, shutdown device, shutdown medium and electronic equipment
CN112540881B (en) * 2019-09-20 2023-11-14 深圳宏芯宇电子股份有限公司 Storage device test management method and storage device test management system
CN111722879A (en) * 2020-06-19 2020-09-29 浪潮电子信息产业股份有限公司 USB flash disk identification method, Linux system, Linux equipment and readable storage medium
CN112328363A (en) * 2020-11-05 2021-02-05 北京金山云网络技术有限公司 Cloud hard disk mounting method and device
CN112328363B (en) * 2020-11-05 2022-12-20 北京金山云网络技术有限公司 Cloud hard disk mounting method and device
CN113791925A (en) * 2021-08-24 2021-12-14 杭州迪普科技股份有限公司 Memory mapping file storage method and device

Similar Documents

Publication Publication Date Title
CN108549550A (en) A kind of hard disk hanging method and device
JP5976221B2 (en) Information backup method and apparatus
US6694345B1 (en) External job scheduling within a distributed processing system having a local job control system
CN105354113B (en) A kind of system and method for server, management server
CN105607972B (en) A kind of method and device repaired extremely
ITTO20010196A1 (en) SYSTEM AND PROCEDURE FOR MANAGING STORAGE RESOURCES IN A BUNCH PROCESSING ENVIRONMENT.
EP2600565B1 (en) Disaster tolerance service system and disaster tolerance method
CN110377456A (en) A kind of management method and device of virtual platform disaster tolerance
WO2018095414A1 (en) Method and apparatus for detecting and recovering fault of virtual machine
CN109445927B (en) Task management method and device for storage cluster
CN107656705B (en) Computer storage medium and data migration method, device and system
CN111478796B (en) Cluster capacity expansion exception handling method for AI platform
EP1943593B1 (en) Methods and apparatus for automatically multi-booting a computer system
WO2009089746A1 (en) Method, device and system for realizing task in cluster environment
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
CN107463390B (en) Software upgrading method and upgrading server
CN110858168B (en) Cluster node fault processing method and device and cluster node
CN113986450A (en) Virtual machine backup method and device
JPH10214208A (en) System for monitoring abnormality of software
CN103761170B (en) system file recovery method, device and system
CN113254166A (en) Method for processing IO request, storage medium and virtualization simulator
CN106897063B (en) Method and system for permanently adding OS boot entry to BIOS based on EFI
WO2017080362A1 (en) Data managing method and device
CN111400081A (en) Process guarding method and device, electronic equipment and computer storage medium
CN106850354A (en) A kind of processing method and processing device of Single Point of Faliure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180918