CN113076225A - External storage medium detection method, device and equipment and storage medium - Google Patents

External storage medium detection method, device and equipment and storage medium Download PDF

Info

Publication number
CN113076225A
CN113076225A CN202110342557.3A CN202110342557A CN113076225A CN 113076225 A CN113076225 A CN 113076225A CN 202110342557 A CN202110342557 A CN 202110342557A CN 113076225 A CN113076225 A CN 113076225A
Authority
CN
China
Prior art keywords
storage medium
file system
bmc
file
initialization
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.)
Granted
Application number
CN202110342557.3A
Other languages
Chinese (zh)
Other versions
CN113076225B (en
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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110342557.3A priority Critical patent/CN113076225B/en
Publication of CN113076225A publication Critical patent/CN113076225A/en
Application granted granted Critical
Publication of CN113076225B publication Critical patent/CN113076225B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test input/output devices or peripheral units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0632Configuration or reconfiguration of storage systems by initialisation or re-initialisation 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses an external storage medium detection method, which is applied to BMC and comprises the following steps: in the starting process, a first storage medium externally connected with the BMC is searched in the equipment directory; if the first storage medium is found to have at least one partition, creating a file system in the first storage medium, and mounting the file system of the first storage medium into a file system of the BMC; according to a received file generation instruction, creating a target file in a file system of a first storage medium, and writing a test completion character string in the target file; if the writing is successful, it is determined that the first storage medium initialization is successful. By applying the technical scheme provided by the application, the external storage medium is automatically and effectively detected through the BMC, so that the detection efficiency can be improved, and the production cost is reduced. The application also discloses an external storage medium detection device, equipment and a storage medium, and the external storage medium detection device has corresponding technical effects.

Description

External storage medium detection method, device and equipment and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting an external storage medium.
Background
With the rapid development of computer technology, devices such as servers are more and more commonly applied in various industries. The Management module of the server is a BMC (baseboard Management Controller). In the using process, the BMC needs to store information of many peripheral devices and many functions of the BMC, but is limited by the size of its own cache, and often needs to be externally connected with a storage medium to store important management information.
Whether the external storage medium can be normally used or not has certain influence on whether the server can normally operate or not. Before the server is delivered, the external storage medium needs to be detected, and problems are discovered and solved. Currently, a professional technician often detects the external storage media of each server one by one. The detection efficiency is lower, and the production cost is higher.
Disclosure of Invention
The application aims to provide a method, a device and equipment for detecting an external storage medium and the storage medium, so that the external storage medium can be quickly and effectively detected, the detection efficiency is improved, and the production cost is reduced.
In order to solve the technical problem, the application provides the following technical scheme:
a method for detecting an external storage medium is applied to a Baseboard Management Controller (BMC), and comprises the following steps:
in the starting process, searching a first storage medium externally connected with the BMC in a device directory;
if the first storage medium is found to have at least one partition, creating a file system in the first storage medium, and mounting the file system of the first storage medium into a file system of the BMC;
according to a received file generation instruction, creating a target file in a file system of the first storage medium, and writing a test completion character string in the target file;
and if the writing is successful, determining that the initialization of the first storage medium is successful.
In a specific embodiment of the present application, before creating the file system in the first storage medium, the method further includes:
creating at least one partition in the first storage medium if the at least one partition does not exist in the first storage medium.
In one embodiment of the present application, the method further includes:
and if the file system of the first storage medium is not mounted in the file system of the BMC, or the target file cannot be created in the file system of the first storage medium, or the test completion character string cannot be written in the target file, determining that the initialization of the first storage medium fails.
In a specific embodiment of the present application, after determining that the initialization of the first storage medium fails, the method further includes:
and outputting error prompt information corresponding to the failure reason.
In one embodiment of the present application, the method further includes:
determining that a hardware circuit of the first storage medium is not connected if the first storage medium is not found in the device directory.
In one embodiment of the present application, the method further includes:
receiving an initialization information notification instruction aiming at a second storage medium externally connected with the system and sent by a Basic Input Output System (BIOS), wherein the initialization information notification instruction carries initialization information of whether the second storage medium is successfully connected, whether the second storage medium is partitioned, whether the file system of the second storage medium is created or not, and whether the second storage medium supports read-write operation or not;
and storing the initialization information into a setting medium which is not easy to lose.
In one embodiment of the present application, the method further includes:
and outputting the initialization information stored in the setting medium when receiving a state checking instruction of an external storage medium of the system.
The utility model provides an external storage medium detection device, is applied to base plate management controller BMC, external storage medium detection device includes:
the first storage medium searching module is used for searching the first storage medium externally connected with the BMC in the equipment directory in the starting process;
the file system creating and mounting module is used for creating a file system in the first storage medium and mounting the file system of the first storage medium into the file system of the BMC under the condition that the first storage medium is found and at least one partition exists in the first storage medium;
the target file creating and writing module is used for creating a target file in a file system of the first storage medium according to the received file generation instruction and writing a test completion character string in the target file;
and the initialization result determining module is used for determining that the initialization of the first storage medium is successful under the condition that the writing is successful.
An external storage medium detection device, which runs on a Baseboard Management Controller (BMC), comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the external storage medium detection method when the computer program is executed.
A computer-readable storage medium, having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for detecting an external storage medium according to any of the above.
By applying the technical scheme provided by the embodiment of the application, in the starting process of the BMC, the first storage medium externally connected with the BMC is searched in the device directory, if the first storage medium is found and has at least one partition, a file system is created in the first storage medium and is mounted in the file system of the BMC, a target file is created in the file system of the first storage medium according to a received file generation instruction, a test completion character string is written in the target file, if the writing is successful, the first storage medium is determined to be successfully initialized, the detection of the first storage medium is completed, the external storage medium is automatically and quickly and effectively detected through the BMC, the detection efficiency can be improved, and the production cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a method for detecting an external storage medium according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an exemplary process of detecting a BMC external storage medium according to an embodiment of the disclosure;
FIG. 3 is a diagram illustrating an exemplary process of detecting a storage medium externally connected to the system according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an external storage medium detection device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an external storage medium detection device in an embodiment of the present application.
Detailed Description
The core of the application is to provide a method for detecting the external storage medium, the method can be applied to BMC, and the BMC can quickly and effectively detect the external storage medium, so that the detection efficiency can be improved, and the production cost can be reduced.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application 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 application.
Referring to fig. 1, a flowchart of an implementation of a method for detecting an external storage medium according to an embodiment of the present application is shown, where the method may include the following steps:
s110: in the starting process, a first storage medium externally connected with the BMC is searched in the device directory.
In practical applications, in order to store important management information, a storage medium externally connected to the BMC needs to be added. During the starting process of the BMC, the first storage medium externally connected with the BMC can be searched in the device directory. The device directory may specifically be a/dev directory. The first storage medium may be any storage medium externally connected to the BMC.
It can be understood that, if there is no problem in the hardware connection of the first storage medium externally connected to the BMC, the BMC may find the first storage medium in the device directory and continue to perform the operations of the subsequent steps.
If the BMC does not find the first storage medium in the device directory, the BMC can determine that the hardware circuit of the first storage medium is not connected, and can output corresponding error prompt information to facilitate technicians to check problems in time.
S120: and if the file system is found and at least one partition exists in the first storage medium, creating the file system in the first storage medium, and mounting the file system of the first storage medium into the file system of the BMC.
In the starting process of the BMC, a first storage medium externally connected with the BMC is searched in the device directory, if the first storage medium is searched, whether at least one partition exists in the first storage medium can be further judged, if the partition exists, a file system can be established in the first storage medium, and the file system of the first storage medium is mounted in the file system of the BMC, so that the BMC can further control the first storage medium.
If the first storage medium does not have at least one partition, creating at least one partition in the first storage medium and then performing the operations of the subsequent steps. So as to improve the success rate of the subsequent step operation.
S130: and according to the received file generation instruction, creating a target file in a file system of the first storage medium, and writing a test completion character string in the target file.
In the embodiment of the application, a technician can provide a file generation instruction in advance for use in production detection. The file generation instruction may be an IPMI (Intelligent Platform Management Interface) instruction. The file name that needs to be generated in the storage medium may be specified in the file generation instruction.
After the BMC creates the file system in the first storage medium and mounts the file system of the first storage medium into the file system of the BMC, if a file generation instruction is received, a target file may be created in the file system of the first storage medium according to the file generation instruction. The file name of the created target file is the file name which is specified in the file generation instruction and needs to be generated in the storage medium.
After the target file is created, a test completion string may be further written into the target file, such as "test ok! "character string.
S140: if the writing is successful, it is determined that the first storage medium initialization is successful.
If the first storage medium supports the read-write operation, the BMC writes the test completion character string into the target file, and the writing is successful. If the writing is successful, it may be determined that the first storage medium initialization is successful. The detection of the first storage medium is completed and the first storage medium can be used normally.
By applying the method provided by the embodiment of the application, in the starting process of the BMC, the first storage medium externally connected with the BMC is searched in the device directory, if the first storage medium is found and has at least one partition, a file system is created in the first storage medium and is mounted in the file system of the BMC, a target file is created in the file system of the first storage medium according to a received file generation instruction, a test completion character string is written in the target file, if the writing is successful, the first storage medium is determined to be successfully initialized, the detection of the first storage medium is completed, the external storage medium is automatically and quickly and effectively detected through the BMC, the detection efficiency can be improved, and the production cost is reduced.
In one embodiment of the present application, the method may further comprise the steps of:
if the file system of the first storage medium is not mounted in the file system of the BMC, or the target file cannot be created in the file system of the first storage medium, or the test completion string cannot be successfully written in the target file, it may be determined that the initialization of the first storage medium fails.
In this embodiment of the application, the BMC creates a file system in the first storage medium, mounts the file system of the first storage medium to the file system of the BMC, and if the mounting is not successful, that is, the file system of the first storage medium is not mounted to the file system of the BMC, the operation of the subsequent step cannot be performed, and it can be determined that the initialization of the first storage medium fails.
In addition, the BMC may create the target file in the file system of the first storage medium according to the received file generation instruction, may further determine whether the creation of the target file is successful, and if the creation is not successful, that is, the target file cannot be created in the file system of the first storage medium, may determine that the initialization of the first storage medium is failed.
Furthermore, after the BMC creates the target file in the file system of the first storage medium, if the test completion string cannot be written in the target file, the first storage medium cannot be normally used, and it may be determined that the initialization of the first storage medium fails.
After determining that the first storage medium has failed to be initialized, error prompt information corresponding to a reason for the failure may be output.
The specific failure reason may be that the file system of the first storage medium is not mounted in the file system of the BMC, the target file cannot be created in the file system of the first storage medium, the test completion string cannot be written in the target file, and the like.
Different failure reasons can correspond to different error prompt messages. After determining that the first storage medium has failed to be initialized, error prompt information corresponding to a reason for the failure may be output. Therefore, technicians can conveniently look up the information, and the reason of initialization failure can be quickly known through error prompt information so as to solve the problem as soon as possible. Specifically, the error prompt message may be in the form of an error code.
For convenience of understanding, the embodiment of the present application is described by taking the detection process of the BMC external storage medium shown in fig. 2 as an example, where the detection process is as follows:
the BMC can determine whether a first storage medium exists under the/dev directory in the starting process;
if there is a first storage medium, it may be further determined whether there is at least one partition in the first storage medium, and if there is no first storage medium, an error warning message ERR1 may be output: no hardware devices;
if the first storage medium has at least one partition, it may be further determined whether a file system has been created, and if the first storage medium does not have at least one partition, at least one partition may be created and a file system created;
if the file system is created, the created file system can be mounted to the file system of the BMC, and if the file system is not created, the created file system can be mounted to the file system of the BMC after the file system is created;
after receiving an IPMI command generated by a file sent from the outside, determining whether the created file system is mounted in a file system of the BMC;
if the mount is successful, a target file specified in the File Generation IPMI directive may be created in the created file system and written to "test ok! "character string, if the writing is successful, the initialization of the first storage medium is determined to be successful;
if the created file system is not mounted in the file system of the BMC, outputting an error prompt message ERR 2: the mounting is unsuccessful;
if the target file cannot be created in the created file system, outputting error prompt information ERR 3: files cannot be created;
if "test ok!cannot be written in the destination file! "character string", then output the wrong suggestion message ERR 4: read and write operations are not possible.
In one embodiment of the present application, the method may further comprise the steps of:
the method comprises the following steps: receiving an initialization information informing instruction which is sent by a Basic Input Output System (BIOS) and aims at a second storage medium externally connected with the system, wherein the initialization information informing instruction carries initialization information of whether the second storage medium is successfully connected, whether the second storage medium is partitioned, whether the creation of a file system of the second storage medium is finished, and whether the second storage medium supports read-write operation;
step two: the initialization information is stored in a setting medium that is not easily lost.
For convenience of description, the above two steps are combined for illustration.
In practical applications, the server system often needs to add an external storage medium to store more information. That is, the server may be connected to a storage medium externally. In this case, before the System is started, the System may be started by a BIOS (Basic Input Output System) to perform an initialization operation on the external storage medium of the System. The second storage medium may be any one of the system-external storage media.
The BIOS may look up the second storage medium in the corresponding device directory, and if the second storage medium is found to have at least one partition, may create a file system in the second storage medium. If the second storage medium is not located, it may be determined that the second storage medium has failed the hard-wired connection. If at least one partition does not exist in the searched second storage medium, the operation of creating the file system in the second storage medium may be executed after at least one partition is created in the second storage medium. After the file system is created, the created file system may be mounted to the file system of the system, a designated file may be created, and a preset character string may be written into the designated file.
Through the above operations, the BIOS may obtain initialization information of the second storage medium. The initialization information may include information on whether the second storage medium is successfully connected, whether the second storage medium is partitioned, whether creation of a file system of the second storage medium is completed, whether the second storage medium supports a read-write operation, and the like.
After the BIOS detects the second storage medium externally connected to the system, an initialization information notification instruction may be sent to the BMC, where the initialization information notification instruction may be an IPMI instruction, and carries initialization notification information.
After receiving the initialization information notification instruction, the BMC may store the initialization information in a setting medium that is not easily lost.
And outputting the initialization information stored in the setting medium when receiving a state checking instruction of the system external storage medium.
Therefore, technicians can quickly know the state of the external storage medium of the system.
For convenience of understanding, the embodiment of the present application is described by taking the detection process of the system external storage medium shown in fig. 3 as an example, and the detection process is as follows:
the BMC receives initialization information aiming at a second storage medium externally connected with the system and sent by a BIOS to inform an IPMI instruction;
storing initialization information contained in the IPMI command in an EEPROM (Electrically Erasable Programmable read only memory);
after receiving the externally transmitted state view IPMI command, the initialization information stored in the EEPROM may be output, such as the successful initialization of the second storage medium, ERR 1: no hardware device, ERR 2: unsuccessful mount, ERR 3: file cannot be created, ERR 4: inability to read and write, etc.
According to the embodiment of the application, the detection of the external storage medium is carried out based on the BMC, the labor cost can be effectively saved, the large-scale rapid and stable production is facilitated, and the production efficiency is improved. Moreover, the initialization of the external storage medium can be completed in advance, so that the user can directly use the external storage medium after the server is delivered for use.
Corresponding to the above method embodiment, an embodiment of the present application further provides an external storage medium detection device, which is applied to the BMC, and the external storage medium detection device described below and the external storage medium detection method described above may be referred to in a corresponding manner.
Referring to fig. 4, the apparatus may include the following modules:
the first storage medium searching module 410 is configured to search, in a starting process, a first storage medium externally connected to the BMC in the device directory;
the file system creating and mounting module 420 is configured to create a file system in the first storage medium and mount the file system of the first storage medium into a file system of the BMC when the first storage medium is found and at least one partition exists in the first storage medium;
a target file creating and writing module 430, configured to create a target file in a file system of the first storage medium according to the received file generation instruction, and write a test completion string in the target file;
and an initialization result determining module 440, configured to determine that the initialization of the first storage medium is successful if the writing is successful.
By applying the device provided by the embodiment of the application, in the starting process of the BMC, the first storage medium externally connected with the BMC is searched in the device directory, if the first storage medium is found and has at least one partition, a file system is created in the first storage medium and is mounted in the file system of the BMC, a target file is created in the file system of the first storage medium according to a received file generation instruction, a test completion character string is written in the target file, if the writing is successful, the first storage medium is determined to be successfully initialized, the detection of the first storage medium is completed, the external storage medium is automatically and quickly and effectively detected through the BMC, the detection efficiency can be improved, and the production cost is reduced.
In a specific embodiment of the present application, the system further includes a partitioning module, configured to:
before creating the file system in the first storage medium, if the first storage medium does not have at least one partition, creating at least one partition in the first storage medium.
In a specific embodiment of the present application, the initialization result determining module 440 is further configured to:
if the file system of the first storage medium is not mounted in the file system of the BMC, or the target file cannot be created in the file system of the first storage medium, or the test completion character string cannot be written in the target file, it is determined that the initialization of the first storage medium fails.
In a specific embodiment of the present application, the system further includes an error prompt information output module, configured to:
after determining that the first storage medium has failed to be initialized, outputting error prompt information corresponding to the reason of the failure.
In a specific embodiment of the present application, the apparatus further includes a hardware connection determining module, configured to:
if the first storage medium is not found in the device directory, determining that the hardware circuit of the first storage medium is not connected.
In one embodiment of the present application, the method further includes:
the initialization information acquisition module is used for receiving an initialization information informing instruction which is sent by a Basic Input Output System (BIOS) and aims at a second storage medium externally connected with the system, wherein the initialization information informing instruction carries initialization information about whether the second storage medium is successfully connected, whether the second storage medium is partitioned, whether the creation of a file system of the second storage medium is finished, and whether the second storage medium supports read-write operation;
and the initialization information storage module is used for storing the initialization information into a setting medium which is not easy to lose.
In a specific embodiment of the present application, the system further includes an initialization information output module, configured to:
and outputting the initialization information stored in the setting medium when receiving a state checking instruction of the system external storage medium.
Corresponding to the above method embodiment, an embodiment of the present application further provides an external storage medium detection device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the external storage medium detection method when executing the computer program.
As shown in fig. 5, which is a schematic view of a composition structure of an external storage medium detection device, the external storage medium detection device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through a communication bus 13.
In the embodiment of the present application, the processor 10 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in an embodiment of the external storage medium detection method.
The memory 11 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 11 stores at least the program for implementing the following functions:
in the starting process, a first storage medium externally connected with the BMC is searched in the equipment directory;
if the first storage medium is found to have at least one partition, creating a file system in the first storage medium, and mounting the file system of the first storage medium into a file system of the BMC;
according to a received file generation instruction, creating a target file in a file system of a first storage medium, and writing a test completion character string in the target file;
if the writing is successful, it is determined that the first storage medium initialization is successful.
In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a file creation function, a data read/write function), and the like; the storage data area may store data created during use, such as initialization data.
Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The communication interface 12 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 5 does not constitute a limitation to the external storage medium detection device in the embodiment of the present application, and in practical applications, the external storage medium detection device may include more or less components than those shown in fig. 5, or some components in combination.
Corresponding to the above method embodiments, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the external storage medium detection method are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present application are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. The method for detecting the external storage medium is applied to a Baseboard Management Controller (BMC), and comprises the following steps:
in the starting process, searching a first storage medium externally connected with the BMC in a device directory;
if the first storage medium is found to have at least one partition, creating a file system in the first storage medium, and mounting the file system of the first storage medium into a file system of the BMC;
according to a received file generation instruction, creating a target file in a file system of the first storage medium, and writing a test completion character string in the target file;
and if the writing is successful, determining that the initialization of the first storage medium is successful.
2. The method according to claim 1, further comprising, before creating the file system in the first storage medium:
creating at least one partition in the first storage medium if the at least one partition does not exist in the first storage medium.
3. The method for detecting the external storage medium according to claim 1, further comprising:
and if the file system of the first storage medium is not mounted in the file system of the BMC, or the target file cannot be created in the file system of the first storage medium, or the test completion character string cannot be written in the target file, determining that the initialization of the first storage medium fails.
4. The method according to claim 3, further comprising, after the determining that the initialization of the first storage medium fails:
and outputting error prompt information corresponding to the failure reason.
5. The method for detecting the external storage medium according to claim 1, further comprising:
determining that a hardware circuit of the first storage medium is not connected if the first storage medium is not found in the device directory.
6. The method for detecting the external storage medium according to any one of claims 1 to 5, further comprising:
receiving an initialization information notification instruction aiming at a second storage medium externally connected with the system and sent by a Basic Input Output System (BIOS), wherein the initialization information notification instruction carries initialization information of whether the second storage medium is successfully connected, whether the second storage medium is partitioned, whether the file system of the second storage medium is created or not, and whether the second storage medium supports read-write operation or not;
and storing the initialization information into a setting medium which is not easy to lose.
7. The method for detecting the external storage medium according to claim 6, further comprising:
and outputting the initialization information stored in the setting medium when receiving a state checking instruction of an external storage medium of the system.
8. The utility model provides an external storage medium detection device which characterized in that is applied to base plate management controller BMC, external storage medium detection device includes:
the first storage medium searching module is used for searching the first storage medium externally connected with the BMC in the equipment directory in the starting process;
the file system creating and mounting module is used for creating a file system in the first storage medium and mounting the file system of the first storage medium into the file system of the BMC under the condition that the first storage medium is found and at least one partition exists in the first storage medium;
the target file creating and writing module is used for creating a target file in a file system of the first storage medium according to the received file generation instruction and writing a test completion character string in the target file;
and the initialization result determining module is used for determining that the initialization of the first storage medium is successful under the condition that the writing is successful.
9. An external storage medium detection device, which is operated in a Baseboard Management Controller (BMC), comprises:
a memory for storing a computer program;
a processor for implementing the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having a computer program stored thereon, which, when being executed by a processor, carries out the steps of the method for detecting an external storage medium according to any one of claims 1 to 7.
CN202110342557.3A 2021-03-30 2021-03-30 External storage medium detection method, device and equipment and storage medium Active CN113076225B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110342557.3A CN113076225B (en) 2021-03-30 2021-03-30 External storage medium detection method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110342557.3A CN113076225B (en) 2021-03-30 2021-03-30 External storage medium detection method, device and equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113076225A true CN113076225A (en) 2021-07-06
CN113076225B CN113076225B (en) 2023-03-24

Family

ID=76611804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110342557.3A Active CN113076225B (en) 2021-03-30 2021-03-30 External storage medium detection method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113076225B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996121A (en) * 2009-08-12 2011-03-30 鸿富锦精密工业(深圳)有限公司 Universal serial bus (USB) port testing device and testing method
CN103106091A (en) * 2013-01-31 2013-05-15 深圳市开立科技有限公司 Start-up system and method of operating system based on removable storage media
US20140188791A1 (en) * 2012-12-31 2014-07-03 Judah G. Hahn System and Method for Selectively Routing Cached Objects
US20140365755A1 (en) * 2013-06-07 2014-12-11 Dell Inc. Firmware authentication
CN105446856A (en) * 2015-11-12 2016-03-30 上海斐讯数据通信技术有限公司 Electronic device interface detection method and apparatus
CN106990958A (en) * 2017-03-17 2017-07-28 联想(北京)有限公司 A kind of extension element, electronic equipment and startup method
CN108733525A (en) * 2018-06-07 2018-11-02 郑州云海信息技术有限公司 A kind of memory module tests and verifies the method and system of correctness automatically
CN109101611A (en) * 2018-08-06 2018-12-28 郑州云海信息技术有限公司 File system directories maximize test method, device, terminal and storage medium
CN109254783A (en) * 2018-09-18 2019-01-22 郑州云海信息技术有限公司 A kind of server system installation method, device, equipment and readable storage medium storing program for executing
CN109683818A (en) * 2018-12-17 2019-04-26 联想(北京)有限公司 A kind of date storage method, equipment and storage medium
CN109710317A (en) * 2018-11-16 2019-05-03 华为技术有限公司 System start method, device, electronic equipment and storage medium
CN110992992A (en) * 2019-10-31 2020-04-10 苏州浪潮智能科技有限公司 Hard disk test method, device and storage medium
CN111538462A (en) * 2020-04-28 2020-08-14 深圳市元征科技股份有限公司 Formatting method and device for external storage equipment and related equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996121A (en) * 2009-08-12 2011-03-30 鸿富锦精密工业(深圳)有限公司 Universal serial bus (USB) port testing device and testing method
US20140188791A1 (en) * 2012-12-31 2014-07-03 Judah G. Hahn System and Method for Selectively Routing Cached Objects
CN103106091A (en) * 2013-01-31 2013-05-15 深圳市开立科技有限公司 Start-up system and method of operating system based on removable storage media
US20140365755A1 (en) * 2013-06-07 2014-12-11 Dell Inc. Firmware authentication
CN105446856A (en) * 2015-11-12 2016-03-30 上海斐讯数据通信技术有限公司 Electronic device interface detection method and apparatus
CN106990958A (en) * 2017-03-17 2017-07-28 联想(北京)有限公司 A kind of extension element, electronic equipment and startup method
CN108733525A (en) * 2018-06-07 2018-11-02 郑州云海信息技术有限公司 A kind of memory module tests and verifies the method and system of correctness automatically
CN109101611A (en) * 2018-08-06 2018-12-28 郑州云海信息技术有限公司 File system directories maximize test method, device, terminal and storage medium
CN109254783A (en) * 2018-09-18 2019-01-22 郑州云海信息技术有限公司 A kind of server system installation method, device, equipment and readable storage medium storing program for executing
CN109710317A (en) * 2018-11-16 2019-05-03 华为技术有限公司 System start method, device, electronic equipment and storage medium
CN109683818A (en) * 2018-12-17 2019-04-26 联想(北京)有限公司 A kind of date storage method, equipment and storage medium
CN110992992A (en) * 2019-10-31 2020-04-10 苏州浪潮智能科技有限公司 Hard disk test method, device and storage medium
CN111538462A (en) * 2020-04-28 2020-08-14 深圳市元征科技股份有限公司 Formatting method and device for external storage equipment and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邝榆宁等: "SeaChange Media Cluster~(TM)硬盘自动播出***", 《广播与电视技术》 *

Also Published As

Publication number Publication date
CN113076225B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
US4852092A (en) Error recovery system of a multiprocessor system for recovering an error in a processor by making the processor into a checking condition after completion of microprogram restart from a checkpoint
US10002054B2 (en) Method and system for performing automatic system recovery
CN106250192B (en) Software upgrading method and system of upper computer
CN110442473B (en) Nonvolatile data storage method and device, electronic equipment and medium
JPH06103481B2 (en) Program loading method
US20060224874A1 (en) Method for updating system management basic input output system (SMBIOS) data
CN111949285B (en) Method, device, equipment and storage medium for upgrading firmware of expansion chip
CN108874441B (en) Board card configuration method, device, server and storage medium
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN115185675A (en) Server cluster deployment method, system, computing device and readable storage medium
CN113076225B (en) External storage medium detection method, device and equipment and storage medium
CN116701518A (en) Database cluster deployment method and device, computer equipment and storage medium
CN108595292B (en) System optimization method, mobile terminal and computer storage medium
CN113377425B (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN111783162B (en) Data protection implementation method and device and computer equipment
CN111158783B (en) Environment variable modification method, device and equipment and readable storage medium
CN111459406B (en) Method and system for identifying NVME hard disk under storage unloading card
CN114153503A (en) BIOS control method, device and medium
CN111538462A (en) Formatting method and device for external storage equipment and related equipment
CN106599046B (en) Writing method and device of distributed file system
CN113849432B (en) Server firmware data storage method, starting method, device, equipment and medium
CN112463071B (en) Method and device for selectively clearing nonvolatile storage
CN117407460A (en) Cross-environment data synchronization method and device, storage medium and electronic equipment
US20060107004A1 (en) Recovery from failure in data storage systems

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
GR01 Patent grant
GR01 Patent grant