The content of the invention
In view of this, it is a primary object of the present invention to provide a kind of access method of cloud storage NFS, can
So that the file access services that FTP Server equipment is provided have disaster tolerance function.
In order to achieve the above object, technical scheme proposed by the present invention is:
A kind of access method of cloud storage NFS, including:
The user profile of system and the access rights configuration information of shared file are stored in number by FTP main control servers in advance
According in storehouse;The user profile includes:FTP user's name, file access ID uid, access password, the user belonging to user
Group mark gid and the addressable shared file root of ftp client;
When ftp client needs to access the NFS, the FTP main control servers are triggered for its distribution is carried
For the ftp server node of file access services;
The ftp client logs in the ftp server node, and the ftp server node triggering basis is pre-saved
The user profile process of subscriber authentication is carried out to the ftp client;In described being proved to be successful, to described
Ftp client returns to the addressable shared file root of the ftp client;
When the ftp client into the shared file root and present a paper access request when, the FTP service
The triggering of device node is performed according to the user profile and the access rights configuration information or refusal performs asked file and visits
Ask the processing procedure of operation.
In sum, the access method of cloud storage NFS proposed by the present invention, using FTP main control servers and
Ftp server node, for ftp client provides file access services, the file access services that FTP Server can provide
With disaster tolerance function.
Specific embodiment
It is right below in conjunction with the accompanying drawings and the specific embodiments to make the object, technical solutions and advantages of the present invention clearer
The present invention is described in further detail.
Core concept of the invention is:FTP Server server clusters technologies are introduced for ftp client provides network text
The service of part Access Management Access, in this way, the file access services that can provide FTP Server have disaster tolerance function.
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention, as shown in figure 1, the cloud storage network that the embodiment is realized
The access method of file system mainly includes:
Step 101, FTP main control servers are in advance by the user profile and the access rights configuration information of shared file of system
It is stored in database;The user profile includes:FTP user's name, file access ID uid, access password, Yong Husuo
User's group mark gid and the addressable shared file root of ftp client of category.
In this step, FTP main control servers are needed the user profile of cloud storage NFS and shared text in advance
The access rights configuration information of part is stored in database, hereafter by FTP main control servers according to these information, to be deposited to cloud
The user for storing up NFS is managed collectively and access rights is carried out to unify to set.
Here, be stored in database for unification by the access rights configuration information of user profile and shared file, rather than
It is stored in the specific ftp server node that file access services are provided, so, when certain ftp server node breaks down
When, still file access services can be provided by other available ftp server nodes, such that it is able to have for ftp client is provided
The file access services of disaster tolerance function.
Step 102, when ftp client needs to access the NFS, triggering the FTP main control servers is
Its distribution provides the ftp server node of file access services.
In this step, when ftp client needs to access the NFS, triggering FTP main control servers are existed
A ftp server node distribution is selected in available ftp server node to ftp client, for being carried for ftp client
For file access services.
It is preferred that following methods can be used to trigger the FTP main control servers for it distributes ftp server node:
The ftp client connects the FTP main control servers by the domain name of cloud storage NFS, described
FTP main control servers from currently available ftp server node, are selected as described according to default load balancing
Ftp client provides the ftp server node of service, by it is selected go out the IP address of ftp server node notify to described
Ftp client.
It should be noted that in actual applications, the IP address of each ftp server node will be pre- by FTP main control servers
First it is stored in database, in above-mentioned distribution ftp server node process, FTP main control servers take out institute from database
The IP address of the ftp server node selected is notified to ftp client.
In above-mentioned distribution method, ftp server node is selected by using load balancing, it can be ensured that each FTP clothes
The load balance of business device node.Specifically load balancing can be according to actual needs configured by those skilled in the art,
For example, realizing that the load balancing can be for convenience:The minimum ftp server node of selection present load.
Step 103, the ftp client log in the ftp server node, and the ftp server node triggers basis
The user profile for pre-saving carries out the process of subscriber authentication to the ftp client;In described being proved to be successful,
To the addressable shared file root of the ftp client in ftp client return cloud storage NFS.
In this step, ftp server node will obtain system when ftp client is logged in by FTP main control servers
User profile, then the user identity accordingly to ftp client verify, after only it is verified, can just allow it
Into addressable shared file root.So, ftp client further can just enter in its addressable extent of competence
Row file access operation.
It is preferred that the ftp server node can be logged in using following methods:
The ftp client connects the ftp server node, and after the successful connection, the ftp client to
The ftp server node submits the log-on message of user input to, and the log-on message is including FTP user's name and accesses password.
It is preferred that the triggering carries out user identity according to the user profile for pre-saving to the ftp client
The process of checking, can be realized using following step:
The ftp server node obtains the corresponding user profile of FTP user's name from the FTP main control servers,
And judge whether whether the log-on message match with acquired user profile, if it is, being proved to be successful, otherwise checking is lost
Lose.
In the above method, the checking of user identity is carried out by ftp server node, in actual applications, ftp server section
The log-on message of user can be also sent to FTP main control servers by point, be believed according to the user for pre-saving by FTP main control servers
Breath carries out authentication, will not be repeated here.
Step 104, when the ftp client into the shared file root and present a paper access request when, institute
The triggering of ftp server node is stated to perform and asked according to the user profile and access rights configuration information execution or refusal
File access operation processing procedure.
In this step, when the ftp client into the shared file root and present a paper access request when,
The user profile and access rights that ftp server node will trigger the file system pre-saved according to FTP main control servers are matched somebody with somebody
Confidence ceases, and determines whether the execution of asked file access operation.In this way, can then realize in default access rights
In the range of to the file access control of user.
It is preferred that the triggering is performed according to the user profile and the access rights configuration information or refusal performs institute
The processing procedure of the file access operation of request, can specifically be realized using following methods:
The ftp server node generates corresponding file access message, the file according to the file access request
Accessing message includes the user's group mark gid belonging to file access ID uid, user, operational order and filename;
The ftp server node sends the file access message to the FTP main control servers;
The FTP main control servers are matched somebody with somebody according to the user profile and the access rights of the shared file that pre-save
Confidence ceases, and judges whether the file access operation that the file access message is indicated is legal, if it is, triggering performs the text
Part accesses operation, and otherwise, refusal performs the file access operation.
It is the execution that asked file access operation is determined whether by FTP main control servers in the above method,
In practical application, also can be by ftp server node according to the above-mentioned user profile and shared file obtained from FTP main control servers
Access rights configuration information, determine whether the execution of asked file access operation, will not be repeated here.
In actual applications, when the ftp server node that ftp client is connected occurs abnormal, can be with retriggered
FTP main control servers are the new ftp server node of its distribution, then continue as it by newly assigned ftp server node and carry
For file access services, specifically, this purpose can be realized using following methods:
When the ftp client monitors that current connected ftp server node is abnormal, FTP described in retriggered
Main control server is the new ftp server node of its distribution, and using cloud storage described in the new ftp server node visit
NFS.
It is preferred that the redundancy ability in order to further improve file access services, can be cloud storage NFS
Above-mentioned FTP main control servers configuration FTP Standby control servers, after FTP main control servers are enabled, the FTP Standby controls
Server will with FTP main control servers keep data syn-chronization, when the FTP main control servers break down, can will described in
FTP Standby controls server is used as current FTP main control servers.
By above-described embodiment, it can be seen that the present invention in cloud storage NFS by introducing FTP Server
Server cluster technology, using the FTP Server server sets being made up of FTP main control servers and some ftp server nodes
Group, can provide the file access services with disaster tolerance function for ftp client.
In sum, presently preferred embodiments of the present invention is these are only, is not intended to limit the scope of the present invention.
All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc., should be included in of the invention
Within protection domain.