Hba card startup disk setting method and device and computer readable storage medium

By configuring an identifier in the BIOS configuration page to fix the boot disk of the HBA card, the problem of inconsistent slot and drive letter correspondence is solved, ensuring system stability.

CN117827711BActive Publication Date: 2026-11-27FULIAN PRESION ELECTRONICS (TIANJIN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211184672.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2026-11-27
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

The HBA card's relationship between the hard drive slot and the system drive letter is not fixed during startup, which can lead to unsuccessful startup and data misplacement.

Method used

By obtaining the physical layer port number corresponding to the slot of the target hard drive, configuring the first identifier and the second identifier in the BIOS configuration page, and writing them into the boot device item to fix the boot disk.

Benefits of technology

Ensure that the HBA card does not recognize other hard drives as boot disks under any circumstances, avoid confusion in the slot and drive letter correspondence, and make the system more stable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117827711B_ABST
    Figure CN117827711B_ABST
Patent Text Reader

Abstract

The application discloses a kind of HBA card startup disk setting method, device and computer readable storage medium, the HBA card startup disk setting method includes: obtaining the physical layer port number corresponding to slot of target hard disk;In the BIOS configuration page of HBA card, the first identifier is configured for the physical layer port number;In the BIOS configuration page, the second identifier is configured for the target hard disk, and the second identifier is obtained according to the first identifier and preset rule;The second identifier is written in the startup device item of the BIOS configuration page, to make the target hard disk fixed as the startup disk of the HBA card.The HBA card startup disk setting method of the application can make the startup disk of HBA card fixed as target hard disk, so that HBA card will not identify other hard disk as startup disk in any case, to avoid the physical slot of HBA card and the corresponding relationship of disk symbol are disturbed.Meanwhile, the above process does not involve the disk symbol modification of HBA card, that is, the rule of changing allocation disk symbol is not involved, so that the system is more stable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to an HBA card boot disk setup method, apparatus, and computer-readable storage medium. Background Technology

[0002] In related technologies, the host computer connects multiple storage devices via an HBA (Host Bus Adapter), such as multiple SATA hard drives (SATA, Serial ATA interface), to meet the needs of storing large amounts of data. However, in these technologies, there is no fixed correspondence between the hard drive slots of the HBA card and the drive letters in the system. During HBA card startup, the first hard drive detected is used as the boot drive, which can lead to misalignment of data read / write positions. Summary of the Invention

[0003] In view of this, this application provides an HBA card boot disk setting method, apparatus and computer-readable storage medium, so that the HBA card will not recognize other hard drives as boot disks under any circumstances, thereby avoiding disruption of the physical slot and drive letter correspondence of the HBA card.

[0004] The first aspect of this application provides a method for setting up an HBA card boot disk, including: Obtain the physical layer port number corresponding to the slot of the target hard drive; Configure a first identifier for the physical layer port number in the BIOS configuration page of the HBA card; In the BIOS configuration page, a second identifier is configured for the target hard drive, and the second identifier is obtained according to the first identifier and a preset rule; Write the second identifier into the boot device entry of the BIOS configuration page to fix the target hard drive as the boot disk of the HBA card.

[0005] According to one possible implementation of this application, obtaining the physical layer port number corresponding to the slot of the target hard disk includes: Obtain the hardware circuit information of the HBA card; By matching the slot number with the hardware circuit information, the physical layer port number corresponding to the slot number can be obtained.

[0006] According to one possible implementation of this application, configuring a first identifier for the physical layer port number in the BIOS configuration page of the HBA card includes: Access the physical layer port configuration page of the BIOS configuration page; Retrieve the corresponding configuration item from the physical layer port configuration page based on the physical layer port number; Write the first identifier into the configuration item.

[0007] According to one possible implementation of this application, the first identifier is in the NAA IEEE Registered format.

[0008] According to one possible implementation of this application, configuring a second identifier for the target hard disk in the BIOS configuration page includes: Access the hard drive configuration page within the BIOS configuration page; The second identifier is generated based on the first identifier and the preset rule; Write the second identifier in the boot form on the hard disk configuration page.

[0009] According to one possible implementation of this application, generating the second identifier based on the first identifier and the preset rule includes: The second identifier is obtained by replacing the first digit of the first identifier with a preset number.

[0010] According to one possible implementation of this application, the second identifier is in the NAA LocallyAssigned format.

[0011] According to one possible implementation of this application, the method further includes: Based on the completed BIOS configuration page, generate the target firmware for the HBA card, and use the target firmware to update the firmware of the HBA card.

[0012] A second aspect of this application provides an HBA card boot disk setup device, comprising: The port number acquisition module is used to obtain the physical layer port number corresponding to the slot of the target hard drive; The first identifier setting module is used to configure a first identifier for the physical layer port number in the BIOS configuration page of the HBA card; The second identifier setting module is used to configure a second identifier for the target hard drive in the BIOS configuration page. The second identifier is obtained according to the first identifier and a preset rule. The boot entry writing module is used to write the second identifier into the boot device entry of the BIOS configuration page, so that the target hard disk is fixed as the boot disk of the HBA card.

[0013] The third aspect of this solution provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the aforementioned HBA card boot disk setup method.

[0014] The beneficial effects of the technical solution provided in this application include at least the following: By configuring the HBA card boot disk as described above, the target hard drive can be fixed as the boot disk for the HBA card. This ensures that the HBA card will not recognize other hard drives as boot disks under any circumstances, thus preventing disruption of the physical slot and drive letter mapping relationship of the HBA card. Furthermore, this process does not involve modifying the HBA card's drive letter, meaning it does not alter the rules for drive letter allocation, resulting in greater system stability. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating an HBA card boot disk setup method provided in an embodiment of this application.

[0016] Figure 2 This is a flowchart illustrating a method for obtaining a physical layer port number provided in an embodiment of this application.

[0017] Figure 3 This is a flowchart illustrating a first identifier setting method provided in an embodiment of this application.

[0018] Figure 4 This is a flowchart illustrating a second identifier setting method provided in an embodiment of this application.

[0019] Figure 5 This is a flowchart illustrating an HBA card boot disk setup method provided in an embodiment of this application.

[0020] Figure 6 This is a schematic diagram of the structure of an HBA card boot disk setting device provided in an embodiment of this application. Detailed Implementation

[0021] It should be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0022] It should also be noted that the methods disclosed in the embodiments of this application or the methods shown in the flowcharts include one or more steps for implementing the method. Without departing from the scope of the claims, the execution order of multiple steps can be interchanged, and some steps can also be deleted.

[0023] In this application, the HBA card mentioned is a Host Bus Adapter (HBA), used for network switching. It can be inserted into a computer or mainframe, such as a server, providing a physical connection channel for input and output between the host and storage devices. In related technologies, the host connects multiple storage devices via the HBA card, such as multiple SATA hard drives (SATA, Serial ATA interface), to meet the needs of storing large amounts of data. However, in related technologies, there is no fixed correspondence between the hard drive slot of the HBA card and the drive letter in the system. When the HBA card boots, it may use the first recognized hard drive as the boot drive, leading to boot failure and incorrect data reading or writing positions. Therefore, when configuring an HBA card for a host, the boot drive needs to be fixed in the target slot. The following describes an HBA card boot drive setting method provided in this application.

[0024] Please refer to Figure 1 , Figure 1 This document illustrates a flowchart of an HBA card boot disk setup method provided in an embodiment of this application. Specifically, it includes the following steps: Step S11: Obtain the physical layer port number corresponding to the slot of the target hard drive.

[0025] In this embodiment, according to the SAS (Serial Attached SCSI) connection specification, data transmission between devices is point-to-point, including both the initiating and receiving ends. Data transmission between the HBA card and the hard drive also includes an initiating and receiving end; the initiating end is the physical layer port of the HBA card, specifically the SATA slot on the HBA card, while the hard drive connected to this physical layer port is the receiving end. Both the initiating and receiving ends require an identifier as their device name for addressing during data transmission. This identifier follows the IEEE registration format (IEEE, Institute of Electrical and Electronics Engineers).

[0026] Therefore, to designate one of the target hard drives connected to the HBA card as the boot drive, it is first necessary to designate the physical layer port identifier. To designate the physical layer port identifier, it is first necessary to know the physical layer port number of the target hard drive slot used as the boot drive.

[0027] In this embodiment, the physical layer port number of the HBA card can be obtained from the hardware circuit diagram of the HBA card. For example, if the target hard drive to be fixed as the boot disk is currently assigned the drive letter slot0, the corresponding physical location can be found on the hardware circuit diagram of the HBA card based on slot0, thereby obtaining the corresponding physical layer port. Alternatively, the physical layer port number corresponding to the slot of the target hard drive can be found through the HBA card's instruction manual; this is not limited here.

[0028] Step S12: Configure the first identifier for the physical layer port number in the BIOS configuration page of the HBA card.

[0029] In this embodiment, the initial identifiers of the physical layer ports in the HBA card are all derived from the HBA card's identifier and are assigned by default by the HBA card's firmware. This initial identifier is unique; different HBA cards have different initial identifiers. That is, for the same SATA hard drive, different HBA cards will have different identifiers, which complicates the unified management of SATA hard drives. To ensure that SATA hard drives have the same identifier under different HBA cards, a fixed first identifier needs to be configured for the physical layer port in the BIOS configuration page of the HBA card firmware. This first identifier can satisfy the IEEE registration format.

[0030] Step S13: Configure a second identifier for the target hard drive in the BIOS configuration page. The second identifier is obtained based on the first identifier and preset rules.

[0031] In this embodiment of the application, the target hard drive connected to the HBA card does not have an identifier. Therefore, during the configuration process, the content of the first identifier can be followed, and the content of the first identifier can be combined according to preset rules to obtain the second identifier, so that the first identifier and the second identifier have a close correlation.

[0032] Step S14: Write the second identifier into the boot device entry of the BIOS configuration page to fix the target hard drive as the boot disk of the HBA card.

[0033] In this embodiment, after obtaining the second identifier and configuring the HBA card's BIOS configuration page using it, the second identifier is written to the boot device entry of the BIOS configuration page, thus completing the configuration of the target hard drive as the boot disk. This HBA card boot disk configuration process ensures that the HBA card's boot disk is fixed as the target hard drive, preventing the HBA card from recognizing other hard drives as boot disks under any circumstances, thereby avoiding disruption of the physical slot and drive letter correspondence of the HBA card. Furthermore, this process does not involve modifying the HBA card's drive letter, i.e., it does not involve changing the rules for assigning drive letters, making the system more stable.

[0034] For example, such as Figure 2 The diagram shown is a flowchart illustrating a method for obtaining a physical layer port number according to an embodiment of this application. This method is one implementation of step S11 described above and specifically includes the following steps: Step S21: Obtain the hardware circuit information of the HBA card.

[0035] Step S22: Match the slot number with the hardware circuit information to obtain the physical layer port number corresponding to the slot number.

[0036] In this embodiment, the slot is the physical interface that the target hard drive is currently connected to the HBA card. After obtaining the hardware circuit information of the HBA card, the physical layer port corresponding to the slot can be obtained by matching the slot number corresponding to the slot with the hardware circuit information.

[0037] For example, such as Figure 3 The diagram shown is a flowchart illustrating a first identifier setting method provided in an embodiment of this application. This first identifier setting method is one implementation of step S12 described above, and specifically includes the following steps: Step S31: Enter the physical layer port configuration page of the BIOS configuration page.

[0038] In this embodiment, the physical layer port configuration page can be the BIOSPage4 configuration page in the HBA card firmware. After the HBA card starts up, the BIOSPage4 configuration page will assign an initial identifier to each physical layer port by default. In this application, a first identifier can be reconfigured for the physical layer port on the BIOSPage4 configuration page, and the first identifier can be recorded in the form for subsequent management.

[0039] Step S32: Obtain the corresponding configuration item in the physical layer port configuration page based on the physical layer port number.

[0040] In this embodiment of the application, the HBA card has multiple physical slots to connect multiple hard drives, and therefore also has multiple physical layer ports. Therefore, before writing the first identifier, it is necessary to find the corresponding configuration item for the above physical layer port number in the BIOS Page 4 configuration page, and replace the default initial identifier in the configuration item with the first identifier.

[0041] Step S33: Write the first identifier in the configuration item.

[0042] In this embodiment of the application, the first identifier is a fixed NAA IEEE Registered format string (NAAIEEE Registered, Global Network Address Authorization Identifier), for example, it can be 5066554433221100.

[0043] For example, such as Figure 4 The diagram shown is a flowchart illustrating a second identifier setting method provided in an embodiment of this application. This second identifier setting method is one implementation of step S13 described above, and specifically includes the following steps: Step S41: Enter the hard disk configuration page of the BIOS configuration page.

[0044] In this embodiment, the aforementioned hard disk configuration page can be the BIOSPage2 configuration page in the HBA card firmware. This configuration page allows the second identifier of the target hard disk to be set to the boot disk configuration location, enabling the target hard disk to function as the boot disk for the HBA card. Specifically, on this BIOSPage2 configuration page, the configuration item "ReqBootDeviceForm" can be set to the fifth item, that is, the format of the second identifier can be set to NAA Locally Assigned format (NAA Locally Assigned, Local Network Address Authorized Identifier).

[0045] Step S42: Generate a second identifier based on the first identifier and preset rules.

[0046] In this embodiment, the process of generating the second identifier includes: replacing the first digit of the first identifier with a preset number to obtain the second identifier. For example, the first identifier is 5066554433221100, where the first digit 5 ​​indicates that it is an identifier for a physical layer port. Replacing it with 3 gives 3066554433221100, which is the corresponding second identifier. The format of the second identifier is NAA Locally Assigned.

[0047] Step S43: Write the second identifier in the boot form of the hard disk configuration page.

[0048] In this embodiment, the aforementioned boot form can be the "RequestedBootDevice" item in the HBA card firmware configuration page. By writing the second identifier into the "RequestedBootDevice" item, the operation of fixing the target hard drive as the boot disk can be completed.

[0049] Please refer to Figure 5 , Figure 5 This document illustrates a flowchart of an HBA card boot disk setup method provided in an embodiment of this application. Specifically, it includes the following steps: Step S51: Obtain the physical layer port number corresponding to the slot of the target hard disk.

[0050] This step is the same as step S11 above, and will not be repeated here.

[0051] Step S52: Configure the first identifier for the physical layer port number in the BIOS configuration page of the HBA card.

[0052] This step is the same as step S12 above, and will not be repeated here.

[0053] Step S53: Configure a second identifier for the target hard drive in the BIOS configuration page. The second identifier is obtained based on the first identifier and preset rules.

[0054] This step is the same as step S13 above, and will not be repeated here.

[0055] Step S54: Write the second identifier into the boot device entry of the BIOS configuration page to fix the target hard drive as the boot disk of the HBA card.

[0056] This step is the same as step S14 above, and will not be repeated here.

[0057] Step S55: Based on the completed BIOS configuration page, generate the target firmware for the HBA card, and use the target firmware to update the firmware of the HBA card.

[0058] In this embodiment, based on the completed BIOS configuration page, the target firmware of the corresponding HBA card can be repackaged and generated. The target firmware can be used to replace the original firmware of the HBA card, or when there is a need for the same fixed target hard drive for a batch of HBA cards of the same model, the target firmware can be used directly for burning operations, thereby reducing the workload of configuration.

[0059] Please see Figure 6 This is a schematic diagram of the structure of an HBA card boot disk setting device provided in an embodiment of this application, as shown below. Figure 6 As shown, the HBA card boot disk setup device 600 includes: The port number acquisition module 610 is used to obtain the physical layer port number corresponding to the slot of the target hard disk. The first identifier setting module 620 is used to configure the first identifier for the physical layer port number in the BIOS configuration page of the HBA card; The second identifier setting module 630 is used to configure a second identifier for the target hard drive in the BIOS configuration page. The second identifier is obtained according to the first identifier and preset rules. The boot entry writing module 640 is used to write a second identifier into the boot device entry of the BIOS configuration page so that the target hard drive is fixed as the boot disk of the HBA card.

[0060] In this embodiment of the application, more detailed functional descriptions of the above modules can be found in the corresponding content of the foregoing section, and will not be repeated here.

[0061] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it causes the processor to execute the HBA card boot disk setup method described above. If the various components of the HBA card boot disk setup device are implemented as software functional units and sold or used as independent products, they can be stored in the storage medium.

[0062] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs, DVDs), or semiconductor media (e.g., solid-state disks, SSDs), etc.

[0063] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0064] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application should fall within the protection scope defined by the claims of this application.

Claims

1. A method for setting up an HBA card boot disk, characterized in that, include: Obtain the physical layer port number corresponding to the slot of the target hard drive; Configure a first identifier for the physical layer port number in the BIOS configuration page of the HBA card; In the BIOS configuration page, a second identifier is configured for the target hard drive, and the second identifier is obtained according to the first identifier and a preset rule; Write the second identifier into the boot device entry of the BIOS configuration page to fix the target hard drive as the boot disk of the HBA card.

2. The HBA card boot disk setting method as described in claim 1, characterized in that, The step of obtaining the physical layer port number corresponding to the slot of the target hard drive includes: Obtain the hardware circuit information of the HBA card; By matching the slot number with the hardware circuit information, the physical layer port number corresponding to the slot number can be obtained.

3. The HBA card boot disk setting method as described in claim 1, characterized in that, Configuring a first identifier for the physical layer port number in the HBA card's BIOS configuration page includes: Access the physical layer port configuration page of the BIOS configuration page; Retrieve the corresponding configuration item from the physical layer port configuration page based on the physical layer port number; Write the first identifier into the configuration item.

4. The HBA card boot disk setup method as described in claim 1, characterized in that, The first identifier is in NAA IEEE Registered format.

5. The HBA card boot disk setting method as described in claim 1, characterized in that, Configuring a second identifier for the target hard drive in the BIOS configuration page includes: Access the hard drive configuration page within the BIOS configuration page; The second identifier is generated based on the first identifier and the preset rule; Write the second identifier in the boot form on the hard disk configuration page.

6. The HBA card boot disk setting method as described in claim 5, characterized in that, The step of generating the second identifier based on the first identifier and the preset rule includes: The second identifier is obtained by replacing the first digit of the first identifier with a preset number.

7. The HBA card boot disk setup method as described in claim 1, characterized in that, The second identifier is in the NAA Locally Assigned format.

8. The HBA card boot disk setting method as described in claim 1, characterized in that, The method further includes: Based on the completed BIOS configuration page, generate the target firmware for the HBA card, and use the target firmware to update the firmware of the HBA card.

9. An HBA card boot disk setting device, characterized in that, include: The port number acquisition module is used to obtain the physical layer port number corresponding to the slot of the target hard drive; The first identifier setting module is used to configure a first identifier for the physical layer port number in the BIOS configuration page of the HBA card; The second identifier setting module is used to configure a second identifier for the target hard drive in the BIOS configuration page. The second identifier is obtained according to the first identifier and a preset rule. The boot entry writing module is used to write the second identifier into the boot device entry of the BIOS configuration page, so that the target hard disk is fixed as the boot disk of the HBA card.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the HBA card boot disk setup method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data access method and device and host

    CN110874297A

  • Path switching method and device and computer readable storage medium

    CN111352574A