CN117931550A - Automatic installation test method, device, equipment and medium for hard disk system - Google Patents

Automatic installation test method, device, equipment and medium for hard disk system Download PDF

Info

Publication number
CN117931550A
CN117931550A CN202410103624.XA CN202410103624A CN117931550A CN 117931550 A CN117931550 A CN 117931550A CN 202410103624 A CN202410103624 A CN 202410103624A CN 117931550 A CN117931550 A CN 117931550A
Authority
CN
China
Prior art keywords
test
hard disk
installation
configuring
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410103624.XA
Other languages
Chinese (zh)
Inventor
杨柳
陈鹏全
吴存宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Xinyilian Information Technology Co Ltd
Original Assignee
Chengdu Xinyilian Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Xinyilian Information Technology Co Ltd filed Critical Chengdu Xinyilian Information Technology Co Ltd
Priority to CN202410103624.XA priority Critical patent/CN117931550A/en
Publication of CN117931550A publication Critical patent/CN117931550A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to an automatic installation test method, device, equipment and medium for a hard disk system, wherein the method comprises the following steps: constructing a PXE server, configuring grub.cfg files in the PXE server, and presetting system information to be installed; configuring a test host to start from a PXE server; restarting the test host, and guiding the test host to enter the PXE server according to the grub file so as to enable the hard disk to automatically install the system according to the preset system information to be installed; configuring a test host to start from a hard disk and acquiring SSH login information; judging whether SSH login is successful or not; if the SSH login is successful, the system installation is completed, and related service tests of the hard disk system are configured and executed; and obtaining a test result and uploading the test result to a specified database. The invention realizes the automatic test of the relevant test scene of the system installation, reduces the manpower input and improves the test efficiency.

Description

Automatic installation test method, device, equipment and medium for hard disk system
Technical Field
The invention relates to the technical field of automatic installation and test of hard disk systems, in particular to an automatic installation and test method, device, equipment and medium for a hard disk system.
Background
For a hard disk, a typical usage scenario is used as a data disk, so that the data disk is tested frequently in daily life; but will also be used as a system disk in an actual usage scenario. The conventional methods for implementing system installation include the following: 1. backing up and restoring the system mirror image; 2. BMC mounting mirror image installation; 3. installing a U disk; 4. PXE directs installation. The 1 st principle belongs to the backup and the restoration of data, is not suitable for being used as a system installation test, relies on manual operation like the 2 nd and the 3 rd, needs a nursing process and cannot be operated in batches; the 4 th type can be deployed as automatic installation, but also relies on manual process intervention, and the subsequent testing step also requires human input, so that the full-flow automation cannot be realized. Therefore, all of the above four methods have problems that the manpower consumption is large and the batch operation cannot be realized.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an automatic installation test method, device, equipment and medium for a hard disk system.
In order to solve the technical problems, the invention adopts the following technical scheme:
In a first aspect, the present embodiment provides a method for automatically installing and testing a hard disk system, including the following steps:
constructing a PXE server, configuring grub.cfg files in the PXE server, and presetting system information to be installed;
configuring a test host to start from a PXE server;
Restarting the test host, and guiding the test host to enter the PXE server according to the grub file so as to enable the hard disk to automatically install the system according to the preset system information to be installed;
Configuring a test host to start from a hard disk and acquiring SSH login information;
judging whether SSH login is successful or not;
If the SSH login is successful, the system installation is completed, and related service tests of the hard disk system are configured and executed;
and obtaining a test result and uploading the test result to a specified database.
The further technical scheme is as follows: the PXE server comprises a DHCP service, a TFTP service and an FTP/HTTP service; the DHCP service is used for configuring and distributing IP for the dynamic host; the TFTP service is used for providing boot files, including grub.cfg files, initrd boot files and vmlinux kernel files; FTP/HTTP services are used to provide system image files.
The further technical scheme is as follows: the related business test of the hard disk system comprises IO test of the hard disk system or a newly added partition, whether the system can be reinstalled when encountering abnormal DC & AC power failure and restarting, whether the system can be restarted when repeatedly encountering abnormal DC & AC power failure and restarting, or whether the system can be restarted when simulating the breakdown fault of the system kernel.
The further technical scheme is as follows: after the step of judging whether the SSH login is successful, the method further comprises the following steps: if the SSH login is unsuccessful, the system installation fails, and an installation log is output and uploaded to a specified database.
In a second aspect, the present embodiment provides an automatic installation test device for a hard disk system, including: setting up a configuration preset unit, a configuration unit, a starting guide installation unit, a configuration acquisition unit, a judgment unit, a configuration execution unit and an acquisition uploading unit;
The construction and configuration preset unit is used for constructing a PXE server, configuring grub.cfg files in the PXE server and presetting system information to be installed;
the configuration unit is used for configuring the test host to start from the PXE server;
the starting guide installation unit is used for restarting the test host, guiding the test host to enter the PXE server according to the grub file, and enabling the hard disk to automatically install the system according to the preset system information to be installed;
The configuration acquisition unit is used for configuring the test host to be started from the hard disk and acquiring SSH login information;
The judging unit is used for judging whether the SSH login is successful or not;
The configuration execution unit is used for completing system installation if SSH login is successful, and configuring and executing related service test of the hard disk system;
the acquisition and uploading unit is used for acquiring the test result and uploading the test result to the appointed database.
The further technical scheme is as follows: the PXE server comprises a DHCP service, a TFTP service and an FTP/HTTP service; the DHCP service is used for configuring and distributing IP for the dynamic host; the TFTP service is used for providing boot files, including grub.cfg files, initrd boot files and vmlinux kernel files; FTP/HTTP services are used to provide system image files.
The further technical scheme is as follows: the related business test of the hard disk system comprises IO test of the hard disk system or a newly added partition, whether the system can be reinstalled when encountering abnormal DC & AC power failure and restarting, whether the system can be restarted when repeatedly encountering abnormal DC & AC power failure and restarting, or whether the system can be restarted when simulating the breakdown fault of the system kernel.
The further technical scheme is as follows: the apparatus further comprises: and the output uploading unit is used for outputting an installation log and uploading the installation log to the appointed database if the SSH login is unsuccessful.
In a third aspect, the present embodiment provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program, and the processor implements the method for automatically installing and testing a hard disk system as described above when executing the computer program.
In a fourth aspect, the present embodiment provides a storage medium storing a computer program comprising program instructions which, when executed by a processor, implement a method for automated hard disk system installation testing as described above.
Compared with the prior art, the invention has the beneficial effects that: through presetting the information of the system to be installed and restarting the system on the test host, the system can automatically install the corresponding operating system according to the information, so that the time and effort for manually installing the system can be saved, in addition, after the system is installed, related business tests can be carried out on the hard disk system, batch tests can be realized, namely, the automatic test of related test scenes of the system installation is realized, the labor input is reduced, and the test efficiency is improved.
The invention is further described below with reference to the drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an automatic installation test method for a hard disk system according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of an automated hard disk system installation test device provided by an embodiment of the present invention;
Fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to the specific embodiment shown in fig. 1, the invention discloses an automatic installation testing method for a hard disk system, which comprises the following steps:
s1, constructing a PXE server, configuring grub.cfg files in the PXE server, and presetting system information to be installed;
Specifically, the construction of a PXE server employs prior art disclosures and is not described herein in any great detail. Wherein, by configuring grub.cfg files, a plurality of starting options, such as different versions of operating systems, different kernel parameters, etc., can be set on the PXE server. Thus, when the client computer is started from the network, a proper option can be selected, so that a corresponding operating system and application programs are started; meanwhile, through presetting the system information to be installed, related parameters required in the installation process of the operating system, such as an IP address, a domain name, a host name, a user name, a password and the like, can be set on the PXE server, and the information can be automatically applied when the client computer installs the operating system, so that the installation process is more automatic and efficient.
In addition, PXE (Preboot Execution Environment) is a network boot technique that enables a computer to boot over a network without a local storage device (e.g., hard disk) and to obtain operating system and application image files on the network. The main roles of PXE technology include:
simplified management: the use of PXE technology can simplify the management of computers because an administrator does not need to manually install operating systems and applications, but simply prepares them in advance and places them on the PXE server;
Efficiency is improved: the deployment efficiency of the computer can be improved by using the PXE technology, because a large number of computers can acquire the image files of the operating system and the application program from the PXE server at the same time, and an optical disk or a USB driver is not required to be used;
Convenient updating: the PXE technology is used for conveniently updating the operating system and the application program, and an administrator can automatically acquire the latest version only by placing the updated image file on the PXE server and restarting the client;
The cost is saved: the use of PXE technology can save computer hardware costs because it is not necessary to purchase a large capacity hard drive or other storage device, and can save software license fees because all computers use the same operating system and application image files.
In one embodiment, the PXE server includes a DHCP service, a TFTP service, and an FTP/HTTP service; the DHCP service is used for configuring and distributing IP for the dynamic host; the TFTP service is used for providing boot files, including grub.cfg files, initrd boot files and vmlinux kernel files; FTP/HTTP services are used to provide system image files.
S2, configuring a test host to start from the PXE server;
Specifically, the test host is configured to be started from the PXE server through Redfish or IPMI over LAN interfaces, and an administrator can finish operation in an office or other places without personally operating a server room through a starting process of a remote control and management server, so that the deployment efficiency can be improved, and the labor cost can be saved. In addition, by remotely controlling and managing the startup process of the server, various problems occurring at the time of startup, such as: it is possible to avoid inserting a wrong starting device at the time of starting, or connecting a wrong network device, etc., thereby reducing the failure rate. In addition, through the starting process of the remote control and management server, an administrator can be prevented from storing important data on local equipment, so that the safety of the data is improved, and operations such as remote locking and shutdown can be performed on the server to prevent unauthorized access. In addition, the server can be conveniently managed and maintained through the starting process of the remote control and management server; for example, operations such as remote restarting, system log viewing, BIOS setting modification and the like can be performed when the server fails, so that the problem can be quickly solved.
S3, restarting the test host, and guiding the test host to enter the PXE server according to the grub file so that the hard disk automatically installs the system according to the preset system information to be installed;
Specifically, the test host is restarted through the interface, and then the test host is guided to enter the PXE server according to the grub file, so that the hard disk automatically installs the system according to the preset system information to be installed, the system installation flow can be automatically triggered by restarting the test host and designating the PXE server in the guiding process, the test host can download the required operating system and application program from the PXE server, and the automatic installation is carried out according to the parameters in the preset system information to be installed, so that the complicated step of manually installing the operating system can be avoided, and the deployment efficiency is improved; in addition, by configuring different starting options in the grub file, unified system configuration of a plurality of test hosts can be realized, and an administrator can set different operating system versions, kernel parameters and the like according to the needs so as to meet the requirements of different test hosts, so that each test host can be ensured to have the same configuration, and the consistency and reliability of system management are improved; in addition, the PXE server is used for system installation, a large number of test hosts can be deployed remotely and rapidly, and when the system needs to be updated or replaced, only the image file or the configuration file on the PXE server is required to be updated, and manual operation is not required to be carried out by accessing each test host one by one, so that the workload of system updating and maintenance is greatly simplified; in addition, through automatic system installation and quick deployment, the workload and labor cost of an administrator can be reduced, the administrator only needs to pre-configure a PXE server and grub.cfg files, then the test host is restarted, each test host does not need to be operated one by one, and therefore the work efficiency can be improved, and more time is released for other important tasks.
S4, configuring a test host to start from a hard disk, and acquiring SSH login information;
specifically, waiting for 5 minutes, configuring the test host to start from the hard disk through the interface, configuring the test host to start from the hard disk, and enabling an administrator to remotely log in to the test host through an SSH protocol to realize remote management of the host, so that physical contact with the test host can be avoided, and convenience and flexibility of management are improved; in addition, when faults or abnormal conditions occur in the test host, an administrator can log in the test host through SSH, check operations such as logs and running commands, and conduct quick fault detection, so that fault detection time can be reduced, and fault processing efficiency is improved; in addition, an administrator can execute commands or scripts in batches by logging in the test host through the SSH, so that centralized management of a plurality of test hosts is realized, each host is prevented from logging in one by one to operate, the labor cost is reduced, and the efficiency of batch operation is improved; in addition, through SSH login, an administrator can use an encrypted communication channel to carry out safe remote management, and the administrator can set different user authorities and access control strategies to ensure that only authorized personnel can log in and manage the test host.
S5, judging whether SSH login is successful or not;
S6, if the SSH login is successful, the system installation is completed, and related service tests of the hard disk system are configured and executed;
Specifically, after the system is installed, relevant service tests of the hard disk system are configured, a test environment can be preset, including network configuration, necessary software and service installation, and parameters required by the test are set, so that the stability and the correctness of the test environment can be ensured; in addition, after the system is prepared, testing of related business of the hard disk system can be configured, for example, testing of specific application programs, services or functions can be performed, the testing can comprise functional verification, performance testing, compatibility testing and the like, and by executing the testing, the performance, the stability and the reliability of the system can be evaluated; in addition, the configuration of the related service test of the hard disk system and the execution can be realized through an automatic test script and a tool, the test script can simulate the operation of a user, execute a series of predefined test cases and collect test results, and the automatic test can improve the efficiency and the accuracy of the test and reduce the influence of human factors on the test results; in addition, in the service test process, if the system is found to have faults or abnormal conditions, fault detection can be carried out through the test logs and the information provided by the test tool, so that the problems in the system can be found and solved, and the reliability and stability of the system are improved.
In an embodiment, the related service test of the hard disk system includes performing an IO test on the hard disk system or a newly added partition, whether the system can be reinstalled when encountering abnormal DC & AC power failure, whether the system can be restarted when repeatedly encountering abnormal DC & AC power failure, or whether the system can be restarted when simulating a crash fault of a system kernel.
Specifically, verifying a single-disk environment to install an operating system, and performing IO test on a system disk or a newly-added partition after the system is installed; repeatedly verifying whether the system can be reinstalled when abnormal DC & AC power failure restarting is encountered in the process of installing the operating system; verifying whether a system can be restarted or not when abnormal DC (direct current) and AC (alternating current) power failure restarting and the like are repeatedly encountered in the running process of an operating system as a system disk; and verifying whether the system can be restarted or not by simulating the breakdown fault of the system kernel in the running process of the operating system of the system disk.
Wherein, DC power down restarts: refers to restarting the host when power is turned off by a physical switch on the host panel or by using the ipmi tool to perform power off and on. AC power-down restart: the method refers to a mode of directly plugging the power line, so that the host is powered down and restarted. Simulating a system kernel crash fault: the command echo c >/proc/sysq-trigger under Linux can simulate triggering the fault.
Specifically, the IO test can verify the read-write performance of the hard disk system or the newly added partition, and the read-write speed and stability of the system disk and the influence on the performance of the application program can be evaluated by simulating the read-write operation in the actual application scene.
The DC & AC power down restart test can verify the system's ability to recover itself when unpredictable anomalies are encountered, such as sudden power down or re-power up after an AC power down, whether the system can be restarted and properly installed and configured, and whether data integrity can be maintained.
The system can be restarted or not when the abnormal DC & AC is powered down and restarted repeatedly, so that whether the system can normally run and start or not under the condition of repeated restarting or not can be verified, and whether the stability and the reliability can be kept or not can be verified.
The test can check whether the system can automatically recover and restart when the system encounters the faults such as kernel collapse and the like, and can keep the integrity of data.
S7, obtaining a test result, and uploading the test result to a specified database;
Specifically, the designated database refers to a certain block storage area of the PXE server. The test results are uploaded to the appointed database, so that the test results of each time can be conveniently recorded and tracked, a durable test result database can be established, the history records of each test task are saved, and the capability of quick search and inquiry is provided; in addition, after the test results are uploaded to the appointed database, the data can be analyzed and counted, and through summarizing and counting the test results, the overall evaluation of the system performance, stability and reliability can be obtained, and potential problems and bottlenecks can be identified; in addition, when a system has faults or abnormal conditions, the test results are uploaded to the appointed database to provide important information for fault detection and problem positioning, and the test results contain key data such as the running state of the system and error logs, so that developers or administrators can be helped to quickly position and solve the problems; in addition, by uploading the test results to the designated database, detailed test reports can be generated and communicated and shared with related personnel, and the test reports can comprise detailed description, problem description, suggestion, improvement measures and the like of the test results, so that team members can be effectively communicated and cooperated; in addition, the test result is uploaded to the appointed database and can be used as a part of data backup, and the safety and reliability of the data can be ensured by periodically backing up the test result, and recovery and backtracking can be performed when needed.
S8, if the SSH login is unsuccessful, the system installation fails, and an installation log is output and uploaded to a specified database.
Specifically, based on the installation log, analyzing the cause of the system installation failure so as to enable an administrator or a developer to check and analyze the error cause, the installation log records various operations and events in the system installation process, including error information, warnings and other relevant records, and is helpful for locating and solving the system installation problem; in addition, the unsuccessful SSH login may be caused by various reasons, such as network connection problems, key authentication failures, configuration errors and the like, and by outputting the installation log and uploading the installation log to a specified database, an administrator or a developer can be helped to quickly locate a fault point, further troubleshoot the problem and take corresponding repair measures.
In order to facilitate understanding of the technical solution of the present invention, the following specific embodiments are specifically provided: after the automatic installation of the Centos7.9 version system is realized, the IO test of the system disk is carried out:
The default parameter in the grub.cfg file is configured to be centos > centos79 so as to automatically install a specified version 7.9 Centros system after the subsequent PXE server is booted;
Through the ipmi tool interface, the next restart of the configuration host is directly started from the PXE server: ipmitool-I lanplus-H192.168.10.10-U admin-P ADMIN CHASSIS bootparam set bootflag force _pxe;
Through the ipmi tool interface, the restart test host is configured: ipmitool-I lanplus-H192.168.10.10-U admin-P admin power cycle;
After waiting for 5 minutes, the configuration host directly starts from the hard disk after the next restart through the ipmi tool interface: ipmitool-I lanplus-H192.168.10.10-U admin-P ADMIN CHASSIS bootparam set bootflag force _disk;
When the system is installed, judging whether the system is completed or not by repeatedly attempting SSH login in the process, and if the login is successful, indicating that the system is installed;
After the system is installed, logging in by remote SSH, and performing IO test under the home directory by using a fio tool, such as :fio-filename=/home/tmp-direct=1-iodepth 1-thread-rw=randread-ioengine=psync-bs=4k-si ze=100G-numjobs=50-runtime=180-group_reporting-name=rand_100read_4k;
After the IO test is completed, if the IO is abnormal, uploading a qualified test result to a specified database for archiving; if the test process has failure, uploading the failure test result to a designated database for archiving.
The invention can automatically install the corresponding operating system according to the information by presetting the information of the system to be installed and restarting the system on the test host, thereby saving the time and effort for manually installing the system, and in addition, after the system is installed, the related business test can be carried out on the hard disk system, thereby realizing batch test, namely realizing the automatic test of the related test scene of the system installation, reducing the labor input and improving the test efficiency.
Referring to fig. 2, the invention also discloses an automatic installation testing device for the hard disk system, which comprises: setting up a configuration presetting unit 10, a configuration unit 20, a starting guide installation unit 30, a configuration acquisition unit 40, a judging unit 50, a configuration executing unit 60 and an acquisition uploading unit 70;
The preset setting up and configuring unit 10 is configured to set up a PXE server, configure a grub.cfg file in the PXE server, and preset system information to be installed;
the configuration unit 20 is configured to configure the test host to start from the PXE server;
The start-up guide installation unit 30 is configured to restart the test host, guide the test host into the PXE server according to a grub file, so that the hard disk automatically installs the system according to the preset system information to be installed;
the configuration obtaining unit 40 is configured to configure the test host to be started from the hard disk, and obtain information of SSH login;
the judging unit 50 is configured to judge whether the SSH login is successful;
the configuration execution unit 60 is configured to complete system installation if SSH login is successful, configure related service test of the hard disk system, and execute the test;
The acquiring and uploading unit 70 is configured to acquire a test result and upload the test result to a specified database.
In one embodiment, the PXE server includes a DHCP service, a TFTP service, and an FTP/HTTP service; the DHCP service is used for configuring and distributing IP for the dynamic host; the TFTP service is used for providing boot files, including grub.cfg files, initrd boot files and vmlinux kernel files; FTP/HTTP services are used to provide system image files.
In an embodiment, the related service test of the hard disk system includes performing an IO test on the hard disk system or a newly added partition, whether the system can be reinstalled when encountering abnormal DC & AC power failure, whether the system can be restarted when repeatedly encountering abnormal DC & AC power failure, or whether the system can be restarted when simulating a crash fault of a system kernel.
In an embodiment, the device further comprises: and the output uploading unit 80 is used for outputting an installation log and uploading the installation log to the appointed database if the SSH login is unsuccessful.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the automatic installation testing device and each unit of the hard disk system may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted here.
The above-described hard disk system automated installation testing apparatus may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a computer device according to an embodiment of the present application; the computer device 500 may be a terminal or a server, where the terminal may be an electronic device with a communication function, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster formed by a plurality of servers.
With reference to FIG. 3, the computer device 500 includes a processor 502, memory, and a network interface 505, connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for automated hard disk system installation testing.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a method for automated hard disk system installation testing.
The network interface 505 is used for network communication with other devices. It will be appreciated by those skilled in the art that the architecture shown in fig. 3 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, and that a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Wherein the processor 502 is configured to execute a computer program 5032 stored in a memory to implement the steps of:
Constructing a PXE server, configuring grub.cfg files in the PXE server, and presetting system information to be installed; configuring a test host to start from a PXE server; restarting the test host, and guiding the test host to enter the PXE server according to the grub file so as to enable the hard disk to automatically install the system according to the preset system information to be installed; configuring a test host to start from a hard disk and acquiring SSH login information; judging whether SSH login is successful or not; if the SSH login is successful, the system installation is completed, and related service tests of the hard disk system are configured and executed; and obtaining a test result and uploading the test result to a specified database.
It should be appreciated that in embodiments of the present application, the Processor 502 may be a central processing unit (Central Processing Unit, CPU), the Processor 502 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program comprises program instructions which, when executed by a processor, implement the hard disk system automated installation test method described above. The storage medium stores a computer program comprising program instructions which, when executed by a processor, implement the method described above. The program instructions include the steps of:
Constructing a PXE server, configuring grub.cfg files in the PXE server, and presetting system information to be installed; configuring a test host to start from a PXE server; restarting the test host, and guiding the test host to enter the PXE server according to the grub file so as to enable the hard disk to automatically install the system according to the preset system information to be installed; configuring a test host to start from a hard disk and acquiring SSH login information; judging whether SSH login is successful or not; if the SSH login is successful, the system installation is completed, and related service tests of the hard disk system are configured and executed; and obtaining a test result and uploading the test result to a specified database.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the 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 solution. 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 invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
The foregoing embodiments are preferred embodiments of the present invention, and in addition, the present invention may be implemented in other ways, and any obvious substitution is within the scope of the present invention without departing from the concept of the present invention.

Claims (10)

1. The automatic installation testing method for the hard disk system is characterized by comprising the following steps of:
constructing a PXE server, configuring grub.cfg files in the PXE server, and presetting system information to be installed;
configuring a test host to start from a PXE server;
Restarting the test host, and guiding the test host to enter the PXE server according to the grub file so as to enable the hard disk to automatically install the system according to the preset system information to be installed;
Configuring a test host to start from a hard disk and acquiring SSH login information;
judging whether SSH login is successful or not;
If the SSH login is successful, the system installation is completed, and related service tests of the hard disk system are configured and executed;
and obtaining a test result and uploading the test result to a specified database.
2. The method for automatically installing and testing a hard disk system according to claim 1, wherein the PXE server includes DHCP service, TFTP service, and FTP/HTTP service; the DHCP service is used for configuring and distributing IP for the dynamic host; the TFTP service is used for providing boot files, including grub.cfg files, initrd boot files and vmlinux kernel files; FTP/HTTP services are used to provide system image files.
3. The method for automatically installing and testing the hard disk system according to claim 1, wherein the service test related to the hard disk system comprises performing an IO test on the hard disk system or a newly added partition, whether the system can be reinstalled when encountering abnormal DC & AC power down restart, whether the system can be restarted when encountering abnormal DC & AC power down restart repeatedly, or whether the system can be restarted when simulating a system kernel crash fault.
4. The method for automatically installing and testing a hard disk system according to claim 1, further comprising, after the step of determining whether the SSH login is successful: if the SSH login is unsuccessful, the system installation fails, and an installation log is output and uploaded to a specified database.
5. Automatic installation testing arrangement of hard disk system, its characterized in that includes: setting up a configuration preset unit, a configuration unit, a starting guide installation unit, a configuration acquisition unit, a judgment unit, a configuration execution unit and an acquisition uploading unit;
The construction and configuration preset unit is used for constructing a PXE server, configuring grub.cfg files in the PXE server and presetting system information to be installed;
the configuration unit is used for configuring the test host to start from the PXE server;
the starting guide installation unit is used for restarting the test host, guiding the test host to enter the PXE server according to the grub file, and enabling the hard disk to automatically install the system according to the preset system information to be installed;
The configuration acquisition unit is used for configuring the test host to be started from the hard disk and acquiring SSH login information;
The judging unit is used for judging whether the SSH login is successful or not;
The configuration execution unit is used for completing system installation if SSH login is successful, and configuring and executing related service test of the hard disk system;
the acquisition and uploading unit is used for acquiring the test result and uploading the test result to the appointed database.
6. The apparatus of claim 5, wherein the PXE server includes DHCP service, TFTP service, and FTP/HTTP service; the DHCP service is used for configuring and distributing IP for the dynamic host; the TFTP service is used for providing boot files, including grub.cfg files, initrd boot files and vmlinux kernel files; FTP/HTTP services are used to provide system image files.
7. The automated hard disk system installation test device of claim 5, wherein the hard disk system related business test comprises performing an IO test on a hard disk system or a newly added partition, whether the system can be reinstalled when encountering an abnormal DC & AC power down restart, whether the system can be restarted when repeatedly encountering an abnormal DC & AC power down restart, or whether the system can be restarted when simulating a system kernel crash fault.
8. The automated hard disk system installation testing device of claim 5, further comprising: and the output uploading unit is used for outputting an installation log and uploading the installation log to the appointed database if the SSH login is unsuccessful.
9. A computer device, characterized in that the computer device comprises a memory and a processor, the memory having stored thereon a computer program, the processor implementing the automated hard disk system installation test method according to any of claims 1-4 when executing the computer program.
10. A storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the hard disk system automated installation test method of any one of claims 1-4.
CN202410103624.XA 2024-01-23 2024-01-23 Automatic installation test method, device, equipment and medium for hard disk system Pending CN117931550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410103624.XA CN117931550A (en) 2024-01-23 2024-01-23 Automatic installation test method, device, equipment and medium for hard disk system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410103624.XA CN117931550A (en) 2024-01-23 2024-01-23 Automatic installation test method, device, equipment and medium for hard disk system

Publications (1)

Publication Number Publication Date
CN117931550A true CN117931550A (en) 2024-04-26

Family

ID=90755365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410103624.XA Pending CN117931550A (en) 2024-01-23 2024-01-23 Automatic installation test method, device, equipment and medium for hard disk system

Country Status (1)

Country Link
CN (1) CN117931550A (en)

Similar Documents

Publication Publication Date Title
CN113489597B (en) Method and system for optimal startup path for network device
CN110928743B (en) Computing system, automatic diagnosis method and medium storing instructions thereof
US9697011B2 (en) Techniques for computer system recovery
WO2022198972A1 (en) Method, system and apparatus for fault positioning in starting process of server
US7293201B2 (en) System and method for active diagnosis and self healing of software systems
US20160026451A1 (en) Automated Operating System Installation on Multiple Drives
KR101949115B1 (en) Self-diagnosis and automatic diagnostic data collection of device driver detection errors
CN109254783A (en) A kind of server system installation method, device, equipment and readable storage medium storing program for executing
JP2004514208A (en) Online diagnostics of computer hardware and software
US9542304B1 (en) Automated operating system installation
US10496495B2 (en) On demand remote diagnostics for hardware component failure and disk drive data recovery using embedded storage media
WO2021057795A1 (en) System starting method and apparatus, node device and computer-readable storage medium
CN106980493B (en) Firmware management method and device
US8607328B1 (en) Methods and systems for automated system support
CN115033419B (en) Method and system for realizing hardware fault self-healing
US20240118884A1 (en) Automated deployment method for upgrading client's internal business software systems
WO2016122510A1 (en) Hard disk drive power removal
CN117931550A (en) Automatic installation test method, device, equipment and medium for hard disk system
US8171347B2 (en) Method and apparatus for troubleshooting a computer system
CN116302738A (en) Method, system, equipment and storage medium for testing chip
US20210334153A1 (en) Remote error detection method adapted for a remote computer device to detect errors that occur in a service computer device
CN115167947A (en) Installation method, device and medium of operating system
CN114448788A (en) Installation method, system, equipment and medium of switch system
Cisco Installing and Uninstalling VHM
Cisco Logging In and Getting Started

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