CN107483637B - NFS-based client link management method and device - Google Patents
NFS-based client link management method and device Download PDFInfo
- Publication number
- CN107483637B CN107483637B CN201710867694.2A CN201710867694A CN107483637B CN 107483637 B CN107483637 B CN 107483637B CN 201710867694 A CN201710867694 A CN 201710867694A CN 107483637 B CN107483637 B CN 107483637B
- Authority
- CN
- China
- Prior art keywords
- client
- request
- link
- linked list
- type
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 34
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 230000004069 differentiation Effects 0.000 claims description 2
- 238000004891 communication Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a client link management method and a client link management device based on NFS, wherein the method comprises the following steps: receiving a client request and distinguishing the type of the client request; if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request; and if the type of the client request is the unloading request, deleting the client address corresponding to the client request from the linked list, and disconnecting the link established between the clients corresponding to the client request. According to the technical scheme disclosed by the application, the client requests are received and the types of the client requests are distinguished, the independent management of the client addresses corresponding to the client requests is realized according to the distinguished types of the client requests, and the management of the clients is conveniently realized through the client addresses.
Description
Technical Field
The present invention relates to the field of information sharing technologies, and in particular, to a method and an apparatus for managing client links based on NFS.
Background
NFS (Network File System) is a method for sharing data between different computers in a Network environment, and an NFS client can access a shared File mounted on a local NFS server as a File in a local hard disk.
In the prior art, when processing a received request, an NFS server records source IP (Internet Protocol) addresses in all requests into a client _ by _ IP structure, where the source address includes a cluster network address, a client address, a local address, and the like, and the NFS server does not identify the client address, so that certain influence may be exerted on management of a client, for example: when the NFS server establishes a link with the client through the client address, because the NFS server records all source addresses together and does not identify the client address therein, at this time, the NFS server will also count the remaining addresses except the client address, which will result in that the number of clients actually linked by the NFS server is smaller than the number of clients theoretically linked by the NFS server.
In summary, the prior art has a problem that the client addresses in all the addresses are not identified, which may have a certain influence on the management of the client.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for managing client links based on NFS, so as to solve the problem in the prior art that the client addresses in all addresses are not identified, which may have a certain impact on the management of the client.
In order to achieve the above purpose, the invention provides the following technical scheme:
a client link management method based on NFS includes:
receiving a client request and distinguishing the type of the client request;
if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request;
and if the type of the client request is an unloading request, deleting the client address corresponding to the client request from the linked list, and disconnecting the link established between the clients corresponding to the client request.
Preferably, after the distinguishing the type of the client request, the method further includes:
if the type of the client request is a request except the mount request and the uninstall request, judging whether a client address corresponding to the client request exists in the linked list, if not, storing the client address in the linked list, and executing an operation corresponding to the client request.
Preferably, after the client corresponding to the client request establishes the link, the method further includes:
and sending a message of successful link establishment to the client.
Preferably, after the client corresponding to the client request establishes the link, the method further includes:
and if the operation request sent by the client is not received after the preset time length is exceeded, deleting the client address corresponding to the client from the linked list, and disconnecting the link established between the client and the client.
Preferably, after the link established with the client is disconnected, the method further includes:
and if an operation request sent by the client is received, storing the client address corresponding to the client into the linked list, and establishing a link with the client again.
An NFS-based client link management apparatus, comprising:
a differentiation module to: receiving a client request and distinguishing the type of the client request;
a storage module to: if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request;
a first deletion module to: and if the type of the client request is an unloading request, deleting the client address corresponding to the client request from the linked list, and disconnecting the link established between the clients corresponding to the client request.
Preferably, the method further comprises the following steps:
a determination module configured to: after the type of the client request is distinguished, if the type of the client request is a request except the mount request and the uninstall request, whether a client address corresponding to the client request exists in the linked list or not is judged, and if the client address does not exist, the client address is stored in the linked list, and the operation corresponding to the client request is executed.
Preferably, the method further comprises the following steps:
a sending module configured to: and after the client corresponding to the client request establishes the link, sending a message of successful link establishment to the client.
Preferably, the method further comprises the following steps:
a second deletion module to: after the link is established with the client corresponding to the client request, if the operation request sent by the client is not received after the preset time length is exceeded, the client address corresponding to the client is deleted from the linked list, and the link established with the client is disconnected.
Preferably, the method further comprises the following steps:
a link establishment module to: after the link established between the client side and the client side is disconnected, if an operation request sent by the client side is received, the client side address corresponding to the client side is stored in the linked list, and the link is established with the client side again.
The invention provides a client link management method and a client link management device based on NFS, wherein the method comprises the following steps: receiving a client request and distinguishing the type of the client request; if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request; and if the type of the client request is the unloading request, deleting the client address corresponding to the client request from the linked list, and disconnecting the link established between the clients corresponding to the client request. According to the technical scheme disclosed by the application, the client request is received and the type of the client request is distinguished, if the client request is a mounting request, the client address corresponding to the client request is independently stored in a linked list, and a link is established with the client corresponding to the client request; if the request is an unloading request, the client address corresponding to the client request is deleted from the linked list, and the link established between the client and the client corresponding to the client request is disconnected, so that the client address can be managed independently, and the client corresponding to the client address can be managed conveniently through the client address.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for managing a client link based on an NFS according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a client link management apparatus based on NFS according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, which shows a flowchart of a method for managing a client link based on an NFS according to an embodiment of the present invention, it should be noted that an execution subject of the technical solution provided in the embodiment of the present invention may be a corresponding device for managing a client link based on an NFS according to an embodiment of the present invention, and the device may be disposed in an NFS server. Therefore, the execution subject of the above technical solution provided in the embodiment of the present invention may also be the above NFS server, and in the embodiments of the present application, the execution subject is described as an NFS server. The method provided by the embodiment of the invention can comprise the following steps:
s11: receiving a client request and distinguishing the type of the client request.
After receiving the request, the NFS server, for example: a udp (user datagram protocol) request, a communication request between clusters, a client request, and the like, and analyzes the request, finds out the client request, and distinguishes the type of the received client request.
S12: and if the type of the client request is a mounting request, storing the client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request.
If the type of the client request is distinguished as the mount request, the NFS server may store the client address corresponding to the client request in a linked list (i.e., a client link management linked list), and establish a link with the client corresponding to the client request to implement individual management of the client address, and facilitate the NFS server to allocate resources such as threads, bandwidth, and reasonable traffic to the corresponding client through the established link, thereby implementing data sharing.
S13: and if the type of the client request is the unloading request, deleting the client address corresponding to the client request from the linked list, and disconnecting the link established between the clients corresponding to the client request.
If the request type of the client is an offload request, because the client address is already stored in the linked list when the mount request was sent by the client before, in order to implement separate management on the client address and reduce the influence on the links of other clients, the client address needs to be deleted from the linked list and the link with the client is disconnected, and of course, other information included in the client request needs to be deleted together.
According to the technical scheme disclosed by the application, the client request is received and the type of the client request is distinguished, if the client request is a mounting request, the client address corresponding to the client request is independently stored in a linked list, and a link is established with the client corresponding to the client request; if the request is an unloading request, the client address corresponding to the client request is deleted from the linked list, and the link established between the client and the client corresponding to the client request is disconnected, so that the client address can be managed independently, and the client corresponding to the client address can be managed conveniently through the client address.
The NFS-based client link management method provided in the embodiment of the present invention may further include, after distinguishing the type of the client request:
if the type of the client request is a request except the mount request and the uninstall request, judging whether a client address corresponding to the client request exists in the linked list or not, if not, storing the client address in the linked list, and executing the operation corresponding to the client request.
When the NFS server distinguishes that the type of the received client request is a request other than a mount request and an offload request, such as a file read-write request, the NFS server needs to determine whether a client address corresponding to the client request exists in a linked list, if not, the NFS server needs to store the client address in the linked list, so as to implement separate management of the client address and implement management of a client link through the client address, if so, to avoid repeated storage, the NFS server does not need to store the client address in the linked list, and then the NFS server can execute an operation corresponding to the client request, so that the client can share data on the NFS server.
The embodiment of the invention provides a client link management method based on NFS, which can further include the following steps after a link is established with a client corresponding to a client request:
and sending a message of successful link establishment to the client.
After the NFS server establishes a link with a client corresponding to the client request, a message that the link establishment is successful may be sent to the client, so that the client may directly access a file in the shared directory on the NFS server after receiving the message.
The NFS-based client link management method provided in the embodiment of the present invention may further include, after establishing a link with a client corresponding to a client request:
and if the operation request sent by the client is not received after the preset time length is exceeded, deleting the client address corresponding to the client from the linked list, and disconnecting the link established between the client and the client.
After the NFS server receives the mount request sent by the client and establishes a link with the client, if the NFS server does not receive the operation request sent by the client after exceeding the preset time length, the NFS server may delete the client address corresponding to the client from the linked list and automatically disconnect the link established with the client in order to reduce resource occupation, where the mentioned preset time length is generally 5 minutes set in the program, and of course, if necessary, other suitable preset time lengths may also be used.
The method for managing the client link based on the NFS provided in the embodiment of the present invention may further include, after the link established with the client is disconnected:
and if an operation request sent by the client is received, storing the client address corresponding to the client into the linked list, and establishing a link with the client again.
After the NFS server breaks the link with the client after not receiving the operation request of the client for more than the preset time length, if the NFS server receives the operation request sent by the client again, at this time, the NFS server needs to store the client address corresponding to the client in the linked list again, and re-establish the link with the client, so as to implement the individual management of the client address, and facilitate the implementation of the management of the client and the allocation of resources for the client through the established link.
An embodiment of the present invention further provides an NFS-based client link management apparatus, as shown in fig. 2, the NFS-based client link management apparatus may include:
a distinguishing module 11, configured to: receiving a client request and distinguishing the type of the client request;
a storage module 12 for: if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request;
a first deletion module 13 configured to: and if the type of the client request is the unloading request, deleting the client address corresponding to the client request from the linked list, and disconnecting the link established between the clients corresponding to the client request.
The NFS-based client link management apparatus provided in the embodiment of the present invention may further include:
a determination module configured to: after the type of the client request is distinguished, if the type of the client request is a request except for a mount request and an unload request, whether a client address corresponding to the client request exists in a linked list or not is judged, if not, the client address exists in the linked list, and operation corresponding to the client request is executed.
The NFS-based client link management apparatus provided in the embodiment of the present invention may further include:
a sending module configured to: and after the client corresponding to the client request establishes the link, sending a message of successful link establishment to the client.
The NFS-based client link management apparatus provided in the embodiment of the present invention may further include:
a second deletion module to: after the link is established with the client corresponding to the client request, if the operation request sent by the client is not received after the preset time length is exceeded, the client address corresponding to the client is deleted from the linked list, and the link established with the client is disconnected.
The NFS-based client link management apparatus provided in the embodiment of the present invention may further include:
a link establishment module to: after the link established with the client is disconnected, if an operation request sent by the client is received, the client address corresponding to the client is stored in the linked list, and the link is established with the client again.
For a description of a relevant part in an NFS-based client link management apparatus according to an embodiment of the present invention, refer to a detailed description of a corresponding part in an NFS-based client link management method according to an embodiment of the present invention, which is not described herein again. In addition, the parts of the technical solutions provided by the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (8)
1. A client link management method based on NFS is characterized by comprising the following steps:
receiving a client request and distinguishing the type of the client request; receiving the client request includes: receiving a request, analyzing the request, and finding out a client request;
if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request;
if the type of the client request is an unloading request, deleting a client address corresponding to the client request from the linked list, and disconnecting a link established between the client address and the client corresponding to the client request;
after the link is established with the client corresponding to the client request, the method further comprises the following steps:
and if the operation request sent by the client is not received after the preset time length is exceeded, deleting the client address corresponding to the client from the linked list, and disconnecting the link established between the client and the client.
2. The method of claim 1, wherein after distinguishing the type of the client request, further comprising:
if the type of the client request is a request except the mount request and the uninstall request, judging whether a client address corresponding to the client request exists in the linked list, if not, storing the client address in the linked list, and executing an operation corresponding to the client request.
3. The method according to claim 2, further comprising, after the client corresponding to the client request establishes the link:
and sending a message of successful link establishment to the client.
4. The method of claim 1, further comprising, after disconnecting the link established with the client:
and if an operation request sent by the client is received, storing the client address corresponding to the client into the linked list, and establishing a link with the client again.
5. An NFS-based client link management apparatus, comprising:
a differentiation module to: receiving a client request and distinguishing the type of the client request; receiving the client request includes: receiving a request, analyzing the request, and finding out a client request;
a storage module to: if the type of the client request is a mounting request, storing a client address corresponding to the client request into a linked list, and establishing a link with the client corresponding to the client request;
a first deletion module to: if the type of the client request is an unloading request, deleting a client address corresponding to the client request from the linked list, and disconnecting a link established between the client address and the client corresponding to the client request;
the device further comprises:
a second deletion module to: after the link is established with the client corresponding to the client request, if the operation request sent by the client is not received after the preset time length is exceeded, the client address corresponding to the client is deleted from the linked list, and the link established with the client is disconnected.
6. The apparatus of claim 5, further comprising:
a determination module configured to: after the type of the client request is distinguished, if the type of the client request is a request except the mount request and the uninstall request, whether a client address corresponding to the client request exists in the linked list or not is judged, and if the client address does not exist, the client address is stored in the linked list, and the operation corresponding to the client request is executed.
7. The apparatus of claim 6, further comprising:
a sending module configured to: and after the client corresponding to the client request establishes the link, sending a message of successful link establishment to the client.
8. The apparatus of claim 5, further comprising:
a link establishment module to: after the link established between the client side and the client side is disconnected, if an operation request sent by the client side is received, the client side address corresponding to the client side is stored in the linked list, and the link is established with the client side again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710867694.2A CN107483637B (en) | 2017-09-22 | 2017-09-22 | NFS-based client link management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710867694.2A CN107483637B (en) | 2017-09-22 | 2017-09-22 | NFS-based client link management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107483637A CN107483637A (en) | 2017-12-15 |
CN107483637B true CN107483637B (en) | 2020-08-21 |
Family
ID=60585823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710867694.2A Active CN107483637B (en) | 2017-09-22 | 2017-09-22 | NFS-based client link management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107483637B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110868323B (en) * | 2019-11-15 | 2022-07-22 | 浪潮电子信息产业股份有限公司 | Bandwidth control method, device, equipment and medium |
CN113032351B (en) * | 2021-03-31 | 2023-01-13 | 中国建设银行股份有限公司 | Recovery method and device of network file system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030054875A (en) * | 2001-12-26 | 2003-07-02 | 한국전자통신연구원 | Method for automatically installing operating system in linux-based cluster system at remote place |
CN101296237A (en) * | 2008-06-16 | 2008-10-29 | 北京快网科技有限公司 | Resource batch processing system and method |
CN102882907A (en) * | 2011-07-14 | 2013-01-16 | 鸿富锦精密工业(深圳)有限公司 | Client configuration system and method |
CN104641369A (en) * | 2012-12-17 | 2015-05-20 | 株式会社日立制作所 | File server, information system, and control method thereof |
-
2017
- 2017-09-22 CN CN201710867694.2A patent/CN107483637B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030054875A (en) * | 2001-12-26 | 2003-07-02 | 한국전자통신연구원 | Method for automatically installing operating system in linux-based cluster system at remote place |
CN101296237A (en) * | 2008-06-16 | 2008-10-29 | 北京快网科技有限公司 | Resource batch processing system and method |
CN102882907A (en) * | 2011-07-14 | 2013-01-16 | 鸿富锦精密工业(深圳)有限公司 | Client configuration system and method |
CN104641369A (en) * | 2012-12-17 | 2015-05-20 | 株式会社日立制作所 | File server, information system, and control method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN107483637A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109343963B (en) | Application access method and device for container cluster and related equipment | |
CN109768871B (en) | Method for configuring multiple virtual network cards, host machine and storage medium | |
CN108984560B (en) | File storage method and device | |
US10313452B2 (en) | Migrating a chat message service provided by a chat server to a new chat server | |
CN103370917B (en) | Message treatment method and server | |
WO2018121334A1 (en) | Web application service providing method, apparatus, electronic device and system | |
US8539089B2 (en) | System and method for vertical perimeter protection | |
US10425475B2 (en) | Distributed data management | |
US10178033B2 (en) | System and method for efficient traffic shaping and quota enforcement in a cluster environment | |
CN113517985B (en) | File data processing method and device, electronic equipment and computer readable medium | |
CN112187903B (en) | Message pushing method and device and message service system | |
CN110909030B (en) | Information processing method and server cluster | |
US11444998B2 (en) | Bit rate reduction processing method for data file, and server | |
CN107483637B (en) | NFS-based client link management method and device | |
CN110855726B (en) | Communication method, device, gateway, computing device and medium | |
CN110609746B (en) | Method, apparatus and computer readable medium for managing network system | |
CN111225003A (en) | NFS node configuration method and device | |
US10154116B1 (en) | Efficient synchronization of locally-available content | |
CN113127923A (en) | Method and device for managing authority | |
CN113612811B (en) | Method, system, equipment and medium for client mounting in multiple channels | |
CN113765871B (en) | Method and device for managing fort machine | |
US20140025730A1 (en) | Managing concurrent conversations over a communications link between a client computer and a server computer | |
CN104468767A (en) | Method and system for detecting cloud storage data collision | |
US20200341968A1 (en) | Differential Update of Local Cache from Central Database | |
CN110784775A (en) | Video fragment caching method and device and video-on-demand system |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20200723 Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601 Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |