WO2021259058A1 - 存储盘检测方法、装置、终端设备和存储介质 - Google Patents

存储盘检测方法、装置、终端设备和存储介质 Download PDF

Info

Publication number
WO2021259058A1
WO2021259058A1 PCT/CN2021/098749 CN2021098749W WO2021259058A1 WO 2021259058 A1 WO2021259058 A1 WO 2021259058A1 CN 2021098749 W CN2021098749 W CN 2021098749W WO 2021259058 A1 WO2021259058 A1 WO 2021259058A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage disk
storage
target
current state
disks
Prior art date
Application number
PCT/CN2021/098749
Other languages
English (en)
French (fr)
Inventor
李军
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021259058A1 publication Critical patent/WO2021259058A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • 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
    • 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

Definitions

  • the embodiments of the present application relate to but not limited to the field of computer technology, and specifically relate to but not limited to a storage disk detection method, device, terminal device, and storage medium.
  • the hardware design of the computer system is related to the upgrade and application direction of the CPU (central processing unit).
  • the general design plan is: design a motherboard for a certain type of application computer system of a certain generation of CPU.
  • the storage system can be configured with different types and quantities of RAID (Redundant Arrays of Independent Disks) cards/HBA (Host Bus Adapter) cards, different numbers of hard disks, and different types and numbers of backplanes to meet various requirements. Specific needs.
  • the storage system configuration is very flexible, which makes it difficult for a set of computer management software to identify the physical location of the hard disks of various storage systems in the computer system, especially when the connection changes, RAID After the firmware upgrade of the card/HBA card, etc., it is very likely that the recognition error will be caused.
  • the storage disk detection method, device, terminal device, and storage medium provided in the embodiments of the present application mainly solve the technical problem that the physical location of the storage disk is difficult to identify, especially the problem that it cannot be accurately identified when the system structure changes.
  • the embodiment of the present application provides a storage disk detection method, including: controlling the current state of the target storage disk corresponding to the preset position parameter in each storage disk, which is different from the current state of other storage disks; reading each of the storage disks Determine the mapping relationship between the preset position parameter of the target storage disk and the target position parameter based on the current state of each storage disk; wherein, the target position parameter includes a physical position or a logical index.
  • the embodiment of the application also provides a storage disk detection device, including: a status control module, a status reading module, and a parameter identification module; the status control module is used to control the target corresponding to the preset position parameter in each storage disk The current status of the storage disk is different from the current status of other storage disks; the status reading module is used to read the current status of each storage disk; the parameter identification module is used to read the current status of each storage disk In the current state, the mapping relationship between the preset position parameter of the target storage disk and the target position parameter is determined; wherein, the target position parameter includes a physical position or a logical index.
  • An embodiment of the present application also provides a terminal device.
  • the terminal includes a processor, a memory, and a communication bus; the communication bus is used to implement connection and communication between the processor and the memory; and the processor is used to execute data stored in the memory.
  • the embodiment of the present application also provides a computer storage medium.
  • the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the above-mentioned storage disk detection method. .
  • Figure 1 is a schematic diagram of the computer system composition of each embodiment of the application.
  • FIG. 2 is a flowchart of a storage disk detection method provided by Embodiment 1 of this application;
  • FIG. 3 is a flowchart of the storage disk detection method provided in the second embodiment of the application.
  • FIG. 4 is a schematic diagram of the composition of the computer system provided in the second embodiment of the application.
  • FIG. 5 is a flowchart of a storage disk detection method provided in Embodiment 3 of this application.
  • FIG. 6 is a schematic diagram of the composition of the computer system provided in the third embodiment of the application.
  • FIG. 7 is a schematic diagram of the composition of the storage disk detection device provided in the fourth embodiment of the application.
  • FIG. 8 is a schematic diagram of the composition of a terminal device provided in Embodiment 5 of this application.
  • Figure 1 shows a storage system design of a computer system, in which a PCIe (peripheral component interconnect express, peripheral component interconnection standard) connection is adopted between the CPU and the RAID card/HBA card; the RAID card/HBA card Use a cable to connect to the backplane where it is located (for example, SAS (Serial Attached SCSI, Serial Attached Small Computer System Interface) cable); the hard disk is inserted into the slot on the backplane.
  • the PCIe RAID card/HBA card model and quantity may be different; the hard disk backplane design may be different; the wiring between the RAID card/HBA card and the hard disk backplane may be different.
  • This embodiment provides a storage disk detection method. Please refer to FIG. 2.
  • the method includes:
  • S203 Based on the current state of each storage disk, determine the mapping relationship between the preset position parameter of the target storage disk and the target position parameter; wherein the target position parameter includes a physical position or a logical index.
  • the storage disk in this embodiment refers to a memory used to store data.
  • the storage disk is the main storage medium of the computer, which can store a large amount of binary data, and can keep the data from being lost even after the power is off.
  • the storage disks used in early computers were floppy disks (Floppy Disks for short).
  • the commonly used storage disks are hard disks (Hard disks for short) and SSDs (Solid State Disk or Solid State Drive, commonly known as solid state drives).
  • the storage disk referred to may be a floppy disk, a hard disk, or an SSD.
  • step S201 the current state of the target storage disk corresponding to the preset position parameter in each storage disk is controlled, which is different from the current state of other storage disks.
  • the preset position parameter is known, and the preset position parameter is known according to the preset position.
  • the type of the preset location parameter may include the logical index of the storage disk, or the physical location of the storage disk.
  • the current state is used to identify the difference between the storage disk and the storage disk, and the difference is a substantial physical difference.
  • the current state of the control target storage disk is different from the current state of other storage disks. This control method is to distinguish the current state of the storage disk from other storage disks for a designated storage disk, so that the subsequent matching can be achieved.
  • the current state of the target storage disk corresponding to the preset position parameter, before being different from the current state of other storage disks may further include:
  • the storage disk in place indicates that the storage disk is in the process of normal power-on operation.
  • the subsequent control state operations can be performed according to the logical index list of the storage disk, and the corresponding preset position parameters and target position parameters can be determined according to the state of the storage disk The mapping relationship between.
  • step S202 the current status of each storage disk is read.
  • the current state of each storage disk is the different current state obtained by controlling the storage disk in step S201.
  • the current status is differentiated based on the storage disk. For a designated storage disk, its status is different from other storage disks, and the status of other storage disks can be the same.
  • step S203 based on the current state of each storage disk, a mapping relationship between the preset position parameter of the target storage disk and the target position parameter is determined; wherein the target position parameter includes a physical position or a logical index.
  • the current state of the target storage disk can be set according to the logical index or physical location, which is different from the current state of other storage disks, then the logical index or physical location of the target storage disk is determined; and the target location parameter, Similar to the preset location parameter, it can also include a physical location or a logical index; in other words, the storage disk detection method in this embodiment is equivalent to one of a known logical index and a physical location, and determines the other corresponding to the storage disk.
  • the unknown physical location or logical index of the target storage disk can be determined according to the status of each storage disk obtained in step S202, and then the mapping relationship from the logical index to the physical location of the storage disk can be established.
  • the mapping relationship from the logical index to the physical location of all storage disks can be established, which is equivalent to the completion of the computer system Detection of the location of the storage disk.
  • controlling the current state of the target storage disk corresponding to the preset position parameter in each storage disk, which is different from the current state of other storage disks may include:
  • RAID is a technology that combines multiple independent hard disks (physical hard disks) in different ways to form a hard disk group (logical hard disk), thereby providing higher storage performance and data redundancy than a single hard disk.
  • a RAID card is a board used to implement RAID functions. It is usually composed of I/O (Input/Output) processors, SCSI (Small Computer System Interface) controllers, SCSI connectors, and caches. It is composed of a series of components.
  • HBA is the physical connection between the I/O channel inside the server and the I/O channel of the storage system.
  • HBA is a circuit board and/or integrated circuit adapter that provides input/output (I/O) processing and physical connection between a server and a storage device. Because the HBA reduces the burden of the main processor in data storage and retrieval tasks, it can improve the performance of the server.
  • An HBA and the storage tray system connected to it are sometimes called a storage tray channel together.
  • There is a small central processing unit inside the host bus adapter card some memory is used as a data buffer and connecting devices to connect the fiber channel and the bus. This small central processing unit is responsible for the conversion of PCI (Peripheral Component Interconnect) and Fibre Channel protocols.
  • PCI Peripheral Component Interconnect
  • the current state of the target storage disk corresponding to the preset position parameter is controlled, which is different from the current state of other storage disks.
  • the current state of the storage disk includes the indicator status and storage status of the storage disk. At least one of the power state of the disk.
  • the status of the indicator light of the storage disk refers to controlling the on and off status of the indicator light on each storage disk
  • the power state of the storage disk refers to whether the power of each storage disk is turned on or not.
  • the corresponding preset position parameter when the current state of the storage disk includes the indicator state, the corresponding preset position parameter includes a logical index; and in each storage disk, the current state of the target storage disk corresponding to the preset position parameter is different.
  • the current status of other storage disks can include:
  • the target location parameter includes the physical location; based on the current state of each storage disk, determining the mapping relationship between the preset location parameter of the target storage disk and the target location parameter includes:
  • the on and off status of the indicator determine the physical location of the target storage disk, and determine the mapping relationship between the physical location and the logical index.
  • the on or off state of the indicator light of each storage disk means that the indicator light of the storage disk is on or off; and the two states of on and off can realize the distinction of the indicator state of each storage disk.
  • controlling the current state of the target storage disk corresponding to the preset position parameter in each storage disk is different from the current state of other storage disks, and may include:
  • the indicator of the target storage disk is on, and the indicators of other storage disks are off; or,
  • the indicator of the target storage disk is off, and the indicators of other storage disks are on. In other words, the indicator light of the target storage disk is turned on alone, or the indicator light of the target storage disk is turned off. Regardless of the status, the target storage disk can be distinguished from other storage disks to determine the physical location of the target storage disk; and the storage disk is controlled on and off according to the logical index, in other words the logical index of the target storage disk It is known, so that the mapping relationship between the logical index and the physical location of the storage disk can be established one by one.
  • the corresponding preset position parameter when the current state of the storage disk includes the power state, the corresponding preset position parameter includes the physical location; and in each storage disk, the current state of the target storage disk corresponding to the preset position parameter is different from The current status of other storage disks can include:
  • the target position parameter includes a logical index; and based on the current state of each storage disk, determining the mapping relationship between the preset position parameter of the target storage disk and the target position parameter may include:
  • the second index list is: the second index list is obtained by reading all the storage disks currently in place and recording;
  • the first index list is: in the control of each storage disk, the current state of the target storage disk corresponding to the preset position parameter is different from the current state of other storage disks, read all the storage disks in place, and record the first Index list.
  • This embodiment provides a storage disk detection method to control the current state of the target storage disk corresponding to the preset position parameter in each storage disk, which is different from the current state of other storage disks; read the current state of each storage disk; Based on the current state of each storage disk, the mapping relationship between the preset position parameter of the target storage disk and the target position parameter is determined; wherein, the target position parameter includes a physical position or a logical index. Therefore, by directly identifying the current storage disk status, the physical location and logical index of the storage disk corresponding to the logical index are determined, realizing the real-time adjustment and change of the mapping relationship between the physical location of the storage disk and the logical index, and improving the accuracy of recognition. Improved the flexibility of computer storage system configuration.
  • this embodiment provides a storage disk detection method, and the storage disk detection method includes:
  • the hard disk indicator detection logic can be designed on the hardware backplane.
  • the detection logic can be FPGA ((Field Programmable Gate Array), MCU (Microcontroller Unit, micro processing) In this way, the indicator light of each hard disk can be read from the hard disk indicator detection logic, and the computer system CPU or BMC (Baseboard Management Controller) can access the hard disk indicator detection logic and read each hard disk. The status of the indicator and the physical location of the hard disk.
  • the RAID card/HBA card sends the lighting command to the FPGA or MCU, and the FPGA or MCU controls the indicator light (usually LED light), and saves the LED light state to the LED state query logic;
  • this embodiment provides a storage disk detection method, and the storage disk detection method includes:
  • S502 Send a command to turn off the power of the storage disk x to the power control unit;
  • the power control unit turns off the power of the storage disk x;
  • S506 Analyze changes in the logical index in the index list in steps S601 and S605, obtain that the logical index of the power-off storage disk is A, and establish a mapping between A and the physical location x of the storage disk in S604;
  • the storage disk detection device includes:
  • the state control module 71 is used to control the current state of the target storage disk corresponding to the preset position parameter in each storage disk, which is different from the current state of other storage disks;
  • the status reading module 72 is used to read the current status of each storage disk
  • the parameter identification module 73 is configured to determine the mapping relationship between the preset position parameters of the target storage disk and the target position parameters based on the current state of each storage disk; wherein the target position parameters include physical positions or logical indexes.
  • the storage disk in this embodiment refers to a memory used to store data.
  • the storage disk is the main storage medium of the computer, which can store a large amount of binary data, and can keep the data from being lost even after the power is off.
  • the storage disks used in early computers were floppy disks, but nowadays the commonly used storage disks are hard disks and SSDs.
  • the storage disk referred to may be a floppy disk, a hard disk, or an SSD.
  • the current state of the target storage disk corresponding to the preset position parameter is different from the current state of other storage disks. It means that the preset position parameter is known.
  • Control the current status of each storage disk The type of the preset location parameter may include the logical index of the storage disk, or the physical location of the storage disk.
  • the current status is used to identify the difference between the storage disk and the storage disk, and the difference is a substantial physical difference.
  • the current state of the control target storage disk is different from the current state of other storage disks. This control method is to distinguish the current state of the storage disk from other storage disks for a designated storage disk, so that the subsequent matching can be achieved.
  • the identification of the storage disk is to distinguish the current state of the storage disk from other storage disks for a designated storage disk, so that the subsequent matching can be achieved.
  • the current state of the target storage disk corresponding to the preset position parameter, before being different from the current state of other storage disks may further include:
  • the storage disk in place indicates that the storage disk is in the process of normal power-on operation.
  • the subsequent control state operations can be performed according to the logical index list of the storage disk, and the corresponding preset position parameters and target position parameters can be determined according to the state of the storage disk The mapping relationship between.
  • the current state of each storage disk is a different current state obtained by controlling the storage disk.
  • the current status is differentiated based on the storage disk. For a designated storage disk, its status is different from other storage disks, and the status of other storage disks can be the same.
  • the current state of the target storage disk can be set according to the logical index or physical location, which is different from the current state of other storage disks, then the logical index or physical location of the target storage disk is determined; and the target location parameter is the same as the preset location parameter Similarly, physical location or logical index can also be included; in other words, the storage disk detection method in this embodiment is equivalent to one of the known logical index and physical location, and the other corresponding to the storage disk is determined to determine the The mapping relationship between the logical index and the physical location of the storage disk.
  • the unknown physical location or logical index of the target storage disk can be determined according to the status of each storage disk obtained by the status reading module 72, and then the mapping relationship from the logical index to the physical location of the storage disk can be established.
  • mapping relationship from the logical index to the physical location of all storage disks can be established, which is equivalent to the completion of the computer system Detection of the location of the storage disk.
  • controlling the current status of each storage disk may include:
  • Control the current state of the storage disk by controlling the RAID storage disk array card/HBA host bus adapter card.
  • the current state of the target storage disk corresponding to the preset position parameter is controlled, which is different from the current state of other storage disks.
  • the current state of the storage disk includes the indicator status and storage status of the storage disk. At least one of the power state of the disk.
  • the status of the indicator light of the storage disk refers to controlling the on and off status of the indicator light on each storage disk
  • the power status of the storage disk refers to whether the power of each storage disk is turned on or not.
  • the corresponding preset position parameter when the current state of the storage disk includes the indicator state, the corresponding preset position parameter includes a logical index; and in each storage disk, the current state of the target storage disk corresponding to the preset position parameter is different.
  • the current status of other storage disks can include:
  • the target location parameter includes the physical location; based on the current state of each storage disk, determining the mapping relationship between the preset location parameter of the target storage disk and the target location parameter includes:
  • the on and off status of the indicator determine the physical location of the target storage disk, and determine the mapping relationship between the physical location and the logical index.
  • the on or off state of the indicator light of each storage disk means that the indicator light of the storage disk is on or off; and the two states of on and off can realize the distinction of the indicator state of each storage disk.
  • controlling the current state of the target storage disk corresponding to the preset position parameter in each storage disk is different from the current state of other storage disks, and may include:
  • the indicator of the target storage disk is on, and the indicators of other storage disks are off; or,
  • the indicator of the target storage disk is off, and the indicators of other storage disks are on. In other words, the indicator light of the target storage disk is turned on alone, or the indicator light of the target storage disk is turned off. Regardless of the status, the target storage disk can be distinguished from other storage disks to determine the physical location of the target storage disk; and the storage disk is controlled on and off according to the logical index, in other words the logical index of the target storage disk It is known, so that the mapping relationship between the logical index and the physical location of the storage disk can be established one by one.
  • the corresponding preset position parameter when the current state of the storage disk includes the power state, the corresponding preset position parameter includes the physical location; and in each storage disk, the current state of the target storage disk corresponding to the preset position parameter is different from The current status of other storage disks can include:
  • the target position parameter includes a logical index; and based on the current state of each storage disk, determining the mapping relationship between the preset position parameter of the target storage disk and the target position parameter may include:
  • the second index list is: the second index list is obtained by reading all the storage disks currently in place and recording;
  • the first index list is: in the control of each storage disk, the current state of the target storage disk corresponding to the preset position parameter is different from the current state of other storage disks, read all the storage disks in place, and record the first Index list.
  • This embodiment provides a storage disk detection device that controls the current state of the target storage disk corresponding to the preset position parameter in each storage disk, which is different from the current state of other storage disks; reads the current state of each storage disk; Based on the current state of each storage disk, the mapping relationship between the preset position parameter of the target storage disk and the target position parameter is determined; wherein, the target position parameter includes a physical position or a logical index. Therefore, by directly identifying the current storage disk status, the physical location and logical index of the storage disk corresponding to the logical index are determined, realizing the real-time adjustment and change of the mapping relationship between the physical location of the storage disk and the logical index, and improving the accuracy of recognition. Improved the flexibility of computer storage system configuration.
  • the functional modules/units in all or some of the above devices include a non-transitory machine-readable storage medium that stores logic that can be used to perform at least a part of the following functions, for example: a storage module, an acquisition module, a trigger module, and Delete modules, etc.
  • Logic may include instructions, data, and/or codes. If these instructions, data, and/or codes are executed by a machine, the machine can perform the methods, processes, and/or operations described herein.
  • the machine can include, for example, any suitable processing platform, computing platform, computing device, processing device, computing system, processing system, computer, processor, etc., and can be implemented using any appropriate combination of hardware, software, firmware, etc. .
  • Logic may include or may be implemented as: software, software modules, applications, programs, subroutines, instructions, instruction sets, calculation codes, words, values, symbols, etc.
  • These instructions may include any suitable type of code, for example, source code, compiled code, interpreted code, executable code, static code, dynamic code, and so on.
  • These instructions can be implemented according to a predetermined computer language, manner, or grammar to instruct the processor to perform a certain function.
  • These instructions can be implemented using any suitable high-level, low-level, object-oriented, visual, compiled and/or interpreted programming language, for example, C, C++, Java, BASIC, Matlab, Pascal, Visual BASIC, assembly Language, machine code, etc.
  • the terminal device includes a processor 81, a memory 82, and a communication bus 83;
  • the communication bus 83 is used to implement connection and communication between the processor 81 and the memory 82;
  • the processor 81 is configured to execute one or more computer programs stored in the memory 82 to implement the steps of the storage disk detection method described in the foregoing embodiments, and details are not described herein again.
  • This embodiment also provides a computer-readable storage medium, which is included in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Volatile or non-volatile, removable or non-removable media.
  • Computer-readable storage media include but are not limited to RAM (Random Access Memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable read only memory, charged Erasable Programmable Read-Only Memory) ), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, storage disk storage or other magnetic storage terminals Or any other medium that can be used to store desired information and can be accessed by a computer.
  • the computer-readable storage medium in this embodiment can be used to store one or more computer programs, and the stored one or more computer programs can be executed by a processor to implement at least one of the storage disk detection methods in the foregoing embodiments step.
  • This embodiment also provides a computer program (or computer software).
  • the computer program can be distributed on a computer-readable medium and executed by a computable terminal to implement at least the storage disk detection method in the foregoing embodiments.
  • This embodiment also provides a computer program product, including a computer-readable terminal, and the computer-readable terminal stores the computer program as shown above.
  • the computer-readable terminal in this embodiment may include the computer-readable storage medium as shown above.
  • the current state of the target storage disk corresponding to the preset position parameter in each storage disk is controlled, which is different from other storage disks.
  • the current state of the storage disk read the current state of each storage disk; based on the current state of each storage disk, determine the mapping relationship between the preset position parameter of the target storage disk and the target position parameter; where the target position parameter includes the physical position Or logical index.
  • the logical index and physical location corresponding to the target storage disk are determined, which realizes the real-time adjustment and change of the mapping relationship between the physical location of the target storage disk and the logical index, and avoids computer systems with different configurations.
  • the real-time adjustment of the mapping relationship between the physical location of the storage disk and the logical index is realized by setting up complex system management software, which reduces the system management software The complexity also avoids recognition errors caused when the connection relationship changes.
  • the terminal, and the functional modules/units in the terminal can be implemented as software (which can be implemented by computer program code executable by the computing terminal ), firmware, hardware and their appropriate combination.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components. The components are executed cooperatively.
  • Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
  • communication media usually contain computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery medium. Therefore, this application is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种存储盘检测方法、装置、终端设备和存储介质。方法包括:控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态(S201);读取各存储盘的当前状态(S202);基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引(S203)。

Description

存储盘检测方法、装置、终端设备和存储介质
相关申请的交叉引用
本申请基于申请号为202010575854.8、申请日为2020年6月22日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本申请实施例涉及但不限于计算机技术领域,具体而言,涉及但不限于一种存储盘检测方法、装置、终端设备和存储介质。
背景技术
计算机系统的硬件设计与CPU(central processing unit,中央处理器)的升级换代和应用方向有关,一般设计方案是:为某一代CPU的某一类应用计算机系统设计一种主板,根据应用的不同,存储系统可以配置不同型号和数量的RAID(Redundant Arrays of Independent Disks,磁盘阵列)卡/HBA(Host Bus Adapter,主机总线适配器)卡、不同数量的硬盘和不同类型与数量的背板来满足各种具体的需求。由于各种具体的需求非常多,所以存储系统配置非常灵活,这就导致了一套计算机管理软件难以识别各种不同存储系统的硬盘在计算机系统中的物理位置,特别是在连接发生改变、RAID卡/HBA卡的固件升级等情况发生后极有可能导致识别错误。
发明内容
本申请实施例提供的存储盘检测方法、装置、终端设备和存储介质,主要解决的技术问题是存储盘物理位置识别困难,特别是在系统结构变化时无法准确识别的问题。
本申请实施例提供一种存储盘检测方法,包括:控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;读取各所述存储盘的当前状态; 基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,所述目标位置参数包括物理位置或逻辑索引。
本申请实施例还提供一种存储盘检测装置,包括:状态控制模块、状态读取模块和参数识别模块;所述状态控制模块,用于控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;所述状态读取模块,用于读取各所述存储盘的当前状态;所述参数识别模块,用于基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,所述目标位置参数包括物理位置或逻辑索引。
本申请实施例还提供一种终端设备,所述终端包括处理器、存储器及通信总线;所述通信总线用于实现处理器和存储器之间的连接通信;所述处理器用于执行存储器中存储的一个或者多个计算机程序,以实现上述的存储盘检测方法的步骤。
本申请实施例还提供一种计算机存储介质,计算机可读存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现上述的存储盘检测方法的步骤。
附图说明
图1为本申请各实施例的计算机系统组成示意图;
图2为本申请实施例一提供的存储盘检测方法流程图;
图3为本申请实施例二提供的存储盘检测方法流程图;
图4为本申请实施例二提供的计算机系统组成示意图;
图5为本申请实施例三提供的存储盘检测方法流程图;
图6为本申请实施例三提供的计算机系统组成示意图;
图7为本申请实施例四提供的存储盘检测装置组成示意图;
图8为本申请实施例五提供的终端设备组成示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图 对本申请实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
请参考图1,图1示出了一种计算机系统的存储系统设计,其中CPU和RAID卡/HBA卡之间采用PCIe(peripheral component interconnect express,外设部件互联标准)连接;RAID卡/HBA卡与所在的背板用电缆连接(譬如SAS(Serial Attached SCSI,串行连接小型计算机系统接口)电缆);硬盘插在背板的插槽中。在不同配置的计算机系统中,其配置的PCIe RAID卡/HBA卡型号和数量可能不同;硬盘背板设计可能不同;RAID卡/HBA卡与硬盘背板之间的连线有差异。
基于以上计算机系统结构,提出本申请各实施例。
实施例一:
本实施例提供了一种存储盘检测方法,请参考图2,该方法包括:
S201、控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;
S202、读取各存储盘的当前状态;
S203、基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引。
本实施例中的存储盘,是指用来存储数据的存储器。存储盘是计算机主要的存储介质,可以存储大量的二进制数据,并且断电后也能保持数据不丢失。早期计算机使用的存储盘是软磁盘(Floppy Disk,简称软盘),如今常用的存储盘是硬磁盘(Hard disk,简称硬盘),和SSD(Solid State Disk或Solid State Drive,固态驱动器,俗称固态硬盘)。在本申请各实施例中,所指的存储盘可以是软盘,也可以是硬盘,还可以是SSD。
步骤S201中,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态,所指的是,预设位置参数是已知的,根据预设位置参数,来控制各个存储盘的当前状态。而预设位置参数的类型可以包括存储盘的逻辑索引,或者是存储盘的物理位置。其中当前状态是用于识别存储盘与存储盘之间的差异性,该差异性是实质上的物理性差异。控制目标存储盘的当前状态不同于其他存储盘的当前状态,这种控制方式就是针对一个指定的存储盘,将该存储盘的当前状态与其他存储盘区分开来,从而就可以在后续实 现对该存储盘的识别。
在一些实施例中,在控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态之前,还可以包括:
读取所有在位的存储盘列表,并记录所有存储盘的逻辑索引列表。其中,在位的存储盘表示的是该存储盘处于正常的上电工作过程中。在记录了所有在位的存储盘的逻辑索引列表之后,就可以根据存储盘的逻辑索引列表进行后续的控制状态操作,和根据存储盘的状态,来确定对应的预设位置参数与目标位置参数之间的映射关系。
步骤S202中,读取各存储盘的当前状态。其中,各存储盘的当前状态就是在步骤S201中控制存储盘得到的不同的当前状态。该当前状态基于存储盘来形成差异化,对于指定的存储盘,其状态不同于其他存储盘,而其他存储盘的状态则可以相同。
步骤S203中,基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引。由于步骤S201中,可以根据逻辑索引或者物理位置来设置目标存储盘的当前状态,不同于其他存储盘的当前状态,那么,就确定了目标存储盘的逻辑索引或者物理位置;而目标位置参数,与预设位置参数类似,也是可以包括物理位置或逻辑索引;换言之,本实施例中的存储盘检测方法,相当于是已知逻辑索引和物理位置中的一者,确定与存储盘对应的另一者,从而确定该存储盘的逻辑索引和物理位置之间的映射关系。而该目标存储盘所未知的物理位置或逻辑索引可以根据步骤S202所获取到的各存储盘的状态来确定,那么就可以建立该存储盘的从逻辑索引到物理位置的映射关系。对于该计算机系统中的存储盘而言,只要根据各存储盘遍历上述操作,就可以实现对所有存储盘的从逻辑索引到物理位置的映射关系的建立,从而就相当于完成了对计算机系统中的存储盘位置的检测。
在一些实施例中,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态可以包括:
通过控制RAID存储盘阵列卡/HBA主机总线适配器卡,来控制存储盘的当前状态。RAID是一种把多块独立的硬盘(物理硬盘)按不同方式组合起来形成一个硬盘组(逻辑硬盘),从而提供比单个硬盘更高的存储性能和提供数据冗余的技术。RAID卡就是用来实现RAID功能的板卡,通常是由I/O(Input/Output,输入/输出)处理器、SCSI(Small Computer System Interface, 小型计算机系统接口)控制器、SCSI连接器和缓存等一系列零组件构成的。
HBA是服务器内部的I/O通道与存储系统的I/O通道之间的物理连接。HBA是一个在服务器和存储装置间提供输入/输出(I/O)处理和物理连接的电路板和/或集成电路适配器。因为HBA减轻了主处理器在数据存储和检索任务的负担,它能够提高服务器的性能。一个HBA和与之相连的存储盘子系统有时一起被称作一个存储盘通道。主机总线适配卡内部有一个小的中央处理器,一些内存作为数据缓存以及连接光纤通道和总线的连接器件等。这个小的中央处理器负责PCI(Peripheral Component Interconnect,外设部件互连标准)和光纤通道两种协议的转换。它还有其他的一些功能,初始化与光纤通道网络连接的服务器端口,支持上层协议例如TCP/IP(Transmission Control Protocol/Internet Protocol,传输控制协议/网际协议),SCSI等,8B/10B的编码解码等。计算机软件通过RAID卡/HBA卡控制存储盘是RAID卡/HBA卡的基本功能。
在一些实施例中,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态中,存储盘的当前状态包括存储盘的指示灯状态、存储盘的电源状态中至少之一。其中,存储盘的指示灯状态指的是控制各存储盘上的指示灯的亮灭状态,而存储盘的电源状态则指的是各存储盘的电源接通与否。
在一些实施例中,当存储盘的当前状态包括指示灯状态时,对应的预设位置参数包括逻辑索引;而控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态可以包括:
控制逻辑索引对应的目标存储盘的指示灯的亮灭状态,使目标存储盘的指示灯的亮灭状态不同于其他存储盘的亮灭状态;
目标位置参数包括物理位置;基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系包括:
根据指示灯的亮灭状态,确定目标存储盘的物理位置,并确定物理位置和逻辑索引之间的映射关系。其中,各存储盘的指示灯的亮灭状态表示的是存储盘的指示灯点亮或者熄灭;而点亮和熄灭两个状态,就可以实现对各个存储盘的指示灯状态的区分。在一些情形中,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态,可以包括:
目标存储盘的指示灯亮,其他存储盘的指示灯灭;或,
目标存储盘的指示灯灭,其他存储盘的指示灯亮。换言之,就是目标存储盘的指示灯独亮,或者是目标存储盘的指示灯独灭。不管是哪种状态,都可以将目标存储盘与其他存储盘区分开来,确定该目标存储盘的物理位置;而存储盘又是根据逻辑索引控制亮灭的,换言之该目标存储盘的逻辑索引是已知的,从而可以一个一个的实现存储盘的逻辑索引与物理位置之间的映射关系的建立。
在一些实施例中,当存储盘的当前状态包括电源状态时,对应的预设位置参数包括物理位置;而控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态可以包括:
关闭其中一个物理位置对应的存储盘的电源,并保持其他存储盘的电源接通。相应的,在一些实施例中,目标位置参数包括逻辑索引;而基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系则可以包括:
根据第一索引列表和第二索引列表,确定被关闭电源的存储盘的逻辑索引;
第二索引列表为:通过读取当前所有在位的存储盘,记录得到第二索引列表;
第一索引列表为:在控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态之前,读取所有在位的存储盘,记录得到第一索引列表。当通过电源通断的方式来检测存储盘时,需要在控制存储盘的状态之前,先遍历读取当前所有在位的存储盘,得到第一索引列表;然后在对指定逻辑索引的目标存储盘下电之后,再读取一下在位的存储盘,记录当前的第二索引列表;而该第二索引列表与第一索引列表是存在区别的,区别就在于被下电的存储盘的逻辑索引在当前索引列表中是不存在的,通过这点就可以同时确定,被下电的存储盘的逻辑索引,以及根据下电的状态,被下电的存储盘的物理位置是已知的,从而可以建立逻辑索引与物理位置之间的映射关系。
本实施例提供了一种存储盘检测方法,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;读取各存储盘的当前状态;基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引。从而通过直接识别当前的存储盘状态,来确定逻辑索引对应的存储盘的物理位置和逻辑索引,实现了存储盘的物理位置与逻辑索引的映射关系的实 时调整变化,提升了识别的准确性,提升了计算机存储系统配置的灵活性。
实施例二
如图3所示,本实施例提供一种存储盘检测方法,该存储盘检测方法包括:
S301、通过RAID卡/HBA卡读取所有在位的存储盘列表,并记录下它们的逻辑索引列表,该逻辑索引列表可以为[A,B,C,D],其中A、B、C、D表示逻辑索引;请参考图4,可以在硬件背板上设计硬盘指示灯检测逻辑,该检测逻辑可以是FPGA((Field Programmable Gate Array,现场可编程门阵列)、MCU(Microcontroller Unit,微处理器)等,这样每一个硬盘的指示灯都能从硬盘指示灯检测逻辑中读取,计算机系统CPU或者BMC(Baseboard Management Controller,基板管理控制器)能够访问硬盘指示灯检测逻辑,读取各个硬盘指示灯的状态,以及硬盘的物理位置信息。
S302、根据存储盘的逻辑索引列表控制RAID卡/HBA卡,点亮逻辑索引X对应存储盘的指示灯,熄灭所有其他存储盘的指示灯;
S303、RAID卡/HBA卡将点灯命令发送给FPGA或MCU,FPGA或MCU控制指示灯(一般是LED灯),并将LED灯状态保存到LED状态查询逻辑;
S304、通过FPGA或MCU的LED状态查询逻辑读取存储盘指示灯状态,识别出被点亮的指示灯在LED状态查询逻辑的索引i;
S305、根据索引i在FPGA或MCU中读取存储盘的物理位置;
重复上述步骤,建立所有存储盘从RAID卡/HBA卡中的逻辑索引[A,B,C,D]到物理位置[a,b,c,d]的映射,完成所有存储盘物理位置的识别。
实施例三
如图5所示,本实施例提供一种存储盘检测方法,该存储盘检测方法包括:
S501、通过RAID卡/HBA卡读取所有在位的存储盘信息,并记录下它们的逻辑索引列表,如[A,B,C,D];请参考图6,可以在存储盘背板上设计存储盘电源控制单元计算机管理软件能通过存储盘电源控制单元控制存储盘背板上的存储盘电源开关;
S502、发送关闭存储盘x的电源的命令给电源控制单元;
S503、电源控制单元关闭存储盘x的电源;
S504、存储盘x与Raid卡/HBA之间的信号断链,Raid卡/HBA卡更新内部在位的存储盘信息;
S505、通过RAID卡/HBA卡再次读取所有在位的存储盘,并记录下它们的当前索引列表,如[B,C,D];
S506、分析步骤S601和S605中索引列表中的逻辑索引的变化,得出被关闭电源存储盘的逻辑索引为A,建立A与S604中的存储盘物理位置x的映射;
反复S501-S506的循环,直至所有的存储盘被识别一遍,建立所有存储盘从RAID卡/HBA卡中的逻辑索引[A,B,C,D]到物理位置[a,b,c,d]的映射,完成所有存储盘物理位置的识别。
实施例四
本实施例提供了一种存储盘检测装置,请参考图7,该存储盘检测装置包括:
状态控制模块71,用于控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;
状态读取模块72,用于读取各存储盘的当前状态;
参数识别模块73,用于基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引。
本实施例中的存储盘,是指用来存储数据的存储器。存储盘是计算机主要的存储介质,可以存储大量的二进制数据,并且断电后也能保持数据不丢失。早期计算机使用的存储盘是软磁盘,如今常用的存储盘是硬磁盘,和SSD。在本申请各实施例中,所指的存储盘可以是软盘,也可以是硬盘,还可以是SSD。
控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态,所指的是,预设位置参数是已知的,根据预设位置参数,来控制各个存储盘的当前状态。而预设位置参数的类型可以包括存储盘的逻辑索引,或者是存储盘的物理位置。其 中当前状态是用于识别存储盘与存储盘之间的差异性,该差异性是实质上的物理性差异。控制目标存储盘的当前状态不同于其他存储盘的当前状态,这种控制方式就是针对一个指定的存储盘,将该存储盘的当前状态与其他存储盘区分开来,从而就可以在后续实现对该存储盘的识别。
在一些实施例中,在控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态之前,还可以包括:
读取所有在位的存储盘列表,并记录所有存储盘的逻辑索引列表。其中,在位的存储盘表示的是该存储盘处于正常的上电工作过程中。在记录了所有在位的存储盘的逻辑索引列表之后,就可以根据存储盘的逻辑索引列表进行后续的控制状态操作,和根据存储盘的状态,来确定对应的预设位置参数与目标位置参数之间的映射关系。
其中,各存储盘的当前状态就是在控制存储盘得到的不同的当前状态。该当前状态基于存储盘来形成差异化,对于指定的存储盘,其状态不同于其他存储盘,而其他存储盘的状态则可以相同。
可以根据逻辑索引或者物理位置来设置目标存储盘的当前状态,不同于其他存储盘的当前状态,那么,就确定了目标存储盘的逻辑索引或者物理位置;而目标位置参数,与预设位置参数类似,也是可以包括物理位置或逻辑索引;换言之,本实施例中的存储盘检测方法,相当于是已知逻辑索引和物理位置中的一者,确定与存储盘对应的另一者,从而确定该存储盘的逻辑索引和物理位置之间的映射关系。而该目标存储盘所未知的物理位置或逻辑索引可以根据状态读取模块72所获取到的各存储盘的状态来确定,那么就可以建立该存储盘的从逻辑索引到物理位置的映射关系。对于该计算机系统中的存储盘而言,只要根据各存储盘遍历上述操作,就可以实现对所有存储盘的从逻辑索引到物理位置的映射关系的建立,从而就相当于完成了对计算机系统中的存储盘位置的检测。
在一些实施例中,控制各存储盘的当前状态可以包括:
通过控制RAID存储盘阵列卡/HBA主机总线适配器卡,来控制存储盘的当前状态。
在一些实施例中,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态中,存储盘的当前状态包括存储盘的指示灯状态、存储盘的电源状态中至少之一。其中,存储盘的指示灯状态指的是控制各存储盘上的指示灯的亮灭状态, 而存储盘的电源状态则指的是各存储盘的电源接通与否。
在一些实施例中,当存储盘的当前状态包括指示灯状态时,对应的预设位置参数包括逻辑索引;而控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态可以包括:
控制逻辑索引对应的目标存储盘的指示灯的亮灭状态,使目标存储盘的指示灯的亮灭状态不同于其他存储盘的亮灭状态;
目标位置参数包括物理位置;基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系包括:
根据指示灯的亮灭状态,确定目标存储盘的物理位置,并确定物理位置和逻辑索引之间的映射关系。其中,各存储盘的指示灯的亮灭状态表示的是存储盘的指示灯点亮或者熄灭;而点亮和熄灭两个状态,就可以实现对各个存储盘的指示灯状态的区分。在一些情形中,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态,可以包括:
目标存储盘的指示灯亮,其他存储盘的指示灯灭;或,
目标存储盘的指示灯灭,其他存储盘的指示灯亮。换言之,就是目标存储盘的指示灯独亮,或者是目标存储盘的指示灯独灭。不管是哪种状态,都可以将目标存储盘与其他存储盘区分开来,确定该目标存储盘的物理位置;而存储盘又是根据逻辑索引控制亮灭的,换言之该目标存储盘的逻辑索引是已知的,从而可以一个一个的实现存储盘的逻辑索引与物理位置之间的映射关系的建立。
在一些实施例中,当存储盘的当前状态包括电源状态时,对应的预设位置参数包括物理位置;而控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态可以包括:
关闭其中一个物理位置对应的存储盘的电源,并保持其他存储盘的电源接通。相应的,在一些实施例中,目标位置参数包括逻辑索引;而基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系则可以包括:
根据第一索引列表和第二索引列表,确定被关闭电源的存储盘的逻辑索引;
第二索引列表为:通过读取当前所有在位的存储盘,记录得到第二索引列表;
第一索引列表为:在控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态之前,读取所有在位的存储盘,记录得到第一索引列表。当通过电源通断的方式来检测存储盘时,需要在控制存储盘的状态之前,先遍历读取当前所有在位的存储盘,得到第一索引列表;然后在对指定逻辑索引的目标存储盘下电之后,再读取一下在位的存储盘,记录当前的第二索引列表;而该第二索引列表与第一索引列表是存在区别的,区别就在于被下电的存储盘的逻辑索引在当前索引列表中是不存在的,通过这点就可以同时确定,被下电的存储盘的逻辑索引,以及根据下电的状态,被下电的存储盘的物理位置是已知的,从而可以建立逻辑索引与物理位置之间的映射关系。
本实施例提供了一种存储盘检测装置,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;读取各存储盘的当前状态;基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引。从而通过直接识别当前的存储盘状态,来确定逻辑索引对应的存储盘的物理位置和逻辑索引,实现了存储盘的物理位置与逻辑索引的映射关系的实时调整变化,提升了识别的准确性,提升了计算机存储系统配置的灵活性。
本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。
上文中的全部或某些装置中的功能模块/单元包括储存逻辑非暂态机器可读存储介质,该逻辑可用于例如执行如下各项的功能的至少一部分:存储模块、获取模块、触发模块和删除模块等。逻辑可包括指令、数据和/或代码,如果这些指令、数据和/或代码被机器执行,则可以使得机器执行本文所述的方法、处理和/或操作。该机器可包括:例如,任意适当的处理平台、计算平台、计算装置、处理装置、计算系统、处理系统、计算机、处理器等,并且可使用硬件、软件、固件等的任意适当的组合来实施。逻辑可包括或可被实施为:软件、软件模块、应用、程序、子程序、指令、指令集、计算代码、词、值、符号等。这些指令可包括任 意合适类型的代码,例如,源代码、编译代码、解译代码、可执行代码、静态代码、动态代码等。这些指令可根据预定的计算机语言、方式或语法来实现,以指导处理器执行某一功能。这些指令可使用任意合适的高级、低级、面向对象的、可视的、编译的和/或解译的编程语言来实现,例如,C、C++、Java、BASIC、Matlab、Pascal、Visual BASIC、汇编语言、机器代码等等。
实施例五
本实施例提供了一种终端设备,请参考图8,该终端设备包括处理器81、存储器82及通信总线83;
通信总线83用于实现处理器81和存储器82之间的连接通信;
处理器81用于执行存储器82中存储的一个或者多个计算机程序,以实现上述各实施例所述的存储盘检测方法的步骤,这里不再赘述。
本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(Random Access Memory,随机存取存储器),ROM(Read-Only Memory,只读存储器),EEPROM(Electrically Erasable Programmable read only memory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器),数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、存储盘存储或其他磁存储终端、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。
本实施例中的计算机可读存储介质可用于存储一个或者多个计算机程序,其存储的一个或者多个计算机程序可被处理器执行,以实现上述各实施例中的存储盘检测方法的至少一个步骤。
本实施例还提供了一种计算机程序(或称计算机软件),该计算机程序可以分布在计算机可读介质上,由可计算终端来执行,以实现上述各实施例中的存储盘检测方法的至少一个步骤。
本实施例还提供了一种计算机程序产品,包括计算机可读终端,该计算机可读终端上存 储有如上所示的计算机程序。本实施例中该计算机可读终端可包括如上所示的计算机可读存储介质。
根据本申请实施例提供的存储盘检测方法、装置、终端设备、存储介质、计算机程序和计算机程序产品,控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;读取各存储盘的当前状态;基于各存储盘的当前状态,确定目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,目标位置参数包括物理位置或逻辑索引。从而通过直接识别存储盘的当前状态,来确定目标存储盘对应的逻辑索引和物理位置,实现了目标存储盘的物理位置与逻辑索引的映射关系的实时调整变化,避免了不同配置的计算机系统中,由于存储盘与硬盘背板之间的连线差异导致的不同,而通过设置复杂的系统管理软件来实现存储盘的物理位置与逻辑索引的映射关系的实时调整的情况,降低了系统管理软件的复杂性,也避免了连接关系发生改变时导致的识别错误。
可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、终端、终端中的功能模块/单元可以被实施为软件(可以用计算终端可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。
此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。所以,本申请不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本申请实施例所作的进一步详细说明,不能认定本申请的具体实施只局限于这些说明。对于本申请所属技术领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本申请的保护范围。

Claims (12)

  1. 一种存储盘检测方法,其中,包括:
    控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;
    读取各所述存储盘的当前状态;
    基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,所述目标位置参数包括物理位置或逻辑索引。
  2. 如权利要求1所述的存储盘检测方法,其中,在所述控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态之前,还包括:
    读取所有在位的存储盘列表,并记录所有存储盘的逻辑索引列表。
  3. 如权利要求1或2所述的存储盘检测方法,其中,所述控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态,所述存储盘的当前状态包括如下至少之一:
    所述存储盘的指示灯状态;所述存储盘的电源状态。
  4. 如权利要求3所述的存储盘检测方法,其中,当所述存储盘的当前状态包括指示灯状态时,所述预设位置参数包括逻辑索引;所述控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态包括:
    控制所述逻辑索引对应的目标存储盘的指示灯的亮灭状态,使所述目标存储盘的指示灯的亮灭状态不同于其他存储盘的亮灭状态;
    所述目标位置参数包括物理位置;所述基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系包括:
    根据所述指示灯的亮灭状态,确定所述目标存储盘的物理位置,并确定所述物理位置和逻辑索引之间的映射关系。
  5. 如权利要求4所述的存储盘检测方法,其中,所述控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态,包括:
    所述目标存储盘的指示灯亮,其他存储盘的指示灯灭;或,
    所述目标存储盘的指示灯灭,其他存储盘的指示灯亮。
  6. 如权利要求3所述的存储盘检测方法,其中,当所述存储盘的当前状态包括电源状态时,所述预设位置参数包括物理位置;所述控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态包括:
    关闭其中一个物理位置对应的存储盘的电源,并保持其他存储盘的电源接通。
  7. 如权利要求6所述的存储盘检测方法,其中,所述目标位置参数包括逻辑索引;所述基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系包括:
    根据第一索引列表和第二索引列表,确定被关闭电源的所述存储盘的逻辑索引;
    所述第二索引列表为:通过读取当前所有在位的存储盘,记录得到所述第二索引列表;
    所述第一索引列表为:在所述控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态之前,读取所有在位的存储盘,记录得到所述第一索引列表。
  8. 如权利要求1至7中任一项所述的存储盘检测方法,其中,所述预设位置参数包括逻辑索引或物理位置;所述基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系包括:基于各所述存储盘的当前状态,确定所述目标存储盘的逻辑索引与物理位置的映射关系。
  9. 一种存储盘检测装置,包括:
    状态控制模块,用于控制各存储盘中,预设位置参数所对应的目标存储盘的当前状态,不同于其他存储盘的当前状态;
    状态读取模块,用于读取各所述存储盘的当前状态;
    参数识别模块,用于基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系;其中,所述目标位置参数包括物理位置或逻辑索引。
  10. 如权利要求9所述的存储盘检测方法,其中,所述预设位置参数包括逻辑索引或物理位置;所述基于各所述存储盘的当前状态,确定所述目标存储盘的预设位置参数与目标位置参数之间的映射关系包括:基于各所述存储盘的当前状态,确定所述目标存储盘的逻辑索 引与物理位置的映射关系。
  11. 一种终端设备,所述终端设备包括处理器、存储器及通信总线;
    所述通信总线用于实现处理器和存储器之间的连接通信;
    所述处理器用于执行存储器中存储的一个或者多个计算机程序,以实现如权利要求1-8中任一项所述的存储盘检测方法的步骤。
  12. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有一个或者多个计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现如权利要求1-8中任一项所述的存储盘检测方法的步骤。
PCT/CN2021/098749 2020-06-22 2021-06-07 存储盘检测方法、装置、终端设备和存储介质 WO2021259058A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010575854.8 2020-06-22
CN202010575854.8A CN113900880A (zh) 2020-06-22 2020-06-22 存储盘检测方法、装置、终端设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021259058A1 true WO2021259058A1 (zh) 2021-12-30

Family

ID=79186418

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/098749 WO2021259058A1 (zh) 2020-06-22 2021-06-07 存储盘检测方法、装置、终端设备和存储介质

Country Status (2)

Country Link
CN (1) CN113900880A (zh)
WO (1) WO2021259058A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489851A (zh) * 2022-01-20 2022-05-13 飞腾信息技术有限公司 内存芯片的启动方法、装置、计算机设备及存储介质
CN114579499A (zh) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 处理器通信接口的控制方法、装置、设备及存储介质
CN115113943A (zh) * 2022-06-30 2022-09-27 苏州浪潮智能科技有限公司 板卡与槽位匹配度的确定方法、装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266814A (zh) * 2008-05-08 2008-09-17 杭州华三通信技术有限公司 存储系统中的磁盘定位方法和实现磁盘定位的存储系统
CN102207829A (zh) * 2011-03-25 2011-10-05 浪潮(北京)电子信息产业有限公司 一种实现高端磁盘阵列的磁盘定位方法及装置
US20180239614A1 (en) * 2017-02-17 2018-08-23 Lenovo (Beijing) Co., Ltd. Method for identifying hardware device in operating system and computer apparatus thereof
CN110427308A (zh) * 2019-07-26 2019-11-08 新华三技术有限公司成都分公司 一种硬盘定位方法、装置、电子设备及存储介质
CN111209174A (zh) * 2020-01-06 2020-05-29 苏州浪潮智能科技有限公司 一种在bios中生成硬盘物理位置的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266814A (zh) * 2008-05-08 2008-09-17 杭州华三通信技术有限公司 存储系统中的磁盘定位方法和实现磁盘定位的存储系统
CN102207829A (zh) * 2011-03-25 2011-10-05 浪潮(北京)电子信息产业有限公司 一种实现高端磁盘阵列的磁盘定位方法及装置
US20180239614A1 (en) * 2017-02-17 2018-08-23 Lenovo (Beijing) Co., Ltd. Method for identifying hardware device in operating system and computer apparatus thereof
CN110427308A (zh) * 2019-07-26 2019-11-08 新华三技术有限公司成都分公司 一种硬盘定位方法、装置、电子设备及存储介质
CN111209174A (zh) * 2020-01-06 2020-05-29 苏州浪潮智能科技有限公司 一种在bios中生成硬盘物理位置的方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489851A (zh) * 2022-01-20 2022-05-13 飞腾信息技术有限公司 内存芯片的启动方法、装置、计算机设备及存储介质
CN114579499A (zh) * 2022-01-20 2022-06-03 飞腾信息技术有限公司 处理器通信接口的控制方法、装置、设备及存储介质
CN114579499B (zh) * 2022-01-20 2023-10-24 飞腾信息技术有限公司 处理器通信接口的控制方法、装置、设备及存储介质
CN114489851B (zh) * 2022-01-20 2024-02-20 飞腾信息技术有限公司 内存芯片的启动方法、装置、计算机设备及存储介质
CN115113943A (zh) * 2022-06-30 2022-09-27 苏州浪潮智能科技有限公司 板卡与槽位匹配度的确定方法、装置、设备和存储介质

Also Published As

Publication number Publication date
CN113900880A (zh) 2022-01-07

Similar Documents

Publication Publication Date Title
WO2021259058A1 (zh) 存储盘检测方法、装置、终端设备和存储介质
US9164840B2 (en) Managing a solid state drive (‘SSD’) in a redundant array of inexpensive drives (‘RAID’)
US9043777B2 (en) Transferring files to a baseboard management controller (‘bmc’) in a computing system
CN106649048B (zh) 指示灯控制系统以及发光二极管控制方法
US8839030B2 (en) Methods and structure for resuming background tasks in a clustered storage environment
US9471126B2 (en) Power management for PCIE switches and devices in a multi-root input-output virtualization blade chassis
US20150149684A1 (en) Handling two ses sidebands using one smbus controller on a backplane controller
US20070006235A1 (en) Task scheduling to devices with same connection address
US20160026531A1 (en) Recovering from a defective boot image
US11137918B1 (en) Administration of control information in a storage system
US11137935B2 (en) Storage system with plurality of storage controllers communicatively coupled for determination of storage controller indentifiers
US9507744B2 (en) Handling two SGPIO channels using single SGPIO decoder on a backplane controller
US20160154696A1 (en) Firmware dump collection from primary system dump device adapter
US20080086615A1 (en) Method and Apparatus to Internalize Non-Volatile Data Function for Sector Size Conversion
US7450027B1 (en) Method and system for implementing a serial enclosure management interface for a computer system
US9158459B2 (en) Managing a storage device using a hybrid controller
US9239807B2 (en) Providing bus resiliency in a hybrid memory system
US20210109885A1 (en) Device for managing hdd backplane
US11315226B2 (en) Intelligent cabling and connection validation
US8230134B2 (en) Fast path SCSI IO
US20140372636A1 (en) Safely mapping and unmapping host scsi volumes
US10049058B2 (en) Method for resolving a cable mismatch in a target device
US11373782B2 (en) Indicator activation over an alternative cable path
US20210065343A1 (en) Intelligent cabling and connection validation
US9141565B2 (en) Memory bus attached input/output (‘I/O’) subsystem management in a computing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21829131

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.05.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21829131

Country of ref document: EP

Kind code of ref document: A1