CN114063920A - Method and system for fixing drive letter under Linux - Google Patents
Method and system for fixing drive letter under Linux Download PDFInfo
- Publication number
- CN114063920A CN114063920A CN202111341607.2A CN202111341607A CN114063920A CN 114063920 A CN114063920 A CN 114063920A CN 202111341607 A CN202111341607 A CN 202111341607A CN 114063920 A CN114063920 A CN 114063920A
- Authority
- CN
- China
- Prior art keywords
- bmc
- power
- disk
- linux
- operating system
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0629—Configuration or reconfiguration of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
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)
- Power Sources (AREA)
- Stored Programmes (AREA)
Abstract
The invention relates to a method and a system for fixing a drive letter under Linux, belonging to the technical field of server data processing; the BMC saves the information of all the hard disk physical slots on the server; the BMC provides a user interface mode of a web or a command line, so that a user can select and set the corresponding relation between the disk symbols and the physical slot positions of all the hard disks on the server; after the user selects and sets the configuration information, the BMC stores the configuration information into a nonvolatile medium of the BMC; when the system is powered on or restarted, all the hard disks are in a default power-off state, and the BMC acquires the power-on or restarting information of the system; the BMC powers on the set hard disk according to the stored corresponding relation information of the related slot disk identifier and the sequence; after the BMC powers on all the hard disks with the slot position disk character corresponding relation set by the user, the BMC powers on all the remaining hard disks without the slot position disk character corresponding relation. And the Linux system is used for correspondingly fixing the disk identifier and the hard disk slot position by orderly controlling the power-on and power-off of the hard disk.
Description
Technical Field
The invention belongs to the technical field of server data processing, and particularly relates to a method and a system for fixing a drive letter under Linux.
Background
In the current server operating system, under the server operating system of the linux kernel, the allocation of the disk identifier of each hard disk is related to the hard disk scanning sequence of the scsi middle layer, and different server operating systems are inconsistent and have randomness. This results in the disk identifier of the hard disk being fixed, which cannot be fixed in a physical location when used by a user.
Some existing solutions, such as in a standard server operating system, artificially modify the Linux kernel, modify the middle layer code in the scsi according to a fixed hardware configuration, and fix the scanning order and the allocation of the drive letter according to the current configuration, have limitations. When the server operating system is changed or upgraded, the hardware is modified or changed manually, and the method is not universal.
Therefore, at present, a method and a system for fixing the drive letter under Linux are needed to solve the above problems.
Disclosure of Invention
The invention aims to provide a method for fixing disc identifiers under Linux, which is used for solving the technical problems in the prior art, such as: some existing schemes, such as modifying the Linux kernel, modifying the layer code in the scsi, fixing the scanning order and allocating the drive letter, have limitations. When the server operating system is changed or upgraded, the hardware is modified or changed manually, and the method is not universal.
In order to achieve the purpose, the technical scheme of the invention is as follows:
a Linux drain letter fixing method comprises the following sub-steps:
s1: the BMC saves the information of all the hard disk physical slots on the server; the BMC can independently control independent power-on and power-off of all hard disks on the server operating system; the BMC can acquire the starting process and stage of the server operating system;
s2: the BMC provides a user interface mode of a web or a command line, so that a user can select and set the corresponding relation between the disk symbols and the physical slot positions of all hard disks on the server operating system;
s3: after the user selects and sets the configuration information, the BMC stores the configuration information into a nonvolatile medium of the BMC;
s4: when the server operating system is powered on or restarted, all the hard disks are in a default power-off state, and the BMC acquires the power-on or restarting information of the server operating system;
s5: the BMC powers on the set hard disk in sequence according to the corresponding relation information of the related slot disk identifier stored in the S2;
s6: after the BMC powers on all the hard disks with the slot position disk character corresponding relation set by the user, the BMC powers on all the remaining hard disks without the slot position disk character corresponding relation.
Further, in step S1, the way in which the BMC can acquire the start process and the phase of the server operating system is: a CPU or a CPLD.
Further, in step S3, the nonvolatile medium is Flash.
Further, step S5 is specifically as follows:
firstly, powering on a slot2 slot set as sda, so that a Linux kernel firstly scans a hard disk of the slot2 and allocates a drive symbol of the sda for the Linux kernel by default;
secondly, powering on the slot5 slot set as sdb by the BMC, scanning the hard disk of the slot5 by the Linux, and distributing the disk symbol of the sdb for the Linux;
by analogy, the BMC powers up all the hard disks with the slot disk identifier corresponding relation set by the user.
The Linux drive letter fixing system is used for the Linux drive letter fixing method and comprises a BMC subsystem, a power-on and power-off control system and a system state interaction system;
the BMC subsystem has a basic board-level management function, can independently control the power-on and power-off of a hard disk in a server operating system, provides an interface or a command line for a user to set, and stores set information;
the power-on and power-off control system consists of a CPLD device and can receive BMC issued commands through channels such as SPI/I2C and the like to control the power-on and power-off of the hard disk;
the system state interaction system consists of a CPLD device and can acquire the starting state and the stage of the server operating system; and provided to the BMC through a channel such as SPI/I2C.
Compared with the prior art, the invention has the beneficial effects that:
the hard disk slot position and the disk letter have no strong correlation of the corresponding relation. Many users are very troublesome to use, and the user interface sees a logical drive symbol relationship, which is not the arrangement order of hard disks. When a client wishes to install a system on a hard disk in a certain slot, it cannot be accurately obtained. In some existing schemes, for example, all hard disks in the server may be taken out, only one hard disk (only one sda is a natural disk identifier) is inserted, and then other hard disks are inserted after the operating system of the server is installed. Or artificially modifying the kernel code of the operating system aiming at each fixed configuration (fixed hardware + fixed certain operating system) to achieve the aim. However, this method fails once the hardware is changed or the system is replaced or upgraded. Therefore, one innovation point of the scheme is that the disk identifier and the hard disk slot position of the Linux server operating system are correspondingly fixed by orderly controlling the power-on and power-off of the hard disk.
Drawings
Fig. 1 is a schematic flow chart illustrating steps according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a system according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to fig. 1 to 2 of the present invention, and it is obvious that the described embodiments are only a part of the embodiments 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.
Example (b):
as shown in fig. 1 and 2, the SAS/SATA hard disk has two connection modes in the server operating system, one is directly connected to the CPU or south bridge, and the other is accessed to the server operating system after being expanded by the Expander. In any of the above embodiments, the present embodiment is applicable.
In the configuration information stored in bmc (board Management controller), information of all hard disk physical slots (such as Slot1 and Slot 2) on the operating system of the server is stored.
The BMC can independently control independent power-on and power-off of all hard disks on the server operating system.
The BMC can acquire the starting process and stage of the server operating system from a CPU or a CPLD or other manners.
The BMC provides a user interface mode of a web or a command line, so that a user can select and set the corresponding relation between the disk symbols and the physical slots of all hard disks on the operating system of the server. Such as slot1 for sda, slot2 for sdb, and so on. There are also customers that do not correspond in natural order, such as some customer slots 40 corresponding to sda.
After the user selects and sets the configuration information, the BMC stores the configuration information into a nonvolatile medium such as Flash of the BMC. Like a medium that can be stored. Including but not limited to Flash.
In the configuration saving process, if the server operating system is powered off, the saving will fail. The scene cannot normally complete the flow described by the scheme; therefore, if the configuration is stored, the operating system of the server is powered off; then the power is re-powered on and the storage process before the power failure is continued. The method comprises the steps of firstly judging whether a server operating system is powered off or not, marking a current recorded position if the server operating system is powered off, and then directly calling a real-time storage progress to the marked position to continue a storage process after the server operating system is powered on.
When the server operating system is powered on or restarted, all the hard disks are in a power-off default state, and the BMC acquires the power-on or restarting information of the server operating system.
And the BMC powers on the set hard disk according to the stored corresponding relation information of the related slot disk identifier and the sequence.
If the slot2 slot set to sda is powered on first, the Linux kernel scans the hard disk of the slot2 first and allocates the drive letter of sda for the slot by default.
Secondly, the BMC powers on the slot5 slot set as sdb, and the Linux scans the hard disk of the slot5 and allocates the disk symbol of the sdb for the slot.
By analogy, the BMC powers up all the hard disks with the slot disk identifier corresponding relation set by the user.
And the BMC uniformly powers on all the remaining hard disks without the corresponding relation of the slot disk identifier.
In general, when the server operating system needs only the first network boot, the operating system needs to be installed on the hard disk of the specified sda drive. Therefore, the BMC needs to give an alarm or prompt when the operating system is already installed and when the user needs to continue to set the corresponding relationship of the drive letter slot.
The method is not limited to Linux, UNIX-like systems and other server operating systems which adopt disc character scanning distribution, and can be set and processed according to the method.
A Linux downloading character fixing system comprises a BMC subsystem, a power-on and power-off control system and a system state interaction system.
Besides the basic board-level management function, the BMC subsystem can independently control the power-on and power-off of a hard disk in a server operating system, and needs to provide an interface or a command line for a user to set and store setting information.
The power-on and power-off control system usually comprises devices such as a CPLD and the like, and can receive a BMC issued command through a channel such as an SPI/I2C and the like to control the power-on and power-off of the hard disk.
The system state interaction system is generally composed of devices such as a CPLD (complex programmable logic device) and the like, and can acquire the starting state and the stage of the server operating system. And provided to the BMC through a channel such as SPI/I2C.
In conclusion, the Linux system is fixed with the hard disk slot position correspondingly by controlling the hard disk to be powered on and powered off in order.
The above are preferred embodiments of the present invention, and all changes made according to the technical scheme of the present invention that produce functional effects do not exceed the scope of the technical scheme of the present invention belong to the protection scope of the present invention.
Claims (5)
1. A Linux drain letter fixing method is characterized by comprising the following substeps:
s1: the BMC saves the information of all the hard disk physical slots on the server; the BMC can independently control independent power-on and power-off of all hard disks on the server operating system; the BMC can acquire the starting process and stage of the server operating system;
s2: the BMC provides a user interface mode of a web or a command line, so that a user can select and set the corresponding relation between the disk symbols and the physical slot positions of all hard disks on the server operating system;
s3: after the user selects and sets the configuration information, the BMC stores the configuration information into a nonvolatile medium of the BMC;
s4: when the server operating system is powered on or restarted, all the hard disks are in a default power-off state, and the BMC acquires the power-on or restarting information of the server operating system;
s5: the BMC powers on the set hard disk in sequence according to the corresponding relation information of the related slot disk identifier stored in the S2;
s6: after the BMC powers on all the hard disks with the slot position disk character corresponding relation set by the user, the BMC powers on all the remaining hard disks without the slot position disk character corresponding relation.
2. The Linux download fixation method of claim 1, wherein in step S1, the way that the BMC can obtain the boot process and phase of the server operating system is: a CPU or a CPLD.
3. The Linux drive fixation method of claim 1, wherein in step S3, the non-volatile medium is Flash.
4. The method for fixing the drain letter in Linux of claim 1, wherein step S5 is as follows:
firstly, powering on a slot2 slot set as sda, so that a Linux kernel firstly scans a hard disk of the slot2 and allocates a drive symbol of the sda for the Linux kernel by default;
secondly, powering on the slot5 slot set as sdb by the BMC, scanning the hard disk of the slot5 by the Linux, and distributing the disk symbol of the sdb for the Linux;
by analogy, the BMC powers up all the hard disks with the slot disk identifier corresponding relation set by the user.
5. A Linux drive fixation system for a Linux drive fixation method according to any one of claims 1 to 4, comprising a BMC subsystem, a power-on and power-off control system, a system state interaction system;
the BMC subsystem has a basic board-level management function, can independently control the power-on and power-off of a hard disk in a server operating system, provides an interface or a command line for a user to set, and stores set information;
the power-on and power-off control system consists of a CPLD device and can receive BMC issued commands through channels such as SPI/I2C and the like to control the power-on and power-off of the hard disk;
the system state interaction system consists of a CPLD device and can acquire the starting state and the stage of the server operating system; and provided to the BMC through a channel such as SPI/I2C.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111341607.2A CN114063920A (en) | 2021-11-12 | 2021-11-12 | Method and system for fixing drive letter under Linux |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111341607.2A CN114063920A (en) | 2021-11-12 | 2021-11-12 | Method and system for fixing drive letter under Linux |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114063920A true CN114063920A (en) | 2022-02-18 |
Family
ID=80271729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111341607.2A Pending CN114063920A (en) | 2021-11-12 | 2021-11-12 | Method and system for fixing drive letter under Linux |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114063920A (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102778942A (en) * | 2012-06-29 | 2012-11-14 | 浪潮电子信息产业股份有限公司 | Design method for off-peak electrification of hard disk |
CN102789371A (en) * | 2012-07-27 | 2012-11-21 | 曙光信息产业(北京)有限公司 | Method for distributing disk identifier of hard disk |
US20150074385A1 (en) * | 2013-09-06 | 2015-03-12 | Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. | Server system |
CN105589690A (en) * | 2015-12-11 | 2016-05-18 | 浪潮电子信息产业股份有限公司 | Method for binding hard disk mounting sequence in Linux system |
CN107239273A (en) * | 2017-05-02 | 2017-10-10 | 杭州沃趣科技股份有限公司 | A kind of disk drive binding method of server |
CN108008914A (en) * | 2016-10-27 | 2018-05-08 | 华为技术有限公司 | The method, apparatus and ARM equipment of disk management in a kind of ARM equipment |
CN108255410A (en) * | 2016-12-28 | 2018-07-06 | 华为技术有限公司 | A kind of method, apparatus and equipment for handling disk roam |
CN109116962A (en) * | 2018-08-15 | 2019-01-01 | 郑州云海信息技术有限公司 | A kind of method and system controlling hard disk power-on and power-off by I2C using BMC |
CN109710049A (en) * | 2018-12-10 | 2019-05-03 | 郑州云海信息技术有限公司 | A kind of system and method for long-range control hard disk power-on and power-off |
CN110377142A (en) * | 2019-06-27 | 2019-10-25 | 苏州浪潮智能科技有限公司 | A kind of system and method for supporting server hard disc independence power-on and power-off |
CN110618918A (en) * | 2019-09-06 | 2019-12-27 | 苏州浪潮智能科技有限公司 | Control method, control device and control equipment for hard disk status lamp in PCH |
CN111090324A (en) * | 2019-11-08 | 2020-05-01 | 苏州浪潮智能科技有限公司 | Method, equipment and medium for off-peak power-up of server hard disk |
CN111142644A (en) * | 2019-12-31 | 2020-05-12 | 苏州浪潮智能科技有限公司 | Hard disk operation control method and device and related components |
-
2021
- 2021-11-12 CN CN202111341607.2A patent/CN114063920A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102778942A (en) * | 2012-06-29 | 2012-11-14 | 浪潮电子信息产业股份有限公司 | Design method for off-peak electrification of hard disk |
CN102789371A (en) * | 2012-07-27 | 2012-11-21 | 曙光信息产业(北京)有限公司 | Method for distributing disk identifier of hard disk |
US20150074385A1 (en) * | 2013-09-06 | 2015-03-12 | Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. | Server system |
CN105589690A (en) * | 2015-12-11 | 2016-05-18 | 浪潮电子信息产业股份有限公司 | Method for binding hard disk mounting sequence in Linux system |
CN108008914A (en) * | 2016-10-27 | 2018-05-08 | 华为技术有限公司 | The method, apparatus and ARM equipment of disk management in a kind of ARM equipment |
CN108255410A (en) * | 2016-12-28 | 2018-07-06 | 华为技术有限公司 | A kind of method, apparatus and equipment for handling disk roam |
CN107239273A (en) * | 2017-05-02 | 2017-10-10 | 杭州沃趣科技股份有限公司 | A kind of disk drive binding method of server |
CN109116962A (en) * | 2018-08-15 | 2019-01-01 | 郑州云海信息技术有限公司 | A kind of method and system controlling hard disk power-on and power-off by I2C using BMC |
CN109710049A (en) * | 2018-12-10 | 2019-05-03 | 郑州云海信息技术有限公司 | A kind of system and method for long-range control hard disk power-on and power-off |
CN110377142A (en) * | 2019-06-27 | 2019-10-25 | 苏州浪潮智能科技有限公司 | A kind of system and method for supporting server hard disc independence power-on and power-off |
CN110618918A (en) * | 2019-09-06 | 2019-12-27 | 苏州浪潮智能科技有限公司 | Control method, control device and control equipment for hard disk status lamp in PCH |
CN111090324A (en) * | 2019-11-08 | 2020-05-01 | 苏州浪潮智能科技有限公司 | Method, equipment and medium for off-peak power-up of server hard disk |
CN111142644A (en) * | 2019-12-31 | 2020-05-12 | 苏州浪潮智能科技有限公司 | Hard disk operation control method and device and related components |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5764593A (en) | Method and system for the interception and control of the computer boot process | |
CN103746833B (en) | PXE-based RAID automatic configuration method and system | |
CN102023908B (en) | Method and device for backing up boot program | |
US7676671B2 (en) | System for multi-profile boot selection of an embedded device | |
US9239725B2 (en) | System and method for installing an OS via a network card supporting PXE | |
US20050235281A1 (en) | Combined software installation package | |
US6658563B1 (en) | Virtual floppy diskette image within a primary partition in a hard disk drive and method for booting system with virtual diskette | |
CN113220332B (en) | BIOS firmware refreshing test method and device, electronic equipment and storage medium | |
CN111143132B (en) | BIOS recovery method, device, equipment and readable storage medium | |
CN108874459B (en) | Rapid starting method and device based on virtualization technology | |
CN109582332B (en) | System upgrading method and device for Internet camera | |
CN110188004A (en) | A kind of double copies software system management method and system of terminal device | |
CN114546537B (en) | Starting sequence deployment method and related device for multiple operating systems | |
CN115098038A (en) | Method, device and medium for binding mounted directory | |
CN111399936A (en) | BMC customization method, system, equipment and readable storage medium | |
CN104866397A (en) | Computer System And Control Method | |
CN114063920A (en) | Method and system for fixing drive letter under Linux | |
CN112506539A (en) | Firmware updating method and device, electronic equipment and storage medium | |
CN111885420A (en) | Standby protection method and device, smart television and readable storage medium | |
EP2835737A1 (en) | Data terminal running mode switching method, device, and data terminal | |
CN115756620A (en) | Method and system for starting NVME (network video management entity) hard disk of server and related equipment | |
CN113986367B (en) | Disk loading control method, device and equipment and readable storage medium | |
US20230012867A1 (en) | Computing device reboot | |
CN113703850B (en) | BIOS program starting method, system and related components | |
CN106569912B (en) | Method and system for restoring factory settings of mobile terminal |
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: 20220218 |