[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118708133B - Logical disk status query method, device, system, equipment and storage medium - Google Patents

Logical disk status query method, device, system, equipment and storage medium Download PDF

Info

Publication number
CN118708133B
CN118708133B CN202411206037.XA CN202411206037A CN118708133B CN 118708133 B CN118708133 B CN 118708133B CN 202411206037 A CN202411206037 A CN 202411206037A CN 118708133 B CN118708133 B CN 118708133B
Authority
CN
China
Prior art keywords
logical disk
storage system
query
host
target logical
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
CN202411206037.XA
Other languages
Chinese (zh)
Other versions
CN118708133A (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 Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain 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 Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202411206037.XA priority Critical patent/CN118708133B/en
Publication of CN118708133A publication Critical patent/CN118708133A/en
Application granted granted Critical
Publication of CN118708133B publication Critical patent/CN118708133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/061Improving I/O performance
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • 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/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

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)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明涉及计算机技术领域,公开了逻辑磁盘的状态查询方法、装置、系统、设备及存储介质,该方法包括:当第一次接收到主机发送的查询命令时,在存储系统至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息,得到查询结果;若查询结果为状态信息为异常,则记录当前时刻;从当前时刻起经过第一预设时间段后,对目标逻辑磁盘的状态信息进行二次查询,得到二次查询结果;若二次查询结果为目标逻辑磁盘的状态信息仍为异常时,则生成指示信息,并将指示信息发送给主机,指示信息用于指示主机第二次发送查询命令,查询目标逻辑磁盘的状态信息直至正常为止。本发明可以解决主机与存储系统交互效率低甚至交互失败的问题。

The present invention relates to the field of computer technology, and discloses a method, device, system, equipment and storage medium for querying the status of a logical disk. The method comprises: when a query command sent by a host is received for the first time, querying a target logical disk in at least one logical disk of a storage system, and checking the status information of the target logical disk to obtain a query result; if the query result is that the status information is abnormal, then recording the current moment; after a first preset time period from the current moment, querying the status information of the target logical disk for the second time to obtain a secondary query result; if the secondary query result is that the status information of the target logical disk is still abnormal, then generating indication information, and sending the indication information to the host, the indication information is used to instruct the host to send a query command for the second time to query the status information of the target logical disk until it is normal. The present invention can solve the problem of low efficiency or even interaction failure between the host and the storage system.

Description

Method, device, system, equipment and storage medium for inquiring state of logic disk
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a system, a device, and a storage medium for querying a state of a logical disk.
Background
In the continuous development of the interaction protocol between the storage system and the host, as the technology of the host and the storage system evolves, the continuous interaction between the host and the storage system needs to be continuously perfected. In the prior art, when a logical disk of a storage system is abnormal, interaction between a host and the storage system is not perfect.
In the related art, when a host sends a query command to a storage system to query a logical disk of the storage system, if the query command is sent once and the command is waited for overtime, retry is not performed, interaction with the storage system is judged to be abnormal, subsequent interaction processing is not performed, which may cause the host to mark the logical disk of the storage system as abnormal and mark the access path as invalid, so that interaction efficiency between the host and the storage system is low. If all paths of the host and the storage system are marked as invalid, the interaction from the host to the logic disk is interrupted, so that the interaction between the host and the storage system fails, and further, the service is interrupted.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus, system, device and storage medium for querying the status of a logical disk, so as to solve the problem of low interaction efficiency and even failure interaction between a host and a storage system.
In a first aspect, the present invention provides a method for querying a state of a logical disk, where the method includes: when a query command sent by a host is received for the first time, querying a target logic disk in at least one logic disk in a storage system, and checking state information of the target logic disk to obtain a query result; if the query result is that the state information of the target logical disk is abnormal, recording the current moment; after a first preset time period from the current moment, carrying out secondary query on the state information of the target logical disk to obtain a secondary query result; if the secondary query result is that the state information of the target logical disk is still abnormal, generating indication information, and sending the indication information to the host, wherein the indication information is used for indicating the host to send a query command for the second time to query the state information of the target logical disk until the state information of the target logical disk queried by the storage system is normal.
Based on the method provided in the first aspect, when the storage system receives the query command sent by the host for the first time, the storage system queries the target logical disk in at least one logical disk in the storage system, and checks the state information of the target logical disk; recording the current moment when the query result is that the state information of the target logical disk is abnormal; and after a first preset time period from the current moment, carrying out secondary query on the state information of the target logic disk, and generating and sending indication information to the host when the secondary query result is that the state information of the target logic disk is still abnormal, so as to trigger the second sending of the query command to query the state information of the target logic disk until the state information of the target logic disk queried by the storage system is normal.
After the state information of the target logical disk is queried by the storage system to be abnormal, after a first preset time period from the current moment, the state information of the target logical disk after the first preset time period can be determined again by secondarily querying the target logical disk. When the secondary query result is still that the state information of the target logical disk is abnormal, it can be determined that the state information of the target logical disk is not recovered from the abnormal state to the normal state within the first preset time period. At this time, the indication information is generated and sent, so that the host considers that the target logical disk is on line again, the host can walk the disk scanning flow again, and the inquiry command can be sent again in the disk scanning flow to inquire the state information of the target logical disk, and further the interaction between the host and the storage system is successful.
Compared with the mode that the host sends a query command once and waits for the command to overtime in the related art, retry is not performed, and the interaction between the host and the storage system is directly judged to be abnormal, the method and the device can avoid the problems that the logic disk of the storage system is marked to be abnormal and the access path is marked to be invalid due to one interaction failure, and improve the interaction efficiency of the host and the storage system. Furthermore, the problem that after all paths of the host and the storage system are marked as invalid, interaction between the host and the storage system fails and service interruption is caused can be avoided.
In an alternative implementation mode, if the query result is that the state information of the target logical disk is normal, acquiring the disk information of the target logical disk, wherein the disk information comprises the space and the type of the target logical disk; and reporting the state information and the disk information of the target logical disk to the host.
Based on the method, when the state information of the target logical disk is normal, the state information and the disk information of the target logical disk can be reported to the host, namely the interaction between the host and the storage system is successful.
In an optional implementation manner, after a first preset time period from the current moment, performing secondary query on the state information of the target logical disk, and acquiring an operating system type corresponding to a host before obtaining a secondary query result; according to the operating system type and a preset corresponding relation, determining the expected response time length corresponding to the operating system type, determining the expected response time length as a first preset time period, wherein the preset corresponding relation is the corresponding relation between the operating system type and the expected response time length, and the expected response time length is the time length when the host computer receives the response after sending the query command.
Based on the method, a first preset time period can be determined, the determined first preset time period can be the expected response time length corresponding to the type of the operating system corresponding to the host, and further, when the host does not receive the response of the storage system within the expected response time length, the storage system secondarily inquires the state information of the target logical disk, and based on the secondary inquiry result, feedback is given to the host.
In an alternative implementation mode, when the Nth query result is that the state information of the target logical disk is recovered from abnormality to normal, recording recovery time, wherein N is more than or equal to 2 and is a positive integer; and calculating a difference value between the recovery time and the current time, and determining the difference value as a state recovery time length of the target logical disk, wherein the state recovery time length is used for determining the time when the host sends the inquiry command to the storage system.
Based on the method, the storage system can record the recovery time of the state information of the target logical disk from abnormal to normal according to the N query results, further determine the state recovery time of the target logical disk, facilitate determining the time of sending the query command to the storage system by the host, avoid waiting excessive time, reduce the interaction times of the query command, and improve the interaction efficiency of the host and the storage system.
In an alternative implementation manner, if the secondary query result is that the state information of the target logical disk is normal, the disk information of the target logical disk is obtained, and the state information and the disk information of the target logical disk are reported to the host.
Based on the method, when the secondary query result is that the state information of the target logical disk is normal, the state information of the target logical disk is indicated to be recovered from abnormal to normal, the state information and the disk information of the target logical disk can be reported to the host, and the host and the target logical disk of the storage system are indicated to be successfully interacted.
In an optional implementation manner, after a first preset period of time from the current time, performing a secondary query on the state information of the target logical disk, and before obtaining a secondary query result, the method further includes: acquiring a reference response time length of a host, idle computing resources and idle memory resources of the host and a disk read-write speed of a target logic disk; and calculating and generating a first preset time period according to a preset algorithm according to the reference response time length, the idle calculation resources, the idle memory resources and the disk read-write speed.
Based on the method, a first preset time period can be determined, the determined first preset time period is matched with idle computing resources and idle memory resources of a host at the current moment and the disk read-write speed of a target logic disk, so that when the host does not receive a response of a storage system in the first preset time period, the storage system can timely inquire the state information of the target logic disk for a second time, and based on a second inquiry result, the host is given feedback, the storage system is prevented from additionally waiting for excessive time, or the storage system is prevented from frequently inquiring the state information of the target logic disk, further the number of times of inquiry command interaction is reduced, and the interaction efficiency of the host and the storage system is improved.
In an alternative embodiment, determining the first preset time period according to the reference response time length, the idle computing resource, the idle memory resource and the disk read-write speed includes: acquiring a first influence factor corresponding to idle computing resources, a second influence factor corresponding to idle memory resources and a third influence factor corresponding to disk read-write speed; according to the reference response time length, the first influence factor, the second influence factor and the third influence factor, a first preset time period is calculated and generated according to a preset algorithm, and the preset algorithm is as follows:
wherein, A first preset time period is indicated,A reference response time period is indicated,A first influencing factor is indicated by the fact that,A second influencing factor is indicated by the fact that,Representing a third influencing factor.
Based on the method, because the idle computing resources of the host, the idle memory resources of the host and the disk read-write speed of the target logical disk are different in weight for determining the first preset time period, the first preset time period to be waited by the storage system before the secondary inquiry can be accurately determined based on the first influence factor corresponding to the idle computing resources, the second influence factor corresponding to the idle memory resources, the third influence factor corresponding to the disk read-write speed and the reference response time length.
In a second aspect, the present invention provides a method for querying a state of a logical disk, where the method includes: the method comprises the steps of firstly sending a query command to a storage system, wherein the query command is used for indicating the storage system to query a target logic disk in at least one logic disk and checking state information of the target logic disk; receiving indication information which is obtained and fed back by a storage system based on a query command, wherein the indication information is generated by the storage system when the state information of a target logical disk is abnormal, and the state information is queried for the second time after a first preset time period passes and the state information is still abnormal; and generating and sending a secondary query command to the storage system, wherein the secondary query command is used for indicating the storage system to query the state information of the target logical disk again until the state information is queried to be normal.
Based on the method provided in the second aspect, the host sends a query command to the storage system for the first time, where the query command is used to instruct the storage system to query the target logical disk in the storage system; receiving indication information which is obtained and fed back by a storage system based on the query command; and generating and sending a secondary query command to a storage system, wherein the secondary query command is used for indicating the storage system to query the state information of the target logical disk again until the state information is queried to be normal.
After the host sends the query command to the storage system for the first time, the indication information sent by the storage system is received after a first preset time period, and the indication information is used for indicating the host to send the query command for the second time, namely, the indication information is received after the first preset time period after the host sends the query command for the first time, so that the host considers that the target logical disk is on line again, the host can walk the disk scanning flow again, and the query command can be sent again in the disk scanning flow to query the target logical disk.
Compared with the mode that the host sends a query command once and waits for the command to overtime in the related art, retry is not performed, and the interaction between the host and the storage system is directly judged to be abnormal, the method and the device can avoid the problems that the logic disk of the storage system is marked to be abnormal and the access path is marked to be invalid due to one interaction failure, and improve the interaction efficiency of the host and the storage system. Furthermore, the problem that after all paths of the host and the storage system are marked as invalid, interaction between the host and the storage system fails and service interruption is caused can be avoided.
In an alternative embodiment, after generating and sending the secondary query command to the storage system, the method further comprises: acquiring historical response time after the host sends the query command; after the query command is sent to the storage system for the second time, if the state information of the target logical disk fed back by the storage system is not received within the historical response time, determining that the state information of the target logical disk is indicated to be abnormal, and sending the query command to the storage system for the third time.
Based on the method, after the host computer can generate and send the secondary query command to the storage system, the response time of the query command is predicted, and further the time for the host computer to issue the query command to the storage system for the third time is determined. Therefore, on the premise of ensuring continuous interaction between the host and the storage system, the number of times of interaction of the query command can be reduced, unnecessary extra waiting time is reduced, and the interaction efficiency of the host and the storage system is improved.
In a third aspect, the present invention provides a state query device for a logical disk, where the device includes: the first query module is used for querying a target logic disk in at least one logic disk in the storage system when a query command sent by the host is received for the first time, and checking the state information of the target logic disk to obtain a query result; the first processing module is used for recording the current moment if the query result is that the state information of the target logical disk is abnormal; the first query module is further configured to perform a secondary query on the target logical disk after a first preset period of time passes from the current time, so as to obtain a secondary query result.
The first processing module is further configured to generate indication information if the second query result indicates that the state information of the target logical disk is still abnormal, and send the indication information to the host, where the indication information is used to instruct the host to send a query command for the second time, query the target logical disk, and until the state information of the target logical disk queried by the storage system is normal.
In a fourth aspect, the present invention provides a state query device for a logical disk, where the device includes: the second query module is used for sending a query command to the storage system for the first time, wherein the query command is used for indicating the storage system to query the target logic disk in at least one logic disk and checking the state information of the target logic disk; the second processing module is used for receiving indication information which is obtained and fed back by the storage system based on the query command, wherein the indication information is generated by the storage system when the state information of the target logical disk is abnormal and the state information is still abnormal; the second query module is further configured to generate and send a secondary query command to the storage system, where the secondary query command is used to instruct the storage system to query the state information of the target logical disk again until the state information is queried to be normal.
In a fifth aspect, the present invention provides a state query system for a logical disk, where the state query system for a logical disk includes a host and a storage system; the host is used for sending a query command to the storage system for the first time, wherein the query command is used for indicating the storage system to query a target logic disk in at least one logic disk and checking the state information of the target logic disk; the storage system is used for inquiring a target logic disk in at least one logic disk in the storage system when an inquiry command sent by the host is received for the first time, and checking the state information of the target logic disk to obtain an inquiry result; the storage system is also used for recording the current moment if the query result is that the state information of the target logical disk is abnormal; the storage system is also used for carrying out secondary query on the state information of the target logical disk after a first preset time period from the current moment to obtain a secondary query result; the storage system is further used for generating indication information and sending the indication information to the host when the secondary query result is that the state information of the target logical disk is still abnormal, wherein the indication information is used for indicating the host to send a query command for the second time; the host is also used for receiving the indication information which is obtained and fed back by the storage system based on the query command; the host is further configured to send a query command to the storage system for the second time until the state information of the target logical disk queried by the storage system is normal.
In a sixth aspect, the present invention provides a computer device comprising: the memory and the processor are in communication connection, computer instructions are stored in the memory, and the processor executes the computer instructions, so that the state query method of the logic disk in the first aspect or any corresponding embodiment of the first aspect is executed.
In a seventh aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to execute the method for querying the state of a logical disk according to the first aspect or any one of the embodiments corresponding thereto.
In an eighth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the method for querying the state of a logical disk according to the first aspect or any implementation manner corresponding to the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a topology diagram of a state query system of a logical disk according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for querying the status of a logical disk according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method of querying the status of a logical disk according to an embodiment of the present invention;
FIG. 4 is a flow chart of another method for querying the status of a logical disk according to an embodiment of the present invention;
FIG. 5 is a block diagram of a logical disk status query device according to an embodiment of the present invention;
FIG. 6 is a block diagram of a state query device of a further logical disk according to an embodiment of the present invention;
Fig. 7 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the related art, when a host sends a query command to a storage system to query a logical disk of the storage system, if the query command is sent once and the command is waited for overtime, retry is not performed, interaction with the storage system is judged to be abnormal, subsequent interaction processing is not performed, which may cause the host to mark the logical disk of the storage system as abnormal and mark the access path as invalid, so that interaction efficiency between the host and the storage system is low.
In addition, the storage system does not perform differential processing on special protocol instructions (such as query commands), so that in a logic disk state abnormal scene, long-time waiting for instruction processing can be caused without timely returning an instruction result to the host, and further occurrence of host timeout is easily caused. The long instruction return time of the storage system and the overtime of the host instruction mark the access path as invalid, and the two together lead to the interaction failure of the host and the logical disk of the storage system.
In order to solve the technical problems, the embodiment of the invention provides a state query method of a logic disk, which can solve the problems of low interaction efficiency and even interaction failure of a host and a storage system.
The method provided by the embodiment of the invention can be used for the state query systems of various logic disks. The method provided by the embodiment of the present invention is described below by taking the state query system 100 of the logical disk shown in fig. 1 as an example. Fig. 1 is only a schematic diagram, and does not limit the applicable scenario of the technical solution provided by the present invention.
As shown in FIG. 1, FIG. 1 is a topology diagram of a state query system for a logical disk according to an embodiment of the present invention. In FIG. 1, a logical disk state query system 100 may include a storage system 101 and a host 102.
The storage system in the embodiment of the invention comprises the following steps: the storage system 101 may be any storage system. The storage system may be a low-end storage system, a medium-end storage system, or a high-end storage system.
The host in the embodiment of the invention includes, for example: the host 102 may be any server or host having communication and computing functions. The host may also be referred to as a host system. The host may deploy different operating systems.
The logical disk state query system 100 shown in fig. 1 is only for example, and is not intended to limit the technical solution of the present invention. Those skilled in the art will appreciate that in the specific implementation, the state query system 100 of the logical disk may further include other devices, and the number of systems may be stored according to specific needs, which is not limited.
In accordance with an embodiment of the present invention, there is provided a method embodiment for querying the status of a logical disk, it should be noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that although a logical sequence is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in a different order than that illustrated herein.
In this embodiment, a method for querying the status of a logical disk is provided, which may be used in the above-mentioned storage system, and fig. 2 is a flowchart of a method for querying the status of a logical disk according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
s201: when a query command sent by a host is received for the first time, a target logical disk is queried in at least one logical disk in a storage system, and state information of the target logical disk is checked to obtain a query result.
The query command may be a preset protocol command. The predetermined protocol may be a storage protocol, for example, a Small Computer system interface protocol (Small Computer SYSTEM INTERFACE, SCSI), a nonvolatile storage protocol (Non-Volatile Memory Express, NVMe) protocol.
Optionally, the preset protocol may also be an IP network-based storage protocol (INTERNET SMALL Computer SYSTEM INTERFACE, ISCSI), a protocol for transmitting SCSI commands over a Fibre Channel network (fibrechannel-SCSI), or a Fibre Channel remote access nonvolatile memory protocol (NVMe over FABRICS) from the transport layer network.
In the embodiment of the invention, the query result comprises the state information of the target logical disk. Optionally, the query result may further include disk information of the target logical disk. The disk information includes the space and type of the target logical disk. The space of the target logical disk is also referred to as the capacity of the target logical disk.
S202: if the query result is that the state information of the target logical disk is abnormal, recording the current moment.
It can be understood that when the target logical disk is processing a task or is busy, the storage system receives the inquiry command sent by the host, and inquires that the state information of the target logical disk is abnormal.
In some optional embodiments, if the query result is that the state information of the target logical disk is normal, the storage system acquires the disk information of the target logical disk; and reporting the state information and the disk information of the target logical disk to the host.
It can be understood that the storage system reports the state information and the disk information of the target logical disk to the host, that is, the host and the storage system are successfully interacted.
S203: after a first preset time period from the current moment, carrying out secondary query on the state information of the target logical disk to obtain a secondary query result.
The first preset time period can be set according to actual needs, and is not limited. For example: the first preset time period may be 30 seconds.
In some optional embodiments, after a first preset period of time passes from the current time, the storage system performs secondary query on the state information of the target logical disk, and before a secondary query result is obtained, obtains an operating system type corresponding to the host; according to the operation system type and the preset corresponding relation, determining the expected response time length corresponding to the operation system type, and determining the expected response time length as a first preset time period.
The preset corresponding relation is the corresponding relation between the type of the operating system and the expected response time length.
In the embodiment of the invention, the expected response time is the time when the host expects to receive the response after sending the inquiry command.
It will be appreciated that the expected response time period for different operating system types is different.
In some optional embodiments, the storage system obtains a desired response duration corresponding to each type of operating system in the at least one type of operating system; and determining the minimum expected response time length in the at least one expected response time length as a first preset time period.
It can be understood that the storage system can determine a first preset time period, the determined first preset time period can be the minimum expected response time period in at least one expected response time period corresponding to different types of operating systems, the state information of the target logical disk can be queried by the storage system for the second time when the host does not receive the response of the storage system within the minimum expected response time period under the operating systems of different operating system types, and feedback is given to the host based on the second query result.
In some optional embodiments, the storage system obtains a reference response time length of the host, idle computing resources and idle memory resources of the host, and a disk read-write speed of the target logical disk; and calculating and generating a first preset time period according to a preset algorithm according to the reference response time length, the idle calculation resources, the idle memory resources and the disk read-write speed.
The reference response time length may be an average response time length of the host after sending the query command in the historical time period, or a preset expected response time length of the host after sending the query command.
In the embodiment of the invention, the idle computing resource of the host is used for indicating the processing capacity of the host. The computing resources may be GPU resources, CPU resources.
In one example, a first influence factor corresponding to an idle computing resource, a second influence factor corresponding to an idle memory resource, and a third influence factor corresponding to a disk read-write speed are obtained; and calculating and generating a first preset time period according to a preset algorithm according to the reference response time length, the first influence factor, the second influence factor and the third influence factor.
The preset algorithm is as follows:
wherein, A first preset time period is indicated,A reference response time period is indicated,A first influencing factor is indicated by the fact that,A second influencing factor is indicated by the fact that,Representing a third influencing factor.
In the embodiment of the present invention, the first influence factor may be a resource influence factor calculated according to a ratio of idle calculation resources. For example, taking the proportion of idle computing resources as 80%, the first impact factor is 20%.
In the embodiment of the present invention, the first influence factor may be an influence factor calculated according to the idle computing resource proportion. For example, taking the proportion of idle computing resources as 80%, the first impact factor is 20%.
In the embodiment of the present invention, the second influence factor may be an influence factor calculated according to the proportion of the idle memory resources. For example, taking the proportion of free memory resources as 90%, the first impact factor is 10%.
In the embodiment of the present invention, the third influence factor may be a performance level of the target disk determined according to the disk read-write speed, and the influence factor is determined according to the performance level. For example, taking the disk read-write speed as the first level, the third influencing factor is 3%.
It can be understood that the first preset time period determined by the storage system is matched with the idle computing resources and idle memory resources of the host at the current moment and the disk read-write speed of the target logical disk, so that when the host does not receive the response of the storage system in the first preset time period, the storage system can timely inquire the state information of the target logical disk for the second time, and give feedback to the host based on the second inquiry result, so that the storage system is prevented from additionally waiting for excessive time or the storage system is prevented from frequently inquiring the state information of the target logical disk, the interaction times of inquiry commands are further reduced, and the interaction efficiency of the host and the storage system is improved.
S204: if the secondary query result is that the state information of the target logical disk is still abnormal, generating indication information and sending the indication information to the host.
The indication information is used for indicating the host to send the query command for the second time and querying the state information of the target logical disk.
For example, the indication may be "disk ready to be re-brought on line" for the host to consider the target logical disk to be re-brought on line. Thus, the host will walk the target logical disk scanning flow again, and will send the inquiry command for the second time in the target logical disk scanning flow, inquire the target logical disk.
It can be understood that if the host sends the query command to the storage system for the second time, if the state information of the target logical disk is queried to be abnormal, the indication information is continuously generated, and the indication information is sent to the host, the host is triggered to send the query command for the third time, and the target logical disk is queried until the state information of the target logical disk queried by the storage system is normal.
Optionally, if the second query result is that the state information of the target logical disk is normal, the storage system acquires the disk information of the target logical disk, and reports the state information and the disk information of the target logical disk to the host.
In some optional embodiments, the storage system records a recovery time when the nth query result indicates that the state information of the target logical disk is recovered from the exception to be normal; and calculating a difference value between the recovery time and the current time, and determining the difference value as the state recovery time of the target logical disk.
The state recovery time length is used for determining the moment when the host sends the query command to the storage system. N is more than or equal to 2 and is a positive integer.
Based on the above method of S201-S204, when the storage system receives the query command sent by the host for the first time, it queries the target logical disk in the storage system; recording the current moment when the query result is that the state information of the target logical disk is abnormal; and after a first preset time period from the current moment, carrying out secondary query on the target logic disk, and generating and sending indication information to the host when the secondary query result is that the state information of the target logic disk is abnormal, so as to trigger the second sending of the query command, query the target logic disk, and until the state information of the target logic disk queried by the storage system is normal.
After the state information of the target logical disk is queried by the storage system to be abnormal, after a first preset time period from the current moment, the state information of the target logical disk after the first preset time period can be determined again by secondarily querying the target logical disk. When the secondary query result is still that the state information of the target logical disk is abnormal, it can be determined that the state information of the target logical disk is not recovered from the abnormal state to the normal state within the first preset time period. At this time, the indication information is generated and sent, so that the host considers that the target logical disk is on line again, the host walks the disk scanning flow again, and the query command is sent again in the disk scanning flow to query the target logical disk.
Compared with the mode that the host sends a query command once and waits for the command to overtime in the related art, retry is not performed, and the interaction between the host and the storage system is directly judged to be abnormal, the method and the device can avoid the problems that the logic disk of the storage system is marked to be abnormal and the access path is marked to be invalid due to one interaction failure, and improve the interaction efficiency of the host and the storage system. Furthermore, the problem that after all paths of the host and the storage system are marked as invalid, interaction between the host and the storage system fails and service interruption is caused can be avoided.
In this embodiment, a method for querying the status of a logical disk is provided, which may be used for the host, and fig. 3 is a flowchart of another method for querying the status of a logical disk according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
S301: the first time a query command is sent to the storage system.
The query command is used for indicating the storage system to query a target logic disk in the storage system in at least one logic disk, and checking the state information of the target logic disk.
S302: and receiving indication information obtained and fed back by the storage system based on the query command.
The indication information is used for indicating the host to send the query command for the second time and query the target logical disk. The indication information is generated when the storage system queries the state information of the target logical disk to indicate abnormality, and performs secondary query to obtain the state information of the target logical disk to still indicate abnormality.
In some alternative embodiments, the host may further receive the state information and the disk information of the target logical disk obtained and fed back by the storage system based on the query command, and the state information of the target logical disk indicates as normal.
S303: and generating and sending a secondary query command to the storage system.
The secondary query command is used for indicating the storage system to query the state information of the target logical disk again until the state information is queried to be normal.
In some alternative embodiments, after receiving the indication information obtained and fed back by the storage system based on the query command, the host generates a secondary query command, delays the second preset period, and sends the secondary query command to the storage system.
The second preset time period is the difference value between the state recovery time period and the first preset time period.
In the embodiment of the invention, the state recovery time is the time for recovering the state information of the target logical disk from the abnormality to the normal state.
For example, taking the first preset time period as 20 seconds and the state recovery time period as 30 seconds as an example, the host computer needs to delay for 10 seconds after receiving the indication information sent by the storage system after 20 seconds elapse, and then sends the query command to the storage system for the second time. Obviously, if the storage system inquires that the state information of the target logical disk is abnormal for the first time, the storage system sends indication information to the host after 20 seconds. After the host delays for 10 seconds, at the moment, the state information of the target logical disk is recovered from abnormality to be normal, and a query command is sent to the storage system for the second time, and the state information of the target logical disk is queried to be normal.
In some optional embodiments, after the host sends the query command to the storage system for the second time, the host may further obtain a historical response time period after the host sends the query command; after the query command is sent to the storage system for the second time, if the state information of the target logical disk fed back by the storage system is not received within the historical response time, determining that the state information of the target logical disk is indicated to be abnormal, and sending the query command to the storage system for the third time.
Based on the method of S301 to S303, the host sends a query command to the storage system for the first time, where the query command is used to instruct the storage system to query a target logical disk in the storage system; receiving indication information sent by a storage system after a first preset time period, wherein the indication information is used for indicating a host to send a query command for the second time and query a target logical disk; and sending a query command to the storage system for the second time until the state information of the target logical disk queried by the storage system is normal.
After the host sends the query command to the storage system for the first time, the indication information sent by the storage system is received after a first preset time period, and the indication information is used for indicating the host to send the query command for the second time, namely, the indication information is received after the first preset time period after the host sends the query command for the first time, so that the host considers that the target logical disk is on line again, the host can walk the disk scanning flow again, and the query command can be sent again in the disk scanning flow to query the target logical disk.
Compared with the mode that the host sends a query command once and waits for the command to overtime in the related art, retry is not performed, and the interaction between the host and the storage system is directly judged to be abnormal, the method and the device can avoid the problems that the logic disk of the storage system is marked to be abnormal and the access path is marked to be invalid due to one interaction failure, and improve the interaction efficiency of the host and the storage system. Furthermore, the problem that after all paths of the host and the storage system are marked as invalid, interaction between the host and the storage system fails and service interruption is caused can be avoided.
The embodiment also provides a state query system of the logic disk, which comprises a host and a storage system.
The host is used for sending a query command to the storage system for the first time, wherein the query command is used for indicating the storage system to query the target logic disk in at least one logic disk and checking the state information of the target logic disk.
And the storage system is used for inquiring the target logic disk in at least one logic disk in the storage system when the inquiry command sent by the host is received for the first time, and checking the state information of the target logic disk to obtain an inquiry result.
And the storage system is also used for recording the current moment if the query result is that the state information of the target logical disk is abnormal.
And the storage system is also used for carrying out secondary query on the state information of the target logical disk after the first preset time period from the current moment to obtain a secondary query result.
The storage system is further configured to generate indication information if the second query result is that the state information of the target logical disk is still abnormal, and send the indication information to the host, where the indication information is used to instruct the host to send the query command for the second time.
The host is also used for receiving the indication information which is obtained and fed back by the storage system based on the query command.
And the host is also used for generating and sending a secondary query command to the storage system until the state information of the target logical disk queried by the storage system is normal.
It can be understood that, in the state query system of the logical disk, the interaction process between the host and the storage system may be as shown in fig. 4, and fig. 4 is a flowchart of another state query method of the logical disk according to an embodiment of the present invention, as shown in fig. 4, where the flowchart includes the following steps:
S401: the host first sends a query command to the storage system.
S402: when the storage system receives a query command sent by the host for the first time, querying a target logical disk in the storage system.
S403: the storage system judges whether the query result is the state information of the target logical disk or not.
S404: if yes, the storage system reports the state information and the disk information of the target logical disk to the host.
S405: if not, the storage system records the current time, and after a first preset time period from the current time, the target logical disk is subjected to secondary query to obtain a secondary query result.
S406: the storage system judges whether the secondary query result is the state information of the target logical disk or not. If yes, return to S404.
S407: if not, the storage system generates the indication information and sends the indication information to the host.
S408: the host receives the indication information and sends the inquiry command to the storage system for the second time until the state information of the target logical disk inquired by the storage system is normal.
The embodiment also provides a device for querying the status of the logical disk, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a state query device of a logic disk, as shown in fig. 5, fig. 5 is a structural block diagram of the state query device of the logic disk according to an embodiment of the invention; applied to a storage system, an apparatus comprising:
The first query module 501 is configured to query a target logical disk in at least one logical disk in the storage system when a query command sent by the host is received for the first time, and check status information of the target logical disk to obtain a query result.
The first processing module 502 is configured to record the current time if the query result indicates that the state information of the target logical disk is abnormal.
The first query module 501 is further configured to perform a secondary query on the state information of the target logical disk after a first preset period of time passes from the current time, so as to obtain a secondary query result.
The first processing module 502 is further configured to generate indication information if the second query result is that the state information of the target logical disk is still abnormal, and send the indication information to the host, where the indication information is used to instruct the host to send a query command for the second time to query the state information of the target logical disk until the state information of the target logical disk queried by the storage system is normal.
In some optional embodiments, the first processing module 502 is further configured to obtain disk information of the target logical disk if the query result indicates that the state information of the target logical disk is normal, where the disk information includes a space and a type of the target logical disk; and reporting the state information and the disk information of the target logical disk to the host.
In some optional embodiments, the first processing module 502 is further configured to obtain an operating system type corresponding to the host; the first processing module 502 is further configured to determine, according to the operating system type and a preset correspondence, an expected response duration corresponding to the operating system type, and determine the expected response duration as a first preset time period, where the preset correspondence is a correspondence between the operating system type and the expected response duration, and the expected response duration is a duration during which the host computer expects to receive the response after sending the query command.
In some optional embodiments, the first processing module 502 is further configured to record a recovery time when the nth query result indicates that the state information of the target logical disk is recovered from an exception to a normal state, where N is greater than or equal to 2 and is a positive integer; the first processing module 502 is further configured to calculate a difference between the recovery time and the current time, and determine the difference as a state recovery time length of the target logical disk, where the state recovery time length is used to determine a time when the host sends the query command to the storage system.
In some optional embodiments, the first processing module 502 is further configured to obtain the disk information of the target logical disk if the second query result indicates that the state information of the target logical disk is normal, and report the state information and the disk information of the target logical disk to the host.
In some optional embodiments, the first processing module 502 is further configured to obtain a reference response duration of the host, idle computing resources and idle memory resources of the host, and a disk read-write speed of the target logical disk; the first processing module 502 is further configured to calculate and generate a first preset time period according to a preset algorithm according to the reference response duration, the idle computing resource, the idle memory resource, and the disk read-write speed.
In some optional embodiments, the first processing module 502 is further configured to obtain a first impact factor corresponding to the idle computing resource, a second impact factor corresponding to the idle memory resource, and a third impact factor corresponding to the disk read/write speed; the first processing module 502 is further configured to calculate, according to a preset algorithm, a first preset time period according to a reference response time length, a first influence factor, a second influence factor, and a third influence factor, where the preset algorithm is:
wherein, A first preset time period is indicated,A reference response time period is indicated,A first influencing factor is indicated by the fact that,A second influencing factor is indicated by the fact that,Representing a third influencing factor.
The present embodiment provides a state query device of a logical disk, as shown in fig. 6, fig. 6 is a structural block diagram of a state query device of another logical disk according to an embodiment of the present invention, where the device includes:
The second query module 601 is configured to send a query command to the storage system for the first time, where the query command is used to instruct the storage system to query the storage system for the target logical disk in the at least one logical disk, and check status information of the target logical disk.
The second processing module 602 is configured to receive indication information obtained and fed back by the storage system based on the query command, where the indication information is generated by the storage system when the state information of the target logical disk is abnormal, the second query is performed after the first preset period of time passes, and the state information is still abnormal.
The second query module 601 is further configured to generate and send a secondary query command to the storage system, where the secondary query command is used to instruct the storage system to query the state information of the target logical disk again until the state information is queried to be normal.
In some alternative embodiments, after the second sending the query command to the storage system, the second processing module 602 is further configured to obtain a historical response duration after the host sends the query command; after the query command is sent to the storage system for the second time, if the state information of the target logical disk fed back by the storage system is not received within the historical response time, determining that the state information of the target logical disk is indicated to be abnormal, and sending the query command to the storage system for the third time.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The state query device of the logical disk in this embodiment is presented as a functional unit, where the unit refers to an ASIC (Application SPECIFIC INTEGRATED Circuit) Circuit, a processor and a memory that execute one or more software or firmware, and/or other devices that can provide the above functions.
The embodiment of the invention also provides computer equipment, which is provided with the state query device of the logic disk shown in the figure 5 or the figure 6.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 7, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 7.
The processor 10 may be a central processor, a network processor, or a combination thereof. Wherein the processor 10 may further comprise a hardware integrated circuit. The hardware integrated circuit may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device 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.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Portions of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or aspects in accordance with the present application by way of operation of the computer. Those skilled in the art will appreciate that the form of computer program instructions present in a computer readable medium includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the manner in which the computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, a computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by a computer.
The invention can be implemented in a number of ways, including as: a process; a device; a system; a composition of matter; a computer program product embodied on a computer readable storage medium; and/or a processor, such as a processor configured to execute instructions stored on and/or provided by a memory coupled to the processor. In this specification, these embodiments, or any other form that the invention may take, may be referred to as techniques. In general, the order of the steps of disclosed processes may be altered within the scope of the invention. Unless otherwise indicated, components described as being configured to perform a task (such as a processor or memory) may be implemented as general-purpose components that are temporarily configured to perform the task at a given time, or as specific components that are manufactured to perform the task. As used herein, the term 'processor' refers to one or more devices, circuits, and/or processing cores configured to process data (such as computer program instructions).
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (13)

1.一种逻辑磁盘的状态查询方法,其特征在于,所述方法包括:1. A method for querying the status of a logical disk, characterized in that the method comprises: 当第一次接收到主机发送的查询命令时,在存储系统中的至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息,得到查询结果;When a query command sent by the host is received for the first time, querying a target logical disk in at least one logical disk in the storage system, and checking status information of the target logical disk to obtain a query result; 若所述查询结果为所述目标逻辑磁盘的状态信息为异常,则记录当前时刻;If the query result is that the status information of the target logical disk is abnormal, recording the current time; 获取所述主机的基准应答时长、所述主机的空闲计算资源和空闲内存资源、所述目标逻辑磁盘的磁盘读写速度;Obtaining a benchmark response time of the host, idle computing resources and idle memory resources of the host, and a disk read and write speed of the target logical disk; 根据所述基准应答时长、所述空闲计算资源、所述空闲内存资源以及所述磁盘读写速度,按照预设算法计算生成第一预设时间段;Generate a first preset time period by calculating according to a preset algorithm based on the benchmark response time, the idle computing resources, the idle memory resources and the disk read/write speed; 从所述当前时刻起经过所述第一预设时间段后,对所述目标逻辑磁盘的状态信息进行二次查询,得到二次查询结果;After the first preset time period has passed since the current moment, a second query is performed on the status information of the target logical disk to obtain a second query result; 若所述二次查询结果为所述目标逻辑磁盘的状态信息仍为异常时,则生成指示信息,并将所述指示信息发送给所述主机,所述指示信息用于指示所述主机第二次发送查询命令,查询所述目标逻辑磁盘的状态信息,直至所述状态信息为正常为止;If the secondary query result shows that the status information of the target logical disk is still abnormal, then generating indication information and sending the indication information to the host, wherein the indication information is used to instruct the host to send a query command for the second time to query the status information of the target logical disk until the status information is normal; 所述根据所述基准应答时长、所述空闲计算资源、所述空闲内存资源以及所述磁盘读写速度,按照预设算法计算生成第一预设时间段,包括:The step of calculating and generating a first preset time period according to a preset algorithm based on the benchmark response time, the idle computing resources, the idle memory resources, and the disk read/write speed includes: 获取所述空闲计算资源对应的第一影响因子、所述空闲内存资源对应的第二影响因子以及所述磁盘读写速度对应的第三影响因子;Obtaining a first impact factor corresponding to the idle computing resources, a second impact factor corresponding to the idle memory resources, and a third impact factor corresponding to the disk read/write speed; 根据所述基准应答时长、所述第一影响因子、所述第二影响因子、所述第三影响因子,按照所述预设算法计算生成所述第一预设时间段,所述预设算法为:The first preset time period is generated by calculating according to the preset algorithm based on the benchmark response time, the first impact factor, the second impact factor, and the third impact factor. The preset algorithm is: 其中,表示所述第一预设时间段,表示所述基准应答时长,表示所述第一影响因子,表示所述第二影响因子,表示所述第三影响因子。in, represents the first preset time period, represents the benchmark response time, represents the first impact factor, represents the second impact factor, represents the third impact factor. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, characterized in that the method further comprises: 若所述查询结果为所述目标逻辑磁盘的状态信息为正常,则获取所述目标逻辑磁盘的磁盘信息,所述磁盘信息包括所述目标逻辑磁盘的空间和类型;If the query result is that the status information of the target logical disk is normal, obtaining disk information of the target logical disk, the disk information including the space and type of the target logical disk; 上报所述目标逻辑磁盘的状态信息和所述磁盘信息给所述主机。Report the status information of the target logical disk and the disk information to the host. 3.根据权利要求2所述的方法,其特征在于,在从所述当前时刻起经过第一预设时间段后,对所述目标逻辑磁盘的状态信息进行二次查询,得到二次查询结果之前,所述方法还包括:3. The method according to claim 2, characterized in that after a first preset time period has passed from the current moment, a secondary query is performed on the status information of the target logical disk, and before obtaining the secondary query result, the method further comprises: 获取所述主机对应的操作系统类型;Obtaining the operating system type corresponding to the host; 根据所述操作系统类型和预设对应关系,确定所述操作系统类型对应的期望应答时长,并将所述期望应答时长确定为所述第一预设时间段,所述预设对应关系为所述操作系统类型与所述期望应答时长的对应关系,所述期望应答时长为所述主机发送所述查询命令后,期望收到应答的时长。According to the operating system type and the preset correspondence, the expected response time corresponding to the operating system type is determined, and the expected response time is determined as the first preset time period. The preset correspondence is the correspondence between the operating system type and the expected response time. The expected response time is the time it takes for the host to expect to receive a response after sending the query command. 4.根据权利要求3所述的方法,其特征在于,所述方法还包括:4. The method according to claim 3, characterized in that the method further comprises: 在第N次查询结果为所述目标逻辑磁盘的状态信息从异常恢复为正常时,记录恢复时刻,N≥2且为正整数;When the Nth query result shows that the status information of the target logical disk is restored from abnormal to normal, the restoration time is recorded, where N ≥ 2 and is a positive integer; 计算所述恢复时刻与所述当前时刻之间的差值,并将所述差值确定为所述目标逻辑磁盘的状态恢复时长,所述状态恢复时长用于确定所述主机向所述存储系统发送所述查询命令的时刻。The difference between the recovery time and the current time is calculated, and the difference is determined as the state recovery duration of the target logical disk, and the state recovery duration is used to determine the time when the host sends the query command to the storage system. 5.根据权利要求4所述的方法,其特征在于,所述方法还包括:5. The method according to claim 4, characterized in that the method further comprises: 若所述二次查询结果为所述目标逻辑磁盘的状态信息为正常时,则获取所述目标逻辑磁盘的所述磁盘信息;If the secondary query result is that the status information of the target logical disk is normal, obtaining the disk information of the target logical disk; 上报所述目标逻辑磁盘的状态信息和所述磁盘信息给所述主机。Report the status information of the target logical disk and the disk information to the host. 6.一种逻辑磁盘的状态查询方法,其特征在于,所述方法包括:6. A method for querying the status of a logical disk, characterized in that the method comprises: 第一次发送查询命令到存储系统,所述查询命令用于指示所述存储系统在至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息;Sending a query command to the storage system for the first time, wherein the query command is used to instruct the storage system to query a target logical disk in at least one logical disk and check status information of the target logical disk; 接收所述存储系统基于所述查询命令得到并反馈的指示信息,所述指示信息由所述存储系统在所述目标逻辑磁盘的状态信息为异常的情况下,经过第一预设时间段后二次查询且所述状态信息仍为异常时生成,所述第一预设时间段是所述存储系统基于主机的基准应答时长、所述主机的空闲计算资源和空闲内存资源、所述目标逻辑磁盘的磁盘读写速度,按照预设算法计算生成的;receiving indication information obtained and fed back by the storage system based on the query command, the indication information being generated by the storage system when, in a case where the status information of the target logical disk is abnormal, a second query is performed after a first preset time period and the status information is still abnormal, the first preset time period being generated by the storage system according to a preset algorithm based on a benchmark response time of the host, idle computing resources and idle memory resources of the host, and a disk read and write speed of the target logical disk; 生成并发送二次查询命令到所述存储系统,所述二次查询命令用于指示所述存储系统再次查询所述目标逻辑磁盘的状态信息,直至查询到所述状态信息为正常时为止;Generate and send a secondary query command to the storage system, wherein the secondary query command is used to instruct the storage system to query the status information of the target logical disk again until the status information is found to be normal; 其中,预设算法为: Among them, the preset algorithm is: 其中,表示所述第一预设时间段,表示所述基准应答时长,表示所述所述空闲计算资源对应的第一影响因子,表示所述所述空闲内存资源对应的第二影响因子,表示所述磁盘读写速度对应的第三影响因子。in, represents the first preset time period, represents the benchmark response time, represents a first impact factor corresponding to the idle computing resource, represents a second impact factor corresponding to the free memory resource, Indicates the third influencing factor corresponding to the disk read and write speed. 7.根据权利要求6所述的方法,其特征在于,所述生成并发送二次查询命令到所述存储系统之后,还包括:7. The method according to claim 6, characterized in that after generating and sending the secondary query command to the storage system, it also includes: 获取主机发送所述查询命令后的历史应答时长;Obtain the historical response time after the host sends the query command; 若在所述历史应答时长内,未接收到所述存储系统反馈的所述目标逻辑磁盘的状态信息,则确定所述目标逻辑磁盘的状态信息指示为异常,并第三次发送所述查询命令到所述存储系统。If the status information of the target logical disk fed back by the storage system is not received within the historical response time, it is determined that the status information of the target logical disk indicates an abnormality, and the query command is sent to the storage system for the third time. 8.一种逻辑磁盘的状态查询装置,其特征在于,所述装置包括:8. A device for querying the status of a logical disk, characterized in that the device comprises: 第一查询模块,用于当第一次接收到主机发送的查询命令时,在存储系统中的至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息,得到查询结果;A first query module, configured to query a target logical disk in at least one logical disk in the storage system and check status information of the target logical disk to obtain a query result when a query command sent by the host is received for the first time; 第一处理模块,用于若所述查询结果为所述目标逻辑磁盘的状态信息为异常,则记录当前时刻;A first processing module, configured to record the current time if the query result indicates that the status information of the target logical disk is abnormal; 所述第一处理模块,还用于获取所述主机的基准应答时长、所述主机的空闲计算资源和空闲内存资源、所述目标逻辑磁盘的磁盘读写速度;The first processing module is further used to obtain the benchmark response time of the host, the idle computing resources and idle memory resources of the host, and the disk read and write speed of the target logical disk; 所述第一处理模块,还用于根据所述基准应答时长、所述空闲计算资源、所述空闲内存资源以及所述磁盘读写速度,按照预设算法计算生成第一预设时间段;The first processing module is further configured to calculate and generate a first preset time period according to a preset algorithm based on the benchmark response time, the idle computing resources, the idle memory resources, and the disk read and write speed; 所述第一查询模块,还用于从所述当前时刻起经过第一预设时间段后,对所述目标逻辑磁盘的状态信息进行二次查询,得到二次查询结果;The first query module is further configured to perform a secondary query on the status information of the target logical disk after a first preset time period has passed from the current moment to obtain a secondary query result; 所述第一处理模块,还用于若所述二次查询结果为所述目标逻辑磁盘的状态信息仍为异常时,则生成指示信息,并将所述指示信息发送给所述主机,所述指示信息用于指示所述主机第二次发送所述查询命令,查询所述目标逻辑磁盘的状态信息,直至所述状态信息为正常为止;The first processing module is further configured to generate indication information if the secondary query result shows that the status information of the target logical disk is still abnormal, and send the indication information to the host, wherein the indication information is used to instruct the host to send the query command for the second time to query the status information of the target logical disk until the status information is normal; 其中,所述第一处理模块,具体用于获取所述空闲计算资源对应的第一影响因子、所述空闲内存资源对应的第二影响因子以及所述磁盘读写速度对应的第三影响因子;The first processing module is specifically used to obtain a first impact factor corresponding to the idle computing resources, a second impact factor corresponding to the idle memory resources, and a third impact factor corresponding to the disk read/write speed; 所述第一处理模块,具体用于根据所述基准应答时长、所述第一影响因子、所述第二影响因子、所述第三影响因子,按照所述预设算法计算生成所述第一预设时间段,所述预设算法为:The first processing module is specifically configured to calculate and generate the first preset time period according to the benchmark response time, the first impact factor, the second impact factor, and the third impact factor according to the preset algorithm, wherein the preset algorithm is: 其中,表示所述第一预设时间段,表示所述基准应答时长,表示所述第一影响因子,表示所述第二影响因子,表示所述第三影响因子。in, represents the first preset time period, represents the benchmark response time, represents the first impact factor, represents the second impact factor, represents the third impact factor. 9.一种逻辑磁盘的状态查询装置,其特征在于,所述装置包括:9. A device for querying the status of a logical disk, characterized in that the device comprises: 第二查询模块,用于第一次发送查询命令到存储系统,所述查询命令用于指示所述存储系统在至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息;A second query module, configured to send a query command to the storage system for the first time, wherein the query command is configured to instruct the storage system to query a target logical disk in at least one logical disk and check status information of the target logical disk; 第二处理模块,用于接收所述存储系统基于所述查询命令得到并反馈的指示信息,所述指示信息由所述存储系统在所述目标逻辑磁盘的状态信息为异常的情况下,经过第一预设时间段后二次查询且所述状态信息仍为异常时生成,所述第一预设时间段是所述存储系统基于主机的基准应答时长、所述主机的空闲计算资源和空闲内存资源、所述目标逻辑磁盘的磁盘读写速度,按照预设算法计算生成的;A second processing module is used to receive indication information obtained and fed back by the storage system based on the query command, wherein the indication information is generated by the storage system when the status information of the target logical disk is abnormal and the storage system performs a second query after a first preset time period and the status information is still abnormal, wherein the first preset time period is calculated and generated by the storage system according to a preset algorithm based on a benchmark response time of the host, idle computing resources and idle memory resources of the host, and a disk read and write speed of the target logical disk; 所述第二查询模块,还用于生成并发送二次查询命令到所述存储系统,所述二次查询命令用于指示所述存储系统再次查询所述目标逻辑磁盘的状态信息,直至查询到所述状态信息为正常时为止;The second query module is further used to generate and send a secondary query command to the storage system, wherein the secondary query command is used to instruct the storage system to query the status information of the target logical disk again until the status information is found to be normal; 其中,预设算法为: Among them, the preset algorithm is: 其中,表示所述第一预设时间段,表示所述基准应答时长,表示所述所述空闲计算资源对应的第一影响因子,表示所述所述空闲内存资源对应的第二影响因子,表示所述磁盘读写速度对应的第三影响因子。in, represents the first preset time period, represents the benchmark response time, represents a first impact factor corresponding to the idle computing resource, represents a second impact factor corresponding to the free memory resource, Indicates the third influencing factor corresponding to the disk read and write speed. 10.一种逻辑磁盘的状态查询系统,其特征在于,所述逻辑磁盘的状态查询系统包括主机和存储系统;10. A logical disk status query system, characterized in that the logical disk status query system comprises a host and a storage system; 所述主机,用于第一次发送查询命令到存储系统,所述查询命令用于指示所述存储系统在至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息;The host is used to send a query command to the storage system for the first time, wherein the query command is used to instruct the storage system to query a target logical disk in at least one logical disk and check status information of the target logical disk; 所述存储系统,用于当第一次接收到主机发送的所述查询命令时,在存储系统中的至少一个逻辑磁盘中查询目标逻辑磁盘,并检查所述目标逻辑磁盘的状态信息,得到查询结果;The storage system is used to query a target logical disk in at least one logical disk in the storage system and check the status information of the target logical disk to obtain a query result when receiving the query command sent by the host for the first time; 所述存储系统,还用于若所述查询结果为所述目标逻辑磁盘的状态信息为异常,则记录当前时刻;The storage system is further configured to record the current time if the query result indicates that the status information of the target logical disk is abnormal; 所述存储系统,还用于获取所述主机的基准应答时长、所述主机的空闲计算资源和空闲内存资源、所述目标逻辑磁盘的磁盘读写速度;The storage system is further used to obtain the benchmark response time of the host, the idle computing resources and idle memory resources of the host, and the disk read and write speed of the target logical disk; 所述存储系统,还用于根据所述基准应答时长、所述空闲计算资源、所述空闲内存资源以及所述磁盘读写速度,按照预设算法计算生成第一预设时间段;The storage system is further configured to calculate and generate a first preset time period according to a preset algorithm based on the benchmark response time, the idle computing resources, the idle memory resources, and the disk read and write speed; 所述存储系统,还用于从所述当前时刻起经过第一预设时间段后,对所述目标逻辑磁盘的状态信息进行二次查询,得到二次查询结果;The storage system is further configured to perform a secondary query on the state information of the target logical disk after a first preset time period has passed since the current moment to obtain a secondary query result; 所述存储系统,还用于若所述二次查询结果为所述目标逻辑磁盘的状态信息仍为异常时,则生成指示信息,并将所述指示信息发送给所述主机,所述指示信息用于指示所述主机第二次发送所述查询命令;The storage system is further configured to generate indication information if the secondary query result shows that the status information of the target logical disk is still abnormal, and send the indication information to the host, wherein the indication information is used to instruct the host to send the query command for the second time; 所述主机,还用于接收所述存储系统基于所述查询命令得到并反馈的指示信息;The host is further used to receive indication information obtained and fed back by the storage system based on the query command; 所述主机,还用于生成并发送二次查询命令到所述存储系统,所述二次查询命令用于指示所述存储系统再次查询所述目标逻辑磁盘的状态信息,直至查询到所述状态信息为正常时为止;The host is further used to generate and send a secondary query command to the storage system, wherein the secondary query command is used to instruct the storage system to query the status information of the target logical disk again until the status information is found to be normal; 其中,所述存储系统,还用于根据所述基准应答时长、所述空闲计算资源、所述空闲内存资源以及所述磁盘读写速度,按照预设算法计算生成第一预设时间段,包括:The storage system is further configured to calculate and generate a first preset time period according to a preset algorithm based on the benchmark response time, the idle computing resources, the idle memory resources, and the disk read and write speed, including: 所述存储系统,具体用于获取所述空闲计算资源对应的第一影响因子、所述空闲内存资源对应的第二影响因子以及所述磁盘读写速度对应的第三影响因子;The storage system is specifically used to obtain a first impact factor corresponding to the idle computing resources, a second impact factor corresponding to the idle memory resources, and a third impact factor corresponding to the disk read and write speed; 所述存储系统,还具体用于根据所述基准应答时长、所述第一影响因子、所述第二影响因子、所述第三影响因子,按照所述预设算法计算生成所述第一预设时间段,所述预设算法为:The storage system is further specifically configured to calculate and generate the first preset time period according to the preset algorithm based on the benchmark response time, the first impact factor, the second impact factor, and the third impact factor, wherein the preset algorithm is: 其中,表示所述第一预设时间段,表示所述基准应答时长,表示所述第一影响因子,表示所述第二影响因子,表示所述第三影响因子。in, represents the first preset time period, represents the benchmark response time, represents the first impact factor, represents the second impact factor, represents the third impact factor. 11.一种计算机设备,其特征在于,包括:11. A computer device, comprising: 存储器和处理器,所述存储器和所述处理器之间互相通信连接,所述存储器中存储有计算机指令,所述处理器通过执行所述计算机指令,从而执行权利要求1至7中任一项所述的逻辑磁盘的状态查询方法。A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the logical disk status query method according to any one of claims 1 to 7 by executing the computer instructions. 12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机指令,所述计算机指令用于使计算机执行权利要求1至7中任一项所述的逻辑磁盘的状态查询方法。12 . A computer-readable storage medium, characterized in that computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to enable a computer to execute the logical disk status query method according to any one of claims 1 to 7. 13.一种计算机程序产品,其特征在于,包括计算机指令,所述计算机指令用于使计算机执行权利要求1至7中任一项所述的逻辑磁盘的状态查询方法。13. A computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the method for querying the status of a logical disk according to any one of claims 1 to 7.
CN202411206037.XA 2024-08-30 2024-08-30 Logical disk status query method, device, system, equipment and storage medium Active CN118708133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411206037.XA CN118708133B (en) 2024-08-30 2024-08-30 Logical disk status query method, device, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411206037.XA CN118708133B (en) 2024-08-30 2024-08-30 Logical disk status query method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118708133A CN118708133A (en) 2024-09-27
CN118708133B true CN118708133B (en) 2024-11-15

Family

ID=92822405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411206037.XA Active CN118708133B (en) 2024-08-30 2024-08-30 Logical disk status query method, device, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118708133B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115004160A (en) * 2020-05-26 2022-09-02 深圳市欢太科技有限公司 Data processing method and device, processing equipment and data storage system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308238A (en) * 2018-12-03 2019-02-05 郑州云海信息技术有限公司 A kind of method, device and equipment that storage system disk array low-quality disk is adjusted
CN112328173B (en) * 2020-10-27 2024-12-03 中国建设银行股份有限公司 A method and device for repairing disk failure in a distributed storage system
CN113934581A (en) * 2021-09-27 2022-01-14 北京百度网讯科技有限公司 Method and device for acquiring disk fault information of storage system, electronic equipment and medium
CN117539386A (en) * 2023-11-09 2024-02-09 山东云海国创云计算装备产业创新中心有限公司 Disk array data processing method, device, equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115004160A (en) * 2020-05-26 2022-09-02 深圳市欢太科技有限公司 Data processing method and device, processing equipment and data storage system

Also Published As

Publication number Publication date
CN118708133A (en) 2024-09-27

Similar Documents

Publication Publication Date Title
EP3839749B1 (en) Data storage method, device and server
US11397538B2 (en) Data migration method and apparatus
CN108509156B (en) Data reading method, device, equipment and system
KR20200070085A (en) Method and apparatus for processing information
US10819611B2 (en) Dynamic timeout-based fault detection
CN113067875A (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
TWI518680B (en) Method for maintaining file system of computer system
CN114296909B (en) Automatic capacity expansion and contraction method and system for nodes according to kubernetes events
WO2023109880A1 (en) Service recovery method, data processing unit and related device
CN118708133B (en) Logical disk status query method, device, system, equipment and storage medium
CN113626054A (en) Business service updating method and device
CN117608893A (en) Method, device and related equipment for adjusting correctable error reporting threshold
TW201523447A (en) Server system and firmware update method
CN113626139B (en) High-availability virtual machine storage method and device
CN117041172A (en) White box switch interface request processing method and device
JP7429792B2 (en) Data transmission methods, terminals and computer-readable storage media
CN115454928A (en) System online migration method, system online migration device, equipment and medium
CN114003342A (en) Distributed storage method and device, electronic equipment and storage medium
US11989105B2 (en) Storage system and control method for adjusting timeout based on network conditions
US20090177911A1 (en) Apparatus, system, and method to prevent queue stalling
CN118484269B (en) Virtual machine data migration method, device, system, and server
US11656782B2 (en) Global deadline driven local synchronous replication I/O handling and recover
CN118642896A (en) A node determination method, device, equipment and storage medium based on fault domain
CN118282860A (en) File acquisition method, device and system
CN118964075A (en) Fault handling method, device, equipment and medium

Legal Events

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