WO2022037171A1 - 一种数据请求方法、设备以及介质 - Google Patents

一种数据请求方法、设备以及介质 Download PDF

Info

Publication number
WO2022037171A1
WO2022037171A1 PCT/CN2021/096543 CN2021096543W WO2022037171A1 WO 2022037171 A1 WO2022037171 A1 WO 2022037171A1 CN 2021096543 W CN2021096543 W CN 2021096543W WO 2022037171 A1 WO2022037171 A1 WO 2022037171A1
Authority
WO
WIPO (PCT)
Prior art keywords
file system
node
client
standby
response
Prior art date
Application number
PCT/CN2021/096543
Other languages
English (en)
French (fr)
Inventor
孙希发
Original Assignee
苏州浪潮智能科技有限公司
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 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2022037171A1 publication Critical patent/WO2022037171A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • G06F16/183Provision of network file services by network file servers, e.g. by using NFS, CIFS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5683Storage of data provided by user terminals, i.e. reverse caching

Definitions

  • the invention relates to the field of NFS (Network File System, network file system), in particular to a data request method, device and storage medium.
  • NFS Network File System, network file system
  • the main function of NFS is to allow different machine systems to share files and directories with each other through the network.
  • the NFS server can allow the NFS client to mount the shared directory on the remote NFS server to the local NFS client. From the perspective of the local NFS client machine, the shared directory on the NFS server side is like its own disk partition and directory.
  • NFS implements remote access to network file systems in the following ways:
  • NFS accesses a local file or an NFS file is transparent to the client. This is determined by the kernel when the file is opened. After the file is opened, the kernel passes all references to local files to the box called "local file access" and all references to an NFS file to the box called "NFS client".
  • the NFS client sends an RPC (Remote Procedure Call, Remote Procedure Call) request to the NFS server through its TCP/IP (Transmission Control Protocol/Internet Protocol) module.
  • RPC Remote Procedure Call, Remote Procedure Call
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • NFS mainly uses UDP (User Datagram Protocol, User Datagram Protocol), and the current implementation can also use TCP.
  • the NFS server receives client requests as UDP datagrams.
  • the NFS server When the NFS server receives a client request, it passes the request to the NFS server's local file access routine, which accesses a local disk file on the server host.
  • the NFS server takes a certain amount of time to process a client's request. Accessing the NFS server's local filesystem also typically takes a fraction of the time. During this interval, the server SHOULD NOT prevent other client requests from being serviced. To accomplish this, NFS servers are multi-threaded—that is, there are actually multiple NFS servers running in the server's core.
  • the NFS client takes a certain amount of time to process a request from a user process.
  • the NFS client makes an RPC call to the NFS server host and then waits for the NFS server's reply.
  • multiple NFS clients typically run in the client kernel.
  • an embodiment of the present invention provides a data request method, including the following steps:
  • the file system on the second remote disk is mounted on the primary node, so as to utilize the pair of the service process on the primary node and the file system mounted on the primary node
  • the client provides data request services
  • the file system on the second remote disk is mounted on the primary node to utilize the service process on the primary node and the file system mounted on the primary node Provide data request services to clients, further including:
  • the virtual IP that provides network access to the client on the primary node is migrated to the standby node.
  • the method further includes:
  • the file system provides data request services to clients;
  • the virtual IP that provides network access to the client on the standby node is migrated to the master node.
  • shut down the service process on the primary node and unmount the file system in response to receiving an active-standby switching instruction, shut down the service process on the primary node and unmount the file system, or in response to receiving an active-standby switching instruction, shut down the service process on the standby node. and unmounting the file system, further comprising:
  • the file system increases the processing priority of the file to which the partial data has been written, so as to quickly call the file to which the partial data has been written in the file system;
  • the method further comprises:
  • the time required for the data request service provided by the primary node to be switched to the standby node to provide the data request service or the data request service provided by the standby node to be switched to the primary node to provide the data The required time for requesting service, and setting the time for the client to retransmit the pending new write request.
  • the method further includes:
  • the scanning time of the file system for the file cache layer is adjusted according to the data request frequency of the client.
  • the method further includes:
  • the data request is processed correspondingly by the service process.
  • the method further includes:
  • the pseudo client In response to detecting the client exception, the pseudo client is used to receive a response returned by the service process.
  • an embodiment of the present invention further provides a computer device, including:
  • a memory wherein the memory stores a computer program that can be executed on the processor, and is characterized in that, when the processor executes the program, the processor executes the steps of any one of the data request methods described above.
  • an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor Perform the steps of any of the data request methods described above.
  • the present invention has one of the following beneficial technical effects: the solution provided by the present invention provides remote network shared block storage based on iSCSI and realizes high availability of network storage, so that during failover, the local file system can still maintain high consistency, and the file system Data is not easily corrupted.
  • Fig. 1 is the architecture diagram of NFS in the prior art
  • FIG. 2 is a schematic flowchart of a data request method provided by an embodiment of the present invention.
  • FIG. 3 is a storage architecture diagram provided by an embodiment of the present invention.
  • FIG. 4 is an architectural diagram of an NFS server provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a computer device provided by an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present invention.
  • NFS Network File System is a distributed file system that allows client hosts to access server-side files, and the process is the same as when accessing local storage.
  • iSCSI Internet Small Computer System Interface
  • Internet Small Computer System Interface is a storage technology based on the Internet and SCSI-3 (Small Computer System Interface-3, Small Computer System Interface 3rd Edition) protocol.
  • an embodiment of the present invention provides a data request method, as shown in FIG. 2 , which may include the steps:
  • the solution provided by the present invention provides remote network shared block storage based on iSCSI and realizes high availability of network storage, so that during failover, the local file system can still maintain high consistency, and the file system data is not easily damaged.
  • step S3 the file system on the second remote disk is mounted on the master node, so as to utilize the service process on the master node and all files mounted on the master node.
  • the above-mentioned file system provides data request services to clients, and further includes:
  • the virtual IP that provides network access to the client on the primary node is migrated to the standby node.
  • the method further includes:
  • the file system provides data request services to clients;
  • the virtual IP that provides network access to the client on the standby node is migrated to the master node.
  • the cluster can include a master node NFS1 and a standby node NFS2.
  • NFS1 and NFS2 are connected to a shared iSCSI target at the same time.
  • the iSCSI target provides two shared block storages.
  • NFS1 and NFS2 share the same
  • the drive letter connects the two block storages.
  • iSCSI1 (the first disk) is used as a heartbeat disk to detect the iSCSI connection
  • iSCSI2 (the second disk) is used as a data disk to provide actual block storage.
  • the shared data disk is formatted as a local file system and mounted to the NFS service cluster composed of NFS1 and NFS2 to provide file system resources.
  • the file system is mounted on the master node.
  • a primary-standby switchover is performed, and the file system is automatically unmounted on the primary node and mounted on the standby node.
  • the file system is directly mounted on the standby node.
  • the user can actively issue an active-standby switching instruction to switch the object mounted by the file system.
  • the file system on the shared disk can only be mounted on one node of the cluster and always exists as a local file system.
  • the master node starts the NFS server (nfs client) process, and outputs the file system mounted to the local file system to the network through the VIP (Virtual IP, virtual IP) through the NFS protocol for the NFS client to discover and mount.
  • the active node will unmount the file system and close the server process.
  • the standby node will mount the file system and start the NFS service process (including the NFS service and exportfs).
  • the standby node starts the NFS server process, and outputs the file system mounted to the local network through the VIP through the NFS protocol to the network for the NFS client to discover and mount.
  • the standby node will unmount the file system and close the server process.
  • the active node will mount the file system and start the NFS service process (including the NFS service and exportfs).
  • the NFS client mounts the NFS network file system provided by the node of the NFS service cluster as the local NFS file system, and the local application can use the NFS file system just like the local file system.
  • the master node of the NFS cluster can be one, and the number of standby nodes can be multiple.
  • each node in an NFS cluster can be maintained by PaceMaker (a cluster resource manager) to maintain five kinds of resources---heartbeat detection, file system, NFS service, exportfs (output file system) and VIP.
  • the heartbeat detection runs on the primary and standby nodes at the same time, and other services run on one of the nodes.
  • the fence mechanism is implemented, that is, when any node in NFS1 and NFS2 has an iSCSI connection problem, it will be removed from the high-availability cluster by PaceMaker, so as to maintain the consistency and stability of the cluster. , to avoid a split-brain situation.
  • iSCSI2 (second disk) is discovered as actual data block storage by NFS1 and NFS2 at the same time, and becomes a local disk in the host.
  • the file system, NFS service, exportfs (output file system) and VIP resources in Figure 4 provide corresponding services based on this shared disk, and only start on one node of the cluster to ensure the exclusivity of the shared disk and avoid file read and write time conflict.
  • NFS service, exportfs, and VIP resources At startup, it starts in the order of the file system, NFS service, exportfs, and VIP resources.
  • it closes it closes in sequence according to the VIP resource, exportfs, NFS service, and file system.
  • NFS service and exportfs (output file system) exist on each node.
  • the file system can be pre-formatted with iSCSI2 as a local file system and mounted on the master node.
  • the NFS service is the NFS server process.
  • the master node starts on the master node, provides the NFS server service, interacts with the NFS client, and provides the NFS network file system function.
  • the NFS file access request is converted into a local file access interface.
  • exportfs is a local file system specified by the NFS server that can be accessed by NFS clients through the NFS network file protocol. You can configure the access parameters for this local file system when the NFS server converts NFS file access requests.
  • the master node starts on the master node.
  • the master-standby switchover occurs, the master node needs to close the output file system and start this configuration on the standby node.
  • a VIP is a virtual IP that provides network access to the outside world and can drift between the active and standby nodes.
  • the master node is normal, it is mounted on the master node.
  • the master-slave switchover occurs, the VIP moves from the master node to the backup node, and the corresponding NFS request will be provided by the backup node.
  • the NFS server cluster node manages the shared data disk file system, corresponding to the above-mentioned file system resources. Receive the NFS file access request converted by the NFS service process, and directly operate the files on the shared data disk file system mounted on the node. Because this operation is a key step for user data to truly fall into persistent storage, the present invention makes targeted optimizations for abnormal situations in this step, mainly including the completion of file system unloading, mounting, and abnormal power-off data involved in active-standby switching. sexual protection.
  • the way the NFS client accesses the NFS server and the access interface it provides to the upper-layer application Due to the stateless nature of the NFS protocol itself, the NFS client cannot perceive the state of the NFS server, so the NFS client locally has a large number of written data caches and a timeout retransmission mechanism.
  • the present invention also has special optimization for the above two points.
  • shut down the service process on the primary node and unmount the file system in response to receiving an active-standby switching instruction, shut down the service process on the primary node and unmount the file system, or in response to receiving an active-standby switching instruction, shut down the service process on the standby node. and unmounting the file system, further comprising:
  • the file system increases the processing priority of the file to which the partial data has been written, so as to quickly call the file to which the partial data has been written in the file system;
  • the method further includes:
  • the scanning time of the file system for the file cache layer is adjusted according to the data request frequency of the client.
  • file system layer that is, the local file system management program.
  • This layer is directly responsible for the management of the shared data disk file system and the unloading and mounting of the file system during active/standby switching, because it directly connects to the raw data disk provided by iSCSI. , which is crucial to the persistent storage of data.
  • iSCSI the raw data disk provided by iSCSI.
  • the file system layer will provide a layer of file cache buffer cache (buffer cache), But when there is an abnormal power failure when the file is written, the file system will be damaged (inconsistency, data loss, etc.). Therefore, in order to take into account the write rate and the stability of the file system, for the aging period of the buffer cache, the file system metadata and the buff (abbreviation for buffer) scan interval of the data block have been adjusted according to the calling characteristics of the NFS service process. excellent.
  • the fast unloading and mounting of the file system and the consistency of the file system during the master-standby switch are the keys to ensure the efficient availability of the entire cluster system.
  • the kernel function is called to quickly write and synchronize the current
  • the file write call that has already written some data, and for the write request sent by the subsequent NFS service process, it will directly reply to the suspension flag, and the corresponding NFS client will receive the suspension response and temporarily suspend the write request. , and wait for the cluster to complete the master/slave switchover.
  • some operations such as disk check and file system integrity check will be performed before the standby node mount action occurs during the active/standby switchover to ensure that the mount operation is completed quickly, thereby speeding up the cluster switchover and providing availability.
  • the method further comprises:
  • the time required for the data request service provided by the primary node to be switched to the standby node to provide the data request service or the data request service provided by the standby node to be switched to the primary node to provide the data The required time for requesting service, and setting the time for the client to retransmit the pending new write request.
  • the method further includes:
  • the data request is processed correspondingly by the service process.
  • the method further includes:
  • the pseudo client In response to detecting the client exception, the pseudo client is used to receive a response returned by the service process.
  • the NFS server and exportfs as the middle layer of the read and write paths, play an important role in linking the previous and the next, so the interaction with the NFS client and the invocation of the local file system are optimized accordingly.
  • the NFS server For the interaction with the NFS client, optimize the local cache of the NFS server to deal with errors caused by network request data loss. Operations such as file creation, deletion, and renaming will change the characteristics of the file.
  • the NFS server successfully completes the request and responds successfully. But the returned data is lost due to network reasons, the NFS client will try to resend the request, but the file attributes have changed, and the NFS server will reply with an error.
  • the NFS server will maintain a cache of the latest response locally. Whenever the NFS client sends a request, the NFS server first checks the cache, and if a match is found, it returns the previous response and The corresponding NFS process is no longer invoked.
  • the call of the NFS client and the local file process is forced to be synchronous, that is, after the NFS server sends the write request of the NFS client to the local file process, the local After the file process returns a response confirming the write, the NFS server will return a response to the NFS client.
  • the processing time of a single NFS write request is increased, the data integrity is greatly improved.
  • the stateless nature of the NFS protocol makes the NFS client unaware of the state of the NFS server, and this stateless design simplifies recovery operations caused by server crashes and network failures. Because the NFS server does not save the state of the NFS request, in order to be transparent to the upper-layer user program, the NFS client needs to maintain a state (Cache) and a complete timeout retransmission mechanism.
  • the Cache (cache) of the NFS client is the basis of the entire stateless protocol of NFS.
  • the master node of the NFS server cluster will start a pseudo NFS client process, synchronize the NFS client cache regularly, and check the availability of the NFS client by heartbeat. If the client fails, the pseudo NFS client will pretend to be the NFS client and call the NFS server to complete the flushing of the Cache.
  • timeout retransmission mechanism considering the master/slave switchover time of the NFS server cluster, set a reasonable timeout time and number of retransmissions to avoid long-term suspension of the upper-layer application and ensure that NFS client requests can be After the standby switch is sent to the NFS server cluster in time.
  • the solution provided by the present invention realizes a local file system with high consistency, drifting among NFS service nodes, and mountable by the shared block storage provided by iSCSI. At the same time, it also optimizes the management of file system buffer Cache, the mounting and unloading of NFS server cluster active-standby switching, the server-side Cache mechanism and the mandatory synchronization mechanism.
  • the optimization of file system management mainly includes parameter tuning of Buff Cache, forced synchronization of IO (Input/Ouput, input and output) operations, and forced suspension of NFS operation requests, so as to ensure the consistency of the file system during master-standby switchover.
  • the optimization of the NFS server cache includes improved mechanism protection against file operation errors such as changing file attributes and network packet loss.
  • the optimization of the NFS client cache includes enabling the NFS client pseudo-process to periodically synchronize the actual NFS client cache on the master node of the NFS server cluster, and completing the flushing of the cache when the NFS client fails.
  • the optimization of the NFS client timeout retransmission mechanism includes cooperating with the configuration of the NFS server cluster, optimizing the timeout time and retransmission times parameters of the timeout retransmission, avoiding the long waiting time of the user program, and truly achieving the high availability of the NFS server cluster. User application insensitivity when switching.
  • an embodiment of the present invention further provides a computer device 501, including:
  • the memory 510 stores a computer program 511 that can be executed on the processor, and the processor 520 executes the steps of any of the above data request methods when the program is executed.
  • an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer The program instructions 610, when executed by the processor, perform the steps of any of the above data request methods.
  • computer-readable storage media e.g. memory
  • volatile memory e.g., memory
  • non-volatile memory e.g., RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

一种数据请求方法,包括以下步骤:建立集群中的主节点和若干个备用节点分别与第一远程磁盘的连接,并建立主节点和若干个备用节点分别和第二远程磁盘的连接(S1);通过心跳检测判断主节点与第一远程磁盘之间的连接是否正常(S2);响应于连接正常,将第二远程磁盘上的文件系统挂载到主节点上,以利用主节点上的服务进程和挂载到主节点上的文件系统对客户端提供数据请求服务(S3);响应于连接不正常,将第二远程磁盘上的文件系统挂载到与第一远程磁盘连接正常的任一备用节点上,以利用备用节点上的服务进程和挂载到备用节点上的文件系统对客户端提供数据请求服务(S4)。

Description

一种数据请求方法、设备以及介质
本申请要求于2020年8月20日提交中国国家知识产权局,申请号为202010841865.6,发明名称为“一种数据请求方法、设备以及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及NFS(Network File System,网络文件系统)领域,具体涉及一种数据请求方法、设备以及存储介质。
背景技术
如图1所示,NFS的主要功能是通过网络让不同的机器系统之间可以彼此共享文件和目录。NFS服务器可以允许NFS客户端将远端NFS服务器端的共享目录挂载到本地的NFS客户端中。在本地的NFS客户端的机器看来,NFS服务器端共享的目录就好像自己的磁盘分区和目录一样。
NFS实现网络文件系统的远程访问的方式如下:
NFS访问的是一个本地文件还是一个NFS文件对于客户端来说是透明的。当文件被打开时,由内核决定这一点。文件被打开之后,内核将本地文件的所有引用传递给名为“本地文件访问”的框中,而将一个NFS文件的所有引用传递给名为“NFS客户端”的框中。
NFS客户端通过它的TCP/IP(Transmission Control Protocol/Internet Protocol,传输控制协议/网际协议)模块向NFS服务器发送RPC(Remote Procedure Call,远程过程调用)请求。NFS主要使用UDP(User Datagram  Protocol,用户数据报协议),现在的实现也可以使用TCP。
NFS服务器接收作为UDP数据报的客户端请求。
当NFS服务器收到一个客户端的请求时,它将这个请求传递给NFS服务器的本地文件访问例程,后者访问服务器主机上的一个本地的磁盘文件。
NFS服务器需要一定的时间来处理一个客户端的请求。访问NFS服务器的本地文件系统一般也需要一部分时间。在这段时间间隔内,服务器不应该阻止其他的客户端请求得到服务。为了实现这一功能,NFS服务器是多线程的—即服务器的内核中实际上有多个NFS服务器在运行。
同样,在客户端主机上,NFS客户端需要花一定的时间来处理一个用户进程的请求。NFS客户端向NFS服务器主机发出一个RPC调用,然后等待NFS服务器的应答。为了给使用NFS的客户端主机上的用户进程提供更多的并发性,在客户端内核中一般运行着多个NFS客户端。
现有技术中的NFS实现网络文件系统的远程访问的方式无法保证高可用性。
发明内容
有鉴于此,为了克服上述问题的至少一个方面,本发明实施例提出一种数据请求方法,包括以下步骤:
建立集群中的主节点和若干个备用节点分别与第一远程磁盘的连接,并建立所述主节点和所述若干个备用节点分别和第二远程磁盘的连接;
通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接是否正常;
响应于连接正常,将所述第二远程磁盘上的文件系统挂载到所述主节点上,以利用所述主节点上的服务进程和挂载到所述主节点上的所述文件 系统对客户端提供数据请求服务;
响应于连接不正常,将所述第二远程磁盘上的文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,以利用所述备用节点上的服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务。
在一些实施例中,将所述第二远程磁盘上的文件系统挂载到所述主节点上,以利用所述主节点上的服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务,进一步还包括:
响应于通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接异常,关闭所述主节点上的服务进程并卸载所述文件系统;
将所述文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,并启动所述备用节点上的所述服务进程,以利用所述备用节点上的所述服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务;
将所述主节点上的对所述客户端提供网络访问的虚拟IP迁移到所述备用节点上。
在一些实施例中,方法还包括:
响应于接收到主备切换指令,关闭所述主节点上的服务进程并卸载所述文件系统;
将所述文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,并启动所述备用节点上的所述服务进程,以利用所述备用节点上的所述服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务;
将所述主节点上的对所述客户端提供网络访问的虚拟IP迁移到所述备 用节点上;或,
响应于接收到主备切换指令,关闭所述备用节点上的服务进程并卸载所述文件系统;
将所述文件系统挂载到所述主节点上,并启动所述主节点上的所述服务进程,以利用所述主节点上的所述服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务;
将所述备用节点上的对所述客户端提供网络访问的虚拟IP迁移到所述主节点上。
在一些实施例中,响应于接收到主备切换指令,关闭所述主节点上的服务进程并卸载所述文件系统,或响应于接收到主备切换指令,关闭所述备用节点上的服务进程并卸载所述文件系统,进一步包括:
所述文件系统提高对已写入部分数据的文件的处理优先级,以快速将所述文件系统中所述已写入部分数据的文件进行写入调用;
响应于接收到所述服务进程发送的所述客户端的新的写入请求,向所述服务进程返回挂起标识,并将所述挂起标识返回所述客户端,以使所述客户端挂起所述新的写入请求。
在一些实施例中,方法进一步包括:
根据由所述主节点提供所述数据请求服务切换到所述备用节点提供所述数据请求服务的所需时间或由所述备用节点提供所述数据请求服务切换到所述主节点提供所述数据请求服务的所需时间,设置所述客户端对挂起的所述新的写入请求进行重传的时间。
在一些实施例中,方法还包括:
根据所述客户端的数据请求频率调整所述文件系统对文件缓存层的扫描时间。
在一些实施例中,方法还包括:
创建应答缓存;
响应于接收到所述客户端发送的数据请求,判断所述应答缓存中是否有所述数据请求对应的应答;
响应于有所述对应的应答,将所述对应的应答返回所述客户端;
响应于没有所述对应的应答,利用所述服务进程对所述数据请求进行相应处理。
在一些实施例中,方法还包括:
创建并启动伪客户端进程,通过心跳检测判断所述客户端的可用性,并定时同步客户端的缓存;
响应于检测到所述客户端异常,利用所述伪客户端接收所述服务进程返回的应答。
基于同一发明构思,根据本发明的另一个方面,本发明的实施例还提供了一种计算机设备,包括:
至少一个处理器;以及
存储器,所述存储器存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时执行如上所述的任一种数据请求方法的步骤。
基于同一发明构思,根据本发明的另一个方面,本发明的实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时执行如上所述的任一种数据请求方法的步骤。
本发明具有以下有益技术效果之一:本发明提供的方案基于iSCSI提供 远程网络共享块存储并实现了网络存储的高可用,使得故障切换时,本地文件系统仍能保持高一致性,且文件系统数据不易损坏。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为现有技术中NFS的架构图;
图2为本发明的实施例提供的数据请求方法的流程示意图;
图3为本发明的实施例提供的存储架构图;
图4为本发明的实施例提供的NFS服务端的架构图;
图5为本发明的实施例提供的计算机设备的结构示意图;
图6为本发明的实施例提供的计算机可读存储介质的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。
需要说明的是,在本发明的实施例中,NFS:Network File System是一 种分布式文件系统,允许客户端主机访问服务器端文件,并且其过程与访问本地存储时一样。
iSCSI:Internet Small Computer System Interface,Internet小型计算机系统接口,是一种基于因特网及SCSI-3(Small Computer System Interface-3,小型计算机系统接口第3版)协议下的存储技术。
Fence:一种当计算机集群中某个节点出现故障时,将其从集群中分离以保护整个集群共享资源的机制。
根据本发明的一个方面,本发明的实施例提出一种数据请求方法,如图2所示,其可以包括步骤:
S1,建立集群中的主节点和若干个备用节点分别与第一远程磁盘的连接,并建立所述主节点和所述若干个备用节点分别和第二远程磁盘的连接;
S2,通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接是否正常;
S3,响应于连接正常,将所述第二远程磁盘上的文件系统挂载到所述主节点上,以利用所述主节点上的服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务;
S4,响应于连接不正常,将所述第二远程磁盘上的文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,以利用所述备用节点上的服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务。
本发明提供的方案基于iSCSI提供远程网络共享块存储并实现了网络存储的高可用,使得故障切换时,本地文件系统仍能保持高一致性,且文件系统数据不易损坏。
在一些实施例中,步骤S3,将所述第二远程磁盘上的文件系统挂载到 所述主节点上,以利用所述主节点上的服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务,进一步还包括:
响应于通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接异常,关闭所述主节点上的服务进程并卸载所述文件系统;
将所述文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,并启动所述备用节点上的所述服务进程,以利用所述备用节点上的所述服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务;
将所述主节点上的对所述客户端提供网络访问的虚拟IP迁移到所述备用节点上。
在一些实施例中,方法还包括:
响应于接收到主备切换指令,关闭所述主节点上的服务进程并卸载所述文件系统;
将所述文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,并启动所述备用节点上的所述服务进程,以利用所述备用节点上的所述服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务;
将所述主节点上的对所述客户端提供网络访问的虚拟IP迁移到所述备用节点上;或,
响应于接收到主备切换指令,关闭所述备用节点上的服务进程并卸载所述文件系统;
将所述文件系统挂载到所述主节点上,并启动所述主节点上的所述服务进程,以利用所述主节点上的所述服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务;
将所述备用节点上的对所述客户端提供网络访问的虚拟IP迁移到所述主节点上。
具体的,如图3所示,集群可以包括一个主节点NFS1和一个备用节点NFS2,NFS1、NFS2同时连接一个共享的iSCSI目标器,iSCSI目标器提供两个共享的块存储,NFS1、NFS2以相同的盘符连接两个块存储。其中,iSCSI1(第一磁盘)作为心跳盘检测iSCSI连接,iSCSI2(第二磁盘)作为数据盘提供实际的块存储。其中,共享数据盘格式化为本地文件系统,并挂载到NFS1、NFS2组成的NFS服务集群,提供文件系统资源。初始时,主节点连接正常时,则将文件系统挂载在主节点上。当通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接异常时,则进行主备切换,文件系统自动在主节点卸载,并在备用节点挂载。初始时,主节点异常时,则直接将文件系统挂载在备用节点上。
需要说明的是,文件系统无论是挂载在主节点上,还是挂载在备用节点上,用户都可以主动发出的主备切换指令,以切换文件系统挂载的对象。但是共享盘上的文件系统只能在集群的一个节点上挂载,并始终作为一个本地文件系统存在。主节点启动NFS服务端(nfs client)进程,并将挂载到本地的文件系统以NFS协议通过VIP(Virtual IP,虚拟IP)输出到网络,供NFS的客户端发现及挂载。主备切换时,主节点会卸载文件系统并关闭服务端进程,此时则备用节点会挂载文件系统并启动NFS服务进程(包括NFS服务和exportfs)。或者当备用节点启动NFS服务端进程,并将挂载到本地的文件系统以NFS协议通过VIP输出到网络,供NFS的客户端发现及挂载。发送主备切换时,备用节点会卸载文件系统并关闭服务端进程,此时则主节点会挂载文件系统并启动NFS服务进程(包括NFS服务和exportfs)。
NFS客户端将NFS服务集群的节点提供的NFS网络文件系统挂载为本 地NFS文件系统,本地应用可以像使用本地文件系统一样,使用此NFS文件系统。
需要说明的是,NFS集群的主节点可以是一个,备用节点的数量可以是多个。
下面结合图4详细说明本发明提出的方案。
如图4所示,NFS集群内的每个节点内可以由PaceMaker(一种集群资源管理器)维护五种资源---心跳检测、文件系统、NFS服务、exportfs(输出文件系统)以及VIP。其中心跳检测在主、备用节点同时运行,其他服务均在其中一个节点运行。通过检测iSCSI1磁盘(第一磁盘)的可用性,实现Fence机制,即当NFS1、NFS2中的任一节点出现iSCSI连接问题时,将会被PaceMaker从高可用集群中剔除,从而维护集群的一致、稳定,避免脑裂的情况出现。
iSCSI2(第二磁盘)作为实际的数据块存储被NFS1,NFS2的同时发现,成为主机内的本地磁盘。图4中的文件系统、NFS服务、exportfs(输出文件系统)以及VIP四种资源基于此共享磁盘提供相应的服务,且只在集群的一个节点启动,保证共享磁盘的排他性,避免出现文件读写时的冲突。在启动时按照文件系统、NFS服务、exportfs和VIP资源的顺序依次启动,关闭时按照VIP资源、exportfs、NFS服务、文件系统依次关闭。其中,NFS服务和exportfs(输出文件系统)在每一个节点均存在。
需要说明的是,文件系统是可以预先将iSCSI2格式化为本地文件系统,并在主节点挂载。发生主备切换时,需要在主节点卸载此文件系统,并在备用节点挂载此文件系统。NFS服务则为NFS服务端进程,当主节点正常时,在主节点启动,对上提供NFS服务端服务,与NFS客户端交互,提供NFS网络文件系统功能。对下管理文件系统,将NFS文件访问请求转换为本地文件访问接口。发生主备切换时需要在主节点关闭NFS服务进程,并 在备用节点启动NFS服务进程。exportfs(输出文件系统)则为NFS服务端指定的可被NFS客户端通过NFS网络文件协议访问的本地文件系统,可以配置NFS服务端转换NFS文件访问请求时针对此本地文件系统的访问参数。当主节点正常时,在主节点启动,发生主备切换时,主节点需要关闭此输出文件系统,并在备用节点启动此配置。VIP则为对外提供网络访问的虚拟IP,可以在主备节点间漂移。当主节点正常时,挂载在主节点,发生主备切换时,VIP从主节点漂移到备用节点,相应的NFS请求将由备用节点提供。
在一些实施例中,从上述网络存储的架构以及各资源的功能来看,系统整体的读写路径中有三个主要节点,自上而下分别是:
(1)NFS服务端集群节点针对共享数据磁盘文件系统管理,对应上述文件系统资源。接收NFS服务进程转换的NFS文件访问请求,直接操作节点上挂载的共享数据磁盘文件系统上的文件。因为此操作是用户数据真正落入持久化存储的关键一步,所以本发明针对此步的异常情况有针对性的优化,主要是主备切换涉及的文件系统卸载、挂载以及异常断电数据完成性保护。
(2)NFS服务端进程与本地文件访问进程的交互,以及对外提供输出文件系统亦即与NFS客户端网络交互的参数,对应于上述的NFS服务及exportfs进程。接收来自NFS客户端的NFS文件访问请求,处理转换后发送给本地文件系统进程,最终完成实际的本地共享磁盘上文件系统的读写。此步要保证其转换的请求能够实际地写入本地文件系统,同时针对网络不稳定导致的传输数据丢失时,能够有比较完善的处理机制。
(3)NFS客户端访问NFS服务端的方式以及其对上层应用提供的访问接口。因为NFS协议本身的无状态特性,NFS客户端对NFS服务器的状态无法感知,所以NFS客户端本地有大量的写入数据Cache以及超时重传 机制,本发明对于上述两点也有特别的优化。
在一些实施例中,响应于接收到主备切换指令,关闭所述主节点上的服务进程并卸载所述文件系统,或响应于接收到主备切换指令,关闭所述备用节点上的服务进程并卸载所述文件系统,进一步包括:
所述文件系统提高对已写入部分数据的文件的处理优先级,以快速将所述文件系统中所述已写入部分数据的文件进行写入调用;
响应于接收到所述服务进程发送的所述客户端的新的写入请求,向所述服务进程返回挂起标识,并将所述挂起标识返回所述客户端,以使所述客户端挂起所述新的写入请求。
在一些实施例中,方法还包括:
根据所述客户端的数据请求频率调整所述文件系统对文件缓存层的扫描时间。
具体的,首先考虑文件系统层面,即本地文件系统管理程序,该层直接负责共享数据盘文件系统的管理以及主备切换时的文件系统的卸载和挂载,因为直接对接iSCSI提供的裸数据磁盘,对数据的持久化存储至关重要,主要特征点有两个:
(1)涉及到数据的最终存储,NFS服务进程的写入请求的处理相对读取请求更为重要,文件系统层为了提高文件的写入速率会提供一层文件缓存buffer cache(缓冲缓存),但是当文件写入时出现异常断电,文件系统会出现损坏(不一致,数据丢失等)。所以,为了兼顾写入速率以及文件系统的稳定,针对buffer cache的老化期,文件系统元数据、数据块的buff(buffer的简写)扫描时间间隔根据NFS服务进程的调用特点做了针对性的调优。
(2)主备切换时文件系统的快速卸载以及挂载、文件系统的一致性是保证整个集群系统高效可用的关键,针对有IO时文件系统的卸载,调用内 核函数,快速写入、同步当前已经写入部分数据的文件写入调用,而对于后续NFS服务进程发送的写入请求,则直接回复挂起标识,相应的NFS客户端会收到此挂起响应,会暂时挂起写入请求,等待集群完成主备切换。而对于挂载操作,主备切换时会在备用节点挂载动作发生前做一些磁盘检查、文件系统完整性检查等操作,保证挂载操作快速完成,从而加快集群切换的速度,提供可用性。
在一些实施例中,方法进一步包括:
根据由所述主节点提供所述数据请求服务切换到所述备用节点提供所述数据请求服务的所需时间或由所述备用节点提供所述数据请求服务切换到所述主节点提供所述数据请求服务的所需时间,设置所述客户端对挂起的所述新的写入请求进行重传的时间。
在一些实施例中,方法还包括:
创建应答缓存;
响应于接收到所述客户端发送的数据请求,判断所述应答缓存中是否有所述数据请求对应的应答;
响应于有所述对应的应答,将所述对应的应答返回所述客户端;
响应于没有所述对应的应答,利用所述服务进程对所述数据请求进行相应处理。
在一些实施例中,方法还包括:
创建并启动伪客户端进程,通过心跳检测判断所述客户端的可用性,并定时同步客户端的缓存;
响应于检测到所述客户端异常,利用所述伪客户端接收所述服务进程返回的应答。
NFS服务端以及exportfs作为读写路径的中间层,起着承上启下的重要 作用,所以针对与NFS客户端的交互以及本地文件系统的调用分别有针对性优化。
针对与NFS客户端的交互,优化NFS服务端的本地Cache,以应对网络请求数据丢失导致错误。文件的创建、删除以及重命名等操作会改变文件的特性,当上述请求中的一个由NFS客户端发送到NFS服务端,NFS服务端成功完成请求,并回复成功。但是回复的数据因为网络原因丢失,NFS客户端会尝试重新发送请求,但是文件属性已经改变,NFS服务端会回复一个错误。为了避免上述情况的发生,NFS服务端会在本地维护一个最近应答的高速缓存,每当NFS客户端发送一个请求,NFS服务端首先检查高速缓存,如果找到了一个匹配,就返回以前的应答而不再调用相应的NFS进程。
为了保证NFS客户端的写入数据完整的发送给本地文件进程,强制NFS客户端与本地文件进程的调用为同步方式,即NFS服务端将NFS客户端的写入请求发送给本地文件进程后,需要本地文件进程返回确认写入的应答后,NFS服务端才会给NFS客户端返回应答,虽然增加了单个NFS写入请求的处理时间,但大大提高了数据的完整性。
NFS协议的无状态特性导致了NFS客户端对NFS服务端的状态是无感知的,而这种无状态的设计简化了服务器崩溃以及网络故障导致的恢复操作。因为NFS服务器不保存NFS请求的状态,为了对上层用户程序的透明,NFS客户端需要自身维护一个状态(Cache)以及完备的超时重传机制。
因为无法依赖NFS服务端的状态,NFS客户端的Cache(缓存)是NFS整个无状态协议的基础。为应对NFS客户端主机崩溃导致Cache丢失的状况,在NFS服务端集群的主节点会启动一个伪NFS客户端进程,定时同步NFS客户端Cache,并会心跳检测NFS客户端的可用性,一旦检测到NFS客户端故障,伪NFS客户端会冒充NFS客户端调用NFS服务端完成Cache 的刷入。
针对超时重传机制,考虑到NFS服务端集群的主备切换时间,设置为较为合理的超时时间以及重传次数,避免上层应用程序的长时间挂起,同时保证了NFS客户端请求可以在主备切换后及时地发送到NFS服务端集群。
本发明提供的方案通过iSCSI提供的共享块存储实现的高一致性的、在NFS服务节点间漂移的、可挂载的本地文件系统。同时还针对文件系统buffer Cache的管理、NFS服务端集群主备切换的挂载、卸载,服务端Cache机制以及强制的同步机制进行优化。具体的,文件系统管理的优化主要包括Buff Cache的参数调优,IO(Input/Ouput,输入输出)操作的强制同步、NFS操作请求的强制挂起,保证主备切换时文件系统的一致性。NFS服务端高速缓存的优化包括针对变更文件属性等操作网络数据包丢失的文件操作错误提高机制保护。并通过NFS服务调用本地文件系统进程的方式,确认底层文件系统完成写入后,才会给NFS客户端返回确认应答,保证文件系统的一致性。针对NFS客户端Cache的优化包括NFS服务端集群主节点启用NFS客户端伪进程定时同步实际NFS客户端Cache,并在NFS客户端发生故障时,完成Cache的刷入。针对NFS客户端超时重传机制的优化包括配合NFS服务端集群的配置,优化超时重传的超时时间、重传次数参数,避免了用户程序的长时间等待,真正做到了NFS服务端集群高可用切换时用户应用程序的无感知。
基于同一发明构思,根据本发明的另一个方面,如图5所示,本发明的实施例还提供了一种计算机设备501,包括:
至少一个处理器520;以及
存储器510,存储器510存储有可在处理器上运行的计算机程序511,处理器520执行程序时执行如上的任一种数据请求方法的步骤。
基于同一发明构思,根据本发明的另一个方面,如图6所示,本发明的实施例还提供了一种计算机可读存储介质601,计算机可读存储介质601存储有计算机程序指令610,计算机程序指令610被处理器执行时执行如上的任一种数据请求方法的步骤。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指示相关硬件来完成,程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。
此外,应该明白的是,本文的计算机可读存储介质(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本发明实施例公开的范围。
以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况, 单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。

Claims (10)

  1. 一种数据请求方法,其特征在于,包括以下步骤:
    建立集群中的主节点和若干个备用节点分别与第一远程磁盘的连接,并建立所述主节点和所述若干个备用节点分别和第二远程磁盘的连接;
    通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接是否正常;
    响应于连接正常,将所述第二远程磁盘上的文件系统挂载到所述主节点上,以利用所述主节点上的服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务;
    响应于连接不正常,将所述第二远程磁盘上的文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,以利用所述备用节点上的服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务。
  2. 如权利要求1所述的方法,其特征在于,将所述第二远程磁盘上的文件系统挂载到所述主节点上,以利用所述主节点上的服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务,进一步还包括:
    响应于通过心跳检测判断所述主节点与所述第一远程磁盘之间的连接异常,关闭所述主节点上的服务进程并卸载所述文件系统;
    将所述文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,并启动所述备用节点上的所述服务进程,以利用所述备用节点上的所述服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务;
    将所述主节点上的对所述客户端提供网络访问的虚拟IP迁移到所述备用节点上。
  3. 如权利要求1所述的方法,其特征在于,还包括:
    响应于接收到主备切换指令,关闭所述主节点上的服务进程并卸载所述 文件系统;
    将所述文件系统挂载到与所述第一远程磁盘连接正常的任一所述备用节点上,并启动所述备用节点上的所述服务进程,以利用所述备用节点上的所述服务进程和挂载到所述备用节点上的所述文件系统对客户端提供数据请求服务;
    将所述主节点上的对所述客户端提供网络访问的虚拟IP迁移到所述备用节点上;或,
    响应于接收到主备切换指令,关闭所述备用节点上的服务进程并卸载所述文件系统;
    将所述文件系统挂载到所述主节点上,并启动所述主节点上的所述服务进程,以利用所述主节点上的所述服务进程和挂载到所述主节点上的所述文件系统对客户端提供数据请求服务;
    将所述备用节点上的对所述客户端提供网络访问的虚拟IP迁移到所述主节点上。
  4. 如权利要求3所述的方法,其特征在于,响应于接收到主备切换指令,关闭所述主节点上的服务进程并卸载所述文件系统,或响应于接收到主备切换指令,关闭所述备用节点上的服务进程并卸载所述文件系统,进一步包括:
    所述文件系统提高对已写入部分数据的文件的处理优先级,以快速将所述文件系统中所述已写入部分数据的文件进行写入调用;
    响应于接收到所述服务进程发送的所述客户端的新的写入请求,向所述服务进程返回挂起标识,并将所述挂起标识返回所述客户端,以使所述客户端挂起所述新的写入请求。
  5. 如权利要求4所述的方法,其特征在于,进一步包括:
    根据由所述主节点提供所述数据请求服务切换到所述备用节点提供所述 数据请求服务的所需时间或由所述备用节点提供所述数据请求服务切换到所述主节点提供所述数据请求服务的所需时间,设置所述客户端对挂起的所述新的写入请求进行重传的时间。
  6. 如权利要求1-5任一项所述的方法,其特征在于,还包括:
    根据所述客户端的数据请求频率调整所述文件系统对文件缓存层的扫描时间。
  7. 如权利要求1-5任一项所述的方法,其特征在于,还包括:
    创建应答缓存;
    响应于接收到所述客户端发送的数据请求,判断所述应答缓存中是否有所述数据请求对应的应答;
    响应于有所述对应的应答,将所述对应的应答返回所述客户端;
    响应于没有所述对应的应答,利用所述服务进程对所述数据请求进行相应处理。
  8. 如权利要求1-5任一项所述的方法,其特征在于,还包括:
    创建并启动伪客户端进程,通过心跳检测判断所述客户端的可用性,并定时同步客户端的缓存;
    响应于检测到所述客户端异常,利用所述伪客户端接收所述服务进程返回的应答。
  9. 一种计算机设备,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时执行如权利要求1-8任意一项所述的方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时执行如权利要求1-8任意一项所述的方法的步骤。
PCT/CN2021/096543 2020-08-20 2021-05-27 一种数据请求方法、设备以及介质 WO2022037171A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010841865.6A CN112000635A (zh) 2020-08-20 2020-08-20 一种数据请求方法、设备以及介质
CN202010841865.6 2020-08-20

Publications (1)

Publication Number Publication Date
WO2022037171A1 true WO2022037171A1 (zh) 2022-02-24

Family

ID=73473407

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096543 WO2022037171A1 (zh) 2020-08-20 2021-05-27 一种数据请求方法、设备以及介质

Country Status (2)

Country Link
CN (1) CN112000635A (zh)
WO (1) WO2022037171A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277377A (zh) * 2022-05-19 2022-11-01 亿点云计算(珠海)有限公司 基于分布式云的服务获取方法、装置、终端及存储介质
CN115277606A (zh) * 2022-08-01 2022-11-01 成都安恒信息技术有限公司 一种优化drbd数据同步的方法
CN116055310A (zh) * 2022-06-28 2023-05-02 荣耀终端有限公司 一种恢复用户配置信息的方法、装置及网络设备

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580086A (zh) * 2019-09-27 2021-03-30 杭州海康威视数字技术股份有限公司 配置文件的访问保护方法、装置、设备以及存储介质
CN112000635A (zh) * 2020-08-20 2020-11-27 苏州浪潮智能科技有限公司 一种数据请求方法、设备以及介质
CN112667172B (zh) * 2021-01-19 2024-06-18 南方电网科学研究院有限责任公司 磁盘操作方法、装置、系统、存储介质及计算设备
CN113505111B (zh) * 2021-06-22 2024-03-12 新华三大数据技术有限公司 一种共享目录挂载方法及分布式网络附加存储系统
CN114064414A (zh) * 2021-11-25 2022-02-18 北京志凌海纳科技有限公司 一种高可用的集群状态监控方法及系统
CN115016738A (zh) * 2022-06-27 2022-09-06 北京天融信网络安全技术有限公司 一种数据迁移的方法、装置、系统、电子设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090240783A1 (en) * 2008-03-19 2009-09-24 Oracle International Corporation Direct network file system
CN103279386A (zh) * 2013-06-09 2013-09-04 浪潮电子信息产业股份有限公司 一种计算机作业调度系统高可用的方法
CN105681074A (zh) * 2015-12-29 2016-06-15 北京同有飞骥科技股份有限公司 一种增强双机集群可靠、可用性的方法及装置
CN106034164A (zh) * 2016-05-16 2016-10-19 深圳元核云技术有限公司 云存储网关文件共享服务方法及系统
CN109240845A (zh) * 2018-09-05 2019-01-18 郑州云海信息技术有限公司 一种心跳磁盘异常的处理方法、装置和存储介质
CN112000635A (zh) * 2020-08-20 2020-11-27 苏州浪潮智能科技有限公司 一种数据请求方法、设备以及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090240783A1 (en) * 2008-03-19 2009-09-24 Oracle International Corporation Direct network file system
CN103279386A (zh) * 2013-06-09 2013-09-04 浪潮电子信息产业股份有限公司 一种计算机作业调度系统高可用的方法
CN105681074A (zh) * 2015-12-29 2016-06-15 北京同有飞骥科技股份有限公司 一种增强双机集群可靠、可用性的方法及装置
CN106034164A (zh) * 2016-05-16 2016-10-19 深圳元核云技术有限公司 云存储网关文件共享服务方法及系统
CN109240845A (zh) * 2018-09-05 2019-01-18 郑州云海信息技术有限公司 一种心跳磁盘异常的处理方法、装置和存储介质
CN112000635A (zh) * 2020-08-20 2020-11-27 苏州浪潮智能科技有限公司 一种数据请求方法、设备以及介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277377A (zh) * 2022-05-19 2022-11-01 亿点云计算(珠海)有限公司 基于分布式云的服务获取方法、装置、终端及存储介质
CN116055310A (zh) * 2022-06-28 2023-05-02 荣耀终端有限公司 一种恢复用户配置信息的方法、装置及网络设备
CN116055310B (zh) * 2022-06-28 2023-10-20 荣耀终端有限公司 一种恢复用户配置信息的方法、装置及网络设备
CN115277606A (zh) * 2022-08-01 2022-11-01 成都安恒信息技术有限公司 一种优化drbd数据同步的方法
CN115277606B (zh) * 2022-08-01 2023-11-24 成都安恒信息技术有限公司 一种优化drbd数据同步的方法

Also Published As

Publication number Publication date
CN112000635A (zh) 2020-11-27

Similar Documents

Publication Publication Date Title
WO2022037171A1 (zh) 一种数据请求方法、设备以及介质
JP6141189B2 (ja) ファイルシステムにおける透過的なフェイルオーバーの提供
US7383463B2 (en) Internet protocol based disaster recovery of a server
TWI625621B (zh) 用於資料庫中進行回復的方法、電腦可用程式產品、與資料處理系統
US8949828B2 (en) Single point, scalable data synchronization for management of a virtual input/output server cluster
JP4005631B2 (ja) 故障許容nfsサーバシステム及びミラーリングプロトコル
JP5974086B2 (ja) 共有ファイルシステムにアクセスするクライアントに一貫した可用性を提供するコンピュータ実施方法及びシステム、並びに、該クライアントとしてコンピュータを機能させるコンピュータ実行可能命令を含むコンピュータ可読記憶媒体
US7111194B1 (en) Mirror split brain avoidance
US7058731B2 (en) Failover and data migration using data replication
US8473692B2 (en) Operating system image management
US7966517B2 (en) Method and apparatus for virtual network attached storage remote migration
US11934670B2 (en) Performing various operations at the granularity of a consistency group within a cross-site storage solution
US20230133014A1 (en) Methods and Systems for Storage Virtual Machine Migration Between Clusters of a Networked Storage System
CN115794499A (zh) 一种用于分布式块存储集群间双活复制数据的方法和系统
CN111552540A (zh) 基于VMware云平台的资源同步方法及超融合云平台
US11921699B1 (en) Lease-based consistency management for handling failover in a database
US20240036997A1 (en) Methods and systems to improve input/output (i/o) resumption time during a non-disruptive automatic unplanned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system
US10776384B1 (en) Method, server and system for criteria-based assured replication
WO2024051027A1 (zh) 一种大数据的数据配置方法和系统
US11507512B2 (en) Fault tolerant cluster data handling
US20210297398A1 (en) Identity management
US11397752B1 (en) In-memory ingestion for highly available distributed time-series databases
JP7104016B2 (ja) クライアント側のキャッシュによる透過的なデータベースセッションの回復
JP2012022379A (ja) 分散トランザクション処理システム、装置、方法およびプログラム
US20210103598A1 (en) Managing persistent handle information for a file

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21857272

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21857272

Country of ref document: EP

Kind code of ref document: A1