CN117056150B - Network attached storage detection method, device, equipment and storage medium - Google Patents

Network attached storage detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN117056150B
CN117056150B CN202311307789.0A CN202311307789A CN117056150B CN 117056150 B CN117056150 B CN 117056150B CN 202311307789 A CN202311307789 A CN 202311307789A CN 117056150 B CN117056150 B CN 117056150B
Authority
CN
China
Prior art keywords
nas
information
detection
mounting
result
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
CN202311307789.0A
Other languages
Chinese (zh)
Other versions
CN117056150A (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.)
Bank Of Ningbo Co ltd
Original Assignee
Bank Of Ningbo 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 Bank Of Ningbo Co ltd filed Critical Bank Of Ningbo Co ltd
Priority to CN202311307789.0A priority Critical patent/CN117056150B/en
Publication of CN117056150A publication Critical patent/CN117056150A/en
Application granted granted Critical
Publication of CN117056150B publication Critical patent/CN117056150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a network attached storage detection method, device, equipment and storage medium, and relates to the technical field of computers. The method mainly comprises the following steps: acquiring network attached storage NAS mounting information on a current server, and inquiring NAS configuration information written in a file system table; detecting whether NAS mounting information is in an available state or not to obtain a detection result; based on NAS mounting information, NAS configuration information and detection results, determining a NAS detection type corresponding to each piece of NAS information in the current server, wherein the NAS information comprises NAS configuration information and NAS mounting information; the NAS detection type is a first type, and based on a first detection strategy, baseline detection is carried out on NAS information to obtain NAS detection results corresponding to the NAS information; the NAS detection type is a second type or a third type, and the NAS information is checked based on a second detection strategy to obtain a check result corresponding to the NAS information; and determining NAS detection results corresponding to the NAS information based on the investigation results corresponding to the NAS information and the NAS detection types.

Description

Network attached storage detection method, device, equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method, a device, equipment and a storage medium for detecting network attached storage.
Background
The network attached storage (NAS, network Attached Storage) is a dedicated data storage server that can be connected to a network and has a data storage function. In a daily operation and maintenance scene, operation and maintenance personnel often need to perform performance inspection on the NAS, including NAS availability inspection, NAS unavailability reason analysis and the like, but the performance inspection on the NAS by manpower wastes a large amount of time and manpower, and the inspection efficiency is low.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for detecting network attached storage, so as to at least solve the above technical problems in the prior art.
According to a first aspect of the present disclosure, there is provided a network attached storage detection method, the method comprising: acquiring network attached storage NAS mounting information on a current server, and inquiring NAS configuration information written in a file system table; detecting whether the NAS mounting information is in an available state or not to obtain a detection result; based on the NAS mounting information, NAS configuration information and the detection result, determining a NAS detection type corresponding to each piece of NAS information in the current server, wherein the NAS information comprises the NAS configuration information and the NAS mounting information; the NAS detection type is a first type, and then baseline detection is carried out on the NAS information based on a first detection strategy to obtain NAS detection results corresponding to the NAS information; the NAS detection type is a second type or a third type, and the NAS information is subjected to investigation and detection based on a second detection strategy to obtain an investigation result corresponding to the NAS information; and determining NAS detection results corresponding to the NAS information based on the investigation results corresponding to the NAS information and the NAS detection types.
In an embodiment, the obtaining the NAS mount information of the network attached storage on the current server and querying NAS configuration information written in the file system table includes: acquiring NAS mounting information on a current server based on a mount command; and inquiring the NAS configuration information written in the file system table based on the cat command.
In an embodiment, the detecting whether the NAS mount information is in an available state includes: acquiring all NAS mounting paths on the current server based on a df command, detecting whether response time of the df command is smaller than a first preset threshold value or not, and whether the NAS mounting paths are matched with NAS mounting information or not to obtain a first detection result; acquiring all working contents under the NAS mounting path based on an ls command, and detecting whether the response time of the ls command is smaller than a second preset threshold value or not to obtain a second detection result; creating a test file under the NAS mounting path based on a touch command, and detecting whether the test file can be successfully deleted or not to obtain a third detection result; and if the first detection result, the second detection result and the third detection result are all yes, determining that the NAS mounting information is in an available state.
In an embodiment, the determining the NAS detection type corresponding to each piece of NAS information in the current server includes: if the detection result of whether the NAS mounting information is in the available state is yes, determining that the NAS detection type corresponding to the NAS mounting information is a first type; if the detection result of whether the NAS mounting information is in the available state is no, determining that the NAS detection type corresponding to the NAS mounting information is a second type; and if the NAS information belongs to NAS configuration information and does not belong to NAS mounting information, determining that the NAS detection type corresponding to the NAS information is a third type.
In an embodiment, the performing baseline detection on the NAS information based on the first detection policy includes: detecting whether the NAS mounting information meets a mounting standard or not to obtain a first baseline detection result; detecting whether NAS configuration information corresponding to NAS mounting information meets a configuration standard or not to obtain a second baseline detection result if the NAS mounting information has corresponding NAS configuration information; based on the communication of the ping command and the service IP address corresponding to the NAS mounting information, detecting whether the response time of the ping command is smaller than a third preset threshold value or not, and obtaining a third baseline detection result; detecting whether the number of files in a NAS mounting path corresponding to the NAS mounting information is larger than a fourth preset threshold value or not, and obtaining a fourth baseline detection result; and if the first baseline detection result, the second baseline detection result, the third baseline detection result and the fourth baseline detection result are all yes, outputting a first NAS detection result, otherwise outputting a second NAS detection result.
In an embodiment, the performing the checking and detecting the NAS information based on the second detection policy includes: detecting whether a service IP address corresponding to the NAS information is connected with a network or not based on a ping command to obtain a first checking result; if the first checking result is yes, detecting whether the NAS mounting path corresponding to the NAS information is a NAS shared mounting path or not, and obtaining a second checking result; if the second checking result is yes, determining a corresponding target NAS based on the service IP address and the NAS mounting path, and detecting whether a white list of the target NAS contains the IP address of the current server or not to obtain a third checking result; if the third investigation result is yes, detecting whether the storage delay of the target NAS is smaller than a fifth preset threshold value or not, and obtaining a fourth investigation result; if the fourth checking result is yes, detecting whether a mounting path of the target NAS exists on the current server or not, and obtaining a fifth checking result; detecting whether the NAS information meets a configuration standard or not to obtain a sixth investigation result if the NAS information belongs to the NAS configuration information; and if the first, second, third, fourth, fifth and sixth investigation results are all passed, the investigation result corresponding to the NAS information is passed.
In an embodiment, the determining the NAS detection result corresponding to the NAS information includes: outputting a third NAS detection result based on the investigation result if the investigation result does not pass; outputting a fourth NAS detection result if the investigation result passes and the NAS detection type is the second type; and outputting a fifth NAS detection result if the check result passes and the NAS detection type is the third type.
According to a second aspect of the present disclosure, there is provided a network attached storage detection apparatus, the apparatus comprising: the acquisition module is used for acquiring network attached storage NAS mounting information on the current server and inquiring NAS configuration information written in a file system table; the state detection module is used for detecting whether the NAS mounting information is in an available state or not to obtain a detection result; a first determining module, configured to determine, based on the NAS mounting information, NAS configuration information, and the detection result, a NAS detection type corresponding to each piece of NAS information in the current server, where the NAS information includes the NAS configuration information and the NAS mounting information; the base line detection module is used for carrying out base line detection on the NAS information based on a first detection strategy to obtain NAS detection results corresponding to the NAS information when the NAS detection type is a first type; the check detection module is used for checking and detecting the NAS information based on a second detection strategy to obtain a check result corresponding to the NAS information when the NAS detection type is a second type or a third type; and the second determining module is used for determining the NAS detection result corresponding to the NAS information based on the investigation result corresponding to the NAS information and the NAS detection type.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described in the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the present disclosure.
According to the network attached storage detection method, device, equipment and storage medium, NAS mounting information on a current server and NAS configuration information written in a file system table are firstly obtained, whether the NAS mounting information is in an available state or not is detected to obtain a detection result, then NAS detection types corresponding to each piece of NAS information in the current server are determined based on the NAS mounting information, the NAS configuration information and the detection result, and finally NAS detection results corresponding to the NAS information are obtained by detecting the NAS information based on detection strategies corresponding to each detection type. Therefore, the present disclosure provides an automatic NAS detection method, which can simplify the NAS operation and maintenance process, improve NAS detection efficiency, and save a great amount of time and manpower.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Fig. 1 is a flow chart of a network attached storage detection method according to a first embodiment of the present disclosure;
FIG. 2 is a flow chart of a network attached storage detection method according to a second embodiment of the present disclosure;
FIG. 3 is a flow chart of a network attached storage detection method according to a third embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a network attached storage detection method according to a fourth embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a network attached storage detection method according to a fifth embodiment of the present disclosure;
Fig. 6 is a flowchart of a network attached storage detection method according to a sixth embodiment of the present disclosure;
fig. 7 is a schematic diagram showing the structure of a network attached storage detection apparatus according to a seventh embodiment of the present disclosure;
fig. 8 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, features and advantages of the present disclosure more comprehensible, the technical solutions in the embodiments of the present disclosure will be clearly described in conjunction with the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Fig. 1 is a flow chart of a network attached storage detection method according to a first embodiment of the present disclosure, as shown in fig. 1, the network attached storage detection method includes:
step S101, NAS mounting information on a current server is obtained, and NAS configuration information written in a file system table is queried.
In this embodiment, the internet protocol (IP, internet Protocol) address of the current server is input first, and then the current server is entered, then NAS mount information on the current server is acquired based on a mount command, and NAS configuration information written in a file system table (fstab, file system table) is queried based on a cat command. The NAS mounting information is NAS information actually mounted on the current server, and the NAS configuration information is configuration information which is written in fstab in advance and is used for realizing NAS mounting. Specifically, NAS mount information on the current server may be obtained based on the "mount|grep nfs" command, and NAS configuration information written in the file system table may be queried based on the "cat/etc/fstab|grep nfs" command.
Step S102, detecting whether the NAS mounting information is in an available state or not, and obtaining a detection result.
In this embodiment, it is further required to detect whether NAS mounting information actually mounted on the current server is in an available state, that is, detect whether NAS corresponding to NAS mounting information has a read-write function, if both the read-write functions are normal, NAS mounting information is in an available state, otherwise NAS mounting information is in an unavailable state. Specifically, whether NAS mount information is in an available state may be detected based on read-write commands such as ls command, cd command, and rm command.
Step S103, based on the NAS mounting information, the NAS configuration information and the detection result, determining the NAS detection type corresponding to each piece of NAS information in the current server.
In this embodiment, when classifying NAS information, each piece of NAS information in the current server needs to be classified, specifically, not one piece of NAS information is corresponding to each NAS, if one NAS is mounted on two NAS mounting paths, two pieces of NAS information can be obtained based on the NAS and the two NAS mounting paths corresponding to the NAS, so when classifying NAS information, both pieces of NAS information need to be classified. Specifically, the NAS information includes NAS configuration information and NAS mount information, and for one piece of NAS information, it may be mounted on the current server and written into fstab at the same time, that is, it may be NAS configuration information and NAS mount information at the same time; it is also possible to mount on the current server only without writing in fstab, or write in fstab only without mounting on the current server, i.e. it may be NAS configuration information or NAS mount information only, so that the NAS detection type corresponding to NAS information may be determined based on whether NAS information is in an available state and the dependency relationship between NAS information and NAS mount information and NAS configuration information.
In an embodiment, the NAS detection types may include a first type, a second type, and a third type, and in a case where NAS information is mounted on a current server and the NAS information is in an available state, it may be determined that the NAS detection type corresponding to the NAS information is the first type; under the condition that NAS information is mounted on a current server and the NAS information is in an unavailable state, determining that a NAS detection type corresponding to the NAS information is a second type; and under the condition that the NAS information is not mounted on the current server but is written into the fstab, determining that the NAS detection type corresponding to the NAS information is a third type.
Step S104, if the NAS detection type is the first type, the NAS information is subjected to baseline detection based on the first detection strategy, and NAS detection results corresponding to the NAS information are obtained.
In this embodiment, if the NAS detection type is the first type, and at this time, the NAS information is mounted on the current server and in an available state, then only baseline detection is required for the NAS information based on the first detection policy, that is, availability advanced inspection is performed for the NAS information, so as to obtain a NAS detection result corresponding to the NAS information.
Step S105, if the NAS detection type is the second type or the third type, the NAS information is checked based on the second detection strategy, and a check result corresponding to the NAS information is obtained.
In this embodiment, if the NAS detection type is the second type or the third type, and the NAS information is mounted on the current server but is in an unavailable state, or is not mounted on the current server but is written in fstab, the NAS information is checked based on the second detection policy, and then the NAS information is checked for an unavailable reason, so as to obtain a check result.
Step S106, determining NAS detection results corresponding to the NAS information based on the investigation results corresponding to the NAS information and the NAS detection types.
In this embodiment, after the NAS information is inspected and detected based on the second detection policy, NAS detection results may be different if NAS detection types are different for the same inspection result, and therefore, it is also necessary to specifically determine the NAS detection result corresponding to the NAS information based on the inspection result and the NAS detection type corresponding to the NAS information.
For the first embodiment of the present disclosure, NAS mount information on a current server and NAS configuration information written in a file system table are first obtained, and whether the NAS mount information is in an available state is detected, so as to obtain a detection result, then based on the NAS mount information, the NAS configuration information and the detection result, a NAS detection type corresponding to each piece of NAS information in the current server is determined, and finally based on a detection policy corresponding to each detection type, NAS information is detected, so as to obtain a NAS detection result corresponding to the NAS information. Therefore, the present disclosure provides an automatic NAS detection method, which can simplify the NAS operation and maintenance process, improve NAS detection efficiency, and save a great amount of time and manpower.
Fig. 2 is a flowchart illustrating a network attached storage detection method according to a second embodiment of the present disclosure, as shown in fig. 2, in step S102, detecting whether NAS mount information is in a usable state, including:
step S201, all NAS mounting paths on the current server are obtained based on the df command, whether the response time of the df command is smaller than a first preset threshold value or not is detected, and whether the NAS mounting paths are matched with NAS mounting information or not is detected, so that a first detection result is obtained.
In this embodiment, all NAS mounting paths on the current server, NAS corresponding to the NAS mounting paths, and disk occupation conditions of the NAS mounting paths may be obtained based on the "df-ah|grep" command, that is, all NAS information mounted on the current server may be obtained based on the command, whether the df command can output all NAS mounting paths within a first preset threshold time may be detected, and whether the output NAS mounting paths are the same as the mounting paths displayed in the NAS mounting information, so as to obtain a first detection result, where the first detection result may display a reading capability of the NAS mounting information. Specifically, the first preset threshold may be 5s.
Step S202, based on the ls command, obtaining all the working contents under the NAS mounting path, and detecting whether the response time of the ls command is smaller than a second preset threshold value, so as to obtain a second detection result.
In this embodiment, all the working contents under each NAS mount path on the current server may be obtained based on the "ls/NAS mount path" command, and whether the ls command can output all the working contents within the time of the second preset threshold is detected, so as to obtain a second detection result, where the second detection result may display the reading capability of the NAS mount information and the number of files under the corresponding mount path. Specifically, the second preset threshold may be 20s.
Step S203, based on the touch command, a test file is created under the NAS mounting path, whether the test file can be successfully deleted is detected, and a third detection result is obtained.
In this embodiment, a test file named "test_nas_date of day" may be created under the NAS mount path based on the command of "touch/NAS mount path/test_nas_date of day", and a test file named "test_nas_date of day" may be deleted under the NAS mount path based on the command of "rm-rf/NAS mount directory/test_nas_date of day", so that whether the test file can be successfully deleted may be detected, thereby obtaining a third detection result, and the third test result may display the writing capability of NAS mount information.
In step S204, if the first detection result, the second detection result, and the third detection result are all yes, it is determined that the NAS mounting information is in an available state.
In this embodiment, if the first detection result, the second detection result and the third detection result are all yes, it may be determined that the read-write function of the NAS mounting information is normal, that is, the NAS mounting information mounted on the current server is in an available state; if one of the first detection result, the second detection result and the third detection result is negative, determining that NAS mounting information mounted on the current server is in an unavailable state.
For the second embodiment of the present disclosure, the read-write function of NAS mount information mounted on the current server is detected based on the df command, the ls command, and the touch command, so as to determine whether the NAS mount information is in an available state, and facilitate subsequent determination of a NAS detection type corresponding to the NAS information based on the state of the NAS mount information.
Fig. 3 is a flowchart illustrating a network attached storage detection method according to a third embodiment of the present disclosure, as shown in fig. 3, the determining, in step S103, a NAS detection type corresponding to each piece of NAS information in the current server includes:
step S301, if the detection result is yes, it is determined that the NAS detection type corresponding to the NAS mounting information is the first type. The detection result refers to a detection result of whether the NAS mounting information is in a usable state.
Step S302, if the detection result is no, determining that the NAS detection type corresponding to the NAS mounting information is the second type.
Step S303, if the NAS information belongs to NAS configuration information and does not belong to NAS mounting information, determining that the NAS detection type corresponding to the NAS information is the third type.
In this embodiment, the NAS detection type includes a first type, a second type, and a third type, and in the case where NAS information is mounted on a current server and the NAS information is in an available state, it is determined that the NAS detection type corresponding to the NAS information is the first type; under the condition that NAS information is mounted on a current server and the NAS information is in an unavailable state, determining that a NAS detection type corresponding to the NAS information is a second type; in the case where NAS information is not mounted on the current server but fstab is written, that is, in the case where NAS information is only NAS configuration information and not NAS mounting information, it is determined that the NAS detection type corresponding to NAS information is the third type. The NAS detection type corresponding to the NAS information may be classified into a case where the NAS information is mounted on a current service, is in an available state, and is written into fstab, that is, the NAS information is both NAS mounting information and NAS configuration information, and a case where the NAS information is mounted on a current service, is in an available state, and is not written into fstab, that is, the NAS information is only NAS mounting information and not NAS configuration information.
To facilitate understanding of the third embodiment of the present disclosure, the classification of NAS information is shown by table (one):
form 1
As shown in table (one), in the case that NAS information is mounted on a current server, available and written to fstab, and NAS information is mounted on a current server, available and not written to fstab, NAS detection types corresponding to NAS information are all of a first type; under the condition that NAS information is mounted on a current server and is unavailable, NAS detection type corresponding to the NAS information is a second type; in the case where NAS information is not mounted on the current server but is written to fstab, the NAS detection type corresponding to the NAS information is the third type.
For the third embodiment of the present disclosure, based on whether NAS information is in an available state and the dependency relationship between NAS information and NAS mounting information and NAS configuration information, a NAS detection type corresponding to NAS information is determined, so that subsequent automated detection of NAS information based on a detection policy corresponding to each detection type is facilitated, thereby improving NAS detection efficiency, and saving a great amount of time and manpower.
Fig. 4 is a flowchart illustrating a network attached storage detection method according to a fourth embodiment of the present disclosure, as shown in fig. 4, the baseline detection of NAS information based on the first detection policy in step S104 includes:
Step S401, detecting whether the NAS mounting information meets the mounting standard or not, and obtaining a first baseline detection result.
In this embodiment, the NAS detection type is a first type, NAS information corresponding to the first type is NAS mount information, and whether the NAS mount information meets a mount standard is detected first, that is, whether all parameters in the NAS mount information match parameters in the mount standard is detected, so as to obtain a first baseline detection result. Specifically, the mounting standard may be shown in the following table (two):
form 2
Step S402, if the NAS mounting information has corresponding NAS configuration information, detecting whether the NAS configuration information corresponding to the NAS mounting information meets the configuration standard or not, and obtaining a second baseline detection result.
In this embodiment, corresponding NAS configuration information exists in the NAS mounting information, that is, the NAS mounting information is not only mounted on the current server but also written into the fstab, so that it is also required to detect whether the NAS configuration information corresponding to the NAS mounting information meets the configuration standard, that is, whether all parameters in the NAS configuration information match parameters in the configuration standard, so as to obtain a second baseline detection result. It should be emphasized that if the NAS mounting information does not have corresponding NAS configuration information, that is, the NAS mounting information is only mounted on the current server and is not written into fstab, the second baseline detection result is no.
Specifically, the configuration standard may be shown in the following table (three):
form (III)
Step S403, based on the communication of the ping command and the service IP address corresponding to the NAS mounting information, detecting whether the response time of the ping command is smaller than a third preset threshold value, and obtaining a third baseline detection result.
In this embodiment, based on the communication between the ping command and the service IP address corresponding to the NAS mounting information, it is detected whether the ping command can return response data in a time smaller than a third preset threshold, so as to obtain a third baseline detection result, where the third baseline detection result can represent performance of the NAS mounting information and performance of the network side. Specifically, the third preset threshold may be 5ms.
Step S404, detecting whether the number of files in the NAS mounting path corresponding to the NAS mounting information is larger than a fourth preset threshold value, and obtaining a fourth baseline detection result.
In this embodiment, if the number of files in the NAS mounting path exceeds a certain threshold, the read-write efficiency of the NAS mounting information will be low, so that whether the number of files in the NAS mounting path corresponding to the NAS mounting information is greater than a fourth preset threshold can be detected according to a command of "find/NAS mounting path-type d-size+fourth preset threshold", thereby obtaining a fourth baseline detection result. Specifically, the fourth preset threshold may be 10w (ten thousand).
In an embodiment, after step S404, whether the NAS snapshot corresponding to the NAS mount information is hidden may also be detected, so as to obtain a fifth baseline detection result, and specifically, whether the NAS snapshot is hidden may be determined according to the command of "ls-al/NAS mount path |grep.
Step S405, the first baseline detection result, the second baseline detection result, the third baseline detection result, and the fourth baseline detection result are all yes, and if not, the first NAS detection result is output, otherwise, the second NAS detection result is output.
In this embodiment, if the first baseline detection result, the second baseline detection result, the third baseline detection result, and the fourth baseline detection result are all yes, it is indicated that the NAS information baseline detection passes, the first NAS detection result may be output, and the first NAS detection result indicates that NAS mounting information is available and the baseline detection thereof passes; otherwise, outputting a second NAS detection result, wherein the second NAS detection result shows that NAS mounting information is available, and the problem types and the solution suggestions exist on the NAS mounting information base line.
In an embodiment, if the first baseline detection result, the second baseline detection result, the third baseline detection result, the fourth baseline detection result, and the fifth baseline detection result are all yes, indicating that the NAS information baseline detection is passed, the first NAS detection result may be output, where the first NAS detection result indicates that NAS mounting information is available and the baseline detection is passed; otherwise, outputting a second NAS detection result, where the second NAS detection result indicates that NAS mounting information is available, a problem type and a solution suggestion exist in a NAS mounting information baseline, for example, the second NAS detection result may be: NAS mount information is available, NAS snapshots are not hidden, normal use is not affected, and the contact storage group is set to invisible.
For the fourth embodiment of the present disclosure, if the NAS detection type is the first type, and at this time, the NAS information is mounted on the current server and in an available state, then only baseline detection is needed for the NAS information based on the first detection policy, that is, availability advanced inspection is performed for the NAS information, so as to obtain NAS detection results corresponding to the NAS information, and NAS may be optimized based on the NAS information availability based on the baseline detection results, so as to improve performance of the NAS.
Fig. 5 is a flowchart illustrating a network attached storage detection method according to a fifth embodiment of the present disclosure, as shown in fig. 5, the performing, in step S105, the check detection on NAS information based on the second detection policy includes:
step S501, detecting whether the service IP address corresponding to the NAS information is connected with the network or not based on the ping command to obtain a first checking result.
In this embodiment, the NAS detection type is a second type or a third type, NAS information is mounted on a current server and is unavailable, or NAS information is not mounted on the current server but is written into fstab, so that the NAS information is subjected to unavailability cause checking, firstly, whether a service IP address corresponding to the NAS information is network connected needs to be detected based on a ping command, and a first checking result is obtained, where the first checking result can represent whether a network side is normal or not and whether NAS mounting information or NAS configuration information is correct or not.
Step S502, if the first checking result is yes, detecting whether the NAS mounting path corresponding to the NAS information is a NAS shared mounting path, and obtaining a second checking result.
In this embodiment, if the service IP address corresponding to the NAS information can be ping-enabled, based on the command of the service IP address |grep/NAS mount path 1 "of the NAS information, it is detected whether the NAS mount path corresponding to the NAS information is a NAS shared mount path, and if the output of the showmount command is consistent with the NAS mount path contained therein, that is, the output is also" NAS mount path 1", it is indicated that the service IP address corresponding to the NAS information shares a remote path such as" NAS mount path 1", and the second checking result is yes.
In an embodiment, if the output of the showmount command is null, it indicates that the service IP address corresponding to the NAS information starts the NFS service, but a far-end path such as "NAS mount path 1" is not provided, NAS configuration information is wrong, or the NAS volume may be already recovered; if the output of the showmount command is other values, such as hang (no response) or err return, it indicates that the network port is not enabled, or the service IP address corresponding to the NAS information does not enable the NFS service.
Step S503, if the second checking result is yes, determining a corresponding target NAS based on the service IP address and the NAS mounting path, and detecting whether the white list of the target NAS contains the IP address of the current server, thereby obtaining a third checking result.
In this embodiment, if the service IP address corresponding to the NAS information can be ping-passed and the NAS mount path corresponding to the NAS information is a NAS shared mount path, determining a target NAS corresponding to the NAS information based on the service IP address and the NAS mount path, and detecting whether the white list of the target NAS includes the IP address of the current server, to obtain a third checking result. Specifically, if one ip in the current server ifconfig is in the white list, the third checking result is yes.
In an embodiment, if the target NAS determined based on the service IP address and the NAS mounting path exists, but the white list of the target NAS does not include the IP address of the current server, it is indicated that the white list authority is wrongly configured, and adjustment is needed; if the target NAS cannot be determined based on the service IP address and the NAS mount path, a command of "showmount-e service IP address" may be used to determine whether to add the whitelist.
And step S504, if the third checking result is yes, detecting whether the storage delay of the target NAS is smaller than a fifth preset threshold value, and obtaining a fourth checking result.
In this embodiment, if the white list of the target NAS includes the IP address of the current server, it is checked whether the storage delay of the target NAS is smaller than a fifth preset threshold, and a fourth investigation result is obtained, if the fourth investigation result is yes, the storage side performance of the target NAS is good; if the fourth checking result is no, it indicates that the target NAS storage side performance is poor, where the fifth preset threshold may be 30ms.
Step S505, if the fourth checking result is yes, detecting whether a mounting path of the target NAS exists on the current server, and obtaining a fifth checking result.
In this embodiment, if the storage delay of the target NAS is smaller than the fifth preset threshold, detecting whether the mount path of the target NAS exists on the current server based on the command of "find/mount path parent directory-maxdepth 1-type d-name mount file folder name" to obtain a fifth checking result, if the fifth checking result is no, the target NAS may not respond completely, and the corresponding mount path cannot be seen.
Step S506, if the NAS information belongs to NAS configuration information, detecting whether the NAS information meets the configuration standard or not to obtain a sixth investigation result.
In this embodiment, if NAS information belongs to NAS configuration information, that is, NAS information is written into fstab, whether all parameters in NAS information match parameters in a configuration standard is detected, so as to obtain a sixth checking result, and the configuration standard may refer to the foregoing table (iii), which is not described herein again.
In step S507, the first investigation result, the second investigation result, the third investigation result, the fourth investigation result, the fifth investigation result and the sixth investigation result are all passed, and the investigation result corresponding to the NAS information is passed.
In this embodiment, if the first investigation result, the second investigation result, the third investigation result, the fourth investigation result, the fifth investigation result and the sixth investigation result are all passed, the investigation result corresponding to the NAS information passes, otherwise the investigation result corresponding to the NAS information does not pass.
With the fifth embodiment of the present disclosure, in the case where NAS information is mounted on the current server and is unavailable, or NAS information is not mounted on the current server but is written into fstab, the cause of unavailable NAS information may be obtained by checking the cause of unavailable NAS information based on the second detection policy, so that NAS may be maintained, and performance of NAS may be improved.
Fig. 6 is a flowchart illustrating a network attached storage detection method according to a sixth embodiment of the present disclosure, as shown in fig. 6, a NAS detection result corresponding to NAS information is determined in step S106, including:
in step S601, if the checking result does not pass, a third NAS detection result is output based on the checking result.
In this embodiment, no matter whether the NAS detection type is the second type or the third type, if the investigation result is not passed, a third NAS detection result is output based on the investigation result, where the third NAS detection result indicates that NAS information is unavailable, a cause of the NAS information being unavailable, and a solution suggestion, for example, the second NAS detection result may be: NAS information is not available, NAS storage performance is delayed by more than 30ms, please contact storage group colleagues for investigation.
Step S602, if the check result passes and the NAS detection type is the second type, outputting a fourth NAS detection result.
In this embodiment, the check result proves that the sixth check result is yes, that is, the NAS information is written in fstab and the NAS information meets the configuration standard, so that, in the second type, that is, in the case that the NAS information is mounted on the current server and is not available, a fourth NAS detection result may be output, where the fourth NAS detection result indicates that the NAS information is mounted on the current server and has abnormal functions, but the NAS information is written in fstab and the NAS information meets the configuration standard, and may be re-mounted after being unloaded.
Step S603, if the checking result passes and the NAS detection type is the third type, outputting a fifth NAS detection result.
In this embodiment, the check result indicates that the NAS information is not mounted on the current server, but the NAS information is written in the fstab and the NAS information satisfies the configuration standard, so whether or not the NAS information needs to be mounted on the current server can be confirmed by proving that the sixth check result is yes, that is, the NAS information is written in the fstab and the NAS information satisfies the configuration standard, and therefore, in the case of the third type, that is, the NAS information is not mounted on the current server but is written in the fstab, the fifth NAS detection result indicates that the NAS information is not mounted on the current server.
In the sixth embodiment of the present disclosure, based on the investigation result and the NAS detection type corresponding to the NAS information, the NAS detection result corresponding to the NAS information is determined, so that a more accurate and comprehensive NAS detection result can be generated, and the NAS can be maintained according to the NAS detection result, so as to improve the performance of the NAS.
In order to facilitate understanding of the present disclosure, the following table (four) shows the classification of NAS detection results in the present disclosure, and based on the table (four), it can be seen that NAS detection results in the present disclosure can be classified into six categories:
form (IV)
Fig. 7 is a schematic structural diagram of a network attached storage detection device according to a seventh embodiment of the present disclosure, and as shown in fig. 7, a network attached storage detection device includes:
the acquiring module 10 is configured to acquire network attached storage NAS mounting information on a current server, and query NAS configuration information written in a file system table; the state detection module 11 is configured to detect whether NAS mounting information is in an available state, and obtain a detection result; a first determining module 12, configured to determine, based on NAS mounting information, NAS configuration information, and a detection result, a NAS detection type corresponding to each piece of NAS information in the current server, where the NAS information includes NAS configuration information and NAS mounting information; the baseline detection module 13 is configured to perform baseline detection on the NAS information based on the first detection policy if the NAS detection type is the first type, so as to obtain a NAS detection result corresponding to the NAS information; the checking and detecting module 14 is configured to check and detect NAS information based on the second detection policy if the NAS detection type is the second type or the third type, so as to obtain a checking result corresponding to the NAS information; the second determining module 15 is configured to determine a NAS detection result corresponding to NAS information based on the investigation result corresponding to NAS information and the NAS detection type.
In one embodiment, the acquisition module 10 is further configured to: acquiring NAS mounting information on a current server based on a mount command; and inquiring the NAS configuration information written in the file system table based on the cat command.
In an embodiment, the status detection module 11 is further configured to: acquiring all NAS mounting paths on a current server based on the df command, detecting whether response time of the df command is smaller than a first preset threshold value or not, and whether the NAS mounting paths are matched with NAS mounting information or not to obtain a first detection result; acquiring all working contents under the NAS mounting path based on the ls command, and detecting whether the response time of the ls command is smaller than a second preset threshold value or not to obtain a second detection result; creating a test file under the NAS mounting path based on the touch command, and detecting whether the test file can be successfully deleted or not to obtain a third detection result; and if the first detection result, the second detection result and the third detection result are all yes, determining that the NAS mounting information is in a usable state.
In an embodiment, the first determining module 12 is further configured to: if the detection result of whether the NAS mounting information is in the available state is yes, determining that the NAS detection type corresponding to the NAS mounting information is a first type; if the detection result of whether the NAS mounting information is in the available state is no, determining that the NAS detection type corresponding to the NAS mounting information is the second type; and if the NAS information belongs to the NAS configuration information and does not belong to the NAS mounting information, determining that the NAS detection type corresponding to the NAS information is a third type.
In one embodiment, the baseline detection module 13 is further configured to: detecting whether NAS mounting information meets mounting standards or not to obtain a first baseline detection result; detecting whether NAS configuration information corresponding to NAS mounting information meets a configuration standard or not to obtain a second baseline detection result if the NAS mounting information has corresponding NAS configuration information; based on the communication of the ping command and the service IP address corresponding to the NAS mounting information, detecting whether the response time of the ping command is smaller than a third preset threshold value or not, and obtaining a third baseline detection result; detecting whether the number of files in the NAS mounting path corresponding to the NAS mounting information is larger than a fourth preset threshold value or not, and obtaining a fourth baseline detection result; and outputting a first NAS detection result if the first baseline detection result, the second baseline detection result, the third baseline detection result and the fourth baseline detection result are all yes, otherwise outputting a second NAS detection result.
In one embodiment, the audit detection module 14 is further configured to: detecting whether a service IP address corresponding to NAS information is connected with a network or not based on a ping command to obtain a first investigation result; if the first checking result is yes, detecting whether the NAS mounting path corresponding to the NAS information is a NAS shared mounting path or not, and obtaining a second checking result; if the second checking result is yes, determining a corresponding target NAS based on the service IP address and the NAS mounting path, and detecting whether a white list of the target NAS contains the IP address of the current server or not to obtain a third checking result; if the third checking result is yes, detecting whether the storage delay of the target NAS is smaller than a fifth preset threshold value, and obtaining a fourth checking result; if the fourth checking result is yes, detecting whether a mounting path of the target NAS exists on the current server or not, and obtaining a fifth checking result; the NAS information belongs to NAS configuration information, and whether the NAS information meets the configuration standard is detected, so that a sixth investigation result is obtained; and if the first investigation result, the second investigation result, the third investigation result, the fourth investigation result, the fifth investigation result and the sixth investigation result are all passed, the investigation result corresponding to the NAS information is passed.
In an embodiment, the second determining module 15 is further configured to: if the checking result does not pass, outputting a third NAS detection result based on the checking result; outputting a fourth NAS detection result if the check result passes and the NAS detection type is the second type; and outputting a fifth NAS detection result if the check result passes and the NAS detection type is the third type.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 8 illustrates a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a network attached storage detection method. For example, in some embodiments, a network attached storage detection method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM 802 and/or communication unit 809. One or more steps of a network attached storage detection method described above may be performed when the computer program is loaded into RAM 803 and executed by computing unit 801. Alternatively, in other embodiments, the computing unit 801 may be configured to perform a network attached storage detection method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (7)

1. A method for network attached storage detection, the method comprising:
acquiring network attached storage NAS mounting information on a current server, and inquiring NAS configuration information written in a file system table;
detecting whether the NAS mounting information is in an available state or not to obtain a detection result;
based on the NAS mounting information, NAS configuration information and the detection result, determining a NAS detection type corresponding to each piece of NAS information in the current server, wherein the NAS information comprises the NAS configuration information and the NAS mounting information;
the NAS detection type is a first type, and then baseline detection is carried out on the NAS information based on a first detection strategy to obtain NAS detection results corresponding to the NAS information;
the NAS detection type is a second type or a third type, and the NAS information is subjected to investigation and detection based on a second detection strategy to obtain an investigation result corresponding to the NAS information;
determining NAS detection results corresponding to the NAS information based on the investigation results corresponding to the NAS information and the NAS detection types;
the determining the NAS detection type corresponding to each piece of NAS information in the current server includes:
If the detection result of whether the NAS mounting information is in the available state is yes, determining that the NAS detection type corresponding to the NAS mounting information is a first type;
if the detection result of whether the NAS mounting information is in the available state is no, determining that the NAS detection type corresponding to the NAS mounting information is a second type;
the NAS information belongs to NAS configuration information and does not belong to NAS mounting information, and the NAS detection type corresponding to the NAS information is determined to be a third type;
wherein the performing baseline detection on the NAS information based on the first detection policy includes:
detecting whether the NAS mounting information meets a mounting standard or not to obtain a first baseline detection result;
detecting whether NAS configuration information corresponding to NAS mounting information meets a configuration standard or not to obtain a second baseline detection result if the NAS mounting information has corresponding NAS configuration information;
based on the communication of the ping command and the service IP address corresponding to the NAS mounting information, detecting whether the response time of the ping command is smaller than a third preset threshold value or not, and obtaining a third baseline detection result;
detecting whether the number of files in a NAS mounting path corresponding to the NAS mounting information is larger than a fourth preset threshold value or not, and obtaining a fourth baseline detection result;
The first baseline detection result, the second baseline detection result, the third baseline detection result and the fourth baseline detection result are all yes, the first NAS detection result is output, and otherwise the second NAS detection result is output;
wherein the performing the check detection on the NAS information based on the second detection policy includes:
detecting whether a service IP address corresponding to the NAS information is connected with a network or not based on a ping command to obtain a first checking result;
if the first checking result is yes, detecting whether the NAS mounting path corresponding to the NAS information is a NAS shared mounting path or not, and obtaining a second checking result;
if the second checking result is yes, determining a corresponding target NAS based on the service IP address and the NAS mounting path, and detecting whether a white list of the target NAS contains the IP address of the current server or not to obtain a third checking result;
if the third investigation result is yes, detecting whether the storage delay of the target NAS is smaller than a fifth preset threshold value or not, and obtaining a fourth investigation result;
if the fourth checking result is yes, detecting whether a mounting path of the target NAS exists on the current server or not, and obtaining a fifth checking result;
Detecting whether the NAS information meets a configuration standard or not to obtain a sixth investigation result if the NAS information belongs to the NAS configuration information;
and if the first, second, third, fourth, fifth and sixth investigation results are all passed, the investigation result corresponding to the NAS information is passed.
2. The method of claim 1, wherein the obtaining NAS mount information on the current server and querying NAS configuration information written in a file system table includes:
acquiring NAS mounting information on a current server based on a mount command;
and inquiring the NAS configuration information written in the file system table based on the cat command.
3. The method of claim 1, wherein the detecting whether the NAS mount information is in an available state comprises:
acquiring all NAS mounting paths on the current server based on a df command, detecting whether response time of the df command is smaller than a first preset threshold value or not, and whether the NAS mounting paths are matched with NAS mounting information or not to obtain a first detection result;
acquiring all working contents under the NAS mounting path based on an ls command, and detecting whether the response time of the ls command is smaller than a second preset threshold value or not to obtain a second detection result;
Creating a test file under the NAS mounting path based on a touch command, and detecting whether the test file can be successfully deleted or not to obtain a third detection result;
and if the first detection result, the second detection result and the third detection result are all yes, determining that the NAS mounting information is in an available state.
4. The method of claim 1, wherein the determining the NAS detection result corresponding to the NAS information includes:
outputting a third NAS detection result based on the investigation result if the investigation result does not pass;
outputting a fourth NAS detection result if the investigation result passes and the NAS detection type is the second type;
and outputting a fifth NAS detection result if the check result passes and the NAS detection type is the third type.
5. A network attached storage detection apparatus, the apparatus comprising:
the acquisition module is used for acquiring network attached storage NAS mounting information on the current server and inquiring NAS configuration information written in a file system table;
the state detection module is used for detecting whether the NAS mounting information is in an available state or not to obtain a detection result;
a first determining module, configured to determine, based on the NAS mounting information, NAS configuration information, and the detection result, a NAS detection type corresponding to each piece of NAS information in the current server, where the NAS information includes the NAS configuration information and the NAS mounting information;
The base line detection module is used for carrying out base line detection on the NAS information based on a first detection strategy to obtain NAS detection results corresponding to the NAS information when the NAS detection type is a first type;
the check detection module is used for checking and detecting the NAS information based on a second detection strategy to obtain a check result corresponding to the NAS information when the NAS detection type is a second type or a third type;
the second determining module is used for determining an NAS detection result corresponding to the NAS information based on the investigation result corresponding to the NAS information and the NAS detection type;
the determining the NAS detection type corresponding to each piece of NAS information in the current server includes:
if the detection result of whether the NAS mounting information is in the available state is yes, determining that the NAS detection type corresponding to the NAS mounting information is a first type;
if the detection result of whether the NAS mounting information is in the available state is no, determining that the NAS detection type corresponding to the NAS mounting information is a second type;
the NAS information belongs to NAS configuration information and does not belong to NAS mounting information, and the NAS detection type corresponding to the NAS information is determined to be a third type;
Wherein the performing baseline detection on the NAS information based on the first detection policy includes:
detecting whether the NAS mounting information meets a mounting standard or not to obtain a first baseline detection result;
detecting whether NAS configuration information corresponding to NAS mounting information meets a configuration standard or not to obtain a second baseline detection result if the NAS mounting information has corresponding NAS configuration information;
based on the communication of the ping command and the service IP address corresponding to the NAS mounting information, detecting whether the response time of the ping command is smaller than a third preset threshold value or not, and obtaining a third baseline detection result;
detecting whether the number of files in a NAS mounting path corresponding to the NAS mounting information is larger than a fourth preset threshold value or not, and obtaining a fourth baseline detection result;
the first baseline detection result, the second baseline detection result, the third baseline detection result and the fourth baseline detection result are all yes, the first NAS detection result is output, and otherwise the second NAS detection result is output;
wherein the performing the check detection on the NAS information based on the second detection policy includes:
detecting whether a service IP address corresponding to the NAS information is connected with a network or not based on a ping command to obtain a first checking result;
If the first checking result is yes, detecting whether the NAS mounting path corresponding to the NAS information is a NAS shared mounting path or not, and obtaining a second checking result;
if the second checking result is yes, determining a corresponding target NAS based on the service IP address and the NAS mounting path, and detecting whether a white list of the target NAS contains the IP address of the current server or not to obtain a third checking result;
if the third investigation result is yes, detecting whether the storage delay of the target NAS is smaller than a fifth preset threshold value or not, and obtaining a fourth investigation result;
if the fourth checking result is yes, detecting whether a mounting path of the target NAS exists on the current server or not, and obtaining a fifth checking result;
detecting whether the NAS information meets a configuration standard or not to obtain a sixth investigation result if the NAS information belongs to the NAS configuration information;
and if the first, second, third, fourth, fifth and sixth investigation results are all passed, the investigation result corresponding to the NAS information is passed.
6. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
7. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-4.
CN202311307789.0A 2023-10-10 2023-10-10 Network attached storage detection method, device, equipment and storage medium Active CN117056150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311307789.0A CN117056150B (en) 2023-10-10 2023-10-10 Network attached storage detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311307789.0A CN117056150B (en) 2023-10-10 2023-10-10 Network attached storage detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117056150A CN117056150A (en) 2023-11-14
CN117056150B true CN117056150B (en) 2024-01-26

Family

ID=88655628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311307789.0A Active CN117056150B (en) 2023-10-10 2023-10-10 Network attached storage detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117056150B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931604A (en) * 2009-06-18 2010-12-29 原少甫 Computer firewall for automatically adjusting security policies according to network security alarm
CN102541475A (en) * 2012-03-12 2012-07-04 成都市华为赛门铁克科技有限公司 Data storage method and data storage device
CN103441925A (en) * 2013-08-19 2013-12-11 上海斐讯数据通信技术有限公司 Home gateway device and method for mounting storage device on home gateway device
CN107547643A (en) * 2017-08-29 2018-01-05 新华三技术有限公司 A kind of load sharing method and device
CN110019081A (en) * 2017-07-20 2019-07-16 中兴通讯股份有限公司 Data persistence processing method, device, system and readable storage medium storing program for executing
CN112083886A (en) * 2020-09-09 2020-12-15 杭州海康威视系统技术有限公司 Storage management method, system and device of NAS (network attached storage) equipment
CN113760180A (en) * 2021-04-22 2021-12-07 腾讯科技(深圳)有限公司 Storage resource management method, device, equipment and computer readable storage medium
EP4113321A1 (en) * 2021-06-30 2023-01-04 Beijing Baidu Netcom Science And Technology Co., Ltd. Data mining method, data mining apparatus, electronic device and storage medium
CN116150121A (en) * 2022-11-15 2023-05-23 中国建设银行股份有限公司 Network attached storage replacement method and related device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7165096B2 (en) * 2000-12-22 2007-01-16 Data Plow, Inc. Storage area network file system
US8311663B2 (en) * 2005-08-31 2012-11-13 International Business Machines Corporation Apparatus and method to store information

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101931604A (en) * 2009-06-18 2010-12-29 原少甫 Computer firewall for automatically adjusting security policies according to network security alarm
CN102541475A (en) * 2012-03-12 2012-07-04 成都市华为赛门铁克科技有限公司 Data storage method and data storage device
CN103441925A (en) * 2013-08-19 2013-12-11 上海斐讯数据通信技术有限公司 Home gateway device and method for mounting storage device on home gateway device
CN110019081A (en) * 2017-07-20 2019-07-16 中兴通讯股份有限公司 Data persistence processing method, device, system and readable storage medium storing program for executing
CN107547643A (en) * 2017-08-29 2018-01-05 新华三技术有限公司 A kind of load sharing method and device
CN112083886A (en) * 2020-09-09 2020-12-15 杭州海康威视系统技术有限公司 Storage management method, system and device of NAS (network attached storage) equipment
CN113760180A (en) * 2021-04-22 2021-12-07 腾讯科技(深圳)有限公司 Storage resource management method, device, equipment and computer readable storage medium
EP4113321A1 (en) * 2021-06-30 2023-01-04 Beijing Baidu Netcom Science And Technology Co., Ltd. Data mining method, data mining apparatus, electronic device and storage medium
CN116150121A (en) * 2022-11-15 2023-05-23 中国建设银行股份有限公司 Network attached storage replacement method and related device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A NAS Integrated File System for On-site IoT Data Storage;Yuki O.等;2020 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops);全文 *
基于NAS的私有存储网络节点的嵌入式设计与实现;刘绍刚;刘明安;;现代电子技术(第10期);全文 *

Also Published As

Publication number Publication date
CN117056150A (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN112559086B (en) Applet page rendering method and device, electronic equipment and readable storage medium
CN114969840A (en) Data leakage prevention method and device
CN113641544B (en) Method, apparatus, device, medium and product for detecting application state
CN111061802A (en) Power data management processing method and device and storage medium
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN117056150B (en) Network attached storage detection method, device, equipment and storage medium
CN113495825A (en) Line alarm processing method and device, electronic equipment and readable storage medium
CN117033058A (en) Analysis method, device, equipment and medium for software crash data
CN111367813A (en) Automatic testing method and device for decision engine, server and storage medium
CN114500326B (en) Abnormality detection method, abnormality detection device, electronic device, and storage medium
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN113590447B (en) Buried point processing method and device
CN115203158A (en) Data comparison method, device, equipment and storage medium
CN114020813A (en) Data comparison method, device and equipment based on Hash algorithm and storage medium
CN114116373A (en) Network request monitoring method and device, electronic equipment and storage medium
CN117194343A (en) Zip file modification method, device, equipment and storage medium
CN113590425B (en) Data processing method, apparatus, device, medium, and program product
CN117852043A (en) Determination method and device for abnormal device, electronic device and storage medium
CN114089712B (en) Data processing method and device
CN118503224A (en) Object data storage processing method and device, electronic equipment and storage medium
CN117633788A (en) File detection method, device, equipment and storage medium
CN117271289A (en) Webpage monitoring method, device, equipment and storage medium
CN117520195A (en) Method, apparatus, device, storage medium and program product for testing interface
CN111159010A (en) Defect collecting method, defect reporting method and related device
CN117033772A (en) Information processing method and device and electronic equipment

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