CN113687797B - Disk management method, system, storage medium and equipment - Google Patents

Disk management method, system, storage medium and equipment Download PDF

Info

Publication number
CN113687797B
CN113687797B CN202111246170.4A CN202111246170A CN113687797B CN 113687797 B CN113687797 B CN 113687797B CN 202111246170 A CN202111246170 A CN 202111246170A CN 113687797 B CN113687797 B CN 113687797B
Authority
CN
China
Prior art keywords
query list
serial number
disk
corresponding serial
storage system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111246170.4A
Other languages
Chinese (zh)
Other versions
CN113687797A (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.)
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 CN202111246170.4A priority Critical patent/CN113687797B/en
Publication of CN113687797A publication Critical patent/CN113687797A/en
Application granted granted Critical
Publication of CN113687797B publication Critical patent/CN113687797B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a disk management method, a system, a storage medium and a device, wherein the method comprises the following steps: acquiring drive letters and corresponding serial numbers of all disks in a storage system, and storing the drive letters and the corresponding serial numbers in a first query list; respectively acquiring the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system, sequentially acquiring the drive letter and corresponding serial number of each disk in each SAS card and storing the drive letter and corresponding serial number into a second query list; sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card and storing the drive letter and the corresponding serial number into a third query list; integrating the information in the second query list and the third query list into the first query list according to the serial numbers to find out the unidentified disks of the storage system, and marking the serial numbers of the unidentified disks to distinguish the disks; different patterns are respectively set on the interface for the distinguished unidentified disk and the identifiable disk for management. The invention realizes the comprehensive management of the disk.

Description

Disk management method, system, storage medium and equipment
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, a system, a storage medium, and a device for managing a disk.
Background
The distributed storage system dispersedly stores data on a plurality of independent devices, the traditional network storage system adopts a centralized storage server to store all data, the storage server becomes the bottleneck of the system performance, and is also the focus of reliability and safety, and the requirement of large-scale storage application cannot be met. The distributed network storage system adopts an expandable system structure, utilizes a plurality of storage servers to share the storage load, and utilizes the position server to position the storage information, thereby not only improving the reliability, the availability and the access efficiency of the system, but also being easy to expand.
At present, the types and the number of disks in a distributed storage system are more and more complex, the requirements on a management system of the disks are higher and higher, when an identifiable disk (with slot information) and an unidentifiable disk (without the slot information) exist in the system at the same time, the disk information is not completely acquired, the existing disk management system is single and chaotic in form, and simultaneously, the acquisition, the display and the management of all disk information of the system are lacked, so that the current complex disk management requirements of the system cannot be met.
Disclosure of Invention
In view of the above, the present invention provides a disk management method, system, storage medium and device, so as to solve the problem that the disk that cannot be identified by the storage system cannot be screened and managed in the prior art.
Based on the above purpose, the present invention provides a disk management method, which comprises the following steps:
acquiring drive letters and corresponding serial numbers of all disks in a storage system, and storing the drive letters and the corresponding serial numbers in a first query list;
respectively acquiring the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system, sequentially acquiring the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card, and storing the drive letter and the corresponding serial number into a second query list;
sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card and storing the drive letter and the corresponding serial number into a third query list;
integrating the information in the second query list and the third query list into the first query list according to the serial numbers, finding out the unidentified disks of the storage system based on the integrated first query list, and marking the serial numbers of the unidentified disks to distinguish the unidentified disks from the rest identifiable disks in the integrated first query list;
and respectively setting different patterns for the distinguished unidentified disk and the identifiable disk on an interface of the storage system for management.
In some embodiments, integrating information in the second query list and the third query list into the first query list according to the sequence number comprises:
searching the same serial number in the second query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the second query list to the first query list;
and searching the same serial number in the third query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the third query list to the first query list.
In some embodiments, finding disks not identified by the storage system based on the integrated first query list comprises:
and taking the disk corresponding to the serial number which does not exist in the second query list and the third query list as the disk which is not identified by the storage system.
In some embodiments, obtaining drive signatures and corresponding serial numbers of all disks in the storage system comprises:
and acquiring the drive letter and the corresponding serial number of all the disks in the storage system by using the ls tool and the smartcll tool.
In some embodiments, the obtaining the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system respectively includes:
and respectively acquiring the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system by using an lspci tool.
In some embodiments, sequentially obtaining the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card and storing the drive letter and the corresponding serial number in the second query list includes:
and sequentially acquiring the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card by using the SAS2IRCU tool or the SAS3IRCU tool, and storing the drive letter and the corresponding serial number into a second query list.
In some embodiments, sequentially obtaining the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card and storing them in the third query list includes:
and sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card by using a storcli64 tool, and storing the drive letter and the corresponding serial number into a third query list.
In another aspect of the present invention, a disk management system is further provided, including:
the first query list module is configured to acquire the drive identifiers and corresponding serial numbers of all the disks in the storage system and store the drive identifiers and the corresponding serial numbers in a first query list;
the second query list module is configured to respectively acquire names and corresponding serial numbers of all SAS cards and names and corresponding serial numbers of all RAID cards in the storage system, sequentially acquire drive symbols and corresponding serial numbers of all disks in each SAS card according to the serial numbers of all SAS cards and store the drive symbols and the corresponding serial numbers in a second query list;
the third query list module is configured and used for sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card and storing the drive letter and the corresponding serial number into a third query list;
the integration module is configured to integrate information in the second query list and the third query list into the first query list according to the serial numbers, to find out the unidentified disks of the storage system based on the integrated first query list, and to distinguish the unidentified disks from the rest identifiable disks in the integrated first query list by marking the serial numbers of the unidentified disks; and
and the disk management module is configured to set different styles for the distinguished unidentified disk and the distinguished disk respectively on an interface of the storage system so as to manage the identified disk and the distinguished disk.
In yet another aspect of the present invention, a computer-readable storage medium is also provided, storing computer program instructions, which when executed by a processor, implement the above-described method.
In yet another aspect of the present invention, a computer device is further provided, which includes a memory and a processor, the memory storing a computer program, which when executed by the processor performs the above method.
The invention has at least the following beneficial technical effects:
the method comprises the steps of obtaining the drive symbols and the serial numbers of all disks in a storage system, storing the drive symbols and the serial numbers of the disks belonging to an SAS card in the storage system into a first query list, obtaining the drive symbols and the serial numbers of the disks belonging to an RAID card in the storage system, storing the drive symbols and the serial numbers of the disks belonging to the SAS card into a second query list, obtaining the drive symbols and the serial numbers of the disks belonging to the RAID card, and storing the drive symbols and the serial numbers of the disks belonging to the RAID card into a third query list, so that identifiable disks and unidentifiable disks in the storage system are completely obtained; the second query list and the third query list are integrated into the first query list according to the serial number of the disk, so that the disk which cannot be identified by the storage system can be found out; the recognizable disk and the unrecognizable disk of the storage system can be directly distinguished conveniently by marking the serial number of the unrecognizable disk; the identifiable disks and the unidentifiable disks are classified, arranged and displayed on the storage system interface, so that the disks can be comprehensively managed.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of a disk management method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a disk management system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer-readable storage medium for implementing a disk management method according to an embodiment of the present invention;
fig. 4 is a schematic hardware structure diagram of a computer device for executing a disk management method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two non-identical entities with the same name or different parameters, and it is understood that "first" and "second" are only used for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements does not include all of the other steps or elements inherent in the list.
In view of the foregoing, a first aspect of the embodiments of the present invention provides an embodiment of a disk management method. Fig. 1 is a schematic diagram illustrating an embodiment of a disk management method provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, acquiring drive symbols and corresponding serial numbers of all disks in the storage system, and storing the drive symbols and the corresponding serial numbers in a first query list;
step S20, respectively acquiring names and corresponding serial numbers of all SAS cards and names and corresponding serial numbers of all RAID cards in the storage system, and sequentially acquiring drive symbols and corresponding serial numbers of all disks in each SAS card according to the serial numbers of all SAS cards and storing the drive symbols and the corresponding serial numbers in a second query list;
step S30, acquiring the drive letter and the corresponding serial number of each disk in each RAID card in turn according to the serial number of each RAID card, and storing the drive letter and the corresponding serial number into a third query list;
step S40, information in the second query list and the third query list is integrated into the first query list according to the serial numbers, discs which are not identified by the storage system are found out based on the integrated first query list, and the serial numbers of the discs which are not identified are marked to be distinguished from other identifiable discs in the integrated first query list;
and step S50, setting different styles for the distinguished unidentified disk and the identifiable disk on the interface of the storage system for management.
In the embodiment of the present invention, different patterns are respectively set for the distinguished unidentified disk and the distinguished disk on the interface of the storage system for management, and specifically, the method includes: two information interface display modes are constructed in an interface, the first mode is that a system cluster diagram with an equipment physical view is constructed aiming at an identifiable disk of a storage system, and functions of disk replacement, capacity expansion and contraction, disk positioning and the like are integrated in the interface to form an integrated disk management interface; and another loose interface display form is constructed aiming at the unidentifiable disk (namely the unidentified disk) of the storage system, and is displayed from the topological form of cluster-node-disk information, and the loose disk information display interface does not support the functions of disk replacement, capacity expansion, disk positioning and the like. The cluster disk information can be comprehensively classified and displayed by setting two different forms of reconstructed disk information interface display, so that the defect of the conventional classification management of unrecognizable disks in a storage system is overcome; the functions of disk management are integrated according to the characteristics of the identifiable disks and the unrecognizable disks, so that the functions are not influenced mutually, and the centralized classified management of the disks is realized.
RAID (Redundant Array of Independent Disks) is a technique that combines a plurality of Independent hard Disks (physical hard Disks) in different ways to form a hard disk group (logical hard disk), thereby providing higher storage performance than a single hard disk and providing data redundancy. The RAID card can support SAS and SATA hard disks to form RAID6\5\3\1\0\10 and the like.
SAS cards, also known as disk array cards, are used for RAID. The system is generally supported to be RAID0\1\10\1E or directly identify SAS hard disks, and is compatible with SATA hard disks (serial hard disks). Sas (serial Attached SCSI), which is a serial Attached SCSI, is a new generation of SCSI technology, and like the popular SATA hard disk, serial technology is used to obtain higher transmission speed and improve internal space by shortening connection lines. SAS is a completely new interface developed after parallel SCSI interfaces, which are designed to improve the performance, availability and scalability of storage systems and to provide compatibility with SATA hard disks.
In the embodiment of the invention, the drive symbols and the serial numbers of all the disks in the storage system are obtained and stored in the first query list, the drive symbols and the serial numbers of the disks belonging to the SAS card in the storage system are obtained and stored in the second query list, and the drive symbols and the serial numbers of the disks belonging to the RAID card are obtained and stored in the third query list, so that the identifiable disks and the unidentifiable disks in the storage system are completely obtained; the second query list and the third query list are integrated into the first query list according to the serial number of the disk, so that the disk which cannot be identified by the storage system can be found out; the recognizable disk and the unrecognizable disk of the storage system can be directly distinguished conveniently by marking the serial number of the unrecognizable disk; the identifiable disks and the unidentifiable disks are classified, arranged and displayed on the storage system interface, so that the disks can be comprehensively managed.
In some embodiments, integrating information in the second query list and the third query list into the first query list according to the sequence number comprises: searching the same serial number in the second query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the second query list to the first query list; and searching the same serial number in the third query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the third query list to the first query list.
In some embodiments, finding disks not identified by the storage system based on the integrated first query list comprises: and taking the disk corresponding to the serial number which does not exist in the second query list and the third query list as the disk which is not identified by the storage system.
In the above embodiment, after the second query list and the third query list are integrated into the first query list according to the serial number, the recognizable disk and the unrecognizable disk of the storage system may be distinguished by querying the slot information. Specifically, if the serial number does not have corresponding slot position information in the integrated first query list, the disk corresponding to the serial number is an unidentifiable disk of the storage system; correspondingly, if some serial numbers in the integrated first query list have corresponding slot position information, the disks corresponding to the serial numbers are identifiable disks of the storage system. For the unidentifiable disk without the slot position information, the functions of disk replacement, capacity expansion, disk positioning and the like are not arranged on the system interface.
In some embodiments, obtaining drive signatures and corresponding serial numbers of all disks in the storage system comprises: and acquiring the drive letter and the corresponding serial number of all the disks in the storage system by using the ls tool and the smartcll tool.
In this embodiment, ls represents a file list generator, and is an auxiliary tool for generating a file list, which can help a user to easily and conveniently generate a file list, and files on a disk can be organized into a web list by using the tool.
Smartctl (s.m.a.r.t. self-monitoring, analysis and reporting technology) is a suite or tool of command lines implementing SMART tasks under Unix-like systems that is used to print SMART self-tests and error logs, enable and disable SMART automatic detection, and initialize device self-tests. Smartctl is useful for Linux physical servers where intelligent disks can be error checked and disk information related to hardware RAID extracted.
In some embodiments, the obtaining the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system respectively includes: and respectively acquiring the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system by using an lspci tool.
In this embodiment, the lspci (list all PCI devices in the machine) tool may assist in listing RAID cards, SAS cards, sound cards, video cards, modems, network cards, USB, motherboard integrated devices, and the like in the machine. PCI devices refer to devices that are plugged into these PCI slots. The PCI slot is an expansion slot based on a PCI local bus (Peripheral Component interface).
In some embodiments, sequentially obtaining the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card and storing the drive letter and the corresponding serial number in the second query list includes: and sequentially acquiring the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card by using the SAS2IRCU tool or the SAS3IRCU tool, and storing the drive letter and the corresponding serial number into a second query list.
In this embodiment, both the SAS2IRCU tool and the SAS3IRCU tool are SAS card management tools provided by LSI corporation officially, and acquire information of a required SAS card in a command line control manner.
In some embodiments, sequentially obtaining the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card and storing them in the third query list includes: and sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card by using a storcli64 tool, and storing the drive letter and the corresponding serial number into a third query list.
In this embodiment, storcli64 is a RAID card management tool provided by an LSI company official, and information of a required RAID card can be acquired by a different command.
In a second aspect of the embodiments of the present invention, a disk management system is further provided. Fig. 2 is a schematic diagram illustrating an embodiment of a disk management system provided in the present invention. As shown in fig. 2, a disk management system includes: a first query list module 10 configured to obtain drive identifiers and corresponding serial numbers of all disks in the storage system, and store the drive identifiers and the corresponding serial numbers in a first query list; the second query list module 20 is configured to obtain names and corresponding serial numbers of all SAS cards and names and corresponding serial numbers of all RAID cards in the storage system, and sequentially obtain drive symbols and corresponding serial numbers of each disk in each SAS card according to the serial numbers of each SAS card and store the drive symbols and the corresponding serial numbers in the second query list; the third query list module 30 is configured to sequentially obtain the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card, and store the drive letter and the corresponding serial number in the third query list; the integration module 40 is configured to integrate information in the second query list and the third query list into the first query list according to the serial number, to find out the disk that is not identified by the storage system based on the integrated first query list, and to distinguish the disk from the remaining identifiable disks in the integrated first query list by marking the serial number of the disk that is not identified; and a disk management module 50 configured to set different patterns for the distinguished unrecognized disk and the distinguished disk on an interface of the storage system, respectively, to perform management.
In some embodiments, the integration module 40 includes an information integration module configured to search for the same serial number in the second query list as in the first query list, and add information that does not exist in the first query list corresponding to the serial number in the second query list to the first query list; and searching the same serial number in the third query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the third query list to the first query list.
In some embodiments, the integration module 40 further includes an identification module configured to use the disk corresponding to the serial number that is not present in the second query list and the third query list as the disk that is not identified by the storage system.
In some embodiments, the first query list module 10 includes a first obtaining module configured to obtain drive letters and corresponding serial numbers of all disks in the storage system by using the ls tool and the smartclt tool.
In some embodiments, the second lookup list module 20 includes a second obtaining module configured to obtain names and corresponding serial numbers of all SAS cards and names and corresponding serial numbers of all RAID cards in the storage system, respectively, using an lspci tool.
In some embodiments, the second query list module 20 further includes a third obtaining module configured to sequentially obtain, by using the SAS2IRCU tool or the SAS3IRCU tool, the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card, and store the drive letter and the corresponding serial number in the second query list.
In some embodiments, the third query list module 30 includes a fourth obtaining module configured to sequentially obtain the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card by using the storcli64 tool, and store the drive letter and the corresponding serial number in the third query list.
In a third aspect of the embodiment of the present invention, a computer-readable storage medium is further provided, and fig. 3 illustrates a schematic diagram of a computer-readable storage medium implementing a disk management method according to an embodiment of the present invention. As shown in fig. 3, the computer-readable storage medium 3 stores computer program instructions 31. The computer program instructions 31, when executed by a processor, implement the method of any of the embodiments described above.
It is to be understood that all embodiments, features and advantages set forth above with respect to the disk management method according to the present invention apply equally, without conflict with one another, to the disk management system and to the storage medium according to the present invention.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer device, including a memory 402 and a processor 401 as shown in fig. 4, where the memory 402 stores therein a computer program, and the computer program, when executed by the processor 401, implements the method of any one of the above embodiments.
Fig. 4 is a schematic hardware structure diagram of an embodiment of a computer device for executing a disk management method according to the present invention. Taking the computer device shown in fig. 4 as an example, the computer device includes a processor 401 and a memory 402, and may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus. The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the disk management system. The output device 404 may include a display device such as a display screen.
The memory 402, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the disk management method in the embodiment of the present application. The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of a disk management method, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications of the server and data processing by running nonvolatile software programs, instructions, and modules stored in the memory 402, that is, implements the disk management method of the above-described method embodiment.
Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. 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 disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (8)

1. A disk management method is characterized by comprising the following steps:
acquiring drive letters and corresponding serial numbers of all disks in a storage system, and storing the drive letters and the corresponding serial numbers in a first query list;
respectively acquiring the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system, sequentially acquiring the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card, and storing the drive letter and the corresponding serial number into a second query list;
sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card and storing the drive letter and the corresponding serial number into a third query list;
integrating information in the second query list and the third query list into the first query list according to the serial number to find out the disks not identified by the storage system based on the integrated first query list, further comprising:
searching the same serial number in the second query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the second query list to the first query list;
searching the third query list for the same serial number as that in the first query list, and adding information which is not in the first query list and corresponds to the serial number in the third query list to the first query list; and
taking the disk corresponding to the serial number which does not exist in the second query list and the third query list as the disk which is not identified by the storage system;
the serial number of the unidentified disk is marked to be distinguished from other identifiable disks in the integrated first query list;
and respectively setting different patterns for the distinguished unidentified disk and the distinguished disk on an interface of the storage system for management.
2. The method of claim 1, wherein obtaining drive signatures and corresponding sequence numbers for all disks in the storage system comprises:
and acquiring the drive letter and the corresponding serial number of all the disks in the storage system by using the ls tool and the smartcll tool.
3. The method of claim 1, wherein obtaining the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system respectively comprises:
and respectively acquiring the names and corresponding serial numbers of all SAS cards and the names and corresponding serial numbers of all RAID cards in the storage system by using an lspci tool.
4. The method of claim 1, wherein the obtaining the drive letter and the corresponding serial number of each disk in each SAS card in sequence according to the serial number of each SAS card and storing the drive letter and the corresponding serial number in the second query list comprises:
and sequentially acquiring the drive letter and the corresponding serial number of each disk in each SAS card according to the serial number of each SAS card by using the SAS2IRCU tool or the SAS3IRCU tool, and storing the drive letter and the corresponding serial number into a second query list.
5. The method of claim 1, wherein obtaining the drive letter and the corresponding serial number of each disk in each RAID card in sequence according to the serial number of each RAID card and storing them in the third lookup list comprises:
and sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card by using a storcli64 tool, and storing the drive letter and the corresponding serial number into a third query list.
6. A disk management system, comprising:
the first query list module is configured to acquire the drive identifiers and corresponding serial numbers of all the disks in the storage system and store the drive identifiers and the corresponding serial numbers in a first query list;
the second query list module is configured to respectively acquire names and corresponding serial numbers of all SAS cards and names and corresponding serial numbers of all RAID cards in the storage system, sequentially acquire drive symbols and corresponding serial numbers of all disks in each SAS card according to the serial numbers of all SAS cards and store the drive symbols and the corresponding serial numbers in a second query list;
the third query list module is configured and used for sequentially acquiring the drive letter and the corresponding serial number of each disk in each RAID card according to the serial number of each RAID card and storing the drive letter and the corresponding serial number into a third query list;
an integration module configured to integrate information in the second query list and the third query list into the first query list according to a serial number, so as to find out a disk that is not identified by the storage system based on the integrated first query list, further comprising:
searching the same serial number in the second query list and the first query list, and adding information which is not in the first query list and corresponds to the serial number in the second query list to the first query list;
searching the third query list for the same serial number as that in the first query list, and adding information which is not in the first query list and corresponds to the serial number in the third query list to the first query list; and
taking the disk corresponding to the serial number which does not exist in the second query list and the third query list as the disk which is not identified by the storage system;
marking the serial number of the unidentified disk to distinguish the serial number from other identifiable disks in the integrated first query list; and
and the disk management module is configured to set different styles for the distinguished unidentified disk and the distinguished disk respectively on an interface of the storage system for management.
7. A computer-readable storage medium, characterized in that computer program instructions are stored which, when executed by a processor, implement the method according to any one of claims 1-5.
8. A computer device comprising a memory and a processor, characterized in that the memory has stored therein a computer program which, when executed by the processor, performs the method according to any one of claims 1-5.
CN202111246170.4A 2021-10-25 2021-10-25 Disk management method, system, storage medium and equipment Active CN113687797B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111246170.4A CN113687797B (en) 2021-10-25 2021-10-25 Disk management method, system, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111246170.4A CN113687797B (en) 2021-10-25 2021-10-25 Disk management method, system, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN113687797A CN113687797A (en) 2021-11-23
CN113687797B true CN113687797B (en) 2022-02-22

Family

ID=78587971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111246170.4A Active CN113687797B (en) 2021-10-25 2021-10-25 Disk management method, system, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113687797B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691052B (en) * 2022-05-31 2022-10-14 杭州沃趣科技股份有限公司 Method and device for replacing magnetic disk, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101180638A (en) * 2002-07-01 2008-05-14 汤姆森许可贸易公司 Heterogeneous disk storage management techique
US10055138B1 (en) * 2015-10-01 2018-08-21 EMC IP Holding Company LLC Topology aware I/O scheduling for RAID storage systems
CN110413463A (en) * 2019-06-29 2019-11-05 苏州浪潮智能科技有限公司 A kind of SMART information inspection method of hard disk

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101180638A (en) * 2002-07-01 2008-05-14 汤姆森许可贸易公司 Heterogeneous disk storage management techique
US10055138B1 (en) * 2015-10-01 2018-08-21 EMC IP Holding Company LLC Topology aware I/O scheduling for RAID storage systems
CN110413463A (en) * 2019-06-29 2019-11-05 苏州浪潮智能科技有限公司 A kind of SMART information inspection method of hard disk

Also Published As

Publication number Publication date
CN113687797A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN111258722B (en) Cluster log acquisition method, system, equipment and medium
CN103095687B (en) metadata processing method and device
CN112099800B (en) Code data processing method, device and server
JP6097880B2 (en) Byzantine fault tolerance data replication method and system
CN104246767A (en) Telemetry system for a cloud synchronization system
CN110781231A (en) Batch import method, device, equipment and storage medium based on database
CN108628885B (en) Data synchronization method and device and storage equipment
CN103049355B (en) Method and equipment for database system recovery
CN111680489B (en) Target text matching method and device, storage medium and electronic equipment
CN113687797B (en) Disk management method, system, storage medium and equipment
CN115237444A (en) Concurrent control method, device and equipment based on version number and storage medium
CN109522311B (en) Data storage method, device, server and storage medium
CN112463880B (en) Block chain data storage method and related device
CN112631833A (en) Data archiving and querying method, system, storage medium and equipment
CN112714022A (en) Control processing method and device for multiple clusters and computer equipment
CN102792281A (en) Storage device
KR20150139546A (en) Removable storage device identity and configuration information
CN113282347B (en) Plug-in operation method, device, equipment and storage medium
CN113590380A (en) Database recovery method and system
CN108959604B (en) Method, apparatus and computer readable storage medium for maintaining database cluster
CN106993036B (en) Running environment information processing method and switch
CN112738157A (en) File uploading method, system and equipment
CN111241099A (en) Industrial big data storage method and device
CN114816266B (en) Metadata restoration method, system, storage medium and device
CN110874371B (en) Data analysis system, method and device

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