A kind of CIFS shares maximized automatic test approachTechnical field
The present invention relates to memory system testing technical field, more particularly to a kind of CIFS shares maximumlly certainlyDynamic test method.
Background technique
Wave information AS18000G2 stores product on the basis of unified storage, increases NAS (Network AttachedStorage) function realizes that the function of console module increases and optimizes, not only supplements company's storage product line, but also enrich companyThe diversification of products scheme combination.Wherein CIFS (Common Internet File System) is a composition portion of NASPoint, the file service of stabilization, high-performance, high reliability, high availability can be provided for NAS service.
In CIFS test, the maximum CIFS that NAS system can be supported shared quantity is always important test, energyEnough intuitive maximum support amounts for embodying NAS are needed in storage end creation NAS cluster, to the greatest extent when carrying out maximization limit testMay more than file system and CIFS catalogue and shared, expend more time and energy, be unfavorable for test it is quick intoRow, so needing one kind that can automate the method that CIFS maximizes test that carries out.
Currently, CIFS is shared in carrying out NAS maximizes in test, if manually performed, needs in gui interface or depositsThe backstage of storage is executed, wherein every one CIFS of progress is shared to need first to create file system, then creates share directory, itIt is shared afterwards by user, whole flow process, which is got off, probably needs 3 minutes, and the shared data supported reaches 3000, needs to consumeTake biggish manpower.
Summary of the invention
In view of the above problems, the purpose of the present invention is to provide a kind of CIFS to share maximized automatic test approach.
The present invention to achieve the above object, is achieved through the following technical solutions: a kind of shared maximized automatic survey of CIFSMethod for testing includes the following steps:
Step 1: removing original NAS cluster;
Step 2: creating new NAS cluster;
Step 3: port ip is configured to two nodes in NAS cluster;
Step 4: the addition domain AD;
Step 5: creation journal file;
Step 6: creation storage pool;
Step 7: creation file system, catalogue and cifs are shared, and are counted;
Step 8: judging whether count value reaches the maximum limitation of system;If so, exiting test: if not, going to step 7.
Further, the step 1 specifically:
Step 11: removing original NAS node;
Step 12: the first delay time of setting;
Step 13: removing original NAS cluster;
Step 14: the second delay time of setting.
Further, the step 2 further include: setting third delay time.
Further, the step 3 specifically: port ip is configured to two storage controls in NAS cluster.
Further, the step 7 specifically:
Step 71: creation file system;
Step 72: judging whether file system creates success;It successfully prompts if so, exporting and goes to step 73;If not, defeatedUnsuccessfully prompt to journal file and exits test out;
Step 73: createing directory for file system and CIFS is shared;
Step 74: judging that CIFS is shared and whether create success;It successfully prompts if so, exporting and goes to step 8;
If not, unsuccessfully prompt to journal file and exits test for output.
Further, first delay time and the second delay time are set as 600 seconds.
Further, the third delay time is set as 200 seconds.
Further, the step 73 further include: set for the 4th delay time as 10 seconds.
The prior art is compared, the beneficial effects of the invention are that: a kind of CIFS proposed by the present invention is shared maximized automaticTest method, by perform script, Infinite Cyclic creates file system, creaties directory, and creation cifs is shared, unless reaching systemCreation number maximum limitation, creation failure when can automatically exit from.By the above method, the automatic maximum for carrying out CIFS is realizedChange test, only need to save a large amount of testing time and energy in storage end Run Script file, improves test effectRate.
It can be seen that compared with prior art, the present invention implementing with substantive distinguishing features outstanding and significant progressBeneficial effect be also obvious.
Detailed description of the invention
Attached drawing 1 is the method flow diagram of the embodiment of the present invention one.
Attached drawing 2 is the method flow diagram of the embodiment of the present invention two.
Specific embodiment
It explains with reference to the accompanying drawing to a specific embodiment of the invention.
Embodiment one:
A kind of CIFS as shown in Figure 1 shares maximized automatic test approach, includes the following steps:
Step 1: removing original NAS cluster.
Step 2: creating new NAS cluster.
Step 3: port ip is configured to two nodes in NAS cluster.
Step 4: the addition domain AD.
Step 5: creation journal file.
Step 6: creation storage pool.
Step 7: creation file system, catalogue and cifs are shared, and are counted.
Step 8: judging whether count value reaches the maximum limitation of system;If so, exiting test: if not, going to stepRapid 7.
A kind of CIFS that the present embodiment proposes shares maximized automatic test approach, passes through perform script, Infinite CyclicFile system is created, is creatied directory, creation cifs is shared, unless reaching the creation number maximum limitation of system, when creating failureIt can automatically exit from.
Embodiment two:
A kind of CIFS as shown in Figure 2 shares maximized automatic test approach, includes the following steps:
Step 1: removing original NAS node.
Step 2: setting for the first delay time as 600 seconds.
Step 3: removing original NAS cluster.
Step 4: setting for the second delay time as 600 seconds.
Step 5: creating new NAS cluster.
Step 6: setting third delay time as 200 seconds.
Step 7: port ip is configured to two storage controls in NAS cluster.
Step 8: the addition domain AD.
Step 9: creation journal file.
Step 10: creation storage pool.
Step 11: creation file system.
Step 12: judging whether file system creates success;It successfully prompts if so, exporting and goes to step 13.IfNo, unsuccessfully prompt to journal file and exits test for output.
Step 13: createing directory for file system and CIFS is shared.
Step 14: setting for the 4th delay time as 10 seconds.
Step 15: judging that CIFS is shared and whether create success;It successfully prompts if so, exporting and goes to step 16;
If not, unsuccessfully prompt to journal file and exits test for output.
Step 16: testing time is counted.
Step 17: judging whether count value reaches the maximum limitation of system;If so, exiting test: if not, going to stepRapid 11.
On the basis of the above, specific Test.sh content for script is as follows:
# script name: max_cifs
# test content: re-establishing nas cluster, creates file system, creaties directory under file system, carry out at catalogue #Cifs is shared
# removes original nas cluster
replacenas
sleep 600
restorenas
Sleep 600
# creates NAS cluster
mknascluster
sleep 200
# configures port ip to two nodes in cluster
cfgnasportip –gui –gw 100.7.47.254 –ip 100.7.40.125 –mask 255.255.240.0 –node node1 –port 1
cfgnasportip –gui –gw 100.7.47.254 –ip 100.7.40.126 –mask 255.255.240.0 –node node2 –port 1
# adds the domain AD
Joidad-user asministrator-passwd 123456a?-domain NASAD.COM-ip100.7.40.23 –group NASAD –dns 100.7.40.22 –computername palm
# creates journal file
Date1=$ (date+%y%m%d)
touch mkfile.$date1
touch mkshare.$date1
# creates storage pool
mtop mkmdiskgrp -easytier auto -encrypt no -ext 1024 -guiid 0 -name Pool0- warning 80%
# creates file system, creaties directory, and creation cifs is shared, at this time: an Infinite Cyclic is provided that, unless reaching and beingThe maximum limitation of system, creation can be automatically exited from when failing, otherwise can be created always
Count=1
while true;do
echo"begin"
# creates file system
addfs –name file${count} –pool Pool0 –size 102400 –node node1
If [$?-eq 0]
then
If # file system creates successfully, output correlation is successfully prompted
echo-e"---create file${count}successfully---"
else
If the creation failure of # file system, unsuccessfully journal file is arrived in prompt for output, while exiting circulation
echo-e"---failed to create file${count}---">>mkfile.$date1
break
fi
# creaties directory for file system
addnasdir–gui/fs/file${count}/file_dir${count}
sleep 10
setcifs –add –name cifs${count} -oplocks on –path/fs/file${count}/file_dir${count}–rights AU:li:rw
If [$?-eq 0]
then
It is created successfully if # is shared, output correlation successfully prompts
echo-e"---create share${count}successfully---"
else
If the shared creation failure of #, unsuccessfully journal file is arrived in prompt for output, while exiting circulation
echo-e"---failed to create file${count}---">>mkshare.$date1
break
fi
echo$count"test success......"
Count=$ ((count+1))
done
When operation, it is only necessary to execute ./test.sh in storage end, cluster can be reset automatically, create file system, catalogueAnd it is shared, simply and easily carry out the shared maximization test of cifs.
A kind of CIFS that the present embodiment proposes shares maximized automatic test approach, by executing ./test.sh script,Infinite Cyclic creates file system, creaties directory, and creation cifs is shared, unless reaching the creation number maximum limitation of system, woundIt can be automatically exited from when building unsuccessfully.By the above method, the automatic maximization test for carrying out CIFS is realized, need to only be transported in storage endRow ./test.sh script file, saves a large amount of testing time and energy, improves testing efficiency.
With reference to the drawings and specific embodiments, the invention will be further described.It should be understood that these embodiments are merely to illustrateThe present invention rather than limit the scope of the invention.In addition, it should also be understood that, after reading the content taught by the present invention, this fieldTechnical staff can make various changes or modifications the present invention, and such equivalent forms equally fall within range defined herein.