CN109165204B - Method for detecting NFS double-client directory display based on script - Google Patents

Method for detecting NFS double-client directory display based on script Download PDF

Info

Publication number
CN109165204B
CN109165204B CN201810927665.5A CN201810927665A CN109165204B CN 109165204 B CN109165204 B CN 109165204B CN 201810927665 A CN201810927665 A CN 201810927665A CN 109165204 B CN109165204 B CN 109165204B
Authority
CN
China
Prior art keywords
client
nfs
directory
script
detecting
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
CN201810927665.5A
Other languages
Chinese (zh)
Other versions
CN109165204A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810927665.5A priority Critical patent/CN109165204B/en
Publication of CN109165204A publication Critical patent/CN109165204A/en
Application granted granted Critical
Publication of CN109165204B publication Critical patent/CN109165204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for detecting NFS double-client directory display based on a script, which is characterized by comprising the following steps: 1) executing the script, and printing the catalog creation progress and the catalog number of one client A in real time; 2) and logging in another client B, calculating the number of the current directories, and comparing whether the directory numbers of the client A and the client B are the same or not. The patent provides an automatic method for detecting the directory display of an NFS client, which can realize the directory comparison of double clients through scripts, print the directory creation process in real time and position the time of error. The method changes the repeatability test step with the execution time exceeding 24 hours into automation, reduces the working time through the automation script and improves the working efficiency.

Description

Method for detecting NFS double-client directory display based on script
Technical Field
The invention relates to a method for detecting NFS double-client directory display based on a script.
Background
NFS is an abbreviation of Network file system, and its maximum function is to enable different machines and different operating systems to share files (sharefiles) with each other through a Network, where a directory of a remote host can be mounted through NFS, and the directory is accessed as a local directory, so it can be simply regarded as a file server (FileServer). This may allow the local workstation to use less disk space; a user directory does not need to be put on each network machine for the user; the number of mobile devices on the network is reduced and therefore this sharing approach is also commonly used in storage network systems.
As the time of a client user increases, various situations may occur, for example, a client a and a client B share the same directory at the same time, a subdirectory created by the client a in the directory in the original 2017 years is created, a new subdirectory is created in the client B after 2018 years, and a new subdirectory cannot be displayed on the NFS client in the refresh client a, which is because the Fs (file serving) permission recovery of the client a is abnormal, and when a file is created by the client B, because the Fs permission is held by the client a, local metadata is considered to be up-to-date, a local cache is used, and is not acquired to mds (metadata serving), so that user services are affected. Therefore, the problem of NFS client directory display should be emphasized during the testing process.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method for detecting the directory display of NFS double clients based on a script.
The scheme is realized by the following technical measures: a method for detecting NFS double-client directory display based on script is characterized by comprising the following steps: 1) executing the script, and printing the catalog creation progress and the catalog number of one client A in real time; 2) and logging in another client B, calculating the number of the current directories, and comparing whether the directory numbers of the client A and the client B are the same or not. Therefore, directory comparison of the two clients can be realized through the script, the directory creation process is printed in real time, and the time of error is positioned.
Before step 1), firstly, a cluster end creates a directory to set NFS sharing, and the NFS sharing is shared to two different clients A and B; the directories are mounted on the client sides A and B, mounting paths are set, the client sides A and B modify/etc/hosts files, respective ip addresses and client names are increased, and secret-free login between the client sides is achieved; the two clients A and B modify/etc/hosts files, respective ip addresses and client names are added, and secret-free login between the clients is achieved. Therefore, secret-free login between the client A and the client B can be realized, the smooth operation of the script is ensured, and the detection is facilitated.
And in the step 2), after the catalog creating progress is printed in real time, logging in the client B at an interval t, wherein t is more than or equal to 10 s. t usually selects 10s, and can log on to client B remotely using ssh, look at the total number of subdirectories using ls commands and compare with the number of subdirectories of client a. This time interval may be more advantageous for detection. And placing the executed script under any directory of the A client. That is, any client a or B can be selected for storage, and if the client B is selected, the client a needs to be remotely logged in.
If the directory numbers are different in the step 2), outputting errors, and marking errors and error time when the directory numbers are different. If the number of the catalogues in the step 2) is the same, repeating the step 1) and the step 2) circularly for n times, wherein n is less than or equal to 10000. Therefore, once a mistake occurs, the mistake and the mistake time when the second catalog is created can be inquired, and the check by a worker is facilitated. Setting is less than ten thousand times, so that the repeatability test step with the execution time exceeding 24 hours becomes automatic, the working time is reduced through the automatic script, and the working efficiency is improved.
In the step 1), the client time is modified and put into a background to be executed, so as to simulate the situation that the NFS client catalog display is inconsistent due to the time problem. Can be used for verification and detection.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
FIG. 1 is a flow chart of an embodiment of the present invention.
Detailed Description
In order to clearly illustrate the technical features of the present solution, the following explains the present solution by a specific embodiment in combination with the accompanying drawings.
As can be seen from the attached drawings, the method for detecting the NFS dual-client directory display based on the script is characterized by comprising the following steps: 1) executing the script, and printing the catalog creation progress and the catalog number of one client A in real time; 2) and at the interval of 10s, the logging client B remotely logs in another client B, checks the number of the current directories of the total number of the subdirectories by using an ls command, and compares whether the number of the directories of the client A is the same as that of the directory of the client B.
Before step 1), firstly, a cluster end creates a directory to set NFS sharing, and the NFS sharing is shared to two different clients A and B; the directories are mounted on the client sides A and B, mounting paths are set, the client sides A and B modify/etc/hosts files, respective ip addresses and client names are increased, and secret-free login between the client sides is achieved; the two clients A and B modify/etc/hosts files, respective ip addresses and client names are added, secret-free login between the clients is achieved, and executed scripts are placed in any directory of the client A.
If the directory numbers are different in the step 2), outputting errors, and marking errors and error time when the directory numbers are different. If the number of the catalogues in the step 2) is the same, repeating the step 1) and the step 2) circularly for n times, wherein n is 10000 in the embodiment.
In the step 1), the client time is modified and put into a background to be executed, so as to simulate the situation that the NFS client catalog display is inconsistent due to the time problem.
The present invention is not limited to the above-described embodiments, and variations, modifications, additions and substitutions which are within the spirit of the invention and the scope of the invention may be made by those of ordinary skill in the art are also within the scope of the invention.

Claims (5)

1. A method for detecting NFS dual-client directory display based on script is characterized in that,
the executed script is placed in any directory of the client A, and the executed script realizes the following steps:
1) printing the catalog establishing progress and the catalog number of the client A in real time;
2) and logging in the client B at an interval t which is not less than 10s, calculating the number of the current directories of the client B, comparing whether the numbers of the directories of the client A and the client B are the same, checking the total number of the subdirectories of the client B by using an ls command, and comparing the total number with the number of the subdirectories of the client A.
2. The method for detecting NFS dual client directory display based on script as claimed in claim 1, wherein: before step 1), firstly, a cluster end creates a directory to set NFS sharing, and the NFS sharing is shared to two different clients A and B; and the directories are mounted on the client sides A and B, mounting paths are set, the client sides A and B modify/etc/hosts files, respective ip addresses and client names are increased, and secret-free login between the client sides is realized.
3. The method for detecting NFS dual client directory display based on script as claimed in claim 1, wherein: if the directory numbers are different in the step 2), outputting errors, and marking errors and error time when the directory numbers are different.
4. The method for detecting NFS dual client directory display based on script as claimed in claim 3, wherein: if the number of the catalogues in the step 2) is the same, repeating the step 1) and the step 2) circularly for n times, wherein n is less than or equal to 10000.
5. The method for detecting NFS dual client directory display based on script as claimed in claim 1, wherein: in the step 1), the client time is modified and put into a background to be executed, so as to simulate the situation that the NFS client catalog display is inconsistent due to the time problem.
CN201810927665.5A 2018-08-15 2018-08-15 Method for detecting NFS double-client directory display based on script Active CN109165204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810927665.5A CN109165204B (en) 2018-08-15 2018-08-15 Method for detecting NFS double-client directory display based on script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810927665.5A CN109165204B (en) 2018-08-15 2018-08-15 Method for detecting NFS double-client directory display based on script

Publications (2)

Publication Number Publication Date
CN109165204A CN109165204A (en) 2019-01-08
CN109165204B true CN109165204B (en) 2022-02-18

Family

ID=64895764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810927665.5A Active CN109165204B (en) 2018-08-15 2018-08-15 Method for detecting NFS double-client directory display based on script

Country Status (1)

Country Link
CN (1) CN109165204B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567858A (en) * 2008-04-21 2009-10-28 联想(北京)有限公司 Method and system for synchronizing data
CN104468615A (en) * 2014-12-25 2015-03-25 西安电子科技大学 Data sharing based file access and permission change control method
US9110920B1 (en) * 2007-05-03 2015-08-18 Emc Corporation CIFS access to NFS files and directories by translating NFS file handles into pseudo-pathnames
CN106503158A (en) * 2016-10-31 2017-03-15 深圳中兴网信科技有限公司 Method of data synchronization and device
CN106550037A (en) * 2016-11-07 2017-03-29 天脉聚源(北京)传媒科技有限公司 A kind of method and device of server data sharing
CN106776980A (en) * 2016-12-06 2017-05-31 上海爱数信息技术股份有限公司 A kind of document synchronization method and system, document-synchronization client
CN107145417A (en) * 2017-05-08 2017-09-08 郑州云海信息技术有限公司 A kind of outer plug-in card installation site method of calibration and device
CN108205623A (en) * 2016-12-16 2018-06-26 杭州华为数字技术有限公司 For the method and apparatus of share directory

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9110920B1 (en) * 2007-05-03 2015-08-18 Emc Corporation CIFS access to NFS files and directories by translating NFS file handles into pseudo-pathnames
CN101567858A (en) * 2008-04-21 2009-10-28 联想(北京)有限公司 Method and system for synchronizing data
CN104468615A (en) * 2014-12-25 2015-03-25 西安电子科技大学 Data sharing based file access and permission change control method
CN106503158A (en) * 2016-10-31 2017-03-15 深圳中兴网信科技有限公司 Method of data synchronization and device
CN106550037A (en) * 2016-11-07 2017-03-29 天脉聚源(北京)传媒科技有限公司 A kind of method and device of server data sharing
CN106776980A (en) * 2016-12-06 2017-05-31 上海爱数信息技术股份有限公司 A kind of document synchronization method and system, document-synchronization client
CN108205623A (en) * 2016-12-16 2018-06-26 杭州华为数字技术有限公司 For the method and apparatus of share directory
CN107145417A (en) * 2017-05-08 2017-09-08 郑州云海信息技术有限公司 A kind of outer plug-in card installation site method of calibration and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Linux实现文件共享方法分析;胡兰兰;《三门峡职业技术学院学报》;20100630;第9卷(第2期);第107-110页 *

Also Published As

Publication number Publication date
CN109165204A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
US9396200B2 (en) Auto-snapshot manager analysis tool
CN112054941B (en) Automatic testing method, device and equipment for private domain name and storage medium
US8024712B1 (en) Collecting application logs
CN107623698B (en) Method and device for remotely debugging network equipment
CN104468843A (en) File uploading method and device
CN107193699A (en) One kind tests the wide time-delay method of HCA cassette tapes automatically by RDMA modes
CN106708859B (en) Resource access behavior auditing method and device
CN106534373B (en) IO performance test method and device for SAN storage equipment
CN112751716B (en) Test method and system for controlling response of file server and electronic equipment
CN104219080A (en) Method for recording logs of error pages of websites
CN111126940B (en) Service application processing method, device, equipment and computer readable storage medium
US9645874B2 (en) Analyzing OpenManage integration for troubleshooting log to determine root cause
CN110781132A (en) Method and device for realizing file storage and computer equipment
CN105553731A (en) Automatic inspection method and device
US10348606B2 (en) Method and system for providing a platform for testing of processes over server communications protocols
US10812346B1 (en) Application discovery and dependency mapping
US8086627B2 (en) Software inventorying system for a shared file system
CN109165204B (en) Method for detecting NFS double-client directory display based on script
US20160328200A1 (en) Testing screens of a multi-screen device
CN103095698B (en) The restorative procedure of client software, device and communication system
CN110807000B (en) File repair method and device, electronic equipment and storage medium
US20080294661A1 (en) Handling Large Messages Via Pointer and Log
CN105631042B (en) A kind of method and apparatus that data test weight
CN111400117B (en) Method for automatically testing Ceph cluster
CN109286692A (en) A kind of method of configuration server IPMI static ip address

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