CN114415939A - Hard disk control method, hard disk control device, computer equipment, storage medium and program product - Google Patents

Hard disk control method, hard disk control device, computer equipment, storage medium and program product Download PDF

Info

Publication number
CN114415939A
CN114415939A CN202111544779.XA CN202111544779A CN114415939A CN 114415939 A CN114415939 A CN 114415939A CN 202111544779 A CN202111544779 A CN 202111544779A CN 114415939 A CN114415939 A CN 114415939A
Authority
CN
China
Prior art keywords
hard disk
power
operating system
hard
hard disks
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
CN202111544779.XA
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.)
Zhongke Controllable Information Industry Co Ltd
Original Assignee
Zhongke Controllable Information Industry 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 Zhongke Controllable Information Industry Co Ltd filed Critical Zhongke Controllable Information Industry Co Ltd
Priority to CN202111544779.XA priority Critical patent/CN114415939A/en
Publication of CN114415939A publication Critical patent/CN114415939A/en
Pending legal-status Critical Current

Links

Images

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/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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Abstract

The application relates to a hard disk control method, a hard disk control device, a computer device, a storage medium and a program product. The method comprises the following steps: in the process of powering on the server, other hard disks except the hard disk where the operating system is located in the server are controlled to be in a power-down state, after the operating system is started, disk symbols are configured for the hard disk where the operating system is located, the other hard disks are controlled to sequentially enter a power-on state, and corresponding disk symbols are configured for the other hard disks. In this embodiment, the server controls the negotiation hard disks except the hard disk where the operating system is located to be in a power-down state in the starting process, only the hard disk where the operating system is located is configured with the drive letter after the system is started, the situation that the hard disk where the operating system is located and other hard disks are disordered in the configuration of the drive letter is avoided, and after the operating system is started, the server controls the other hard disks to sequentially enter the power-on state and sequentially distribute the drive letter, so that the situation that the other hard disks are disordered in the configuration of the drive letter when being executed in parallel is avoided.

Description

Hard disk control method, hard disk control device, computer equipment, storage medium and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a hard disk control method, apparatus, computer device, storage medium, and program product.
Background
Generally, a server is equipped with a plurality of hard disk controllers, and in a Linux system, drives of different hard disk controllers are executed in parallel. For example, the hard disk controller A, B, C exists in the server, and during the power-on process of the server, because the drives of the hard disk controllers A, B, C are executed in parallel, the hard disk controllers A, B, C may complete the initialization of the hard disks at the same time, and the server may allocate disk characters to each hard disk controller at the same time of the initialization of the hard disks, so that the disk characters of different hard disk controllers may collide and be disordered, thereby causing an error in the server program.
Disclosure of Invention
In view of the above, it is desirable to provide a hard disk control method, apparatus, computer device, storage medium, and program product that can avoid confusion among a plurality of hard disk configuration signatures in a server.
In a first aspect, the present application provides a hard disk control method, including:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
In the embodiment, the server controls all the hard disks except the hard disk where the operating system is located to be in a power-down state in the starting process, after the server is started up and the operating system is started based on the hard disk where the operating system is located, only the hard disk where the operating system is located is in the power-on state, namely, only the hard disk where the operating system is located is configured with the disk identifier, the situation that the disk identifier configuration is disordered between the hard disk where the operating system is located and other hard disks due to the fact that the hard disk where the operating system is located and other hard disks are executed in parallel is avoided, and furthermore, after the operating system is started, the server controls other hard disks to sequentially enter a power-on state, and sequentially distributes disk identifiers for the other hard disks, so that the condition that the disk identifier configuration is disordered among the other hard disks due to the parallel execution of the other hard disks is avoided, and the problem that the hard disks float before different hard disks under Linux is effectively solved.
In one optional embodiment, controlling each of the other hard disks to sequentially enter a power-on state, and configuring a corresponding drive letter for each of the other hard disks includes:
controlling other hard disks to sequentially enter a power-on state according to a preset hard disk control sequence;
calling a preset hot plug drive to detect the state of each other hard disk, sequentially carrying out hard disk initialization processing on the hard disk in the power-on state, and configuring corresponding disk symbols for the hard disk in the power-on state.
In this embodiment, because the hard disk belongs to the non-hot plug firmware, the server may detect the state of the hard disk and enable the drive by using the Pcie hot plug, so that after the server enters the operating system, the server may still perform initialization processing on the hard disk and configure corresponding disk identifiers for the hard disk, and the server is executed based on a preset hard disk control sequence, and under the condition that a plurality of other hard disks are not executed in parallel, the situation that the disk identifiers are configured for the hard disk is disordered is avoided.
In one optional embodiment, controlling each of the other hard disks to sequentially enter a power-on state includes:
and controlling the high-speed serial computer expansion bus standard PCI-E links of other hard disks to recover connection so as to enable the other hard disks to be in a power-on state.
In this embodiment, the server may control the PCI-E link recovery connection to enable the other hard disks to be in the powered-on state, without requiring a complex design of other control circuits, and thus, the design cost is low.
In one optional embodiment, controlling each of the other hard disks to sequentially enter a power-on state includes:
and setting the value of the register of each other hard disk to be a first value so as to enable each other hard disk to be in a power-on state.
In this embodiment, the server may modify the values of the registers of the other hard disks to enable the other hard disks to be in the power-on state, without requiring complex designs of other control circuits, and thus, the design cost is low.
In one optional embodiment, controlling other hard disks except the hard disk in which the operating system is located to be in a power-down state includes:
and controlling the high-speed serial computer expansion bus standard PCI-E links of other hard disks to be disconnected so as to enable the other hard disks to be in a power-down state.
In this embodiment, the server can control the PCI-E link to be disconnected to realize that other hard disks are in a power-down state, without the need for complex design of other control circuits, and the design cost is low.
In one optional embodiment, controlling other hard disks except the hard disk in which the operating system is located to be in a power-down state includes:
and setting the value of the register of each other hard disk as a second value so as to enable each other hard disk to be in a power-down state.
In this embodiment, the server may implement that the other hard disks are in the power-down state by modifying the values of the registers of the other hard disks, and the server does not need complex designs of other control circuits, so that the design cost is low.
In one optional embodiment, the method further comprises:
and determining the hard disk where the operating system is located according to the parameter information of all the hard disks in the server.
In this embodiment, the server determines the hard disk where the operating system is located according to the parameter information of the hard disk, and in the subsequent hard disk control process, the system where the operating system is located is always kept in a normal power-on state, so that the operating system of the server can be ensured to be started normally.
In a second aspect, the present application further provides a hard disk control device. The device comprises:
the control module is used for controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state in the power-on process of the server;
the configuration module is used for configuring a disk identifier for a hard disk where the operating system is located after the operating system is started;
and the control module is also used for controlling other hard disks to sequentially enter a power-on state and configuring corresponding disk symbols for the other hard disks.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
According to the hard disk control method, the hard disk control device, the computer equipment, the storage medium and the program product, in the power-on process of the server, other hard disks except the hard disk where the operating system is located in the server are controlled to be in the power-off state, after the operating system is started, the disk identifier is configured for the hard disk where the operating system is located, the other hard disks are controlled to sequentially enter the power-on state, and the corresponding disk identifiers are configured for the other hard disks. In the embodiment, the server controls all the hard disks except the hard disk where the operating system is located to be in a power-down state in the starting process, after the server is started up and the operating system is started based on the hard disk where the operating system is located, only the hard disk where the operating system is located is in the power-on state, namely, only the hard disk where the operating system is located is configured with the disk identifier, the situation that the disk identifier configuration is disordered between the hard disk where the operating system is located and other hard disks due to the fact that the hard disk where the operating system is located and other hard disks are executed in parallel is avoided, and furthermore, after the operating system is started, the server controls other hard disks to sequentially enter a power-on state, and sequentially distributes disk identifiers for the other hard disks, so that the condition that the disk identifier configuration is disordered among the other hard disks due to the parallel execution of the other hard disks is avoided, and the problem that the hard disks float before different hard disks under Linux is effectively solved.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of a hard disk control method;
FIG. 2 is a flowchart illustrating a hard disk control method according to an embodiment;
FIG. 3 is a flowchart illustrating a hard disk control method according to another embodiment;
FIG. 4 is a flowchart illustrating a hard disk control method according to another embodiment;
FIG. 5 is a block diagram showing the structure of a hard disk control device according to an embodiment;
fig. 6 is a block diagram showing a structure of a hard disk control device according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The hard disk control method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 1. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing hard disk control data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a hard disk control method.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, as shown in fig. 2, a hard disk control method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 201, in the process of powering on the server, controlling other hard disks in the server except the hard disk where the operating system is located to be in a power-down state.
The hard disk where the operating system is located refers to a hard disk loaded with an operating system installation package or an operating system image file, that is, the operating system of the server can be started or installed by driving the hard disk. Generally, the number of hard disks in which the operating system is located is one. The hard disk in the server may include a plurality of them. In the actual operation process of the server, the plurality of hard disks can automatically trigger the power-on operation in the power-on process of the server, that is, the plurality of hard disks are in a parallel execution state in the power-on process of the server.
In this case, in order to avoid the problem of confusion of configuration disk identifiers caused by parallel execution, the server may preferentially ensure that the hard disk where the operating system is located is in a power-on state, so as to normally start the operating system of the server, control other hard disks except the hard disk where the operating system is located to be in a power-off state, and in the process of starting the operating system, the initialization of the hard disk where the operating system is located is not affected.
Alternatively, the server may disconnect the high-speed serial computer expansion bus standard PCI-E link of each of the other hard disks by controlling the disconnection of the PCI-E link, so that each of the other hard disks is in a power-down state.
In this embodiment, the server may execute a PCI-E Link disconnection operation on a controller where the other hard disk is located through a Basic Input Output System (BISO), so that the other hard disk is in a power-Down state.
Optionally, the server may further set the value of the register of each of the other hard disks to a second value, so that each of the other hard disks is in a power-down state.
In this embodiment, the server may also control the states of the other hard disks by modifying the values of the registers corresponding to the other hard disks, for example, modifying the values of the registers corresponding to the other hard disks to a second value, where the second value may be "1" or "0", so as to control the other hard disks to be in a power-down state.
Step 202, after the operating system is started, a drive letter is configured for the hard disk where the operating system is located.
In this embodiment, after the server is powered on, it is detected that the hard disk where the operating system is located is in a powered-on state, the hard disk where the operating system is located is driven to run, and the operating system in the hard disk is started. After entering the operating system, the server performs initialization processing on the hard disk where the operating system is located, and configures a corresponding drive letter for the hard disk where the operating system is located, for example, the drive letter may be a preset C drive, which is not limited in this embodiment.
And step 203, controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk identifiers for the other hard disks.
In this case, the server needs to control each of the other hard disks to sequentially enter a power-on state to perform hard disk initialization processing on each of the other hard disks, and configure corresponding disk identifiers for the other hard disks.
In this embodiment, since the hard disk is in the firmware with the non-hot-plug function, after the server enters the operating system, the server cannot acquire the actual power-on state of the other hard disks. Based on this practical situation, after the server enters the operating system, the state of each of the other hard disks needs to be detected by the preset hot plug driver, and the controller drivers corresponding to the other hard disks are enabled, that is, the other hard disks are controlled to sequentially enter the power-on state by the preset hot plug driver, so that after the server enters the operating system, the power-on states of the other hard disks can still be detected, and corresponding disk identifiers are configured for the other hard disks.
In the hard disk control method, in the power-on process of the server, other hard disks except the hard disk where the operating system is located in the server are controlled to be in a power-off state, after the operating system is started, the hard disk where the operating system is located is configured with the disk identifier, the other hard disks are controlled to sequentially enter the power-on state, and the other hard disks are configured with the corresponding disk identifiers. In the embodiment, the server controls all the hard disks except the hard disk where the operating system is located to be in a power-down state in the starting process, after the server is started up and the operating system is started based on the hard disk where the operating system is located, only the hard disk where the operating system is located is in the power-on state, namely, only the hard disk where the operating system is located is configured with the disk identifier, the situation that the disk identifier configuration is disordered between the hard disk where the operating system is located and other hard disks due to the fact that the hard disk where the operating system is located and other hard disks are executed in parallel is avoided, and furthermore, after the operating system is started, the server controls other hard disks to sequentially enter a power-on state, and sequentially distributes disk identifiers for the other hard disks, so that the condition that the disk identifier configuration is disordered among the other hard disks due to the parallel execution of the other hard disks is avoided, and the problem that the hard disks float before different hard disks under Linux is effectively solved.
In order to avoid confusion of the disk signatures distributed at the same time, in an alternative embodiment, as shown in fig. 3, the server controls each of the other hard disks to sequentially enter the power-on state, and configures corresponding disk signatures for each of the other hard disks, including:
step 301, controlling other hard disks to sequentially enter a power-on state according to a preset hard disk control sequence.
The preset hard disk control sequence can be determined according to user requirements; the size of the hard disk space may also be determined, which is not limited in this embodiment.
Optionally, the server may control the high-speed serial computer expansion bus standard PEI-e link of each other hard disk to recover the connection, so that each other hard disk is in a powered-on state.
In this embodiment, the server may execute the PCI-E Link connection operation Link retry on the hard disk controllers of other hard disks except the hard disk where the operating system is located through the BISO, so that the other hard disks are in a powered-on state.
Optionally, the server may further set the value of the register of each of the other hard disks to the first value, so that each of the other hard disks is in a power-on state.
The server may also control the state of the other hard disks by modifying the values of the registers corresponding to the other hard disks except the hard disk where the operating system is located, for example, modifying the values of the registers corresponding to the other hard disks to a first value, where the first value may be "0" or "1", so as to control the other hard disks to be in a powered-on state.
In this embodiment, the server respectively controls, according to a preset hard disk control sequence and based on the hard disk identifier, each of the other hard disks except the hard disk where the operating system is located to sequentially enter a power-on state.
Step 302, calling a preset hot plug driver to detect the state of each other hard disk, sequentially performing hard disk initialization processing on the hard disk in the powered-on state, and configuring corresponding disk characters for the hard disk in the powered-on state.
In this embodiment, the computer device controls the hard disk to enter the power-on state, and a situation of hard disk power-on failure may also occur, so that the computer device needs to detect the states of the other hard disks controlled to execute the power-on operation, except for the hard disk where the operating system is located, again through the preset hot-plug driver, and determine the hard disk that is successfully in the power-on state from the hard disks, thereby performing initialization processing and disk identifier configuration processing on the hard disk that is already in the power-on state. For example, the hard disk control sequence is a hard disk B and a hard disk C, the server controls the hard disk B to be in a power-on state, meanwhile, the server calls a preset hot plug drive PEI-e Hotpug to detect whether a PEI-e device is in hot access or not, if so, the PEI-e Hotpug detects that the hard disk B is in hot access, the PEI-eHotpug enables the hard disk B to be driven by a controller, the server can acquire information of the hard disk B after the system is started, initialize the hard disk B and configure a corresponding disk identifier for the hard disk B; after configuring the corresponding disc symbol for the hard disc B, the server controls the hard disc C to be in a power-on state, meanwhile, the server calls a preset hot plug drive PEI-e Hotpug to detect whether the PEI-e device is in hot access or not, if so, the PEI-e Hotpug detects that the hard disc C is in hot access, the PEI-e Hotpug enables the controller drive where the hard disc C is located, the server can obtain the information of the hard disc C after the system is started, initialize the hard disc C and configure the corresponding disc symbol for the hard disc C. If there are multiple hard disks, the method for controlling power-on and configuring the disk identifier is similar, and this embodiment does not limit this.
In this embodiment, since the hard disk belongs to the non-hot plug firmware, the server may detect the state of the hard disk and enable the drive by using the PEI-e hot plug, so that after the server enters the operating system, the server may still perform initialization processing on the hard disk and configure corresponding disk identifiers for the hard disk, and the server is executed based on a preset hard disk control sequence, and under the condition that a plurality of other hard disks are not executed in parallel, the situation that the disk identifiers are configured for the hard disk is disordered is avoided.
In an optional embodiment, the method further includes that the server determines that the disk where the operating system is located is intended to drive the hard disk to start the operating system in a process of starting the server, where:
and determining the hard disk where the operating system is located according to the parameter information of all the hard disks in the server.
In this embodiment, the server obtains parameter information of each hard disk by detecting the in-place state of the hard disk, and determines the hard disk where the operating system is located and other hard disks. The parameter information of the hard disk includes a hard disk identifier, a hard disk space size, a hard disk address, information of a register corresponding to the hard disk, and the like, which is not limited in this embodiment.
In this embodiment, the server determines the hard disk where the operating system is located according to the parameter information of the hard disk, and in the subsequent hard disk control process, the system where the operating system is located is always kept in a normal power-on state, so that the operating system of the server can be ensured to be started normally.
To better explain the above method, as shown in fig. 4, this embodiment provides a hard disk control method, which specifically includes:
s101, determining a hard disk where an operating system is located according to parameter information of all hard disks in a server;
s102, in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
s103, after the operating system is started, initializing the hard disk where the operating system is located, and configuring a disk identifier for the hard disk where the operating system is located;
s104, controlling other hard disks to sequentially enter a power-on state according to a preset hard disk control sequence;
and S105, calling the preset hot plug drive to detect the states of other hard disks, sequentially carrying out hard disk initialization processing on the hard disks in the powered-on state, and configuring corresponding disk symbols for the hard disks in the powered-on state.
In the embodiment, the server controls all the hard disks except the hard disk where the operating system is located to be in a power-down state in the starting process, after the server is started up and the operating system is started based on the hard disk where the operating system is located, only the hard disk where the operating system is located is in the power-on state, namely, only the hard disk where the operating system is located is configured with the disk identifier, the situation that the disk identifier configuration is disordered between the hard disk where the operating system is located and other hard disks due to the fact that the hard disk where the operating system is located and other hard disks are executed in parallel is avoided, and furthermore, after the operating system is started, the server controls other hard disks to sequentially enter a power-on state, and sequentially distributes disk identifiers for the other hard disks, so that the condition that the disk identifier configuration is disordered among the other hard disks due to the parallel execution of the other hard disks is avoided, and the problem that the hard disks float before different hard disks under Linux is effectively solved.
The hard disk control method provided by the above embodiment has the similar implementation principle and technical effect as those of the above method embodiment, and is not described herein again.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a hard disk control device for realizing the hard disk control method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so specific limitations in one or more embodiments of the hard disk control device provided below can be referred to the limitations of the hard disk control method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 5, there is provided a hard disk control apparatus including a control module 01 and a configuration module 02, wherein:
the control module 01 is used for controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state in the power-on process of the server;
the configuration module 02 is used for configuring a drive letter for a hard disk where an operating system is located after the operating system is started;
the control module 01 is further configured to control each of the other hard disks to sequentially enter a power-on state, and configure a corresponding disk identifier for each of the other hard disks.
In one optional embodiment, the control module 01 is configured to control, according to a preset hard disk control sequence, each of the other hard disks to sequentially enter a power-on state; calling a preset hot plug drive to detect the state of each other hard disk, sequentially carrying out hard disk initialization processing on the hard disk in the power-on state, and configuring corresponding disk symbols for the hard disk in the power-on state.
In one optional embodiment, the control module 01 is configured to control the high-speed serial computer expansion bus standard PCI-E link of each of the other hard disks to recover the connection, so that each of the other hard disks is in a powered-on state.
In one optional embodiment, the control module 01 is configured to set the value of the register of each of the other hard disks to a first value, so that each of the other hard disks is in a power-on state.
In one optional embodiment, the control module 01 is configured to control the high-speed serial computer expansion bus standard PCI-E link of each of the other hard disks to be disconnected, so that each of the other hard disks is in a power-down state.
In one optional embodiment, the control module 01 is configured to set the value of the register of each of the other hard disks to a second value, so that each of the other hard disks is in a power-down state.
In one alternative embodiment, as shown in fig. 6, the apparatus further includes a determining module 03;
and the determining module 04 is configured to determine the hard disk where the operating system is located according to the parameter information of all hard disks in the server.
All or part of each module in the hard disk control device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
The implementation principle and technical effect of the computer device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the computer program product provided by the above embodiment has similar implementation principles and technical effects to those of the above method embodiment, and is not described herein again.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (11)

1. A hard disk control method, characterized in that the method comprises:
in the process of powering on the server, controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state;
after the operating system is started, configuring a disk identifier for a hard disk where the operating system is located;
and controlling the other hard disks to sequentially enter a power-on state, and configuring corresponding disk symbols for the other hard disks.
2. The method of claim 1, wherein the controlling each of the other hard disks to sequentially enter a power-on state and configuring a corresponding drive letter for each of the other hard disks comprises:
controlling other hard disks to sequentially enter the power-on state according to a preset hard disk control sequence;
and calling a preset hot plug driver to detect the state of each other hard disk, sequentially carrying out hard disk initialization processing on the hard disk in the power-on state, and configuring corresponding disk symbols for the hard disk in the power-on state.
3. The method of claim 2, wherein the controlling each of the other hard disks to sequentially enter a power-on state comprises:
and controlling the high-speed serial computer expansion bus standard PCI-E link of each other hard disk to recover the connection so as to enable each other hard disk to be in a power-on state.
4. The method of claim 2, wherein the controlling each of the other hard disks to sequentially enter a power-on state comprises:
setting the value of the register of each other hard disk to be a first value so as to enable each other hard disk to be in a power-on state.
5. The method of claim 1, wherein the controlling other hard disks except the hard disk where the operating system is located to be in a power-down state comprises:
and controlling the high-speed serial computer expansion bus standard PCI-E link of each other hard disk to be disconnected so as to enable each other hard disk to be in a power-down state.
6. The method of claim 1, wherein the controlling other hard disks except the hard disk where the operating system is located to be in a power-down state comprises:
and setting the value of the register of each other hard disk as a second value so as to enable each other hard disk to be in a power-down state.
7. The method of claim 1, further comprising:
and determining the hard disk where the operating system is located according to the parameter information of all the hard disks in the server.
8. A hard disk control apparatus, characterized in that the apparatus comprises:
the control module is used for controlling other hard disks except the hard disk where the operating system is located in the server to be in a power-down state in the power-on process of the server;
the configuration module is used for configuring a drive letter for a hard disk where the operating system is located after the operating system is started;
and the control module is also used for controlling the other hard disks to sequentially enter a power-on state and configuring corresponding disk symbols for the other hard disks.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 7 when executed by a processor.
CN202111544779.XA 2021-12-16 2021-12-16 Hard disk control method, hard disk control device, computer equipment, storage medium and program product Pending CN114415939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111544779.XA CN114415939A (en) 2021-12-16 2021-12-16 Hard disk control method, hard disk control device, computer equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111544779.XA CN114415939A (en) 2021-12-16 2021-12-16 Hard disk control method, hard disk control device, computer equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN114415939A true CN114415939A (en) 2022-04-29

Family

ID=81267299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111544779.XA Pending CN114415939A (en) 2021-12-16 2021-12-16 Hard disk control method, hard disk control device, computer equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN114415939A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202013570U (en) * 2011-04-18 2011-10-19 苏州捷泰科信息技术有限公司 Power down protecting device for solid state disk based on PCIE (Peripheral Component Interface Express) interface
CN107885686A (en) * 2017-12-01 2018-04-06 郑州云海信息技术有限公司 A kind of system and method for controlling single hard disk to restart using BMC
CN108008914A (en) * 2016-10-27 2018-05-08 华为技术有限公司 The method, apparatus and ARM equipment of disk management in a kind of ARM equipment
CN108197457A (en) * 2017-12-20 2018-06-22 新华三技术有限公司 Hard disk secure control method and device
CN109062749A (en) * 2018-08-15 2018-12-21 郑州云海信息技术有限公司 A kind of server M.3 hard disk hot-plug stability test method and device
CN109284207A (en) * 2018-08-30 2019-01-29 紫光华山信息技术有限公司 Hard disc failure processing method, device, server and computer-readable medium
CN111142644A (en) * 2019-12-31 2020-05-12 苏州浪潮智能科技有限公司 Hard disk operation control method and device and related components
CN111782446A (en) * 2020-06-30 2020-10-16 深圳忆联信息系统有限公司 Method and device for testing normal power failure of SSD, computer equipment and storage medium
CN112631973A (en) * 2020-12-30 2021-04-09 海光信息技术股份有限公司 Hot plug control method and device for NVMe solid state disk and control mainboard
CN112667066A (en) * 2020-12-14 2021-04-16 苏州浪潮智能科技有限公司 Method, system and medium for expanding hard disk storage capacity
CN113656339A (en) * 2021-07-14 2021-11-16 浪潮商用机器有限公司 NVME hot plug processing method, BMC, device, equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202013570U (en) * 2011-04-18 2011-10-19 苏州捷泰科信息技术有限公司 Power down protecting device for solid state disk based on PCIE (Peripheral Component Interface Express) interface
CN108008914A (en) * 2016-10-27 2018-05-08 华为技术有限公司 The method, apparatus and ARM equipment of disk management in a kind of ARM equipment
CN107885686A (en) * 2017-12-01 2018-04-06 郑州云海信息技术有限公司 A kind of system and method for controlling single hard disk to restart using BMC
CN108197457A (en) * 2017-12-20 2018-06-22 新华三技术有限公司 Hard disk secure control method and device
CN109062749A (en) * 2018-08-15 2018-12-21 郑州云海信息技术有限公司 A kind of server M.3 hard disk hot-plug stability test method and device
CN109284207A (en) * 2018-08-30 2019-01-29 紫光华山信息技术有限公司 Hard disc failure processing method, device, server and computer-readable medium
CN111142644A (en) * 2019-12-31 2020-05-12 苏州浪潮智能科技有限公司 Hard disk operation control method and device and related components
CN111782446A (en) * 2020-06-30 2020-10-16 深圳忆联信息系统有限公司 Method and device for testing normal power failure of SSD, computer equipment and storage medium
CN112667066A (en) * 2020-12-14 2021-04-16 苏州浪潮智能科技有限公司 Method, system and medium for expanding hard disk storage capacity
CN112631973A (en) * 2020-12-30 2021-04-09 海光信息技术股份有限公司 Hot plug control method and device for NVMe solid state disk and control mainboard
CN113656339A (en) * 2021-07-14 2021-11-16 浪潮商用机器有限公司 NVME hot plug processing method, BMC, device, equipment and medium

Similar Documents

Publication Publication Date Title
US10019253B2 (en) Systems and methods of updating hot-pluggable devices
US20170185498A1 (en) Method and apparatus for facilitating storage system recovery and relevant storage system
CN103119554B (en) The memory logic that platform is irrelevant is provided
US9910664B2 (en) System and method of online firmware update for baseboard management controller (BMC) devices
US8782469B2 (en) Request processing system provided with multi-core processor
CN111158767B (en) BMC-based server safe starting method and device
JP2008511913A (en) Power loss recovery mechanism based on volatile memory
US9684475B2 (en) Multi-mode hybrid storage drive
CN112506745B (en) Memory temperature reading method and device and computer readable storage medium
US9471256B2 (en) Systems and methods for restoring data in a degraded computer system
TWI437493B (en) Computer system and operation systen loading method
CN112667442B (en) Control method, device and equipment based on nonvolatile memory device starting system
US9250942B2 (en) Hardware emulation using on-the-fly virtualization
US20100268925A1 (en) System and method for populating a dedicated system service repository for an information handling system
US10198270B2 (en) Dynamic hardware configuration via firmware interface at computing device boot
WO2018059565A1 (en) Method and system for backing up flash memory data
CN104731577A (en) Multisystem and method of booting the same
CN114415939A (en) Hard disk control method, hard disk control device, computer equipment, storage medium and program product
CN115509618A (en) Drive control method, device, apparatus, storage medium, and program product
CN103902301A (en) Method and device and processor reading BIOS
CN111309521B (en) FPGA reloading method, FPGA card type equipment and host
CN114416148A (en) Hot upgrading method, device and storage medium for virtual machine management program
US10838737B1 (en) Restoration of memory content to restore machine state
US8868870B1 (en) Systems and methods for managing off-host storage migration
CN105278993A (en) Linux system based drive module upgrading method and apparatus

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