CN112214384A - Hard disk serial number management method, system, terminal and storage medium - Google Patents

Hard disk serial number management method, system, terminal and storage medium Download PDF

Info

Publication number
CN112214384A
CN112214384A CN202010990061.2A CN202010990061A CN112214384A CN 112214384 A CN112214384 A CN 112214384A CN 202010990061 A CN202010990061 A CN 202010990061A CN 112214384 A CN112214384 A CN 112214384A
Authority
CN
China
Prior art keywords
hard disk
serial number
identification code
management server
disk serial
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.)
Withdrawn
Application number
CN202010990061.2A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010990061.2A priority Critical patent/CN112214384A/en
Publication of CN112214384A publication Critical patent/CN112214384A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/325Display of status information by lamps or LED's
    • G06F11/326Display of status information by lamps or LED's for error or online/offline status
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers

Abstract

The invention provides a hard disk serial number management method, a system, a terminal and a storage medium, comprising the following steps: reading an identification code of a hard disk of a storage device and sending the identification code of the hard disk to a hard disk management server; receiving a hard disk serial number which is returned by the hard disk management server and corresponds to the hard disk identification code; and storing the corresponding hard disk serial number to the hard disk. The invention can ensure that the PN information of each hard disk is successfully written into the log sense area of the hard disk. The generation flow of writing PN codes into each hard disk is recorded through the PN hard disk information database, so that the product management and the fault tracing in the later period are facilitated. The whole process is automatically completed by software without manual intervention, so that the labor cost is greatly saved, and the production efficiency is obviously improved.

Description

Hard disk serial number management method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of storage equipment, in particular to a hard disk serial number management method, a hard disk serial number management system, a hard disk serial number management terminal and a storage medium.
Background
Each hard disk is attached with a PN number (serial number) of the hard disk. In some scenarios, we need to know the detailed information of each hard disk without pulling out the hard disk, and the PN number of the hard disk is an important piece of information. However, the PN number of the hard disk is not saved in the hard disk when the hard disk is shipped from the factory, and therefore, the PN number cannot be obtained through some operations of reading the hard disk. This results in the storage device not being able to directly acquire the PN number of the hard disk, and the storage device is wasted in computing resources and time when acquiring the PN number through other ways.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for managing a serial number of a hard disk, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a hard disk serial number management method, including:
reading an identification code of a hard disk of a storage device and sending the identification code of the hard disk to a hard disk management server;
receiving a hard disk serial number which is returned by the hard disk management server and corresponds to the hard disk identification code;
and storing the corresponding hard disk serial number to the hard disk.
Further, the method for querying the hard disk serial number includes:
and the hard disk management server inquires a corresponding hard disk serial number from a database according to the hard disk identification code, and the database stores a mapping pair of the hard disk serial number and the hard disk identification code.
Further, the storing the serial number of the corresponding hard disk to the hard disk includes:
and storing the corresponding hard disk serial number to a log recording page of the hard disk.
Further, the method further comprises:
sending an identification code of a hard disk to the hard disk management server to obtain a corresponding hard disk serial number returned by the hard disk management server;
reading a stored hard disk serial number from the hard disk;
and comparing whether the corresponding hard disk serial number is consistent with the stored hard disk serial number, and if not, lightening a fault lamp of the hard disk.
In a second aspect, the present invention provides a hard disk serial number management system, including:
the identification reading unit is used for reading an identification code of a hard disk of the storage device and sending the hard disk identification code to the hard disk management server;
the sequence receiving unit is configured to receive a hard disk serial number which is returned by the hard disk management server and corresponds to the hard disk identification code;
and the sequence storage unit is configured to store the corresponding hard disk serial number to the hard disk.
Further, the method for querying the hard disk serial number includes:
and the hard disk management server inquires a corresponding hard disk serial number from a database according to the hard disk identification code, and the database stores a mapping pair of the hard disk serial number and the hard disk identification code.
Further, the sequence saving unit includes:
and the storage module is configured to store the corresponding hard disk serial number to a log record page of the hard disk.
Further, the system further comprises:
the verification acquisition unit is configured to send an identification code of a hard disk to the hard disk management server to acquire a corresponding hard disk serial number returned by the hard disk management server;
the verification reading unit is configured to read the stored hard disk serial number from the hard disk;
and the verification comparison unit is configured for comparing whether the corresponding hard disk serial number is consistent with the stored hard disk serial number or not, and if not, lightening a fault lamp of the hard disk.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the hard disk serial number management method, the system, the terminal and the storage medium provided by the invention read a piece of hard disk identification code information, then send the identification code to the PN information database, the hard disk management server sorts and stores the received identification code sent from the storage device into the database, the PN number of the hard disk is obtained by searching the database, and then the PN number is written into the hard disk. The invention can ensure that the PN information of each hard disk is successfully written into the log sense area of the hard disk. The generation flow of writing PN codes into each hard disk is recorded through the PN hard disk information database, so that the product management and the fault tracing in the later period are facilitated. The whole process is automatically completed by software without manual intervention, so that the labor cost is greatly saved, and the production efficiency is obviously improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
Fig. 2 is a schematic and schematic diagram of a method of one embodiment of the present invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a hard disk serial number management system.
As shown in fig. 1, the method includes:
step 110, reading an identification code of a hard disk of a storage device and sending the identification code of the hard disk to a hard disk management server;
step 120, receiving a hard disk serial number corresponding to the hard disk identification code returned by the hard disk management server;
and step 130, storing the corresponding hard disk serial number to the hard disk.
Specifically, as shown in fig. 2, the hard disk serial number management method includes:
s1, reading the identification code of the hard disk of the storage device and sending the identification code of the hard disk to the hard disk management server.
The production line operator records the PN code of the hard disk, inserts the hard disk into the storage device case, and the hard disk PN information management tool reads the hard disk identification code information of each hard disk through ISCSI command by using sg3_ utils software package. And the hard disk PN information management tool transmits the hard disk identification code to a hard disk management server of the storage device through socket communication.
And S2, receiving the hard disk serial number corresponding to the hard disk identification code returned by the hard disk management server.
The hard disk PN information database management software running on the hard disk management server sorts and stores the hard disk identification codes sent from the storage device and received through socket communication into a database. The database is a database in which hard disk product information is pre-entered, wherein the hard disk product information comprises a hard disk identification code and a PN number, and therefore the identification code of each hard disk and the PN number have a one-to-one mapping relation. And acquiring the PN number of the hard disk by searching the database under the condition that the hard disk identification code is known.
And the hard disk management server returns the PN number of the hard disk to the hard disk through socket communication.
And S3, storing the corresponding hard disk serial number to the hard disk.
And after the hard disk PN code returned by the hard disk PN information database is received, writing the hard disk PN code into the log sense page of the hard disk.
S4, regularly checking the serial number stored locally in the hard disk to prevent the serial number from being tampered, wherein the checking method comprises the following steps:
and reading the PN number of the hard disk in the log sense page of the hard disk, comparing the PN number with the PN number returned by the database, if the PN number is not matched with the PN number, lightening a fault lamp of the hard disk, and simultaneously sending the position information of the hard disk in the storage equipment case to the database.
As shown in fig. 3, the system 300 includes:
an identification reading unit 310 configured to read an identification code of a hard disk of a storage device and send the hard disk identification code to a hard disk management server;
a sequence receiving unit 320 configured to receive a hard disk serial number corresponding to the hard disk identification code returned by the hard disk management server;
a sequence storage unit 330 configured to store the corresponding hard disk serial number to the hard disk.
Optionally, as an embodiment of the present invention, the method for querying a serial number of a hard disk includes:
and the hard disk management server inquires a corresponding hard disk serial number from a database according to the hard disk identification code, and the database stores a mapping pair of the hard disk serial number and the hard disk identification code.
Optionally, as an embodiment of the present invention, the sequence saving unit includes:
and the storage module is configured to store the corresponding hard disk serial number to a log record page of the hard disk.
Optionally, as an embodiment of the present invention, the system further includes:
the verification acquisition unit is configured to send an identification code of a hard disk to the hard disk management server to acquire a corresponding hard disk serial number returned by the hard disk management server;
the verification reading unit is configured to read the stored hard disk serial number from the hard disk;
and the verification comparison unit is configured for comparing whether the corresponding hard disk serial number is consistent with the stored hard disk serial number or not, and if not, lightening a fault lamp of the hard disk.
Fig. 3 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be used to execute the hard disk serial number management method according to the embodiment of the present invention.
Among them, the terminal 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention reads the identification code information of a hard disk, then sends the identification code to the PN information database, the hard disk management server sorts and stores the received identification code sent from the storage device into the database, the PN number of the hard disk is obtained by searching the database, and then the PN number is written into the hard disk. The invention can ensure that the PN information of each hard disk is successfully written into the log sense area of the hard disk. The generation flow of writing PN codes into each hard disk is recorded through the PN hard disk information database, so that the product management and the fault tracing in the later period are facilitated. The whole process is automatically completed by software without manual intervention, so that the labor cost is greatly saved, the production efficiency is obviously improved, the technical effect which can be achieved by the embodiment can be referred to the description above, and the details are not repeated here.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A hard disk serial number management method is characterized by comprising the following steps:
reading an identification code of a hard disk of a storage device and sending the identification code of the hard disk to a hard disk management server;
receiving a hard disk serial number which is returned by the hard disk management server and corresponds to the hard disk identification code;
and storing the corresponding hard disk serial number to the hard disk.
2. The method according to claim 1, wherein the method for querying the serial number of the hard disk comprises:
and the hard disk management server inquires a corresponding hard disk serial number from a database according to the hard disk identification code, and the database stores a mapping pair of the hard disk serial number and the hard disk identification code.
3. The method of claim 1, wherein saving the corresponding hard disk serial number to the hard disk comprises:
and storing the corresponding hard disk serial number to a log recording page of the hard disk.
4. The method of claim 1, further comprising:
sending an identification code of a hard disk to the hard disk management server to obtain a corresponding hard disk serial number returned by the hard disk management server;
reading a stored hard disk serial number from the hard disk;
and comparing whether the corresponding hard disk serial number is consistent with the stored hard disk serial number, and if not, lightening a fault lamp of the hard disk.
5. A hard disk serial number management system is characterized by comprising:
the identification reading unit is used for reading an identification code of a hard disk of the storage device and sending the hard disk identification code to the hard disk management server;
the sequence receiving unit is configured to receive a hard disk serial number which is returned by the hard disk management server and corresponds to the hard disk identification code;
and the sequence storage unit is configured to store the corresponding hard disk serial number to the hard disk.
6. The system according to claim 5, wherein the method for querying the serial number of the hard disk comprises:
and the hard disk management server inquires a corresponding hard disk serial number from a database according to the hard disk identification code, and the database stores a mapping pair of the hard disk serial number and the hard disk identification code.
7. The system of claim 5, wherein the sequence preservation unit comprises:
and the storage module is configured to store the corresponding hard disk serial number to a log record page of the hard disk.
8. The system of claim 5, further comprising:
the verification acquisition unit is configured to send an identification code of a hard disk to the hard disk management server to acquire a corresponding hard disk serial number returned by the hard disk management server;
the verification reading unit is configured to read the stored hard disk serial number from the hard disk;
and the verification comparison unit is configured for comparing whether the corresponding hard disk serial number is consistent with the stored hard disk serial number or not, and if not, lightening a fault lamp of the hard disk.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202010990061.2A 2020-09-18 2020-09-18 Hard disk serial number management method, system, terminal and storage medium Withdrawn CN112214384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010990061.2A CN112214384A (en) 2020-09-18 2020-09-18 Hard disk serial number management method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010990061.2A CN112214384A (en) 2020-09-18 2020-09-18 Hard disk serial number management method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112214384A true CN112214384A (en) 2021-01-12

Family

ID=74050193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010990061.2A Withdrawn CN112214384A (en) 2020-09-18 2020-09-18 Hard disk serial number management method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112214384A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468009A (en) * 2021-07-21 2021-10-01 宁畅信息产业(北京)有限公司 Pressure testing method and device, electronic equipment and storage medium
CN115102843A (en) * 2022-05-26 2022-09-23 苏州浪潮智能科技有限公司 Server serial number obtaining method and device and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468009A (en) * 2021-07-21 2021-10-01 宁畅信息产业(北京)有限公司 Pressure testing method and device, electronic equipment and storage medium
CN115102843A (en) * 2022-05-26 2022-09-23 苏州浪潮智能科技有限公司 Server serial number obtaining method and device and computer equipment
CN115102843B (en) * 2022-05-26 2023-07-14 苏州浪潮智能科技有限公司 Method and device for obtaining server serial number and computer equipment

Similar Documents

Publication Publication Date Title
CN112214384A (en) Hard disk serial number management method, system, terminal and storage medium
CN111858468B (en) Method, system, terminal and storage medium for verifying metadata of distributed file system
CN111475106A (en) RAID customization creating method, system, terminal and storage medium
CN109684166A (en) Method, apparatus, terminal and the storage medium of automatic test Sensor log normalization
CN114281788A (en) BMC firmware data extraction method, device, terminal and storage medium
CN109918221B (en) Hard disk error reporting analysis method, system, terminal and storage medium
CN111258664B (en) Method, system, terminal and storage medium for completely acquiring memory serial number
CN111124772A (en) Cloud platform storage performance testing method, system, terminal and storage medium
CN112003730A (en) Method, system, terminal and storage medium for rapid cluster deployment
CN112486785B (en) Method, system, terminal and storage medium for positioning downtime phase of server
CN112463042B (en) Data volume import data verification method, device, terminal and storage medium
CN115359828A (en) Server firmware refreshing method, device, terminal and storage medium
CN114595089A (en) Hard disk remote diagnosis method, system, terminal and storage medium
CN115129249A (en) SAS link topology identification management method, system, terminal and storage medium
CN110703988B (en) Storage pool creating method, system, terminal and storage medium for distributed storage
CN110175096B (en) GPU (graphics processing Unit) pressurization test method, system, terminal and storage medium
CN112486717A (en) Method, system, terminal and storage medium for verifying consistency of disk data
CN111858590A (en) Storage system metadata organization method, system, terminal and storage medium
CN111694727A (en) Network card firmware upgrading and downgrading test method, system, terminal and storage medium
CN114238232B (en) Intelligent ammeter file reading and writing system, method, equipment and medium
CN111813679B (en) Method and device for executing test case based on python, electronic equipment and storage medium
CN112988250B (en) Multi-mainboard USB service configuration method, system, terminal and storage medium
CN112214167B (en) Spatial information management method, system, terminal and storage medium of solid state disk
CN112464499B (en) Nonvolatile chip erasing data checking method and device, storage medium and terminal
CN111475481A (en) HDFS resource permission testing method, system, terminal and storage medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210112