CN107450864A - A kind of magnetic disc control method, device, server and storage medium - Google Patents

A kind of magnetic disc control method, device, server and storage medium Download PDF

Info

Publication number
CN107450864A
CN107450864A CN201710774582.2A CN201710774582A CN107450864A CN 107450864 A CN107450864 A CN 107450864A CN 201710774582 A CN201710774582 A CN 201710774582A CN 107450864 A CN107450864 A CN 107450864A
Authority
CN
China
Prior art keywords
drive
disk
module
file
drive module
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
CN201710774582.2A
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 CN201710774582.2A priority Critical patent/CN107450864A/en
Publication of CN107450864A publication Critical patent/CN107450864A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The embodiment of the present invention provides a kind of magnetic disc control method, device, server and storage medium, when the drive order that the first drive of the first disk and the second drive of second disk are formed, with target sequences it is inconsistent when, determine the first drive module of the first disk, and the second drive module of second disk;According to the target sequences, the loading sequence of the first drive module of adjustment and the second drive module;Wherein, first drive module is used to drive the first disk being arranged on first interface, and second drive module is used to drive the second disk being arranged in second interface.The embodiment of the present invention ensures the priority of the identification of disk, so as to which the stability of disk drive distribution be effectively ensured, it is out of order to avoid disk by adjusting the loading of disk drive.

Description

Disk control method, device, server and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a disk control method, apparatus, server, and storage medium.
Background
In a server, multiple disks are typically configured to meet the storage needs of a user. When the server system is started, the server distributes the drive letter for the disk; when the server is provided with a first disk and a second disk, the first disk can be configured on the server through an onboard AHCI (Advanced Host Controller Interface, Chinese), so that the first disk is loaded through a loading AHCI drive; the second disk may be configured on the server through a RAID (Redundant array of Independent Disks, chinese) card or an SAS (Serial Attached SCSI, chinese) card, so that the second disk is loaded by loading the RAID card or the SAS card. Taking the above server architecture as an example, the allocation process of the disk identifier is generally as follows: when the AHCI driver is loaded first after the system is started, the first disk is identified and allocated with the drive letter "/dev/sda", and then when the RAID card or SAS card driver is loaded later, the second disk is identified later and allocated with the drive letter "/dev/sdb".
However, the inventor finds that, due to the fact that the allocation sequence of the disk signatures depends on the identification sequence of the disks, at the time of system restart, the AHCI driver load corresponding to the first disk may be later than the RAID card or SAS card driver load corresponding to the second disk, which may result in the second disk being identified first and then the first disk, and further the second disk may be allocated as "/dev/sda", and the first disk may be allocated as "/dev/sdb", which may result in disk misordering.
Therefore, how to prevent disk misordering and ensure the stability of disk drive allocation is a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present invention provides a disk control method, device, server and storage medium to solve the problem of disk disorder in the prior art.
To achieve the above and other related objects, according to a first aspect of the present invention, an embodiment of the present invention provides a disk control method, including:
when the drive letter sequence formed by the first drive letter of the first disk and the second drive letter of the second disk is inconsistent with the target sequence, determining a first drive module of the first disk and a second drive module of the second disk;
adjusting the loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
Optionally, adjusting a loading order of the first driver module and the second driver module according to the target order includes:
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
determining a drive module to be loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
Optionally, adjusting a loading order of the first driver module and the second driver module according to the target order includes:
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
Optionally, adjusting a loading order of the first driver module and the second driver module according to the target order includes:
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence;
acquiring a drive loading sequence;
when the loading sequence of the first drive module and the second drive module is inconsistent with the target sequence, determining a drive module which is loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
According to a second aspect of the present invention, an embodiment of the present invention provides a disk control apparatus, including:
the drive determining module is used for determining a first drive module of the first disk and a second drive module of the second disk when the drive character sequence formed by the first drive character of the first disk and the second drive character of the second disk is inconsistent with the target sequence;
the adjusting module is used for adjusting the loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
Optionally, the adjusting module is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
determining a drive module to be loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
Optionally, the adjusting module is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
Optionally, the adjusting module is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence;
acquiring a drive loading sequence;
when the loading sequence of the first drive module and the second drive module is inconsistent with the target sequence, determining a drive module which is loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
According to a third aspect of the present invention, there is also provided a server, including at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to:
when the drive letter sequence formed by the first drive letter of the first disk and the second drive letter of the second disk is inconsistent with the target sequence, determining a first drive module of the first disk and a second drive module of the second disk;
adjusting the loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
According to a fourth aspect of the present invention, an embodiment of the present invention further provides a storage medium, where the storage medium stores executable instructions for executing the disk control method described in the foregoing method embodiment.
As described above, the disk control method, device, server and storage medium provided in the embodiments of the present invention have the following beneficial effects: when the drive letter sequence formed by the first drive letter of the first disk and the second drive letter of the second disk is inconsistent with the target sequence, determining a first drive module of the first disk and a second drive module of the second disk; adjusting the loading sequence of the first driving module and the second driving module according to the target sequence; the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface. The embodiment of the invention ensures the identification sequence of the disk by adjusting the loading of the disk drive, thereby effectively ensuring the distribution stability of the disk drive characters of the disk and avoiding the disorder of the disk.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a disk control method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a load order adjustment method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another loading order adjustment method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a loading sequence adjustment method according to another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a disk control apparatus according to an embodiment of the present invention;
fig. 6 is a schematic hardware structure diagram of a server executing a disk control method according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1 to 6. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
Fig. 1 is a schematic flow chart of a disk control method according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step S101: and when the drive letter sequence formed by the first drive letter of the first disk and the second drive letter of the second disk is inconsistent with the target sequence, determining a first drive module of the first disk and a second drive module of the second disk.
In specific implementation, a plurality of disks may be configured in the server, and for convenience of describing the disk control method of the present invention, the embodiment of the present invention will be described in detail by taking the first disk and the second disk as examples. The first disk can be configured on the server through an onboard AHCI interface, and the second disk can be configured on the server through a RAID card or an SAS card.
Further, the first drive letter of the first disk and the second drive letter of the second disk can be viewed through a viewing tool of disk information, which is not described in detail in the embodiment of the present invention. In an exemplary embodiment, the target sequence may be a predefined sequence, for example, a sequence of defining disks corresponding to onboard AHCIs is prior to a sequence of disks configured by a RAID card or an SAS card; thus, when the first drive letter of the first disk is acquired as 'sda' and the second drive letter of the second disk is acquired as 'sdb', the first disk is a disk corresponding to the onboard ACHI, and the order of the drive letters is first, it is determined that the disks are not out of order; and when the first drive letter of the first disk is acquired to be 'sdb' and the second drive letter of the second disk is acquired to be 'sda', the first disk is a disk corresponding to the onboard AHCI, and the disk sequence is back, so that the disk disorder can be judged.
Step S102: adjusting the loading sequence of the first driving module and the second driving module according to the target sequence; the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
And when the disk disorder is determined, adjusting the loading sequence of the first drive module corresponding to the first disk and the second drive module corresponding to the second disk according to the target sequence, and ensuring the stability of disk identifier distribution of the disks through the control of the loading sequence of the drives.
In a first implementation case, in order to adjust a loading sequence of a first driver module and a second driver module, referring to fig. 2, a flowchart of a method for adjusting a loading sequence according to an embodiment of the present invention is shown. As shown in fig. 2, the method comprises the steps of:
step S201: and acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when the system is started.
In an exemplary embodiment, the image file may be an initamfs file, and the order of the loaded driver files is controlled by the initamfs file when the Linux system is started; wherein initramfs contains many disk drives that are necessary before the system actually loads the kernel.
Step S202: and determining a drive module to be loaded later from the first drive module and the second drive module according to the target sequence.
In an exemplary embodiment, according to the target sequence, the first disk needs to be loaded first, and the second disk needs to be loaded later; the first disk corresponds to a first driver module, the second disk corresponds to a second driver module, accordingly, the first driver module needs to be loaded first, the second driver module needs to be loaded later, and the driver module loaded later is further determined to be the second driver module.
Step S203: and deleting the drive file corresponding to the loaded drive module from the mapping file.
In the image file, the second driver file corresponding to the second driver module may be deleted. Therefore, when the system is started, the first drive module is guaranteed to be loaded firstly, so that the loading of the first disk is realized, the first disk is firstly identified and the drive letter is distributed, and the sequence of the disks is guaranteed.
In an exemplary embodiment, since the system is installed on an on-board AHCI disk device, the initialization of the operating system is not affected by removing the Raid/SAS driver mpt3SAS from the initramfs file, when initramfs completes the initialization of the on-board AHCI disk device, the on-board AHCI is allocated to the drive identifier sda, and the initialization of the Raid/SAS driver is performed in the subsequent kernel, and the Raid/SAS disk device is allocated to the drive identifier sdb. By the method, the initialization time of an onboard AHCI disk and the Raid/SAS disk drive can be staggered, so that the stability of the disk drive letter under the system is ensured.
In a second implementation case, referring to fig. 3, a flowchart of another loading order adjustment method provided in the embodiment of the present invention is shown. As shown in fig. 3, the method comprises the steps of:
step S301: and acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when the system is started.
Step S302: and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
In a specific implementation, when the loading control file is included in the image file, the loading control file is used for controlling the loading sequence of the driver. The loading sequence of the first driver module driver file and the second driver module driver file in the loading control file can be further modified according to the target sequence. When it is determined that the loading of the first disk is prior to the loading of the second disk according to the target sequence, the first drive module drive file corresponding to the first disk may be modified in the loading control file prior to the second drive module drive file corresponding to the second disk. This ensures that the first disk is loaded and allocated with the drive letter first and the second disk is loaded and allocated with the drive letter later, thus ensuring the stability of the drive letter allocation.
In a third implementation case, referring to fig. 4, a flowchart of another method for adjusting a loading order according to an embodiment of the present invention is shown. As shown in fig. 4, the method comprises the steps of:
step S401: and acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when the system is started.
Step S402: and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
Step S403: a driver loading sequence is obtained.
Step S404: and when the loading sequence of the first drive module and the second drive module is not consistent with the target sequence, determining a drive module which is loaded later from the first drive module and the second drive module according to the target sequence.
Step S405: and deleting the drive file corresponding to the loaded drive module from the mapping file.
In specific implementation, when the system is started, devices under the system may be scanned in sequence according to the sequence of bus serial numbers, and if an onboard AHCI device is scanned first, the AHCI driver creates a Thread _ AHCI Thread to independently process initialization of the AHCI disk device; it should be noted that the system does not wait for the Thread _ ahci Thread to perform the next Thread after completing initialization, but the Thread independently processes the subsequent initialization action, and the system immediately performs the Thread creation of the next device; if the Raid/SAS card device is scanned later, the Raid/SAS driver also creates a Thread _ sa Thread to independently process the initialization of the Raid/SAS card device, and the time interval between the creation of the Thread threads is very short, so that the Thread _ AHCI and the Thread _ sa device initialization Thread are equivalent to parallel operation, which driver completes the initialization first and starts to apply for a drive letter to the system, the system will allocate/dev/sda to the drive, and then the disk device which completes the initialization can only allocate/dev/sdb to the drive letter, so that the loading time of AHCI and the Raid/SAS driver is really determined to be the order of the drive letter. In the embodiment of the invention, the identification sequence of the disk is controlled by adjusting the loading sequence of the drive, and when the mode fails, the loading time interval of the two drives is increased by deleting the drive file in the mapping file, so that the stability of disk drive allocation is ensured by combining the two modes.
As can be seen from the description of the foregoing embodiment, the disk control method provided in the embodiment of the present invention includes determining a first drive module of a first disk and a second drive module of a second disk when a sequence of drive characters formed by a first drive character of the first disk and a second drive character of the second disk is inconsistent with a target sequence; adjusting the loading sequence of the first driving module and the second driving module according to the target sequence; the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface. The embodiment of the invention ensures the identification sequence of the disk by adjusting the loading of the disk drive, thereby effectively ensuring the distribution stability of the disk drive characters of the disk and avoiding the disorder of the disk.
Through the above description of the method embodiments, those skilled in the art can clearly understand that the present invention can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as Read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and so on.
Corresponding to the embodiment of the disk control method provided by the invention, the invention also provides a disk control device.
Fig. 5 is a schematic structural diagram of a disk control apparatus according to an embodiment of the present invention. As shown in fig. 5, the apparatus includes:
a drive determining module 11, configured to determine a first drive module of the first disk and a second drive module of the second disk when a drive sequence formed by a first drive letter of the first disk and a second drive letter of the second disk is inconsistent with the target sequence;
the adjusting module 12 is configured to adjust a loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
In the first implementation case, the adjusting module 12 is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
determining a drive module to be loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
In a second implementation case, the adjusting module 12 is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
In a third implementation case, the adjusting module 12 is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence;
acquiring a drive loading sequence;
when the loading sequence of the first drive module and the second drive module is inconsistent with the target sequence, determining a drive module which is loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
Referring to fig. 6, it is a schematic diagram of a hardware structure of a server for executing a disk control method according to an embodiment of the present invention, and as shown in fig. 6, the server includes:
one or more processors 610 and a memory 620, with one processor 610 being an example in fig. 6.
The apparatus for performing the disk control method may further include: an input device 630 and an output device 640.
The processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, such as the bus connection in fig. 6.
The memory 620, as a non-volatile computer-readable storage medium, may be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the disk control method in the embodiment of the present invention (for example, the drive determining module 11 and the adjusting module 12 shown in fig. 5). The processor 610 executes various functional applications of the server and data processing by running nonvolatile software programs, instructions and modules stored in the memory 620, that is, implements the disk control method of the above-described method embodiment.
The memory 620 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the disk control apparatus, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 620 optionally includes memory located remotely from processor 610, which may be connected to a disk control unit via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 630 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the disk control device. The output device 640 may include a display device such as a display screen.
The one or more modules are stored in the memory 620 and, when executed by the one or more processors 610, perform the disk control method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Embodiments of the present invention provide a non-volatile computer storage medium, where a computer-executable instruction is stored in the computer storage medium, and the computer-executable instruction may execute a disk control method in any of the above method embodiments.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A disk control method, comprising the steps of:
when the drive letter sequence formed by the first drive letter of the first disk and the second drive letter of the second disk is inconsistent with the target sequence, determining a first drive module of the first disk and a second drive module of the second disk;
adjusting the loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
2. The method of claim 1, wherein adjusting the loading order of the first and second driver modules according to the target order comprises:
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
determining a drive module to be loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
3. The method of claim 1, wherein adjusting the loading order of the first and second driver modules according to the target order comprises:
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
4. The method of claim 1, wherein adjusting the loading order of the first and second driver modules according to the target order comprises:
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence;
acquiring a drive loading sequence;
when the loading sequence of the first drive module and the second drive module is inconsistent with the target sequence, determining a drive module which is loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
5. A disk control apparatus, comprising:
the drive determining module is used for determining a first drive module of the first disk and a second drive module of the second disk when the drive character sequence formed by the first drive character of the first disk and the second drive character of the second disk is inconsistent with the target sequence;
the adjusting module is used for adjusting the loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
6. The disk control apparatus of claim 5, wherein the adjustment module is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
determining a drive module to be loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
7. The disk control apparatus of claim 5, wherein the adjustment module is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
and when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence.
8. The disk control apparatus of claim 5, wherein the adjustment module is configured to,
acquiring an image file, wherein the image file comprises drive files of a plurality of drive modules and is used for controlling the drive modules to load when a system is started;
when the mapping file further comprises a loading control file, modifying the loading sequence of the first drive module drive file and the second drive module drive file of the loading control file identifier according to the target sequence;
acquiring a drive loading sequence;
when the loading sequence of the first drive module and the second drive module is inconsistent with the target sequence, determining a drive module which is loaded later from the first drive module and the second drive module according to the target sequence;
and deleting the drive file corresponding to the loaded drive module from the mapping file.
9. A server, characterized in that the server comprises at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to:
when the drive letter sequence formed by the first drive letter of the first disk and the second drive letter of the second disk is inconsistent with the target sequence, determining a first drive module of the first disk and a second drive module of the second disk;
adjusting the loading sequence of the first driving module and the second driving module according to the target sequence;
the first drive module is used for driving a first disk arranged on the first interface, and the second drive module is used for driving a second disk arranged on the second interface.
10. A storage medium having stored thereon executable instructions for performing the method of any one of claims 1 to 4.
CN201710774582.2A 2017-08-31 2017-08-31 A kind of magnetic disc control method, device, server and storage medium Pending CN107450864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710774582.2A CN107450864A (en) 2017-08-31 2017-08-31 A kind of magnetic disc control method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710774582.2A CN107450864A (en) 2017-08-31 2017-08-31 A kind of magnetic disc control method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN107450864A true CN107450864A (en) 2017-12-08

Family

ID=60494568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710774582.2A Pending CN107450864A (en) 2017-08-31 2017-08-31 A kind of magnetic disc control method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN107450864A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941642B1 (en) * 2002-12-24 2005-09-13 Western Digital Technologies, Inc. Head stack load comb for controlled head loading
US20080052733A1 (en) * 2006-08-24 2008-02-28 Quanta Storage Inc. Slot-in disk drive device and method
CN104125286A (en) * 2014-08-03 2014-10-29 浙江网新恒天软件有限公司 Smart cloud management system based on cloud computing for enterprise infrastructure
CN104461402A (en) * 2014-12-29 2015-03-25 浪潮电子信息产业股份有限公司 Method for adjusting disk sequence among multiple controllers under linux system
CN105589690A (en) * 2015-12-11 2016-05-18 浪潮电子信息产业股份有限公司 Method for binding hard disk mounting sequence in Linux system
CN106020914A (en) * 2016-06-07 2016-10-12 浪潮电子信息产业股份有限公司 Method for adjusting loading sequence of multiple controller drives under RedHat7

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6941642B1 (en) * 2002-12-24 2005-09-13 Western Digital Technologies, Inc. Head stack load comb for controlled head loading
US20080052733A1 (en) * 2006-08-24 2008-02-28 Quanta Storage Inc. Slot-in disk drive device and method
CN104125286A (en) * 2014-08-03 2014-10-29 浙江网新恒天软件有限公司 Smart cloud management system based on cloud computing for enterprise infrastructure
CN104461402A (en) * 2014-12-29 2015-03-25 浪潮电子信息产业股份有限公司 Method for adjusting disk sequence among multiple controllers under linux system
CN105589690A (en) * 2015-12-11 2016-05-18 浪潮电子信息产业股份有限公司 Method for binding hard disk mounting sequence in Linux system
CN106020914A (en) * 2016-06-07 2016-10-12 浪潮电子信息产业股份有限公司 Method for adjusting loading sequence of multiple controller drives under RedHat7

Similar Documents

Publication Publication Date Title
US9870288B2 (en) Container-based processing method, apparatus, and system
EP2652599B1 (en) System reset
US9930207B2 (en) Information processing apparatus, method of initializing a non-volatile storage device, and storage medium
US20170031698A1 (en) System and method for dynamically allocating resources of virtual machines based on service-level agreements (sla) and privilege levels of users
EP3605341A1 (en) Controlling performance of a solid state drive
CN110007974B (en) Method and device applied to starting of operating system and electronic equipment
US20160371001A1 (en) Computer system having tiered block storage device, storage controller, file arrangement method and storage medium
CN102419803A (en) Method, system and device for searching and killing computer virus
CN102331958A (en) Method for starting hard disk under Linux system
CN104077167A (en) Boot loading method and device based on NAND FLASH
US11023153B2 (en) Installation of operating system
US20180225065A1 (en) Method and system for handling an asynchronous event request command in a solid-state drive
CN105656970A (en) RAID (Redundant Array of Independent Disk) card configuring method and system and relevant device
CN110941516B (en) Operating system restoration method, device, equipment and storage medium
US20190303172A1 (en) Information processing apparatus, device assignment method, and computer readable medium
US8661237B2 (en) System and method for booting a plurality of servers from a shared boot image stored on a USB boot image sharer
CN103488431A (en) Data-writing method and storage device
WO2018059565A1 (en) Method and system for backing up flash memory data
CN107450864A (en) A kind of magnetic disc control method, device, server and storage medium
CN108920249B (en) Speed limiting method based on multi-host multi-virtual machine system
CN102760063A (en) File loading method and device
CN104392189A (en) Method and device for realizing safety operation of file system
JP7522775B2 (en) Non-volatile storage partition identifier
CN108108133A (en) A kind of method and apparatus for changing nvme SSD hard disk users and capacity can be used
US7975136B1 (en) Hardware-independent detection of SAN logical volumes

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: 20171208