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
disk
serial number
disks
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

本发明提供了一种磁盘管理方法、系统、存储介质及设备,方法包括:获取存储系统中所有磁盘的盘符和相应的序列号,并将其存放至第一查询列表;分别获取存储系统中所有SAS卡的名称和相应的序号以及所有RAID卡的名称和相应的序号,并依次获取每个SAS卡中各磁盘的盘符和相应的序列号且将其存放至第二查询列表;依次获取每个RAID卡中各磁盘的盘符和相应的序列号且将其存放至第三查询列表;根据序列号将第二查询列表和第三查询列表中的信息整合至第一查询列表,以查找出存储系统未识别的磁盘,并对未识别的磁盘的序列号做标记以对磁盘进行区分;在界面上针对区分后的未识别磁盘和可识别磁盘分别设置不同的样式以进行管理。本发明实现了对磁盘的全面管理。

Figure 202111246170

The present invention provides a disk management method, system, storage medium and device. The method includes: acquiring the drive letters and corresponding serial numbers of all disks in the storage system, and storing them in a first query list; Names and corresponding serial numbers of all SAS cards and names and corresponding serial numbers of all RAID cards, and sequentially obtain the drive letter and corresponding serial number of each disk in each SAS card and store them in the second query list; obtain in turn The drive letter and corresponding serial number of each disk in each RAID card are stored in the third lookup list; the information in the second lookup list and the third lookup list is integrated into the first lookup list according to the serial number to find The disks that are not recognized by the storage system are displayed, and the serial numbers of the unrecognized disks are marked to distinguish the disks; on the interface, different styles are set for the distinguished unrecognized disks and identifiable disks for management. The present invention realizes the overall management of the disk.

Figure 202111246170

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.一种磁盘管理方法,其特征在于,包括以下步骤:1. a disk management method, is characterized in that, comprises the following steps: 获取存储系统中所有磁盘的盘符和相应的序列号,并将其存放至第一查询列表;Obtain the drive letters and corresponding serial numbers of all disks in the storage system, and store them in the first query list; 分别获取所述存储系统中所有SAS卡的名称和相应的序号以及所有RAID卡的名称和相应的序号,并按照各SAS卡的序号依次获取每个SAS卡中各磁盘的盘符和相应的序列号且将其存放至第二查询列表;Obtain the names and corresponding serial numbers of all SAS cards in the storage system and the names and corresponding serial numbers of all RAID cards respectively, and sequentially obtain the drive letter and corresponding serial number of each disk in each SAS card according to the serial number of each SAS card number and store it in the second query list; 按照各RAID卡的序号依次获取每个RAID卡中各磁盘的盘符和相应的序列号且将其存放至第三查询列表;Acquire the drive letter and corresponding serial number of each disk in each RAID card in turn according to the serial number of each RAID card, and store them in the third query list; 根据序列号将所述第二查询列表和第三查询列表中的信息整合至所述第一查询列表,以基于所述整合后的第一查询列表查找出所述存储系统未识别的磁盘,其进一步包括:The information in the second query list and the third query list is integrated into the first query list according to the serial number, so as to find out the disks that are not recognized by the storage system based on the integrated first query list. Further includes: 查找所述第二查询列表与所述第一查询列表中相同的序列号,并将所述第二查询列表中所述序列号对应的不存在于所述第一查询列表中的信息添加至所述第一查询列表中;Find the same sequence number in the second query list as in the first query list, and add the information corresponding to the sequence number in the second query list that does not exist in the first query list to the in the first query list; 查找所述第三查询列表与所述第一查询列表中相同的序列号,并将所述第三查询列表中所述序列号对应的不存在于所述第一查询列表中的信息添加至所述第一查询列表中;以及Find the same sequence number in the third query list as the first query list, and add the information corresponding to the sequence number in the third query list that does not exist in the first query list to the in the first query list described above; and 将未存在于所述第二查询列表和第三查询列表中的序列号对应的磁盘作为所述存储系统未识别的磁盘;Taking the disk corresponding to the serial number that does not exist in the second query list and the third query list as the disk not recognized by the storage system; 通过对所述未识别的磁盘的序列号做标记以将其与所述整合后的第一查询列表中其余可识别的磁盘进行区分;by marking the serial number of the unidentified disk to distinguish it from the remaining identifiable disks in the integrated first lookup list; 在所述存储系统的界面上针对区分后的所述未识别的磁盘和所述可识别的磁盘分别设置不同的样式以进行管理。On the interface of the storage system, different styles are respectively set for the discriminated unidentified disks and the identifiable disks for management. 2.根据权利要求1所述的方法,其特征在于,获取存储系统中所有磁盘的盘符和相应的序列号包括:2. The method according to claim 1, wherein obtaining the drive letters and corresponding serial numbers of all disks in the storage system comprises: 利用ls工具和smartctl工具获取存储系统中所有磁盘的盘符和相应的序列号。Use the ls tool and the smartctl tool to obtain the drive letters and corresponding serial numbers of all disks in the storage system. 3.根据权利要求1所述的方法,其特征在于,分别获取所述存储系统中所有SAS卡的名称和相应的序号以及所有RAID卡的名称和相应的序号包括:3. The method according to claim 1, wherein obtaining the names and corresponding serial numbers of all SAS cards in the storage system and the names and corresponding serial numbers of all RAID cards respectively comprises: 利用lspci工具分别获取所述存储系统中所有SAS卡的名称和相应的序号以及所有RAID卡的名称和相应的序号。Use the lspci tool to obtain 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. 4.根据权利要求1所述的方法,其特征在于,按照各SAS卡的序号依次获取每个SAS卡中各磁盘的盘符和相应的序列号且将其存放至第二查询列表包括:4. method according to claim 1, is characterized in that, according to the serial number of each SAS card, obtain the drive letter and corresponding serial number of each disk in each SAS card successively and store it in the second query list comprising: 利用SAS2IRCU工具或SAS3IRCU工具按照各SAS卡的序号依次获取每个SAS卡中各磁盘的盘符和相应的序列号且将其存放至第二查询列表。Use the SAS2IRCU tool or the SAS3IRCU tool to sequentially obtain the drive letter and corresponding serial number of each disk in each SAS card according to the serial number of each SAS card, and store them in the second query list. 5.根据权利要求1所述的方法,其特征在于,按照各RAID卡的序号依次获取每个RAID卡中各磁盘的盘符和相应的序列号且将其存放至第三查询列表包括:5. The method according to claim 1, wherein 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 comprises: 利用storcli64工具按照各RAID卡的序号依次获取每个RAID卡中各磁盘的盘符和相应的序列号且将其存放至第三查询列表。Use the storcli64 tool to sequentially obtain the drive letter and corresponding serial number of each disk in each RAID card according to the serial number of each RAID card, and store them in the third query list. 6.一种磁盘管理系统,其特征在于,包括:6. A disk management system, comprising: 第一查询列表模块,配置用于获取存储系统中所有磁盘的盘符和相应的序列号,并将其存放至第一查询列表;The first query list module is configured to obtain the drive letters and corresponding serial numbers of all disks in the storage system, and store them in the first query list; 第二查询列表模块,配置用于分别获取所述存储系统中所有SAS卡的名称和相应的序号以及所有RAID卡的名称和相应的序号,并按照各SAS卡的序号依次获取每个SAS卡中各磁盘的盘符和相应的序列号且将其存放至第二查询列表;The second query list module is configured to obtain the names and corresponding serial numbers of all SAS cards in the storage system and the names and corresponding serial numbers of all RAID cards respectively, and sequentially obtain the names and corresponding serial numbers of each SAS card according to the serial number of each SAS card. The drive letter and corresponding serial number of each disk are stored in the second query list; 第三查询列表模块,配置用于按照各RAID卡的序号依次获取每个RAID卡中各磁盘的盘符和相应的序列号且将其存放至第三查询列表;The third query list module 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 them in the third query list; 整合模块,配置用于根据序列号将所述第二查询列表和第三查询列表中的信息整合至所述第一查询列表,以基于所述整合后的第一查询列表查找出所述存储系统未识别的磁盘,其进一步包括:an integration module, configured to integrate the information in the second query list and the third query list into the first query list according to the serial number, so as to find the storage system based on the integrated first query list Unidentified disks, which further include: 查找所述第二查询列表与所述第一查询列表中相同的序列号,并将所述第二查询列表中所述序列号对应的不存在于所述第一查询列表中的信息添加至所述第一查询列表中;Find the same sequence number in the second query list as in the first query list, and add the information corresponding to the sequence number in the second query list that does not exist in the first query list to the in the first query list; 查找所述第三查询列表与所述第一查询列表中相同的序列号,并将所述第三查询列表中所述序列号对应的不存在于所述第一查询列表中的信息添加至所述第一查询列表中;以及Find the same sequence number in the third query list as the first query list, and add the information corresponding to the sequence number in the third query list that does not exist in the first query list to the in the first query list described above; and 将未存在于所述第二查询列表和第三查询列表中的序列号对应的磁盘作为所述存储系统未识别的磁盘;Taking the disk corresponding to the serial number that does not exist in the second query list and the third query list as the disk not recognized by the storage system; 并通过对所述未识别的磁盘的序列号做标记以将其与所述整合后的第一查询列表中其余可识别的磁盘进行区分;以及and by marking the serial number of the unidentified disk to distinguish it from the remaining identifiable disks in the integrated first lookup list; and 磁盘管理模块,配置用于在所述存储系统的界面上针对区分后的所述未识别的磁盘和所述可识别的磁盘分别设置不同的样式以进行管理。The disk management module is configured to set different styles on the interface of the storage system for the differentiated unidentified disks and the identifiable disks for management. 7.一种计算机可读存储介质,其特征在于,存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如权利要求1-5任意一项所述的方法。7. A computer-readable storage medium, characterized in that it stores computer program instructions, which implement the method according to any one of claims 1-5 when the computer program instructions are executed by a processor. 8.一种计算机设备,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述计算机程序被所述处理器执行时执行如权利要求1-5任意一项所述的方法。8. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the computer program according to any one of claims 1-5 is executed. method.
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 method for checking SMART information 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 method for checking SMART information of hard disk

Also Published As

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

Similar Documents

Publication Publication Date Title
US20170279840A1 (en) Automated event id field analysis on heterogeneous logs
CN112099800B (en) Code data processing method, device and server
CN104246767A (en) Telemetry system for cloud synchronization system
CN108628885B (en) Data synchronization method and device and storage equipment
CN113687797B (en) Disk management method, system, storage medium and equipment
CN109522311B (en) Data storage method, device, server and storage medium
CN109299116B (en) A data synchronization method, apparatus, device and readable storage medium
CN112347040A (en) File management method, device, storage medium and terminal
CN110019017B (en) High-energy physical file storage method based on access characteristics
CN105765570B (en) Music recognition
CN112631833A (en) Data archiving and querying method, system, storage medium and equipment
CN112596968A (en) IIC topology checking method, IIC topology checking device and storage medium
CN110674008B (en) Method, device, device and medium for collecting log information of problem disks of SSD
CN115237444A (en) Concurrent control method, device and equipment based on version number and storage medium
CN104424316A (en) Data storage method, data searching method, related device and system
CN113282347A (en) Plug-in operation method, device, equipment and storage medium
CN108052654A (en) Data extraction method, device, equipment and storage medium
CN110879900A (en) A data processing method and device based on a blockchain system
US10042957B2 (en) Devices and methods for implementing dynamic collaborative workflow systems
US20150172131A1 (en) Method and system for verifying quality of server
CN113590380A (en) Database recovery method and system
CN106993036B (en) Running environment information processing method and switch
CN111163151A (en) Information processing method and device and computer readable storage medium
CN116932555B (en) Target object slice position determining method, device, equipment and storage medium
US20190370259A1 (en) Devices and methods for implementing dynamic collaborative workflow systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant