WO2022077777A1 - Locking reapplication method, lock management method, and server - Google Patents

Locking reapplication method, lock management method, and server Download PDF

Info

Publication number
WO2022077777A1
WO2022077777A1 PCT/CN2020/141986 CN2020141986W WO2022077777A1 WO 2022077777 A1 WO2022077777 A1 WO 2022077777A1 CN 2020141986 W CN2020141986 W CN 2020141986W WO 2022077777 A1 WO2022077777 A1 WO 2022077777A1
Authority
WO
WIPO (PCT)
Prior art keywords
lock
server
target object
client
request
Prior art date
Application number
PCT/CN2020/141986
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Priority to CN202080018013.5A priority Critical patent/CN114710976B/en
Publication of WO2022077777A1 publication Critical patent/WO2022077777A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • 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/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • G06F16/1767Concurrency control, e.g. optimistic or pessimistic approaches
    • G06F16/1774Locking methods, e.g. locking methods for file systems allowing shared and concurrent access to files
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2094Redundant storage or storage space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2097Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements maintaining the standby controller/processing unit updated
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/825Indexing scheme relating to error detection, to error correction, and to monitoring the problem or solution involving locking

Definitions

  • the present application relates to the field of computer technology, and in particular, to a lock reassertion method, a lock management method, and a server.
  • Network file system (NFS) version 3 (NFS version 3, NFSv3) is a stateless network file sharing protocol, which can provide file read and write services for multiple NFS clients at the same time.
  • NFS Network file system
  • the server fails and restarts it will read the client information from the persistence layer and send a message to the client to inform the client to re-apply for the lock that has been added when the capacity is expanded or contracted.
  • the server will set a silent period. During the silent period, only the client is allowed to reiterate the lock, and new lock requests are not allowed. When the silent period ends, the lock request from any client can be received normally. But in the process of lock reiteration, the client may reiterate the lock that was not added before the failure.
  • the present application provides a lock reiteration method, a lock management method and a server, which are used to reduce abnormal lock reiteration of clients.
  • a first aspect of the present application provides a lock reassertion method, which includes: a server receiving a lock reassertion request from a client; Locked file; the server locks the target object from the lock identifier in the extension information corresponding to the target object, and the lock identifier indicates that the target object was locked before the server failure.
  • the target object may be a file, directory, etc. in the file system, or may be a block or a logical unit number (LUN) in a block storage system, or an object in an object storage system.
  • LUN logical unit number
  • the server when it determines that there is a move-in event, it mutes each object area in the server, and obtains the locked client information in the feature log, so as to release the silent state of the object area that does not need to be muted.
  • the object area in the file system, the object area is the file area or the directory area; in the block storage system, the object area is the metadata area of the block or LUN; in the object storage system, it is the metadata area of the object.
  • the corresponding server receives the lock reiteration request from the client, and obtains the lock reiteration request from the client.
  • Locked target object The objects in the server of the present application all have corresponding extension information, the data in the extension information is non-volatile data, the server can determine whether there is a lock mark in the extension information of the target object, if there is the lock mark, The server can lock the target file, and if there is no lock identification, the server can reject the lock reiteration request.
  • This application only locks the object with the lock identification, and rejects the client's lock reiteration request for the object without the lock identification, so as to reduce the abnormal lock reiteration of the client.
  • the extended information also includes the number of locks, and in the above steps, before the server locks the target object according to the lock reiteration request, the method further includes: when the number of lock reiteration requests corresponding to the target object exceeds the number of locks. , the server marks the end of the target object lock reassurance.
  • the extended information of each object in the server of the present application further includes the number of locks, and the number of locks may indicate the number of locks added before the server restarts.
  • the server also needs to determine the target object corresponding to the lock reiteration request, whether the number of reiterated locks after the server restarts exceeds the number of locks, and if so, the client's lock reiteration request is directly rejected. If the number of locks is exceeded, the corresponding locking operation can be performed according to the client's lock reiteration request. In this way, abnormal lock reiteration by clients can be further reduced.
  • the method further includes: when the successful lock reiteration request corresponds to the client, and the lock of the object area where the target object is located.
  • the server stores the locking relationship between the client and the object area where the target object is located in the feature log.
  • the server can detect whether the target successful client and the locking relationship of the object area are stored in the feature log, if so, do not perform other operations, if not, the server can store the Locking relationship for double protection against locking.
  • the method before the server receives the lock reiteration request from the client in the above steps, the method further includes: the server receives the lock request from the client; the server determines the target object according to the lock request; the server extends the corresponding extension of the target object.
  • the lock identification is stored in the information.
  • the server before the server restarts, the server can determine the target object according to the object identifier in the client's locking request, and if the target object can be locked, the locking identifier is stored in the extension information of the target object, So that after the server restarts, it can be determined through the lock identifier that the target object has been locked before the server restarts, so as to improve the feasibility of the solution.
  • the extended information further includes the number of locks
  • the method further includes: the server correspondingly increases the number of locks.
  • the server when multiple clients request locks on the target object, the server correspondingly increases the number of locks according to the number of requests that can be successfully locked, so that the feasibility of the solution can be improved.
  • the method further includes: the server receives an unlock request from one or more clients; the server determines the target object according to the unlock request; When the number of unlock requests of the target object is the same as the number of lock requests, the server clears the lock flag.
  • the server after the server stores the lock identifier in the extension information corresponding to the target object, if the locked client does not need to be locked, it can send an unlock request to the server.
  • the server can detect the number of unlock requests and the number of lock requests of the target object in the cache. If the number of unlock requests is less than the number of lock requests, the lock identifier in the extended information is retained. If the number of unlock requests is equal to the number of lock requests, Then the server deletes the lock identification in the extended information, which can improve the reliability of lock reiteration.
  • the method further includes: the server receives an unlock request from the client; the server determines the target object according to the unlock request; the server correspondingly reduces the number of locks; when the number of locks is 0 , the server clears the lock flag.
  • the server when the extended information includes the number of locks, the server also needs to correspondingly reduce the number of locks according to the unlock request. If the number of locks is 0, it means that there is no lock on the target object, then clear the lock identification to Improve the reliability of lock reiteration.
  • the method further includes: when the locking relationship between the client and the target area where the target object is located is not stored in the feature log, the server stores the client and the target object. The locking relationship of the object area where the target object is located is stored in the feature log.
  • the locking relationship between the successfully locked client and the object area where the target object is located is stored in the feature log, so that the lock can be reiterated later.
  • a second aspect of the present application provides a lock management method.
  • the method includes: the server obtains a lock identifier of a target object; and the server records the lock identifier in extended information of the target object.
  • the locking request that the client applies for locking to the target object carries the locking identification
  • the server obtains the locking identification in the locking request, and stores the locking identification in the extension information of the target object. , so that after the server restarts, it can be determined through the lock identifier that the target object has been locked before the server restarts.
  • the server obtains the lock quantity of the target object; the server records the lock quantity in the extended information of the target object.
  • the server when there is no unlock request, can use the number of lock requests stored by the target object in the cache as the number of locks of the target object, and then record it in the extension information of the target object, so that after the server restarts
  • the number of clients locked on the target object can be determined by the number of locks.
  • the server when releasing the lock of the target object, deletes the lock identification from the extended information of the target object.
  • the client when it completes the operation and does not need to lock, it can send an unlock request to the server, and accordingly, the server can release the lock on the target object and delete the lock identifier in the extended information.
  • the server when the lock on the target object is a write lock or there is only one read lock, the server deletes the lock ID upon receiving the unlock request.
  • the server can delete the extended information after receiving the unlock request. The lock identifier corresponding to the unlock request.
  • the server when restoring the lock of the target object, acquires the lock identifier from the extended information stored in the hard disk.
  • the lock identification can be obtained from the extended information stored in the hard disk.
  • the lock reiteration requests that the target object be locked accordingly.
  • the method is applied to a distributed file storage system.
  • a third aspect of the present application provides a server, the server comprising: a receiving unit for receiving a lock reiteration request from a client; a determining unit for determining a target object corresponding to the client according to the lock reiteration request, where the target object is the client The object to be locked after the server restarts; the re-locking unit is used to lock the target object according to the lock reiteration request when the extension information corresponding to the target object determines that there is a lock mark, and the lock mark indicates the target object Locked before server failure.
  • the server is configured to execute the method of the foregoing first aspect or any implementation manner of the first aspect.
  • a fourth aspect of the present application provides a server, the server comprising: an acquiring unit, configured to acquire a locking identifier of a target object; and a recording unit, configured to record the locking identifier in extended information of the target object.
  • the server is configured to execute the method of the foregoing second aspect or any implementation manner of the second aspect.
  • a fifth aspect of the present application provides a computer device, including: a processor, a memory, and a communication interface, where the processor is configured to execute instructions stored in the memory, so that the computer device executes the first aspect or any one of the first aspects
  • the communication interface is used for receiving or sending an indication.
  • a sixth aspect of the present application provides a computer device, including: a processor, a memory, and a communication interface, where the processor is configured to execute instructions stored in the memory, so that the computer device executes the second aspect or any one of the second aspects.
  • the method provided by the optional manner, the communication interface is used for receiving or sending an indication.
  • the specific details of the computer device provided by the sixth aspect reference may be made to the second aspect or any optional manner of the second aspect, which will not be repeated here.
  • a seventh aspect of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the computer executes the first aspect or any optional manner of the first aspect. method.
  • An eighth aspect of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium.
  • the computer executes the program, the computer executes the second aspect or any optional manner of the second aspect. method.
  • a ninth aspect of the present application provides a computer program product.
  • the computer program product When the computer program product is executed on a computer, the computer executes the method provided in the foregoing first aspect or any optional manner of the first aspect.
  • a tenth aspect of the present application provides a computer program product.
  • the computer program product When the computer program product is executed on a computer, the computer executes the method provided in the second aspect or any optional manner of the second aspect.
  • FIG. 1 is a block diagram of a server-client system provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an embodiment of a lock reassertion method provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of another embodiment of a lock reassertion method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an embodiment of a locking method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another embodiment of the locking method provided by the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
  • FIG. 9 is another schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 10 is another schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application.
  • Embodiments of the present application provide a lock reiteration method, a lock management method, and a server, which are used to reduce abnormal lock reiteration by clients.
  • NFS Network file system
  • a network file system allows a server to share files and directories with clients over a network. This allows clients to access remote files and directories in the same way that clients would access local files and directories.
  • the NFS structure can provide many advantages. For example, clients use less storage space because data can be stored on a single server and still be accessible by clients. Thus, data that would otherwise be replicated on each client can be stored in a single location and accessed by multiple clients on the network.
  • a storage device of a data storage system may implement one or more file systems to organize data stored on it.
  • a "file system” may refer to the structure or organization of files or directories, and a "file” may refer to a set of data.
  • Each file can be associated with a filename that allows the file to be uniquely identified and located. Depending on the specific requirements and desired application, a number of different file systems can be used.
  • the PortMapper protocol uses fixed ports to manage ports for various NFS services.
  • NLM network lock manager
  • TCP transmission control protocol
  • UDP user datagram protocol
  • the network status monitoring (NSM) protocol registers the listening port with the PortMapper module when the NFS service starts.
  • the client and the server inform each other of their own status through this protocol, which is used for NLM cleanup and recovery in the scenario of client failure and server failure.
  • FIG. 1 is a block diagram of a server-client system provided by an embodiment of the present application.
  • the system 100 may include a client 101 in communication with an NFS server 103 (ie, a server, exemplified here as an NFS server) over a network 102 .
  • NFS server 103 may access storage device 104 including file system 1041 .
  • storage device 104 may be included in NFS server 103 .
  • a client 101 may issue a request to access or perform an operation on a data object on the NFS server 103 through the network 102 .
  • a request can be encapsulated into a standardized message format defined by the NFS protocol.
  • a "data object" may refer to any of data, files, applications, subdirectories, directories, file systems, combinations thereof, and the like.
  • the NFS server 103 may allow the client 101 to access the data object from the file system 1041 of the storage device 104.
  • NFS server 103 may send data objects from file system 1041 to requesting client 101 .
  • NFS server 103 may allow client 101 to mount a remote directory of file system 1041 on a local directory at client 101 .
  • NFS server 103 may also allow client 101 to perform one or more operations on data objects. For example, client 101 may open data objects, read data objects, write data objects, close data objects, create data objects, lock data objects, delete data objects, delegate data objects, combinations thereof, and the like. NFS server 103 may track some or all of these operations in the form of state. NFS server 103 may track one or more of these states associated with one or more data objects. In some embodiments, client 101 may additionally track these states.
  • NFS server 103 may first determine whether client 101 has appropriate permissions to access or perform certain operations on data objects in file system 1041 of storage device 104 .
  • "permission" defines access control options that can be applied to one or more users.
  • NFS server 103 may examine metadata associated with a data object to ensure that the requesting user (eg, a user ID associated with client 101) is associated with a "read" operation of the data object.
  • NFS server 103 may deny client 101 access to the data object if the requesting user is not associated with the operation.
  • state information for data objects is stored in volatile memory for fast access and update compared to non-volatile memory.
  • volatile memory is erased when the storage system is powered down.
  • conventional NFS protocols often rely on clients to resend all previous state information and/or related data to the server during a smooth recovery period.
  • the state information of data objects on one storage device can be difficult to copy from volatile memory to another storage device.
  • typically only the data objects themselves will be migrated, and it may be desirable to migrate the state of the data objects, however, during migration, data (eg, state information) stored in volatile memory will typically not be migrated to destination storage device.
  • systems and methods are provided for capturing and storing state information corresponding to various states of NFS.
  • the disclosed systems and methods can automatically collect and synchronously write state changes made to NFS to non-volatile storage.
  • state information corresponding to the NFS system can be automatically imported from the non-volatile storage device, so that the NFS service can be restored immediately and transparently.
  • the state information can be transferred from the non-volatile storage to the destination storage device, which can then import the state information into memory to mirror the source storage device.
  • FIG. 2 is a server-client lock recovery scenario provided by an embodiment of the present application.
  • the client 101 includes an NSM1 module and an NLM1 module
  • the server 103 includes an NSM2 module, an NLM2 module, and a lock service module.
  • NLM1 After the NLM1 module is successfully locked, it will notify the NSM1 module to save the locked server information, and the NSM1 module is responsible for persisting this information.
  • NSM1 reads the server information from the persistence layer, and sends a notification message to the NSM2 module of the server 103, instructing the server 103 to clear all locking requests sent from the client 101.
  • the NLM2 module After the NLM2 module receives the lock request, it will submit the request to the lock service module (LockServer) to process the lock business logic (locking, unlocking, lock conflict checking, etc.), and persist the client information.
  • the server 103 restarts due to a failure, it will read the client information from the persistence layer when expanding or shrinking the capacity, and send a notification message to the client 101, informing the client 101 to re-apply for the lock that has been added.
  • the server 103 During the reiteration process, the server 103 will set a silent period. During the silent period, only the client 101 is allowed to reiterate the lock, and a new client's lock request is not allowed. When the silent period ends, the lock request from any client can be received normally.
  • the embodiment of the present application provides a lock reiteration method.
  • the method includes: the server receives a lock reiteration request from the client; the server determines a target file corresponding to the client according to the lock reiteration request, and the target file is a file that the client wants to lock after the server restarts; The target file is locked with the lock mark of the lock mark, and the lock mark indicates that the target file was locked before the server failure.
  • the client can only perform lock reiteration on the files that were locked before the failure, reducing the abnormal lock reiteration of the client.
  • the server in this embodiment may be a network attached storage (NAS) server, which is a dedicated data storage server. It is data-centric, completely separates storage devices from servers, and centrally manages data, thereby freeing bandwidth, improving performance, reducing total cost of ownership, and protecting investments. Its cost is much lower than using server storage, and its efficiency is much higher.
  • NAS is defined as a special dedicated data storage server, including storage devices (such as disk arrays, compact disc (CD)/digital versatile disc (DVD) drives, tape drives or removable storage media ) and embedded system software to provide cross-platform file sharing.
  • NAS usually has its own node on a local area network (LAN) without the intervention of the application server, allowing users to access data on the network. In this configuration, the NAS centrally manages and processes all data on the network. Offload the load from the application or enterprise server, effectively reduce the total cost of ownership and protect user investment.
  • LAN local area network
  • the server configures the file with extended information that can store non-volatile data.
  • the lock reiteration request is processed according to the lock ID of the extended information.
  • the server processes the lock reiteration request according to the lock identifier of the extended information.
  • a period of silence is set for the client to reiterate the lock.
  • the server may be configured to end the silence in advance, or may not be configured to end the silence in advance.
  • the server is not configured to end the silence in advance.
  • the server determines the move-in event, it sets each file area to be silent, and reads the client information from the feature log.
  • the migration event is that when one node in the server fails, another node takes over the physical storage of the failed node. resource.
  • the server can silence each file area to prevent other clients from applying for locking and affecting the locking service of the client before the failure.
  • the server can read the client information from the feature log of the physical storage resource, and the client information can be the locking relationship between the client and the file area where the file in the server is located, indicating that the client is in a certain file area in the file area. The file is locked.
  • the server can determine which file areas and which clients have been locked before the server fails according to the locking relationship between the client and the file area in the server in the client information.
  • the server can de-quiesce the file area that has not been locked before the failure, so that the lock application of other clients can be executed normally.
  • the server sends a lock reiteration message to the client according to the client information.
  • the failure of the server can be a crash or other failure.
  • the server is restarted, the data in the cache is lost, and the locks on each file are also cleared.
  • the client needs to restore all previous state information and/or during the recovery period (ie the silent time). Or the relevant data is resent to the server, and the server can send a lock reiteration message to the client that locked the file before the server failure, informing the client that the file lock needs to be re-applied.
  • the client sends a lock reiteration request to the server according to the lock reiteration message.
  • the client can send a lock reiteration request to the server based on the file lock recorded in the cache, and the lock reiteration request may include the file identifier of the target file to be re-locked.
  • the lock reiteration request also includes the lock status reply flag (reclaim).
  • the client needs to restore the file lock previously applied for. At this time, the reclaim in the lock reiteration request message is set to 1, and the value is 0 in other cases.
  • the server determines the target file corresponding to the client according to the lock reiteration request.
  • the server After the server receives the lock reiteration request, it can determine the target file to be applied for by the client from the file system according to the above-mentioned file identifier.
  • Each file in the file system is provided with extended information, which is used to store non-volatile data.
  • the server determines the target file and needs to restore the lock of the target file, the server obtains the lock identifier from the extended information stored in the hard disk, for example, the data in the extended information corresponding to the target file can be read into the cache , if there is no lock identification in the extended information, the server can reject the client's lock reiteration request. If the lock identification exists in the extended information, the server can read and lock or write the target file accordingly according to the lock reiteration request. lock, wherein the lock identifier is used to indicate that the target file has been locked before the server fails.
  • the server can directly perform corresponding operations according to the data in the cache without reading the extended information.
  • the server stores the lock relationship between the client and the file region where the target file is located in the feature log.
  • the server can determine whether the locking relationship between the client and the file area where the target file is located has been written after a lock identification exists in the extended information and a corresponding locking operation is performed on the target file according to the lock reiteration request. If it has been written, it does not need to be written repeatedly. If it has not been written, the lock relationship between the client and the file area where the target file is located can be stored in the feature log to ensure data reliability.
  • the server confirms the lock identification from the extended information of the target file reiterated by the client, and rejects the lock reiteration request of the client for the file without the lock identification, because the reiterated file in the lock reiteration request of the client is not necessarily It is a file to which the client was locked before the server failure.
  • the client's lock reiteration request can be rejected for a file that has not been locked before the server failure, which can reduce abnormal lock reiteration by the client.
  • the server configuration ends the silence in advance.
  • the server determines the move-in event, it sets each file area to be silent, and reads client information from the feature log.
  • the server sends a lock reiteration message to the client according to the client information.
  • the client sends a lock reiteration request to the server according to the lock reiteration message.
  • the server determines the target file corresponding to the client according to the lock reiteration request.
  • Steps 401 to 405 in this embodiment may refer to the relevant descriptions of steps 301 to 305 in the lock reassertion method shown in FIG. 3 , and details are not repeated here.
  • the server marks the end of lock reiteration of the target file.
  • the scope of influence of the silence at the file area level is relatively large, and the silence cannot be released in advance during silence, and the influence time is relatively long, generally 60s.
  • the NAS server since the NAS server does not save the file information locked by the client, it cannot prevent the client from using the reiterated rules to apply for a lock that does not belong to itself during the reiteration.
  • Each file in the file system is provided with extended information, which is used to store non-volatile data.
  • the server determines the target file, it can read the data in the extension information corresponding to the target file into the cache. If there is no lock identification in the extension information, the server can reject the client's lock reiteration request.
  • the lock identifier the server can also obtain the number of locks in the extended information, and the number of locks is used to indicate the number of locks added to the target file before the server fails.
  • the target file can be set to multiple reads before the server fails.
  • the server can judge whether the number of multiple lock reiteration requests of the target file exceeds the number of locks after restarting. Within the range, the server can reject the current lock reiteration request and mark the end of the lock reiteration process of the target file, that is, the silence of the target file can be ended in advance.
  • the lock identification is used to indicate that the target file has been locked before the server fails.
  • the server locks the target file according to the lock reiteration request.
  • the server can directly The target file is read-locked or write-locked accordingly according to the lock reiteration request.
  • the server stores the lock relationship between the client and the file region where the target file is located in the feature log.
  • step 408 in this embodiment reference may be made to the relevant description of step 307 in the lock reassertion method shown in FIG. 3 , and details are not repeated here.
  • the server confirms the lock identification from the extended information of the target file reiterated by the client, and rejects the lock reiteration request of the client for the file without the lock identification, because the reiterated file in the lock reiteration request of the client is not necessarily It is a file to which the client was locked before the server failure.
  • the client's lock reiteration request can be rejected for a file that has not been locked before the server failure, which can reduce abnormal lock reiteration by the client.
  • the server can mark the end of the lock reiteration of the target file, that is, end the silence of the target file in advance, and other clients can proceed normally. Applying for a lock can also prevent the client from applying for a lock that does not belong to itself through the lock reiteration during the reiteration period, ending the silence in advance, and reducing the time affected by the failure.
  • the server sets the lock flag to the extended information of the file when the client applies for lock.
  • a period of silence is set for the client to reiterate the lock.
  • the server may be configured to end the silence in advance, or may not be configured to end the silence in advance.
  • the server is not configured to end the silence in advance.
  • the client sends a lock request to the server.
  • the client can check whether there is a file lock on the server when accessing a file in the server, so there will be no conflict when all clients access the same file.
  • the client can send a lock request for the file to the server.
  • the client can request a read lock or a write lock, and when there is only a read lock on the file, the client can only apply for a read lock.
  • the server determines the target file according to the lock request.
  • the lock request sent by the client includes the identifier of the file to be accessed by the client, and the server can determine the target file to be locked by the client according to the identifier.
  • the server stores the locking relationship between the client and the file region where the target file is located in the feature log.
  • the server can judge whether the locking relationship between the client and the file area where the target file is located has been written into the feature log (Feature log). and the locking relationship of the file area where the target file is located is stored in the feature log as the basis for the client to reiterate the lock.
  • the server stores the lock identifier in the extension information corresponding to the target file.
  • Each file in the file system is provided with extended information, which is used to store non-volatile data.
  • the server may determine the target file, obtain the lock identifier of the target file, and store the lock identifier in the extension information of the target file, and the lock identifier indicates the lock identifier of the target file.
  • the target file is currently locked, which can be used to indicate that the target file was locked before the server failed.
  • the extended information only records the lock identification once, which can save memory resources.
  • the target file has only one write lock, and can have one or more read locks.
  • the extended information may record the lock identification only once.
  • the client sends an unlock request to the server.
  • the client After the client accesses the file in the server, it needs to release the locked state of the file, and can send an unlock request for the file to the server, wherein the number of clients sending the unlock request to the server can be one or more.
  • the server determines the target file according to the unlock request.
  • the server determines the target file to be unlocked by the client according to the file identifier included in the unlock request.
  • the server clears the lock identifier.
  • the number of lock requests and unlock requests of all clients to the target file are stored in the cache. That is, the lock to be released by the current unlock request is the last lock of the target file, and the server can know the lock identifier in the extension information corresponding to the target file. Remove the lock sign from .
  • the server configures extended information for the file, and whether the lock identifier in the extended information exists can indicate whether the file has been locked when the server is restarted. For files that have not been locked before the server fails, the server can Rejecting the client's lock reiteration request can reduce the client's abnormal lock reiteration.
  • the server configuration ends the silence in advance.
  • the client sends a lock request to the server.
  • the server determines the target file according to the lock request.
  • the server stores the locking relationship between the client and the file region where the target file is located in the feature log.
  • the server stores the lock identifier in the extension information corresponding to the target file.
  • Steps 601 to 604 in this embodiment may refer to the relevant descriptions of steps 501 to 504 in the locking method shown in FIG. 5 , and details are not repeated here.
  • the server correspondingly increases the number of locks.
  • the extended information also includes the number of locks of the target file.
  • the server When the server receives a lock request that can be implemented, it will perform the corresponding lock operation on the target file, and then the number of locks of the target file can be obtained, and correspondingly.
  • the number of locks is recorded in the extended information, for example, an increase operation can be performed on the number of locks in the extended information. Exemplarily, after the server locks the target file, the number of locks is incremented by 1.
  • the client sends an unlock request to the server.
  • the server determines the target file according to the unlock request.
  • Steps 606 to 607 in this embodiment may refer to the relevant descriptions of steps 505 to 506 in the locking method shown in FIG. 5 , and details are not repeated here.
  • the server correspondingly reduces the number of locks.
  • the server after receiving the unlock request, the server reduces the number of locks in the extension information corresponding to the target file.
  • the number of locks is decremented by 1.
  • the server can clear the lock flag in the extension information of the target file, that is, when releasing the lock of the target file, the server will remove the lock from the target file from the target file. Delete the lock mark from the extended information of the file.
  • the server configures extended information for the file, and whether the lock identifier in the extended information exists can indicate whether the file has been locked when the server is restarted, so that there is no locked file before the server fails, the server The client's lock reiteration request can be rejected, which can reduce the client's abnormal lock reiteration.
  • the extended information also includes the number of locks, and the number of locks can provide the server with the number of locks added to the file after the server restarts, so that the server can end the file silence in advance according to the number of locks after restarting.
  • the lock reassertion method in this embodiment of the present application may be implemented through a system architecture.
  • FIG. 7 is a schematic diagram of the architecture of the server in this embodiment of the present application.
  • the server 103 includes an NFS module 1031, a lock server module 1032, Feature log module 1033 and file system 1034.
  • the lock server module 1032 further includes: a recovery (recover) module 10321, a lock manager (lock manager) module 10322 and a persistent (persistent) module 10323.
  • the NFS module 1031 After receiving the lock request from the client, the NFS module 1031 parses the lock information, and sends the lock information to the lock management module 10322 .
  • the NFS module 1031 executes steps 501 and 505 in FIG. 5 or steps 601 and 606 in FIG. 6 .
  • the lock management module 10322 determines whether the information of the locked client has been written into the feature log module 1033. If it has been written, it will not be written again. If the feature log module 1033 has not been written before, the client information will be written into the feature log module. 1033.
  • the lock management module 10322 may perform steps 502, 503, 506 and 507 in FIG. 5 or steps 602, 603, 607 and 609 in FIG. 6 .
  • the lock management module 10322 sends the lock information to the persistence module 10323, and the persistence module 10323 determines whether to write to the file system.
  • the persistence module 10323 determines whether the current server is configured with the function of ending the silence early. If the silent function is not terminated in advance, only the identifier of the first NFS lock needs to be written into the extended information of the file. When the client is unlocked, when the last lock is unlocked, the lock identifier in the extended information of the file is cleared. If the function of prematurely ending the silence is set, the number of locks (the number of locks) will be written into the extended information of the file. The number of locks in the extended information of the refresh file when the client is unlocked.
  • the lock management module 10322 may perform step 504 in FIG. 5 or steps 605 and 608 in FIG. 6 .
  • the recovery module 10321 After receiving the migration event, the recovery module 10321 reads the lock client information from the feature log module 1033 , and then sends the client information to the NFS module 1031 .
  • the recovery module 10321 can perform steps 301 and 302 in FIG. 3 or steps 401 and 402 in FIG. 4 .
  • the NFS module 1031 sends a lock reassertion message to the client, and receives a lock reassertion request from the client, parses the lock information, and sends the lock information to the lock management module 10322.
  • the NFS module 1031 may perform steps 303 and 304 in FIG. 3 or steps 403 and 404 in FIG. 4 .
  • the lock management module 10322 reads the extended information through the persistence module 10323. If it has already been read, it does not need to be read repeatedly, but can be read directly from the cache. If there is no setting to end the silent function in advance, you only need to judge whether there is a lock mark. If there is a lock identification, the logical judgment of lock reiteration is performed. If there is no lock flag, an error is returned and the client's lock reassertion is rejected. If the early termination of silence function is set, it is judged whether the number of locks reiterated is equal to the number of locks read, and if it is less than the number of locks read, the logical judgment of lock reiteration is performed. If the number of locks reiterated is equal to the number of locks read, the end of lock reiteration is marked.
  • the persistence module 10323 may perform step 306 in FIG. 3 or steps 406 and 407 in FIG. 4 .
  • the lock management module 10322 determines whether the information of the locked client has been written into the feature log module 1033. If it has been written, it will not be written again. If the feature log module 1033 has not been written before, the client information will be written into the feature log module. 1033.
  • the lock management module 10322 may perform steps 305 and 307 in FIG. 3 or steps 405 and 408 in FIG. 4 .
  • FIG. 8 is a schematic diagram of an embodiment of a server 80 in an embodiment of the present application.
  • an embodiment of the present application provides a structure of the server 80 including:
  • a receiving unit 801 configured to receive a lock reiteration request from a client
  • a determination unit 802 configured to determine the target object corresponding to the client according to the lock reiteration request, and the target object is the object that the client wants to lock after the server restarts;
  • the re-locking unit 803 is configured to lock the target object from the lock identifier in the extension information corresponding to the target object, where the lock identifier indicates that the target object was locked before the server failure.
  • another structure of the server 90 provided in this embodiment of the present application includes:
  • a receiving unit 901 configured to receive a lock reiteration request from a client
  • the determining unit 902 is used to determine the target object corresponding to the client according to the lock reiteration request, and the target object is the object that the client wants to lock after the server restarts;
  • the re-locking unit 903 is configured to lock the target object from the lock identifier in the extension information corresponding to the target object, where the lock identifier indicates that the target object was locked before the server failure.
  • the extended information further includes the number of locks
  • the server further includes a marking unit 904
  • the marking unit 904 is specifically configured to: when the number of lock reiteration requests corresponding to the target object exceeds the number of locks, mark the end of lock reiteration of the target object.
  • the target object may be a file, directory, etc. in the file system, or may be a block or a logical unit number (Logical Unit Number, LUN) in a block storage system, or an object in an object storage system.
  • LUN Logical Unit Number
  • the server further includes a first storage unit 905, and the first storage unit 905 is specifically configured to: when the successful lock reiteration request corresponds to the client, and the locking relationship of the object area where the target object is located is not stored in the feature log.
  • the lock relationship between the client and the target area where the target object is located is stored in the feature log.
  • the object area in the file system, the object area is the file area or the directory area; in the block storage system, the object area is the metadata area of the block or LUN; in the object storage system, it is the metadata area of the object.
  • the server also includes a locking unit 906, and the locking unit 906 is specifically used to: receive a locking request from the client; determine a target object according to the locking request, and the target object is the object to be locked by the client; The lock identification is stored in the corresponding extended information.
  • the extended information further includes the number of locks, and the locking unit is also used for: correspondingly increasing the number of locks.
  • the server further includes a first unlocking unit 907, and the first unlocking unit 907 is specifically configured to: receive unlocking requests from one or more clients; determine the target object according to the unlocking request, and the target object is the target object; When the number of unlock requests is the same as the number of lock requests, the lock flag is cleared.
  • the server further includes a second unlocking unit 908, and the second unlocking unit 908 is specifically configured to: receive the unlocking request from the client; determine the target object according to the unlocking request; reduce the number of locks accordingly; When the number of lock requests is the same, the lock flag is cleared.
  • the server further includes a second storage unit 909, and the second storage unit 909 is specifically configured to: when the locking relationship of the object area where the client and the target object are located is not stored in the feature log, store the object where the client and the target object are located. The locking relationship of the region is stored in the feature log.
  • another structure of the server 100 provided in this embodiment of the present application includes:
  • Obtaining unit 1001 for obtaining the lock identification of the target object
  • the recording unit 1002 is configured to record the lock identification in the extended information of the target object.
  • the obtaining unit 1001 is further configured to obtain the lock quantity of the target object; the recording unit 1002 is further configured to record the lock quantity in the extended information of the target object.
  • the server 100 further includes a deletion unit 1003, the deletion unit 1003 is configured to delete the lock identification from the extended information of the target object when the lock of the target object is released.
  • the server 100 further includes a reading unit 1004, and the reading unit 1004 is configured to acquire the lock identification from the extended information stored in the hard disk when restoring the lock of the target object.
  • the server 100 is applied to a distributed file storage system.
  • Computer device 110 includes: processor 1101 , communication interface 1102 , storage system 1103 , and bus 1104 .
  • the processor 1101 , the communication interface 1102 , and the storage system 1103 are connected to each other through a bus 1104 .
  • the processor 1101 is configured to control and manage the actions of the computer device 110.
  • the processor 1101 is configured to execute the steps performed by the storage management apparatus in the method embodiment of FIG. 3 .
  • Communication interface 1102 is used to support computer device 110 to communicate.
  • the storage system 1103 is used to store program codes and data of the computer device 110 .
  • the processor 1101 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor 1101 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
  • the bus 1104 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • Embodiments of the present invention may be specifically implemented by software, for example, by instructions, or by hardware, or by both software and hardware. This embodiment of the present invention does not limit this.
  • the embodiment of the present invention can be used in a storage array supporting a file system, and can also be used to perform the above operations of the embodiment of the present invention on a directory in the file system.
  • the embodiments of the present invention may also be applied to a block storage system or an object storage system.
  • the block storage system may be a distributed block storage system or a storage array.
  • the foregoing operations in the embodiments of the present invention may be used for operations on blocks or LUNs.
  • an object storage system the foregoing operations in the embodiments of the present invention may be applied to objects in the object storage system.
  • a computer-readable storage medium is also provided, where computer-executable instructions are stored in the computer-readable storage medium.
  • the processor of the device executes the computer-executable instructions
  • the device executes the above-mentioned FIG. 3 to The steps of the lock reassurance method performed by the server in FIG. 6 .
  • a computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; when a processor of a device executes the computer-executable instructions , the device executes the steps of the lock reassertion method executed by the server in the above-mentioned FIG. 3 to FIG. 6 .
  • the server in this embodiment of the present invention may be a lock server, an array controller in a storage array, a server providing corresponding functions in a distributed storage system, and the like, which is not limited in this embodiment of the present invention.
  • Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or modules may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A locking reapplication method, a lock management method, and a server, for use in reducing abnormal locking reapplications of a client. The method comprises, after receiving a locking reapplication request of the client, the server needs to detect whether a locking identifier is present on extension information of a target object requested by the locking reapplication request, and the target object can be locked only when the locking identifier is present.

Description

一种锁重申方法、锁管理方法以及服务器A lock reiteration method, lock management method and server
本申请要求于2020年10月16日提交印度专利局、申请号为IN202031045050、发明名称为“LOCK MANAGEMENT METHOD,LOCK MANAGEMENT APPARATUS,AND COMPUTER-READABLE STORAGE MEDIUM”(锁管理方法、锁管理装置及计算机可读存储介质)的印度专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the Indian Patent Office on October 16, 2020, the application number is IN202031045050, and the name of the invention is "LOCK MANAGEMENT METHOD, LOCK MANAGEMENT APPARATUS, AND COMPUTER-READABLE STORAGE MEDIUM" (lock management method, lock management device and computer can Priority of the Indian Patent Application for Reading Storage Medium), the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种锁重申方法、锁管理方法以及服务器。The present application relates to the field of computer technology, and in particular, to a lock reassertion method, a lock management method, and a server.
背景技术Background technique
网络文件系统(network file system,NFS)中第3版网络文件系统(NFS version 3,NFSv3)是一种无状态的网络文件共享协议,可以同时为多个NFS客户端提供文件的读写业务。在实际应用中,为避免多个NFS客户端同时写同一个文件而出现数据不一致,需要在NFS客户端读写时对服务器中的文件执行加锁保护。当服务器故障重启,扩容缩容时会从持久化层读取客户端信息,向客户端发送消息,告知客户端重新申请已经加过的锁。Network file system (NFS) version 3 (NFS version 3, NFSv3) is a stateless network file sharing protocol, which can provide file read and write services for multiple NFS clients at the same time. In practical applications, in order to avoid data inconsistency caused by multiple NFS clients writing the same file at the same time, it is necessary to perform lock protection on the files in the server when the NFS client reads and writes. When the server fails and restarts, it will read the client information from the persistence layer and send a message to the client to inform the client to re-apply for the lock that has been added when the capacity is expanded or contracted.
重申过程中,服务器会设置静默期,静默期间只允许客户端重申锁,不允许新的加锁请求。当静默期结束后,才可以正常接收任意客户端的加锁请求。但在锁重申的过程,客户端可能会重申故障前没有加过的锁。During the reiteration process, the server will set a silent period. During the silent period, only the client is allowed to reiterate the lock, and new lock requests are not allowed. When the silent period ends, the lock request from any client can be received normally. But in the process of lock reiteration, the client may reiterate the lock that was not added before the failure.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种锁重申方法、锁管理方法以及服务器,用于减少客户端的非正常重申锁。The present application provides a lock reiteration method, a lock management method and a server, which are used to reduce abnormal lock reiteration of clients.
本申请第一方面提供了一种锁重申方法,该方法包括:服务器接收来自客户端的锁重申请求;服务器根据锁重申请求确定客户端对应的目标对象,目标对象为客户端在服务器重启后想要加锁的文件;服务器从目标对象对应的扩展信息中的加锁标识对目标对象进行加锁,加锁标识指示目标对象在服务器故障前加过锁。具体的,目标对象可以为文件系统中的文件、目录等,也可以为块存储系统中的块或者逻辑单元号(logical unit number,LUN),或者对象存储系统中的对象。A first aspect of the present application provides a lock reassertion method, which includes: a server receiving a lock reassertion request from a client; Locked file; the server locks the target object from the lock identifier in the extension information corresponding to the target object, and the lock identifier indicates that the target object was locked before the server failure. Specifically, the target object may be a file, directory, etc. in the file system, or may be a block or a logical unit number (LUN) in a block storage system, or an object in an object storage system.
上述第一方面中,服务器确定有迁入事件时,静默服务器中的各个对象区域,并在特征日志中获取加过锁的客户端信息,以便解除不需要静默的对象区域的静默状态。其中一种实现,在文件系统中,对象区域为文件区域或目录区域;在块存储系统中,对象区域为块或LUN的元数据区域;在对象存储系统中,为对象的元数据区域。服务器重启后,缓存中的数据丢失,各个对象上的锁也都清除,需要提醒客户端重新申请加锁,相应的服务器接收来自客户端的锁重申请求,并从锁重申请求中获取客户端所要重新加锁的目标对象。本申请的服务器中的对象都有对应的扩展信息,该扩展信息中的数据为非易失性数据,服务器可以确定该目标对象的扩展信息中是否存在加锁标识,如果存在该加锁标识,则服务器可以对该目标文件进行加锁,如果不存在加锁标识,则服务器可以拒绝该锁重申请求。本申请只对有加锁标识的对象进行加锁,对于没有加锁标识的对象拒绝客户端的锁重申请求,减少客户端非正常重申锁。In the above-mentioned first aspect, when the server determines that there is a move-in event, it mutes each object area in the server, and obtains the locked client information in the feature log, so as to release the silent state of the object area that does not need to be muted. In one implementation, in the file system, the object area is the file area or the directory area; in the block storage system, the object area is the metadata area of the block or LUN; in the object storage system, it is the metadata area of the object. After the server restarts, the data in the cache is lost, and the locks on each object are also cleared. The client needs to be reminded to apply for the lock again. The corresponding server receives the lock reiteration request from the client, and obtains the lock reiteration request from the client. Locked target object. The objects in the server of the present application all have corresponding extension information, the data in the extension information is non-volatile data, the server can determine whether there is a lock mark in the extension information of the target object, if there is the lock mark, The server can lock the target file, and if there is no lock identification, the server can reject the lock reiteration request. This application only locks the object with the lock identification, and rejects the client's lock reiteration request for the object without the lock identification, so as to reduce the abnormal lock reiteration of the client.
一种可能的实施方式中,扩展信息还包括加锁数量,上述步骤服务器根据锁重申请求对目标对象进行加锁之前,该方法还包括:当目标对象对应的锁重申请求的数量超出锁数量时,服务器标记目标对象锁重申结束。In a possible implementation, the extended information also includes the number of locks, and in the above steps, before the server locks the target object according to the lock reiteration request, the method further includes: when the number of lock reiteration requests corresponding to the target object exceeds the number of locks. , the server marks the end of the target object lock reassurance.
上述可能的实施方式中,本申请的服务器中每个对象的扩展信息中还包括锁数量,该锁数量可以指示在服务器重启前加过锁的数量。对于客户端的锁重申请求,服务器还需要判断该锁重申请求对应的目标对象,在服务器重启后的进行重申加锁的数量是否超过该锁数量,如果超过则直接拒绝客户端的锁重申请求,如果没超过锁数量,则可以根据客户端的锁重申请求执行相应的加锁操作。这样,可以进一步减少客户端的非正常锁重申。In the above possible implementation manner, the extended information of each object in the server of the present application further includes the number of locks, and the number of locks may indicate the number of locks added before the server restarts. For the client's lock reiteration request, the server also needs to determine the target object corresponding to the lock reiteration request, whether the number of reiterated locks after the server restarts exceeds the number of locks, and if so, the client's lock reiteration request is directly rejected. If the number of locks is exceeded, the corresponding locking operation can be performed according to the client's lock reiteration request. In this way, abnormal lock reiteration by clients can be further reduced.
一种可能的实施方式中,上述步骤服务器根据锁重申请求对目标对象进行加锁之后,该方法还包括:当加锁成功的锁重申请求对应的客户端,及目标对象所在对象区域的加锁关系没有存储在特征日志时,服务器将客户端及目标对象所在对象区域的加锁关系存储在特征日志。In a possible implementation manner, after the server locks the target object according to the lock reiteration request in the above steps, the method further includes: when the successful lock reiteration request corresponds to the client, and the lock of the object area where the target object is located. When the relationship is not stored in the feature log, the server stores the locking relationship between the client and the object area where the target object is located in the feature log.
上述可能的实施方式中,服务器可以检测目标成功的客户端以及该对象区域的加锁关系是否存储在特征日志,如果存在,则不进行其他操作,如果不存在,则服务器可以在特征日志存储该加锁关系,以便进行对加锁情况的双重保护。In the above possible implementation manner, the server can detect whether the target successful client and the locking relationship of the object area are stored in the feature log, if so, do not perform other operations, if not, the server can store the Locking relationship for double protection against locking.
一种可能的实施方式中,上述步骤服务器接收来自客户端的锁重申请求之前,该方法还包括:服务器接收来自客户端的加锁请求;服务器根据加锁请求确定目标对象;服务器在目标对象对应的扩展信息中存储加锁标识。In a possible implementation, before the server receives the lock reiteration request from the client in the above steps, the method further includes: the server receives the lock request from the client; the server determines the target object according to the lock request; the server extends the corresponding extension of the target object. The lock identification is stored in the information.
上述可能的实施方式中,在服务器重启前,根据客户端的加锁请求中的对象标识,服务器可以确定目标对象,如果该目标对象可以加锁,则在目标对象的扩展信息中存储加锁标识,以便服务器重启后能通过该加锁标识确定该目标对象在服务器重启前加过锁,以提高方案的可行性。In the above possible implementation, before the server restarts, the server can determine the target object according to the object identifier in the client's locking request, and if the target object can be locked, the locking identifier is stored in the extension information of the target object, So that after the server restarts, it can be determined through the lock identifier that the target object has been locked before the server restarts, so as to improve the feasibility of the solution.
一种可能的实施方式中,扩展信息还包括锁数量,上述步骤服务器在目标对象对应的扩展信息中存储加锁标识之后,该方法还包括:服务器相应增加锁数量。In a possible implementation manner, the extended information further includes the number of locks, and after the server stores the lock identifier in the extended information corresponding to the target object in the above steps, the method further includes: the server correspondingly increases the number of locks.
上述可能的实施方式中,当有多个客户端对目标对象请求加锁时,服务器根据可以加锁成功的请求的数量相应增加锁数量,这样,可以提高方案的可行性。In the above possible implementation manner, when multiple clients request locks on the target object, the server correspondingly increases the number of locks according to the number of requests that can be successfully locked, so that the feasibility of the solution can be improved.
一种可能的实施方式中,上述步骤服务器在目标对象对应的扩展信息中存储加锁标识之后,该方法还包括:服务器接收来自一个或多个客户端的解锁请求;服务器根据解锁请求确定目标对象;当目标对象的解锁请求的数量与加锁请求的数量相同时,服务器清除加锁标识。In a possible implementation, after the server stores the lock identification in the extension information corresponding to the target object in the above steps, the method further includes: the server receives an unlock request from one or more clients; the server determines the target object according to the unlock request; When the number of unlock requests of the target object is the same as the number of lock requests, the server clears the lock flag.
上述可能的实施方式中,服务器在目标对象对应的扩展信息中存储加锁标识之后,如果加锁的客户端不需要加锁了,可以向服务器发送解锁请求。服务器可以在缓存中检测目标对象的解锁请求数量和加锁请求数量,如果解锁请求数量少于加锁请求数量,则保留扩展信息中的加锁标识,如果解锁请求数量等于该加锁请求数量,则服务器删除扩展信息中的加锁标识,可以提高锁重申的可靠性。In the above possible implementation manner, after the server stores the lock identifier in the extension information corresponding to the target object, if the locked client does not need to be locked, it can send an unlock request to the server. The server can detect the number of unlock requests and the number of lock requests of the target object in the cache. If the number of unlock requests is less than the number of lock requests, the lock identifier in the extended information is retained. If the number of unlock requests is equal to the number of lock requests, Then the server deletes the lock identification in the extended information, which can improve the reliability of lock reiteration.
一种可能的实施方式中,上述步骤服务器相应增加加锁数量之后,该方法还包括:服务器接收来自客户端的解锁请求;服务器根据解锁请求确定目标对象;服务器相应减少锁 数量;当锁数量为0时,服务器清除加锁标识。In a possible implementation, after the server correspondingly increases the number of locks in the above steps, the method further includes: the server receives an unlock request from the client; the server determines the target object according to the unlock request; the server correspondingly reduces the number of locks; when the number of locks is 0 , the server clears the lock flag.
上述可能的实施方式中,当扩展信息中包括锁数量时,服务器还需要根据解锁请求相应减少锁数量,如果锁数量为0,则代表该目标对象上没有加锁,则清除加锁标识,以提高锁重申的可靠性。In the above possible implementation, when the extended information includes the number of locks, the server also needs to correspondingly reduce the number of locks according to the unlock request. If the number of locks is 0, it means that there is no lock on the target object, then clear the lock identification to Improve the reliability of lock reiteration.
一种可能的实施方式中,上述步骤服务器根据加锁请求确定目标对象之后,该方法还包括:当客户端及目标对象所在对象区域的加锁关系没有存储在特征日志时,服务器将客户端及目标对象所在对象区域的加锁关系存储在特征日志。In a possible implementation, after the server determines the target object according to the locking request in the above steps, the method further includes: when the locking relationship between the client and the target area where the target object is located is not stored in the feature log, the server stores the client and the target object. The locking relationship of the object area where the target object is located is stored in the feature log.
上述可能的实施方式中,将成功加锁的客户端及目标对象所在对象区域的加锁关系存储到特征日志中,以便后续进行锁重申。In the above possible implementation manner, the locking relationship between the successfully locked client and the object area where the target object is located is stored in the feature log, so that the lock can be reiterated later.
本申请第二方面提供了一种锁管理方法,该方法包括:服务器获取目标对象的加锁标识;服务器在目标对象的扩展信息中记录加锁标识。A second aspect of the present application provides a lock management method. The method includes: the server obtains a lock identifier of a target object; and the server records the lock identifier in extended information of the target object.
上述第二方面中,客户端对目标对象申请加锁的加锁请求中携带加锁标识,服务器在加锁请求中获取该加锁标识,并将该加锁标识存储在目标对象的扩展信息中,以便服务器重启后能通过该加锁标识确定该目标对象在服务器重启前加过锁。In the above-mentioned second aspect, the locking request that the client applies for locking to the target object carries the locking identification, and the server obtains the locking identification in the locking request, and stores the locking identification in the extension information of the target object. , so that after the server restarts, it can be determined through the lock identifier that the target object has been locked before the server restarts.
一种可能的实施方式中,服务器获取目标对象的锁数量;服务器在目标对象的扩展信息中记录锁数量。In a possible implementation manner, the server obtains the lock quantity of the target object; the server records the lock quantity in the extended information of the target object.
上述可能的实施方式中,当没有解锁请求时,服务器可以将该目标对象在缓存中保存的加锁请求的数量作为目标对象的锁数量,然后记录在目标对象的扩展信息中,以便服务器重启后能通过该锁数量确定在该目标对象加锁的客户端的数量。In the above possible implementation manner, when there is no unlock request, the server can use the number of lock requests stored by the target object in the cache as the number of locks of the target object, and then record it in the extension information of the target object, so that after the server restarts The number of clients locked on the target object can be determined by the number of locks.
一种可能的实施方式中,当释放目标对象的锁时,服务器从目标对象的扩展信息中删除加锁标识。In a possible implementation manner, when releasing the lock of the target object, the server deletes the lock identification from the extended information of the target object.
上述可能的实施方式中,当客户端操作完毕,不需要加锁时,可以向服务器发送解锁请求,相应的,服务器可以释放该目标对象上的锁,并删除扩展信息中的加锁标识。可选的,当目标对象上的锁为写锁或只有一个读锁时,服务器接收到解锁请求即删除该加锁标识,当目标对象上有多个读锁时,如果扩展信息中只有一个加锁标识,则当缓存中该目标对象的加锁请求和接收请求数量相同时,服务器删除该加锁标识,如果扩展信息中有多个加锁标识,服务器接收到解锁请求后可以删除扩展信息中该解锁请求对应的加锁标识。In the above possible implementation manner, when the client completes the operation and does not need to lock, it can send an unlock request to the server, and accordingly, the server can release the lock on the target object and delete the lock identifier in the extended information. Optionally, when the lock on the target object is a write lock or there is only one read lock, the server deletes the lock ID upon receiving the unlock request. When there are multiple read locks on the target object, if there is only one read lock in the extended information If there are multiple lock identifiers in the extended information, the server can delete the extended information after receiving the unlock request. The lock identifier corresponding to the unlock request.
一种可能的实施方式中,当恢复目标对象的锁时,服务器从硬盘存储的扩展信息中获取加锁标识。In a possible implementation manner, when restoring the lock of the target object, the server acquires the lock identifier from the extended information stored in the hard disk.
上述可能的实施方式中,当服务器重启后,如果接收到客户端对于目标对象的锁重申请求,可以从硬盘存储的扩展信息中获取加锁标识,如果获取得到该加锁标识,则可以根据该锁重申请求相应对目标对象进行加锁。In the above possible implementation manner, after the server is restarted, if a lock reiteration request for the target object is received from the client, the lock identification can be obtained from the extended information stored in the hard disk. The lock reiteration requests that the target object be locked accordingly.
一种可能的实施方式中,该方法应用于分布式文件存储系统。In a possible implementation, the method is applied to a distributed file storage system.
本申请第三方面提供了一种服务器,该服务器包括:接收单元,用于接收来自客户端的锁重申请求;确定单元,用于根据锁重申请求确定客户端对应的目标对象,目标对象为客户端在服务器重启后想要加锁的对象;重加锁单元,用于当目标对象对应的扩展信息中确定有加锁标识时,根据锁重申请求对目标对象进行加锁,加锁标识指示目标对象在服务 器故障前加过锁。A third aspect of the present application provides a server, the server comprising: a receiving unit for receiving a lock reiteration request from a client; a determining unit for determining a target object corresponding to the client according to the lock reiteration request, where the target object is the client The object to be locked after the server restarts; the re-locking unit is used to lock the target object according to the lock reiteration request when the extension information corresponding to the target object determines that there is a lock mark, and the lock mark indicates the target object Locked before server failure.
该服务器用于执行前述第一方面的方法或第一方面任意一种实施方式。The server is configured to execute the method of the foregoing first aspect or any implementation manner of the first aspect.
本申请第四方面提供了一种服务器,该服务器包括:获取单元,用于获取目标对象的加锁标识;记录单元,用于在所述目标对象的扩展信息中记录所述加锁标识。A fourth aspect of the present application provides a server, the server comprising: an acquiring unit, configured to acquire a locking identifier of a target object; and a recording unit, configured to record the locking identifier in extended information of the target object.
该服务器用于执行前述第二方面的方法或第二方面任意一种实施方式。The server is configured to execute the method of the foregoing second aspect or any implementation manner of the second aspect.
本申请第五方面提供了一种计算机设备,包括:处理器、存储器、以及通信接口,该处理器用于执行该存储器中存储的指令,使得计算机设备执行上述第一方面或第一方面任一种可选方式所提供的方法,该通信接口用于接收或发送指示。第五方面提供的计算机设备的具体细节可参见上述第一方面或第一方面任一种可选方式,此处不再赘述。A fifth aspect of the present application provides a computer device, including: a processor, a memory, and a communication interface, where the processor is configured to execute instructions stored in the memory, so that the computer device executes the first aspect or any one of the first aspects The method provided by the optional manner, the communication interface is used for receiving or sending an indication. For the specific details of the computer device provided in the fifth aspect, reference may be made to the first aspect or any optional manner of the first aspect, which will not be repeated here.
本申请第六方面提供了一种计算机设备,包括:处理器、存储器、以及通信接口,该处理器用于执行该存储器中存储的指令,使得计算机设备执行上述第二方面或第二方面任一种可选方式所提供的方法,该通信接口用于接收或发送指示。第六方面提供的计算机设备的具体细节可参见上述第二方面或第二方面任一种可选方式,此处不再赘述。A sixth aspect of the present application provides a computer device, including: a processor, a memory, and a communication interface, where the processor is configured to execute instructions stored in the memory, so that the computer device executes the second aspect or any one of the second aspects. The method provided by the optional manner, the communication interface is used for receiving or sending an indication. For the specific details of the computer device provided by the sixth aspect, reference may be made to the second aspect or any optional manner of the second aspect, which will not be repeated here.
本申请第七方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有程序,当该计算机执行程序时,执行前述第一方面或第一方面任一种可选方式提供的方法。A seventh aspect of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the computer executes the first aspect or any optional manner of the first aspect. method.
本申请第八方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有程序,当该计算机执行程序时,执行前述第二方面或第二方面任一种可选方式提供的方法。An eighth aspect of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium. When the computer executes the program, the computer executes the second aspect or any optional manner of the second aspect. method.
本申请第九方面提供了一种计算机程序产品,当该计算机程序产品在计算机上执行时,该计算机执行前述第一方面或第一方面任一种可选方式提供的方法。A ninth aspect of the present application provides a computer program product. When the computer program product is executed on a computer, the computer executes the method provided in the foregoing first aspect or any optional manner of the first aspect.
本申请第十方面提供了一种计算机程序产品,当该计算机程序产品在计算机上执行时,该计算机执行前述第二方面或第二方面任一种可选方式提供的方法。A tenth aspect of the present application provides a computer program product. When the computer program product is executed on a computer, the computer executes the method provided in the second aspect or any optional manner of the second aspect.
附图说明Description of drawings
图1为本申请实施例提供的服务器-客户端系统框图;1 is a block diagram of a server-client system provided by an embodiment of the present application;
图2为本申请实施例提供的服务器-客户端的锁恢复场景;2 is a server-client lock recovery scenario provided by an embodiment of the present application;
图3为本申请实施例提供的锁重申方法一实施例示意图;3 is a schematic diagram of an embodiment of a lock reassertion method provided by an embodiment of the present application;
图4为本申请实施例提供的锁重申方法另一实施例示意图;4 is a schematic diagram of another embodiment of a lock reassertion method provided by an embodiment of the present application;
图5为本申请实施例提供的加锁方法一实施例示意图;FIG. 5 is a schematic diagram of an embodiment of a locking method provided by an embodiment of the present application;
图6为本申请实施例提供的加锁方法另一实施例示意图;FIG. 6 is a schematic diagram of another embodiment of the locking method provided by the embodiment of the present application;
图7为本申请实施例提供的服务器的架构示意图;FIG. 7 is a schematic structural diagram of a server provided by an embodiment of the present application;
图8为本申请实施例提供的服务器一结构示意图;FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present application;
图9为本申请实施例提供的服务器另一结构示意图;FIG. 9 is another schematic structural diagram of a server provided by an embodiment of the present application;
图10为本申请实施例提供的服务器另一结构示意图;FIG. 10 is another schematic structural diagram of a server provided by an embodiment of the present application;
图11为本申请实施例提供的计算机设备一结构示意图。FIG. 11 is a schematic structural diagram of a computer device according to an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种锁重申方法、锁管理方法以及服务器,用于减少客户端非正 常重申锁。Embodiments of the present application provide a lock reiteration method, a lock management method, and a server, which are used to reduce abnormal lock reiteration by clients.
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Those of ordinary skill in the art know that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
下面对本申请实施例以在文件系统环境为例进行介绍中的一些术语进行描述:The following describes some terms used in the introduction by taking a file system environment as an example in this embodiment of the present application:
网络文件系统(network file system,NFS):网络文件系统允许服务器通过网络与客户端共享文件和目录。这允许客户端以与客户端将访问本地文件和目录相同的方式访问远程文件和目录。NFS结构可以提供许多优点。例如,客户端使用较少的存储空间,因为数据可以存储在单个服务器上并且仍然能够由客户端访问。因此,否则将在每个客户端上被复制的数据可以存储在单个位置中并由网络上的多个客户端访问。Network file system (NFS): A network file system allows a server to share files and directories with clients over a network. This allows clients to access remote files and directories in the same way that clients would access local files and directories. The NFS structure can provide many advantages. For example, clients use less storage space because data can be stored on a single server and still be accessible by clients. Thus, data that would otherwise be replicated on each client can be stored in a single location and accessed by multiple clients on the network.
文件系统:数据存储系统的存储设备可以实现一个或多个文件系统以组织存储在其上的数据。如本文所使用的,“文件系统”可以指文件或目录的结构或组织,并且“文件”可以指一组数据。每个文件可以与文件名相关联,该文件名允许唯一地识别和定位文件。取决于具体要求和期望的应用,可以使用多种不同的文件系统。File System: A storage device of a data storage system may implement one or more file systems to organize data stored on it. As used herein, a "file system" may refer to the structure or organization of files or directories, and a "file" may refer to a set of data. Each file can be associated with a filename that allows the file to be uniquely identified and located. Depending on the specific requirements and desired application, a number of different file systems can be used.
端口映射(PortMapper)协议,使用固定端口,管理NFS各种服务的端口。The PortMapper protocol uses fixed ports to manage ports for various NFS services.
网络锁管理(network lock manager,NLM)协议,在NFS服务启动时,向PortMapper模块注册监听端口。客户端可以通过此协议对文件加锁和解锁,支持阻塞锁和非阻塞锁,支持传输控制协议(transmission control protocol,TCP)和用户数据报协议(user datagram protocol,UDP)连接。The network lock manager (NLM) protocol registers the listening port with the PortMapper module when the NFS service starts. Clients can lock and unlock files through this protocol, support blocking locks and non-blocking locks, and support transmission control protocol (TCP) and user datagram protocol (UDP) connections.
网络状态监控(network status monitoring,NSM)协议,在NFS服务启动时,向PortMapper模块注册监听端口。客户端和服务器通过此协议告知对方自身的状态,用于客户端故障、服务端故障场景下的NLM的清理和恢复。支持TCP和UDP连接。The network status monitoring (NSM) protocol registers the listening port with the PortMapper module when the NFS service starts. The client and the server inform each other of their own status through this protocol, which is used for NLM cleanup and recovery in the scenario of client failure and server failure. Supports TCP and UDP connections.
图1是本申请实施例提供的服务器-客户端系统框图。系统100可以包括通过网络102与NFS服务器103(即服务器,此处以NFS服务器示例)通信的客户端101。NFS服务器103可以访问包括文件系统1041的存储设备104。虽然被示出和描述为单独的部件,但是可以预期在一些实施例中,存储设备104可以被包括在NFS服务器103中。FIG. 1 is a block diagram of a server-client system provided by an embodiment of the present application. The system 100 may include a client 101 in communication with an NFS server 103 (ie, a server, exemplified here as an NFS server) over a network 102 . NFS server 103 may access storage device 104 including file system 1041 . Although shown and described as a separate component, it is contemplated that in some embodiments storage device 104 may be included in NFS server 103 .
实际上,客户端101可以通过网络102发出访问NFS服务器103上的数据对象或对其执行操作的请求。可以将请求封装为由NFS协议定义的标准化消息格式。如本文所使用的,“数据对象”可以指数据、文件、应用、子目录、目录、文件系统、它们的组合等中的任何一种。一旦接收到请求,NFS服务器103就可以允许客户端101从存储设备104的文件 系统1041访问数据对象。例如,NFS服务器103可以将数据对象从文件系统1041发送到发出请求的客户端101。在另一个示例中,NFS服务器103可以允许客户端101将文件系统1041的远程目录安装在客户端101处的本地目录上。In practice, a client 101 may issue a request to access or perform an operation on a data object on the NFS server 103 through the network 102 . A request can be encapsulated into a standardized message format defined by the NFS protocol. As used herein, a "data object" may refer to any of data, files, applications, subdirectories, directories, file systems, combinations thereof, and the like. Once the request is received, the NFS server 103 may allow the client 101 to access the data object from the file system 1041 of the storage device 104. For example, NFS server 103 may send data objects from file system 1041 to requesting client 101 . In another example, NFS server 103 may allow client 101 to mount a remote directory of file system 1041 on a local directory at client 101 .
NFS服务器103还可以允许客户端101对数据对象执行一个或多个操作。例如,客户端101可以打开数据对象、读取数据对象、写入数据对象、关闭数据对象、创建数据对象、锁定数据对象、删除数据对象、委托(delegate)数据对象、其组合等。NFS服务器103可以以状态的形式跟踪这些操作中的一些或全部。NFS服务器103可以跟踪与一个或多个数据对象相关联的这些状态中的一个或多个。在一些实施例中,客户端101可以附加地跟踪这些状态。 NFS server 103 may also allow client 101 to perform one or more operations on data objects. For example, client 101 may open data objects, read data objects, write data objects, close data objects, create data objects, lock data objects, delete data objects, delegate data objects, combinations thereof, and the like. NFS server 103 may track some or all of these operations in the form of state. NFS server 103 may track one or more of these states associated with one or more data objects. In some embodiments, client 101 may additionally track these states.
在一些实施例中,NFS服务器103可以首先确定客户端101是否具有访问存储设备104的文件系统1041中的数据对象或对其执行特定操作的适当许可。如本文所使用的,“许可”定义可以应用于一个或多个用户的访问控制选项。例如,NFS服务器103可以检查与数据对象相关联的元数据,以确保发出请求的用户(例如,与客户端101相关联的用户ID)与数据对象的“读取”操作相关联。如果发出请求的用户不与该操作相关联,则NFS服务器103可以拒绝客户端101对数据对象的访问。In some embodiments, NFS server 103 may first determine whether client 101 has appropriate permissions to access or perform certain operations on data objects in file system 1041 of storage device 104 . As used herein, "permission" defines access control options that can be applied to one or more users. For example, NFS server 103 may examine metadata associated with a data object to ensure that the requesting user (eg, a user ID associated with client 101) is associated with a "read" operation of the data object. NFS server 103 may deny client 101 access to the data object if the requesting user is not associated with the operation.
传统上,与非易失性存储器相比,数据对象的状态信息存储在易失性存储器中以便快速访问和更新。但是,如以上所讨论的,当存储系统断电时,易失性存储器被擦除。因此,在NFS服务器崩溃或故障的情况下,常规的NFS协议经常依赖于客户端在平稳的恢复时段中将所有先前的状态信息和/或相关数据重新发送到服务器。Traditionally, state information for data objects is stored in volatile memory for fast access and update compared to non-volatile memory. However, as discussed above, volatile memory is erased when the storage system is powered down. Thus, in the event of an NFS server crash or failure, conventional NFS protocols often rely on clients to resend all previous state information and/or related data to the server during a smooth recovery period.
此外,即使没有崩溃或故障,一个存储设备上的数据对象的状态信息也可能难以从易失性存储器复制到另一个存储设备上。例如,可能期望用目的地存储设备对源存储设备进行镜像以无缝地替换源存储设备或在给定时间点备份数据。在这种情况下,通常只迁移数据对象本身,可能还期望迁移数据对象的状态,但是,在迁移期间,存储在易失性存储器中的数据(例如,状态信息)通常将不会被迁移到目的地存储设备。Furthermore, even in the absence of crashes or failures, the state information of data objects on one storage device can be difficult to copy from volatile memory to another storage device. For example, it may be desirable to mirror the source storage device with the destination storage device to seamlessly replace the source storage device or to back up data at a given point in time. In this case, typically only the data objects themselves will be migrated, and it may be desirable to migrate the state of the data objects, however, during migration, data (eg, state information) stored in volatile memory will typically not be migrated to destination storage device.
因此,根据本申请的一些实施例,提供了用于捕获和存储与NFS的各种状态对应的状态信息的系统和方法。在各个方面,所公开的系统和方法可以自动地收集对NFS做出的状态改变并将其同步地写入到非易失性存储装置。在NFS系统发生故障或崩溃(例如,NFS服务器的故障)的情况下,可以从非易失性存储装置自动导入与NFS系统对应的状态信息,从而使得NFS服务能够被立即且透明地恢复。在迁移的情况下,可以将状态信息从非易失性存储装置传输到目的地存储设备,然后目的地存储设备可以将状态信息导入到存储器中以对源存储设备进行镜像。Accordingly, according to some embodiments of the present application, systems and methods are provided for capturing and storing state information corresponding to various states of NFS. In various aspects, the disclosed systems and methods can automatically collect and synchronously write state changes made to NFS to non-volatile storage. In the event of a failure or crash of the NFS system (eg, failure of the NFS server), state information corresponding to the NFS system can be automatically imported from the non-volatile storage device, so that the NFS service can be restored immediately and transparently. In the case of migration, the state information can be transferred from the non-volatile storage to the destination storage device, which can then import the state information into memory to mirror the source storage device.
图2是本申请实施例提供的服务器-客户端的锁恢复场景,如图2中所示,客户端101包括NSM1模块和NLM1模块,服务器103包括NSM2模块、NLM2模块和锁服务模块。FIG. 2 is a server-client lock recovery scenario provided by an embodiment of the present application. As shown in FIG. 2 , the client 101 includes an NSM1 module and an NLM1 module, and the server 103 includes an NSM2 module, an NLM2 module, and a lock service module.
NLM1模块加锁成功后,会通知NSM1模块保存加锁的服务器信息,由NSM1模块负责持久化此信息。当客户端故障重启时,NSM1从持久化层读取服务器信息,向服务器103的NSM2模块发送通知消息,告知服务器103清理从此客户端101发送的所有加锁请求。After the NLM1 module is successfully locked, it will notify the NSM1 module to save the locked server information, and the NSM1 module is responsible for persisting this information. When the client restarts due to failure, NSM1 reads the server information from the persistence layer, and sends a notification message to the NSM2 module of the server 103, instructing the server 103 to clear all locking requests sent from the client 101.
NLM2模块收到加锁请求后,会将请求递交到锁服务模块(LockServer)进行锁业务逻 辑的处理(加锁、解锁、锁冲突检查等),并将客户端信息持久化。当服务器103故障重启,扩容缩容时会从持久化层读取客户端信息,向客户端101发送通知消息,告知客户端101重新申请已经加过的锁。重申过程中,服务器103会设置静默期,静默期间只允许客户端101重申锁,不允许新的客户端的加锁请求。当静默期结束后,才可以正常接收任意客户端的加锁请求。After the NLM2 module receives the lock request, it will submit the request to the lock service module (LockServer) to process the lock business logic (locking, unlocking, lock conflict checking, etc.), and persist the client information. When the server 103 restarts due to a failure, it will read the client information from the persistence layer when expanding or shrinking the capacity, and send a notification message to the client 101, informing the client 101 to re-apply for the lock that has been added. During the reiteration process, the server 103 will set a silent period. During the silent period, only the client 101 is allowed to reiterate the lock, and a new client's lock request is not allowed. When the silent period ends, the lock request from any client can be received normally.
服务器没有保存对哪些文件加过锁,在客户端锁重申的过程中,无法防止客户端重申故障前没有加过的锁,为解决上述问题,本申请实施例提供了一种锁重申方法,该方法包括:服务器接收来自客户端的锁重申请求;服务器根据锁重申请求确定客户端对应的目标文件,目标文件为客户端在服务器重启后想要加锁的文件;服务器从目标文件对应的扩展信息中的加锁标识对目标文件进行加锁,加锁标识指示目标文件在服务器故障前加过锁。这样,客户端只能对在故障前加过锁的文件进行锁重申,减少客户端非正常重申锁。The server does not save which files have been locked. During the process of client lock reiteration, it is impossible to prevent the client from reiterating the locks that have not been added before the failure. To solve the above problem, the embodiment of the present application provides a lock reiteration method. The method includes: the server receives a lock reiteration request from the client; the server determines a target file corresponding to the client according to the lock reiteration request, and the target file is a file that the client wants to lock after the server restarts; The target file is locked with the lock mark of the lock mark, and the lock mark indicates that the target file was locked before the server failure. In this way, the client can only perform lock reiteration on the files that were locked before the failure, reducing the abnormal lock reiteration of the client.
下面,基于上述的系统框架,下面对本申请实施例中的锁重申方法进行描述。Hereinafter, based on the above-mentioned system framework, the lock reassertion method in the embodiment of the present application will be described below.
本实施例中的服务器可以为网络附属存储(network attached storage,NAS)服务器,它是一种专用数据存储服务器。它以数据为中心,将存储设备与服务器彻底分离,集中管理数据,从而释放带宽、提高性能、降低总拥有成本、保护投资。其成本远远低于使用服务器存储,而效率却远远高于后者。NAS被定义为一种特殊的专用数据存储服务器,包括存储器件(例如磁盘阵列、光盘(compact disc,CD)/数字多功能光盘(digital versatile disc,DVD)驱动器、磁带驱动器或可移动的存储介质)和内嵌系统软件,可提供跨平台文件共享功能。NAS通常在一个局域网(local area network,LAN)上占有自己的节点,无需应用服务器的干预,允许用户在网络上存取数据,在这种配置中,NAS集中管理和处理网络上的所有数据,将负载从应用或企业服务器上卸载下来,有效降低总拥有成本,保护用户投资。The server in this embodiment may be a network attached storage (NAS) server, which is a dedicated data storage server. It is data-centric, completely separates storage devices from servers, and centrally manages data, thereby freeing bandwidth, improving performance, reducing total cost of ownership, and protecting investments. Its cost is much lower than using server storage, and its efficiency is much higher. NAS is defined as a special dedicated data storage server, including storage devices (such as disk arrays, compact disc (CD)/digital versatile disc (DVD) drives, tape drives or removable storage media ) and embedded system software to provide cross-platform file sharing. NAS usually has its own node on a local area network (LAN) without the intervention of the application server, allowing users to access data on the network. In this configuration, the NAS centrally manages and processes all data on the network. Offload the load from the application or enterprise server, effectively reduce the total cost of ownership and protect user investment.
本申请实施例的锁重申方法中,服务器对文件配置有可存储非易失性数据的扩展信息,服务器需要在客户端申请加锁的时候对文件的扩展信息设置加锁标识,在客户端重申锁的时候根据扩展信息的锁标识对锁重申请求进行处理。In the lock reiteration method of the embodiment of the present application, the server configures the file with extended information that can store non-volatile data. When locking, the lock reiteration request is processed according to the lock ID of the extended information.
一、服务器在客户端重申锁的时候根据扩展信息的锁标识对锁重申请求进行处理。1. When the client reiterates the lock, the server processes the lock reiteration request according to the lock identifier of the extended information.
本申请实施例中,服务器重启后设置有一段静默时间以供客户端进行锁重申,服务器可以配置提前结束静默,也可以不配置提前结束静默。In this embodiment of the present application, after the server is restarted, a period of silence is set for the client to reiterate the lock. The server may be configured to end the silence in advance, or may not be configured to end the silence in advance.
1.1、服务器不配置提前结束静默。1.1. The server is not configured to end the silence in advance.
请参阅图3所示的锁重申方法一实施例包括:Please refer to an embodiment of the lock reassertion method shown in FIG. 3 including:
301、当服务器确定迁入事件时,将各个文件区域设置静默,并从特征日志中读取客户端信息。301. When the server determines the move-in event, it sets each file area to be silent, and reads the client information from the feature log.
本实施例应用于第3版网络文件系统(NFS version 3,NFSv3)的分布式文件存储系统,迁入事件为当服务器中的一个节点故障时,由另一节点接管该故障的节点的物理存储资源。服务器可以将各个文件区域执行静默,以避免其他客户端申请加锁影响故障前客户端的加锁服务。服务器可以从该物理存储资源的特征日志中读取客户端信息,该客户端信息可以为客户端与服务器中的文件所在文件区域的加锁关系,指示该客户端在该文件区域 中的某个文件有加锁。This embodiment is applied to the distributed file storage system of the network file system version 3 (NFS version 3, NFSv3). The migration event is that when one node in the server fails, another node takes over the physical storage of the failed node. resource. The server can silence each file area to prevent other clients from applying for locking and affecting the locking service of the client before the failure. The server can read the client information from the feature log of the physical storage resource, and the client information can be the locking relationship between the client and the file area where the file in the server is located, indicating that the client is in a certain file area in the file area. The file is locked.
302、对不需要静默的文件区域解除静默。302. Unmute the file area that does not need to be silenced.
服务器可以根据客户端信息中客户端与服务器中的文件所在文件区域的加锁关系,确定哪些文件区域在服务器故障前哪些客户端还加过锁。服务器可以将故障前没有加过锁的文件区域解静默,以使得其他客户端的加锁申请可以正常执行。The server can determine which file areas and which clients have been locked before the server fails according to the locking relationship between the client and the file area in the server in the client information. The server can de-quiesce the file area that has not been locked before the failure, so that the lock application of other clients can be executed normally.
303、服务器根据客户端信息发送锁重申消息至客户端。303. The server sends a lock reiteration message to the client according to the client information.
服务器的故障可以是崩溃或其他故障,当服务器重启后,缓存中的数据丢失,各个文件上的锁也都清除,需要客户端在恢复时段(即静默时间)中将所有先前的状态信息和/或相关数据重新发送到服务器,服务器可以向在服务器故障前对文件加过锁的客户端发送锁重申消息,通知该客户端需要对文件锁进行重新申请。The failure of the server can be a crash or other failure. When the server is restarted, the data in the cache is lost, and the locks on each file are also cleared. The client needs to restore all previous state information and/or during the recovery period (ie the silent time). Or the relevant data is resent to the server, and the server can send a lock reiteration message to the client that locked the file before the server failure, informing the client that the file lock needs to be re-applied.
304、客户端根据锁重申消息向服务器发送锁重申请求。304. The client sends a lock reiteration request to the server according to the lock reiteration message.
客户端在接收到该锁重申消息后,即可基于缓存记录的文件锁向服务器发送锁重申请求,该锁重申请求中可以包括所要申请重新加锁的目标文件的文件标识。其中,锁重申请求中还包括锁状态回复标志位(reclaim),客户端需要恢复以前申请的文件锁,这时锁重申请求报文中的reclaim设置为1,其他情况下这个值为0。After receiving the lock reiteration message, the client can send a lock reiteration request to the server based on the file lock recorded in the cache, and the lock reiteration request may include the file identifier of the target file to be re-locked. Among them, the lock reiteration request also includes the lock status reply flag (reclaim). The client needs to restore the file lock previously applied for. At this time, the reclaim in the lock reiteration request message is set to 1, and the value is 0 in other cases.
305、服务器根据锁重申请求确定客户端对应的目标文件。305. The server determines the target file corresponding to the client according to the lock reiteration request.
服务器接收到锁重申请求后,可以根据上述文件标识从文件系统中确定客户端所要申请的目标文件。After the server receives the lock reiteration request, it can determine the target file to be applied for by the client from the file system according to the above-mentioned file identifier.
306、从目标文件对应的扩展信息中的加锁标识对目标文件进行加锁。306. Lock the target file from the lock identifier in the extension information corresponding to the target file.
文件系统中的每个文件都设置有一个扩展信息,该扩展信息用于存储非易失性数据。当服务器确定目标文件,当需要恢复目标文件的锁时,服务器从硬盘存储的所述扩展信息中获取加锁标识,示例性的,可以读取该目标文件对应的扩展信息中的数据到缓存中,如果扩展信息中没有加锁标识,则服务器可以拒绝客户端的锁重申请求,如果该扩展信息中存在该加锁标识,则服务器可以根据锁重申请求相应地对该目标文件进行读加锁或写加锁,其中,该加锁标识用来指示该目标文件在服务器故障前加过锁。可选的,对于目标文件,如果有其他客户端的锁重申,服务器可以不用读取扩展信息,可以直接根据缓存中的数据执行相应操作。Each file in the file system is provided with extended information, which is used to store non-volatile data. When the server determines the target file and needs to restore the lock of the target file, the server obtains the lock identifier from the extended information stored in the hard disk, for example, the data in the extended information corresponding to the target file can be read into the cache , if there is no lock identification in the extended information, the server can reject the client's lock reiteration request. If the lock identification exists in the extended information, the server can read and lock or write the target file accordingly according to the lock reiteration request. lock, wherein the lock identifier is used to indicate that the target file has been locked before the server fails. Optionally, for the target file, if there are lock reiterations of other clients, the server can directly perform corresponding operations according to the data in the cache without reading the extended information.
307、当加锁成功的锁重申请求对应的客户端及目标文件所在文件区域的加锁关系没有存储在特征日志时,服务器将客户端及目标文件所在文件区域的加锁关系存储在特征日志。307. When the lock reiteration request corresponding to the successful lock reiteration request is not stored in the feature log, the server stores the lock relationship between the client and the file region where the target file is located in the feature log.
本实施例中,服务器在扩展信息存在加锁标识,并根据锁重申请求对该目标文件执行相应的加锁操作后,可以判断该客户端与该目标文件所在文件区域的加锁关系是否已经写入特征日志(Feature log)中,如果已经写入,则不用重复写入,如果没有写入,则可以将客户端及目标文件所在文件区域的加锁关系存储在特征日志,以保证数据可靠。In this embodiment, the server can determine whether the locking relationship between the client and the file area where the target file is located has been written after a lock identification exists in the extended information and a corresponding locking operation is performed on the target file according to the lock reiteration request. If it has been written, it does not need to be written repeatedly. If it has not been written, the lock relationship between the client and the file area where the target file is located can be stored in the feature log to ensure data reliability.
本申请实施例中,服务器从客户端重申的目标文件的扩展信息中确认加锁标识,对于没有加锁标识的文件拒绝客户端的锁重申请求,由于客户端的锁重申请求中的重申的文件不一定是该客户端在服务器故障前加过锁的文件,本实施例对于在服务器故障前没有加过锁的文件可以拒绝客户端的锁重申请求,可以减少客户端非正常重申锁。In the embodiment of the present application, the server confirms the lock identification from the extended information of the target file reiterated by the client, and rejects the lock reiteration request of the client for the file without the lock identification, because the reiterated file in the lock reiteration request of the client is not necessarily It is a file to which the client was locked before the server failure. In this embodiment, the client's lock reiteration request can be rejected for a file that has not been locked before the server failure, which can reduce abnormal lock reiteration by the client.
1.2、服务器配置提前结束静默。1.2. The server configuration ends the silence in advance.
请参阅图4所示的锁重申方法另一实施例包括:Please refer to another embodiment of the lock reassertion method shown in FIG. 4 including:
401、当服务器确定迁入事件时,将各个文件区域设置静默,并从特征日志中读取客户端信息。401. When the server determines the move-in event, it sets each file area to be silent, and reads client information from the feature log.
402、对不需要静默的文件区域解除静默。402. Unmute the file area that does not need to be silenced.
403、服务器根据客户端信息发送锁重申消息至客户端。403. The server sends a lock reiteration message to the client according to the client information.
404、客户端根据锁重申消息向服务器发送锁重申请求。404. The client sends a lock reiteration request to the server according to the lock reiteration message.
405、服务器根据锁重申请求确定客户端对应的目标文件。405. The server determines the target file corresponding to the client according to the lock reiteration request.
本实施例步骤401至步骤405可以参照图3所示锁重申方法中步骤301至步骤305的相关描述,此处不再赘述。Steps 401 to 405 in this embodiment may refer to the relevant descriptions of steps 301 to 305 in the lock reassertion method shown in FIG. 3 , and details are not repeated here.
406、当目标文件对应的扩展信息中确定有加锁标识时,如果目标文件对应的锁重申请求的数量达到扩展信息中的锁数量,则服务器标记目标文件的锁重申结束。406. When it is determined that the extension information corresponding to the target file has a lock identifier, if the number of lock reiteration requests corresponding to the target file reaches the number of locks in the extension information, the server marks the end of lock reiteration of the target file.
本实施例中,文件区域级别的静默影响范围比较大,而且静默时无法提前解除静默,影响时间比较长,一般为60s。静默重申期间,由于NAS服务器没有保存客户端加锁的文件信息,无法防止客户端在重申期间利用重申的规则申请不属于自己的锁。文件系统中的每个文件都设置有一个扩展信息,该扩展信息用于存储非易失性数据。当服务器确定目标文件,可以读取该目标文件对应的扩展信息中的数据到缓存中,如果扩展信息中没有加锁标识,则服务器可以拒绝客户端的锁重申请求,如果该扩展信息中存在该加锁标识,服务器还可以获取扩展信息中的锁数量,该锁数量用于指示该目标文件在服务器故障前加过的锁的数量,示例性的,该目标文件在服务器故障前可以设置多个读取锁,服务器可以判断重启后该目标文件的多个锁重申请求的数量是否超出该锁数量,如果超出锁数量,则表示当前的锁重申请求不在该目标文件在服务器故障前加过的锁的范围内,则服务器可以拒绝当前的锁重申请求,并标记该目标文件的锁重申流程结束,即可以提前结束该目标文件的静默。其中,该加锁标识用来指示该目标文件在服务器故障前加过锁。In this embodiment, the scope of influence of the silence at the file area level is relatively large, and the silence cannot be released in advance during silence, and the influence time is relatively long, generally 60s. During the silent reiteration, since the NAS server does not save the file information locked by the client, it cannot prevent the client from using the reiterated rules to apply for a lock that does not belong to itself during the reiteration. Each file in the file system is provided with extended information, which is used to store non-volatile data. When the server determines the target file, it can read the data in the extension information corresponding to the target file into the cache. If there is no lock identification in the extension information, the server can reject the client's lock reiteration request. The lock identifier, the server can also obtain the number of locks in the extended information, and the number of locks is used to indicate the number of locks added to the target file before the server fails. Exemplarily, the target file can be set to multiple reads before the server fails. To get the lock, the server can judge whether the number of multiple lock reiteration requests of the target file exceeds the number of locks after restarting. Within the range, the server can reject the current lock reiteration request and mark the end of the lock reiteration process of the target file, that is, the silence of the target file can be ended in advance. The lock identification is used to indicate that the target file has been locked before the server fails.
407、如果目标文件对应的锁重申请求的数量没有超出扩展信息中的锁数量,服务器根据锁重申请求对目标文件进行加锁。407. If the number of lock reiteration requests corresponding to the target file does not exceed the number of locks in the extended information, the server locks the target file according to the lock reiteration request.
本实施例中,当目标文件的多个锁重申请求的数量没有超出该锁数量时,即表示当前的锁重申请求还在该目标文件在服务器故障前加过的锁的范围内,服务器可以直接根据锁重申请求相应地对该目标文件进行读加锁或写加锁。In this embodiment, when the number of multiple lock reiteration requests of the target file does not exceed the number of locks, it means that the current lock reiteration request is still within the range of the locks added to the target file before the server failure, and the server can directly The target file is read-locked or write-locked accordingly according to the lock reiteration request.
408、当加锁成功的锁重申请求对应的客户端及目标文件所在文件区域的加锁关系没有存储在特征日志时,服务器将客户端及目标文件所在文件区域的加锁关系存储在特征日志。408. When the lock reiteration request corresponding to the successful lock reiteration request is not stored in the feature log, the server stores the lock relationship between the client and the file region where the target file is located in the feature log.
本实施例步骤408可以参照图3所示的锁重申方法中步骤307的相关描述,此处不再赘述。For step 408 in this embodiment, reference may be made to the relevant description of step 307 in the lock reassertion method shown in FIG. 3 , and details are not repeated here.
本申请实施例中,服务器从客户端重申的目标文件的扩展信息中确认加锁标识,对于没有加锁标识的文件拒绝客户端的锁重申请求,由于客户端的锁重申请求中的重申的文件不一定是该客户端在服务器故障前加过锁的文件,本实施例对于在服务器故障前没有加过锁的文件可以拒绝客户端的锁重申请求,可以减少客户端非正常重申锁。In the embodiment of the present application, the server confirms the lock identification from the extended information of the target file reiterated by the client, and rejects the lock reiteration request of the client for the file without the lock identification, because the reiterated file in the lock reiteration request of the client is not necessarily It is a file to which the client was locked before the server failure. In this embodiment, the client's lock reiteration request can be rejected for a file that has not been locked before the server failure, which can reduce abnormal lock reiteration by the client.
进一步的,当目标文件对应的锁重申请求的数量达到扩展信息中的锁数量时,服务器可以标记目标文件的锁重申结束,即提前结束对该目标文件的静默,其他客户端还可以正常地进行加锁申请,也可以避免客户端在重申期间通过锁重申申请不属于自己的锁,提前结束静默,降低了故障影响的时间。Further, when the number of lock reiteration requests corresponding to the target file reaches the number of locks in the extended information, the server can mark the end of the lock reiteration of the target file, that is, end the silence of the target file in advance, and other clients can proceed normally. Applying for a lock can also prevent the client from applying for a lock that does not belong to itself through the lock reiteration during the reiteration period, ending the silence in advance, and reducing the time affected by the failure.
二、服务器在客户端申请加锁的时候对文件的扩展信息设置加锁标识。2. The server sets the lock flag to the extended information of the file when the client applies for lock.
本申请实施例中,服务器重启后设置有一段静默时间以供客户端进行锁重申,服务器可以配置提前结束静默,也可以不配置提前结束静默。In this embodiment of the present application, after the server is restarted, a period of silence is set for the client to reiterate the lock. The server may be configured to end the silence in advance, or may not be configured to end the silence in advance.
2.1、服务器不配置提前结束静默。2.1. The server is not configured to end the silence in advance.
请参阅图5所示的加锁方法一实施例包括:Please refer to an embodiment of the locking method shown in FIG. 5 including:
501、客户端向服务器发送加锁请求。501. The client sends a lock request to the server.
本实施例中,客户端访问服务器中的文件时可以检查服务器是否存在文件锁,因此所有客户端访问同一个文件时都不会发生冲突。当服务器中该客户端所要访问的文件没有文件锁或者只有读锁时,客户端可以向服务器发送关于该文件的加锁请求。示例性的,该文件上没有文件锁时,客户端可以请求读加锁或写加锁,当该文件上只有读锁时,客户端只可以申请读加锁。In this embodiment, the client can check whether there is a file lock on the server when accessing a file in the server, so there will be no conflict when all clients access the same file. When the file to be accessed by the client in the server has no file lock or only has a read lock, the client can send a lock request for the file to the server. Exemplarily, when there is no file lock on the file, the client can request a read lock or a write lock, and when there is only a read lock on the file, the client can only apply for a read lock.
502、服务器根据加锁请求确定目标文件。502. The server determines the target file according to the lock request.
客户端发送的加锁请求中包括该客户端所要访问的文件的标识,服务器可以根据该标识确定客户端所要加锁的目标文件。The lock request sent by the client includes the identifier of the file to be accessed by the client, and the server can determine the target file to be locked by the client according to the identifier.
503、当客户端及目标文件所在文件区域的加锁关系没有存储在特征日志时,服务器将客户端及目标文件所在文件区域的加锁关系存储在特征日志。503. When the locking relationship between the client and the file region where the target file is located is not stored in the feature log, the server stores the locking relationship between the client and the file region where the target file is located in the feature log.
服务器可以判断该客户端与该目标文件所在文件区域的加锁关系是否已经写入特征日志(Feature log)中,如果已经写入,则不用重复写入,如果没有写入,则可以将客户端及目标文件所在文件区域的加锁关系存储在特征日志,以作为客户端进行锁重申的依据。The server can judge whether the locking relationship between the client and the file area where the target file is located has been written into the feature log (Feature log). and the locking relationship of the file area where the target file is located is stored in the feature log as the basis for the client to reiterate the lock.
504、服务器在目标文件对应的扩展信息中存储加锁标识。504. The server stores the lock identifier in the extension information corresponding to the target file.
文件系统中的每个文件都设置有一个扩展信息,该扩展信息用于存储非易失性数据。本实施例中,服务器接收到客户端的加锁请求后,可以确定目标文件,获取该目标文件的加锁标识,并可以在该目标文件的扩展信息中保存加锁标识,该加锁标识表示该目标文件当前处于加锁状态,可以用来指示该目标文件在服务器故障前加过锁。Each file in the file system is provided with extended information, which is used to store non-volatile data. In this embodiment, after receiving the lock request from the client, the server may determine the target file, obtain the lock identifier of the target file, and store the lock identifier in the extension information of the target file, and the lock identifier indicates the lock identifier of the target file. The target file is currently locked, which can be used to indicate that the target file was locked before the server failed.
当目标文件有多个可以实施的加锁请求时,扩展信息只记录一次加锁标识,可以节省内存资源。示例性的,目标文件的写锁只有一个,读锁可以一个或多个,当目标文件有多个读锁时,扩展信息中可以只记录一次加锁标识。When the target file has multiple lock requests that can be implemented, the extended information only records the lock identification once, which can save memory resources. Exemplarily, the target file has only one write lock, and can have one or more read locks. When the target file has multiple read locks, the extended information may record the lock identification only once.
505、客户端向服务器发送解锁请求。505. The client sends an unlock request to the server.
客户端对服务器中文件访问结束后,需要解除该文件的加锁状态,可以向该服务器发送关于该文件的解锁请求,其中,向服务器发送解锁请求的客户端可以为一个或多个。After the client accesses the file in the server, it needs to release the locked state of the file, and can send an unlock request for the file to the server, wherein the number of clients sending the unlock request to the server can be one or more.
506、服务器根据解锁请求确定目标文件。506. The server determines the target file according to the unlock request.
本实施例中,服务器根据该解锁请求中包含的文件标识确定客户端要解除加锁状态的目标文件。In this embodiment, the server determines the target file to be unlocked by the client according to the file identifier included in the unlock request.
507、当目标文件的解锁请求的数量与加锁请求的数量相同时,服务器清除加锁标识。507. When the number of unlock requests of the target file is the same as the number of lock requests, the server clears the lock identifier.
本实施例中,所有客户端对该目标文件的加锁请求和解锁请求数量都保存在缓存中,服务器可以基于缓存的记录,当目标文件的解锁请求的数量与加锁请求的数量相同时,即当前的解锁请求所要解除的锁为该目标文件的最后一个锁,服务器可以清楚该目标文件对应的扩展信息中的加锁标识,即当释放目标文件的锁时,服务器从目标文件的扩展信息中删除加锁标识。In this embodiment, the number of lock requests and unlock requests of all clients to the target file are stored in the cache. That is, the lock to be released by the current unlock request is the last lock of the target file, and the server can know the lock identifier in the extension information corresponding to the target file. Remove the lock sign from .
本申请实施例中,服务器为文件配置扩展信息,该扩展信息中的加锁标识是否存在可以在服务器重启时指示该文件是否加过锁,对于在服务器故障前没有加过锁的文件,服务器可以拒绝客户端的锁重申请求,可以减少客户端非正常重申锁。In the embodiment of the present application, the server configures extended information for the file, and whether the lock identifier in the extended information exists can indicate whether the file has been locked when the server is restarted. For files that have not been locked before the server fails, the server can Rejecting the client's lock reiteration request can reduce the client's abnormal lock reiteration.
2.2、服务器配置提前结束静默。2.2. The server configuration ends the silence in advance.
请参阅图6所示的加锁方法另一实施例包括:Please refer to another embodiment of the locking method shown in FIG. 6 including:
601、客户端向服务器发送加锁请求。601. The client sends a lock request to the server.
602、服务器根据加锁请求确定目标文件。602. The server determines the target file according to the lock request.
603、当客户端及目标文件所在文件区域的加锁关系没有存储在特征日志时,服务器将客户端及目标文件所在文件区域的加锁关系存储在特征日志。603. When the locking relationship between the client and the file area where the target file is located is not stored in the feature log, the server stores the locking relationship between the client and the file region where the target file is located in the feature log.
604、服务器在目标文件对应的扩展信息中存储加锁标识。604. The server stores the lock identifier in the extension information corresponding to the target file.
本实施例步骤601至步骤604可以参照图5所示加锁方法中步骤501至步骤504的相关描述,此处不再赘述。Steps 601 to 604 in this embodiment may refer to the relevant descriptions of steps 501 to 504 in the locking method shown in FIG. 5 , and details are not repeated here.
605、服务器相应增加锁数量。605. The server correspondingly increases the number of locks.
扩展信息中还包括该目标文件的加的锁的锁数量,当服务器接收到可以实施的加锁请求后,对目标文件执行相应的加锁操作,然后可以获取该目标文件的锁数量,并相应在扩展信息中记录该锁数量,例如,可以对扩展信息中的锁数量执行增加操作。示例性的,服务器对目标文件加锁后则对该锁数量加1。The extended information also includes the number of locks of the target file. When the server receives a lock request that can be implemented, it will perform the corresponding lock operation on the target file, and then the number of locks of the target file can be obtained, and correspondingly. The number of locks is recorded in the extended information, for example, an increase operation can be performed on the number of locks in the extended information. Exemplarily, after the server locks the target file, the number of locks is incremented by 1.
606、客户端向服务器发送解锁请求。606. The client sends an unlock request to the server.
607、服务器根据解锁请求确定目标文件。607. The server determines the target file according to the unlock request.
本实施例步骤606至步骤607可以参照图5所示加锁方法中步骤505至步骤506的相关描述,此处不再赘述。Steps 606 to 607 in this embodiment may refer to the relevant descriptions of steps 505 to 506 in the locking method shown in FIG. 5 , and details are not repeated here.
608、服务器相应减少锁数量。608. The server correspondingly reduces the number of locks.
相应的,服务器接收到解锁请求后,则减少目标文件对应的扩展信息中的锁数量。示例性的,接收到一个解锁请求,则该锁数量减1。Correspondingly, after receiving the unlock request, the server reduces the number of locks in the extension information corresponding to the target file. Exemplarily, when an unlock request is received, the number of locks is decremented by 1.
609、当锁数量为0时,服务器清除加锁标识。609. When the number of locks is 0, the server clears the lock identification.
当目标文件的解锁请求的数量与加锁请求的数量相同时,锁数量相应减少为0,则服务器可以清除目标文件扩展信息中的加锁标识,即当释放目标文件的锁时,服务器从目标文件的扩展信息中删除加锁标识。When the number of unlock requests of the target file is the same as the number of lock requests, the number of locks is correspondingly reduced to 0, and the server can clear the lock flag in the extension information of the target file, that is, when releasing the lock of the target file, the server will remove the lock from the target file from the target file. Delete the lock mark from the extended information of the file.
本申请实施例中,服务器为文件配置扩展信息,该扩展信息中的加锁标识是否存在可以在服务器重启时指示该文件是否加过锁,以使得在服务器故障前没有加过锁的文件,服务器可以拒绝客户端的锁重申请求,可以减少客户端非正常重申锁。In the embodiment of the present application, the server configures extended information for the file, and whether the lock identifier in the extended information exists can indicate whether the file has been locked when the server is restarted, so that there is no locked file before the server fails, the server The client's lock reiteration request can be rejected, which can reduce the client's abnormal lock reiteration.
进一步的,扩展信息还包括锁数量,该锁数量可以在服务器重启后为服务器提供该文件加过的锁的数量,以使得服务器在重启后可以根据该锁数量提前结束文件的静默。Further, the extended information also includes the number of locks, and the number of locks can provide the server with the number of locks added to the file after the server restarts, so that the server can end the file silence in advance according to the number of locks after restarting.
示例性的,本申请实施例中的锁重申方法可以通过一个系统架构实现,请参阅图7,本申请实施例服务器的架构示意图,服务器103包括NFS模块1031,锁服务(lock server)模块1032,特征日志模块1033和文件系统1034。其中lock server模块1032还包括:恢复(recover)模块10321,锁管理(lock manager)模块10322和持久化(persistent)模块10323。Exemplarily, the lock reassertion method in this embodiment of the present application may be implemented through a system architecture. Please refer to FIG. 7 , which is a schematic diagram of the architecture of the server in this embodiment of the present application. The server 103 includes an NFS module 1031, a lock server module 1032, Feature log module 1033 and file system 1034. The lock server module 1032 further includes: a recovery (recover) module 10321, a lock manager (lock manager) module 10322 and a persistent (persistent) module 10323.
加锁流程中:During the locking process:
NFS模块1031收到来自客户端的加锁请求后,解析加锁信息,将加锁信息发送到锁管理模块10322。NFS模块1031执行图5中步骤501和505或图6中步骤601和606。After receiving the lock request from the client, the NFS module 1031 parses the lock information, and sends the lock information to the lock management module 10322 . The NFS module 1031 executes steps 501 and 505 in FIG. 5 or steps 601 and 606 in FIG. 6 .
锁管理模块10322判断加锁客户端的信息是否已经写入特征日志模块1033,如果已经写入,不再重复写入,如果之前未写入特征日志模块1033,则将客户端信息写入特征日志模块1033。锁管理模块10322可以执行图5中步骤502、503、506和507或图6中步骤602、603、607和609。The lock management module 10322 determines whether the information of the locked client has been written into the feature log module 1033. If it has been written, it will not be written again. If the feature log module 1033 has not been written before, the client information will be written into the feature log module. 1033. The lock management module 10322 may perform steps 502, 503, 506 and 507 in FIG. 5 or steps 602, 603, 607 and 609 in FIG. 6 .
锁管理模块10322将加锁信息发送到持久化模块10323,持久化模块10323判断是否写入文件系统。持久化模块10323判断当前服务器是否配置有提前结束静默功能。如果没有提前结束静默功能,则只需要对第一把NFS锁的标识写入文件的扩展信息中。客户端解锁时,对于最后一把锁解锁时,清除文件的扩展信息中的锁标识。如果设置有提前结束静默功能,则将加锁的数量(锁数量)写入文件的扩展信息中。客户端解锁时,刷新文件的扩展信息中的锁数量。锁管理模块10322可以执行图5中步骤504或图6中步骤605和608。The lock management module 10322 sends the lock information to the persistence module 10323, and the persistence module 10323 determines whether to write to the file system. The persistence module 10323 determines whether the current server is configured with the function of ending the silence early. If the silent function is not terminated in advance, only the identifier of the first NFS lock needs to be written into the extended information of the file. When the client is unlocked, when the last lock is unlocked, the lock identifier in the extended information of the file is cleared. If the function of prematurely ending the silence is set, the number of locks (the number of locks) will be written into the extended information of the file. The number of locks in the extended information of the refresh file when the client is unlocked. The lock management module 10322 may perform step 504 in FIG. 5 or steps 605 and 608 in FIG. 6 .
锁重申流程:Lock reiteration process:
恢复模块10321收到迁入事件后,从特征日志模块1033中读取锁客户端信息,然后将客户端信息发送给NFS模块1031。恢复模块10321可以执行图3中步骤301和302或图4中步骤401和402。After receiving the migration event, the recovery module 10321 reads the lock client information from the feature log module 1033 , and then sends the client information to the NFS module 1031 . The recovery module 10321 can perform steps 301 and 302 in FIG. 3 or steps 401 and 402 in FIG. 4 .
NFS模块1031发送锁重申消息到客户端,并接收来自客户端的锁重申请求,解析锁信息,将锁信息发送到锁管理模块10322。NFS模块1031可以执行图3中步骤303和304或图4中步骤403和404。The NFS module 1031 sends a lock reassertion message to the client, and receives a lock reassertion request from the client, parses the lock information, and sends the lock information to the lock management module 10322. The NFS module 1031 may perform steps 303 and 304 in FIG. 3 or steps 403 and 404 in FIG. 4 .
锁管理模块10322通过持久化模块10323读取扩展信息,如果已经读取过,不需要重复读取,直接从缓存中读取即可。如果没有设置提前结束静默功能,则只需要判断是否有加锁标识。如果有加锁标识,则进行锁重申的逻辑判断。如果没有加锁标识,则返回错误,拒绝客户端的锁重申。如果设置有提前结束静默功能,则判断重申的锁个数是否与读取到的锁个数相等,如果小于读取的锁个数,则进行锁重申的逻辑判断。如果锁重申的锁个数已经等于读取到的锁个数,则标记锁重申结束。持久化模块10323可以执行图3中步骤306或图4中步骤406和407。The lock management module 10322 reads the extended information through the persistence module 10323. If it has already been read, it does not need to be read repeatedly, but can be read directly from the cache. If there is no setting to end the silent function in advance, you only need to judge whether there is a lock mark. If there is a lock identification, the logical judgment of lock reiteration is performed. If there is no lock flag, an error is returned and the client's lock reassertion is rejected. If the early termination of silence function is set, it is judged whether the number of locks reiterated is equal to the number of locks read, and if it is less than the number of locks read, the logical judgment of lock reiteration is performed. If the number of locks reiterated is equal to the number of locks read, the end of lock reiteration is marked. The persistence module 10323 may perform step 306 in FIG. 3 or steps 406 and 407 in FIG. 4 .
锁管理模块10322判断加锁客户端的信息是否已经写入特征日志模块1033,如果已经写入,不再重复写入,如果之前未写入特征日志模块1033,则将客户端信息写入特征日志模块1033。锁管理模块10322可以执行图3中步骤305和307或图4中步骤405和408。The lock management module 10322 determines whether the information of the locked client has been written into the feature log module 1033. If it has been written, it will not be written again. If the feature log module 1033 has not been written before, the client information will be written into the feature log module. 1033. The lock management module 10322 may perform steps 305 and 307 in FIG. 3 or steps 405 and 408 in FIG. 4 .
以上描述了锁重申方法,下面结合附图介绍本申请实施例的服务器。The lock reassertion method has been described above, and the following describes the server of the embodiment of the present application with reference to the accompanying drawings.
图8为本申请实施例中服务器80的一实施例示意图。FIG. 8 is a schematic diagram of an embodiment of a server 80 in an embodiment of the present application.
如图8所示,本申请实施例提供了服务器80一结构包括:As shown in FIG. 8 , an embodiment of the present application provides a structure of the server 80 including:
接收单元801,用于接收来自客户端的锁重申请求;A receiving unit 801, configured to receive a lock reiteration request from a client;
确定单元802,用于根据锁重申请求确定客户端对应的目标对象,目标对象为客户端在服务器重启后想要加锁的对象;A determination unit 802, configured to determine the target object corresponding to the client according to the lock reiteration request, and the target object is the object that the client wants to lock after the server restarts;
重加锁单元803,用于从目标对象对应的扩展信息中的加锁标识对目标对象进行加锁,加锁标识指示目标对象在服务器故障前加过锁。The re-locking unit 803 is configured to lock the target object from the lock identifier in the extension information corresponding to the target object, where the lock identifier indicates that the target object was locked before the server failure.
如图9所示,本申请实施例提供了服务器90另一结构包括:As shown in FIG. 9 , another structure of the server 90 provided in this embodiment of the present application includes:
接收单元901,用于接收来自客户端的锁重申请求;a receiving unit 901, configured to receive a lock reiteration request from a client;
确定单元902,用于根据锁重申请求确定客户端对应的目标对象,目标对象为客户端在服务器重启后想要加锁的对象;The determining unit 902 is used to determine the target object corresponding to the client according to the lock reiteration request, and the target object is the object that the client wants to lock after the server restarts;
重加锁单元903,用于从目标对象对应的扩展信息中的加锁标识对目标对象进行加锁,加锁标识指示目标对象在服务器故障前加过锁。The re-locking unit 903 is configured to lock the target object from the lock identifier in the extension information corresponding to the target object, where the lock identifier indicates that the target object was locked before the server failure.
可选的,扩展信息还包括加锁数量,服务器还包括标记单元904,标记单元904具体用于:当目标对象对应的锁重申请求的数量超出锁数量时,标记目标对象锁重申结束。Optionally, the extended information further includes the number of locks, the server further includes a marking unit 904, and the marking unit 904 is specifically configured to: when the number of lock reiteration requests corresponding to the target object exceeds the number of locks, mark the end of lock reiteration of the target object.
具体的,目标对象可以为文件系统中的文件、目录等,也可以为块存储系统中的块或者逻辑单元号(Logical Unit Number,LUN),或者对象存储系统中的对象。Specifically, the target object may be a file, directory, etc. in the file system, or may be a block or a logical unit number (Logical Unit Number, LUN) in a block storage system, or an object in an object storage system.
可选的,服务器还包括第一存储单元905,第一存储单元905具体用于:当加锁成功的锁重申请求对应的客户端,及目标对象所在对象区域的加锁关系没有存储在特征日志时,将客户端及目标对象所在对象区域的加锁关系存储在特征日志。其中一种实现,在文件系统中,对象区域为文件区域或目录区域;在块存储系统中,对象区域为块或LUN的元数据区域;在对象存储系统中,为对象的元数据区域。Optionally, the server further includes a first storage unit 905, and the first storage unit 905 is specifically configured to: when the successful lock reiteration request corresponds to the client, and the locking relationship of the object area where the target object is located is not stored in the feature log. When , the lock relationship between the client and the target area where the target object is located is stored in the feature log. In one implementation, in the file system, the object area is the file area or the directory area; in the block storage system, the object area is the metadata area of the block or LUN; in the object storage system, it is the metadata area of the object.
可选的,服务器还包括加锁单元906,加锁单元906具体用于:接收来自客户端的加锁请求;根据加锁请求确定目标对象,目标对象为客户端所要加锁的对象;在目标对象对应的扩展信息中存储加锁标识。Optionally, the server also includes a locking unit 906, and the locking unit 906 is specifically used to: receive a locking request from the client; determine a target object according to the locking request, and the target object is the object to be locked by the client; The lock identification is stored in the corresponding extended information.
可选的,扩展信息还包括锁数量,加锁单元还用于:相应增加锁数量。Optionally, the extended information further includes the number of locks, and the locking unit is also used for: correspondingly increasing the number of locks.
可选的,服务器还包括第一解锁单元907,第一解锁单元907具体用于:接收来自一个或多个客户端的解锁请求;根据解锁请求确定目标对象,目标对象为目标对象;当目标对象的解锁请求的数量与加锁请求的数量相同时,清除加锁标识。Optionally, the server further includes a first unlocking unit 907, and the first unlocking unit 907 is specifically configured to: receive unlocking requests from one or more clients; determine the target object according to the unlocking request, and the target object is the target object; When the number of unlock requests is the same as the number of lock requests, the lock flag is cleared.
可选的,服务器还包括第二解锁单元908,第二解锁单元908具体用于:接收来自客户端的解锁请求;根据解锁请求确定目标对象;相应减少锁数量;当目标对象的解锁请求的数量与加锁请求的数量相同时,清除加锁标识。Optionally, the server further includes a second unlocking unit 908, and the second unlocking unit 908 is specifically configured to: receive the unlocking request from the client; determine the target object according to the unlocking request; reduce the number of locks accordingly; When the number of lock requests is the same, the lock flag is cleared.
可选的,服务器还包括第二存储单元909,第二存储单元909具体用于:当客户端及目标对象所在对象区域的加锁关系没有存储在特征日志时,将客户端及目标对象所在对象区域的加锁关系存储在特征日志。Optionally, the server further includes a second storage unit 909, and the second storage unit 909 is specifically configured to: when the locking relationship of the object area where the client and the target object are located is not stored in the feature log, store the object where the client and the target object are located. The locking relationship of the region is stored in the feature log.
如图10所示,本申请实施例提供了服务器100另一结构包括:As shown in FIG. 10 , another structure of the server 100 provided in this embodiment of the present application includes:
获取单元1001,用于获取目标对象的加锁标识;Obtaining unit 1001, for obtaining the lock identification of the target object;
记录单元1002,用于在目标对象的扩展信息中记录加锁标识。The recording unit 1002 is configured to record the lock identification in the extended information of the target object.
可选的,获取单元1001,还用于获取目标对象的锁数量;记录单元1002,还用于在目标对象的扩展信息中记录锁数量。Optionally, the obtaining unit 1001 is further configured to obtain the lock quantity of the target object; the recording unit 1002 is further configured to record the lock quantity in the extended information of the target object.
可选的,服务器100还包括删除单元1003,删除单元1003,用于当释放目标对象的锁时,从目标对象的扩展信息中删除加锁标识。Optionally, the server 100 further includes a deletion unit 1003, the deletion unit 1003 is configured to delete the lock identification from the extended information of the target object when the lock of the target object is released.
可选的,服务器100还包括读取单元1004,读取单元1004,用于当恢复目标对象的锁时,从硬盘存储的扩展信息中获取加锁标识。Optionally, the server 100 further includes a reading unit 1004, and the reading unit 1004 is configured to acquire the lock identification from the extended information stored in the hard disk when restoring the lock of the target object.
可选的,服务器100应用于分布式文件存储系统。Optionally, the server 100 is applied to a distributed file storage system.
图11所示,为本申请的实施例提供的计算机设备110的一种可能的逻辑结构示意图。计算机设备110包括:处理器1101、通信接口1102、存储系统1103以及总线1104。处理器1101、通信接口1102以及存储系统1103通过总线1104相互连接。在本申请的实施例中,处理器1101用于对计算机设备110的动作进行控制管理,例如,处理器1101用于执行图3方法实施例中存储管理装置所执行的步骤。通信接口1102用于支持计算机设备110进行通信。存储系统1103,用于存储计算机设备110的程序代码和数据。As shown in FIG. 11 , a schematic diagram of a possible logical structure of the computer device 110 provided by the embodiment of the present application is shown. Computer device 110 includes: processor 1101 , communication interface 1102 , storage system 1103 , and bus 1104 . The processor 1101 , the communication interface 1102 , and the storage system 1103 are connected to each other through a bus 1104 . In this embodiment of the present application, the processor 1101 is configured to control and manage the actions of the computer device 110. For example, the processor 1101 is configured to execute the steps performed by the storage management apparatus in the method embodiment of FIG. 3 . Communication interface 1102 is used to support computer device 110 to communicate. The storage system 1103 is used to store program codes and data of the computer device 110 .
其中,处理器1101可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器1101也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。总线1104可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 1101 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor 1101 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The bus 1104 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 11, but it does not mean that there is only one bus or one type of bus.
本发明实施例上述各实施例中的模块或单元,具体实现可以由软件实现,例如由指令实现,也可以由硬件实现,或者由软件和硬件实现。本发明实施例对此不作限定。本发明实施例可以用于支持文件系统的存储阵列中,还可以用于对文件系统中的目录的进行本发明实施例上述操作。另外,本发明实施例还可以应用于块存储系统或对象存储系统。块存储系统可以是分布式块存储系统或存储阵列,在块存储系统中,本发明实施例上述操作可以用于对块或LUN的操作。在对象存储系统中,本发明实施例上述操作可以应用于对象存储系统中的对象。Embodiments of the present invention The modules or units in the foregoing embodiments may be specifically implemented by software, for example, by instructions, or by hardware, or by both software and hardware. This embodiment of the present invention does not limit this. The embodiment of the present invention can be used in a storage array supporting a file system, and can also be used to perform the above operations of the embodiment of the present invention on a directory in the file system. In addition, the embodiments of the present invention may also be applied to a block storage system or an object storage system. The block storage system may be a distributed block storage system or a storage array. In the block storage system, the foregoing operations in the embodiments of the present invention may be used for operations on blocks or LUNs. In an object storage system, the foregoing operations in the embodiments of the present invention may be applied to objects in the object storage system.
在本申请的另一实施例中,还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当设备的处理器执行该计算机执行指令时,设备执行上述图3至图6中服务器所执行的锁重申方法的步骤。In another embodiment of the present application, a computer-readable storage medium is also provided, where computer-executable instructions are stored in the computer-readable storage medium. When the processor of the device executes the computer-executable instructions, the device executes the above-mentioned FIG. 3 to The steps of the lock reassurance method performed by the server in FIG. 6 .
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;当设备的处理器执行该计算机执行指令时,设备执行上述图3至图6中服务器所执行的锁重申方法的步骤。In another embodiment of the present application, a computer program product is also provided, the computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; when a processor of a device executes the computer-executable instructions , the device executes the steps of the lock reassertion method executed by the server in the above-mentioned FIG. 3 to FIG. 6 .
本发明实施例中的服务器可以为锁服务器、存储阵列中的阵列控制器、分布式存储系 统中的提供相应功能的服务器等,本发明实施例对此不作限定。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。The server in this embodiment of the present invention may be a lock server, an array controller in a storage array, a server providing corresponding functions in a distributed storage system, and the like, which is not limited in this embodiment of the present invention. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or modules may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program codes .

Claims (30)

  1. 一种锁重申方法,其特征在于,包括:A lock reiteration method, comprising:
    服务器接收来自客户端的锁重申请求;The server receives a lock reassertion request from the client;
    所述服务器根据所述锁重申请求确定所述客户端对应的目标对象,所述目标对象为所述客户端在所述服务器重启后想要加锁的对象;The server determines the target object corresponding to the client according to the lock reiteration request, and the target object is the object that the client wants to lock after the server restarts;
    所述服务器从所述目标对象对应的扩展信息中的加锁标识对所述目标对象进行加锁,所述加锁标识指示所述目标对象在所述服务器故障前加过锁。The server locks the target object from a lock identifier in the extension information corresponding to the target object, and the lock identifier indicates that the target object was locked before the server fails.
  2. 根据权利要求1所述的锁重申方法,其特征在于,所述扩展信息还包括加锁数量,所述服务器从所述目标对象对应的扩展信息中的加锁标识对所述目标对象进行加锁之前,所述方法还包括:The lock reassertion method according to claim 1, wherein the extension information further includes a lock quantity, and the server locks the target object from a lock identifier in the extension information corresponding to the target object Before, the method further includes:
    当所述目标对象对应的锁重申请求的数量超出所述锁数量时,所述服务器标记所述目标对象锁重申结束。When the number of lock reassertion requests corresponding to the target object exceeds the number of locks, the server marks the lock reassertion end of the target object.
  3. 根据权利要求1所述的锁重申方法,其特征在于,所述服务器根据所述锁重申请求对所述目标对象进行加锁之后,所述方法还包括:The lock reassertion method according to claim 1, wherein after the server locks the target object according to the lock reassertion request, the method further comprises:
    当加锁成功的所述锁重申请求对应的所述客户端,及所述目标对象所在对象区域的加锁关系没有存储在特征日志时,所述服务器将所述客户端及所述目标对象所在对象区域的加锁关系存储在所述特征日志。When the client corresponding to the successful lock reiteration request and the locking relationship of the object area where the target object is located are not stored in the feature log, the server stores the client and the target object where The locking relationship of the object area is stored in the feature log.
  4. 根据权利要求1所述的锁重申方法,其特征在于,所述服务器接收来自客户端的锁重申请求之前,所述方法还包括:The lock reassertion method according to claim 1, wherein before the server receives the lock reassertion request from the client, the method further comprises:
    所述服务器接收来自所述客户端的加锁请求;the server receives the locking request from the client;
    所述服务器根据所述加锁请求确定所述目标对象;The server determines the target object according to the lock request;
    所述服务器在所述目标对象对应的扩展信息中存储所述加锁标识。The server stores the lock identifier in the extension information corresponding to the target object.
  5. 根据权利要求4所述的锁重申方法,其特征在于,所述扩展信息还包括锁数量,所述服务器在所述目标对象对应的扩展信息中存储所述加锁标识之后,所述方法还包括:The lock reassertion method according to claim 4, wherein the extended information further includes the number of locks, and after the server stores the lock identification in the extended information corresponding to the target object, the method further includes :
    所述服务器相应增加所述锁数量。The server increases the number of locks accordingly.
  6. 根据权利要求4所述的锁重申方法,其特征在于,所述服务器在所述目标对象对应的扩展信息中存储所述加锁标识之后,所述方法还包括:The lock reiteration method according to claim 4, wherein after the server stores the lock identification in the extension information corresponding to the target object, the method further comprises:
    所述服务器接收来自一个或多个客户端的解锁请求;the server receives an unlock request from one or more clients;
    所述服务器根据所述解锁请求确定所述目标对象;The server determines the target object according to the unlock request;
    当所述解锁请求的数量与所述加锁请求的数量相同时,所述服务器清除所述加锁标识。When the number of the unlocking requests is the same as the number of the locking requests, the server clears the locking identifier.
  7. 根据权利要求5所述的锁重申方法,其特征在于,所述服务器相应增加所述加锁数量之后,所述方法还包括:The lock reassertion method according to claim 5, wherein after the server increases the number of locks correspondingly, the method further comprises:
    所述服务器接收来自所述客户端的解锁请求;the server receives the unlock request from the client;
    所述服务器根据所述解锁请求确定所述目标对象;The server determines the target object according to the unlock request;
    所述服务器相应减少所述锁数量;The server reduces the number of locks accordingly;
    当所述锁数量为0时,所述服务器清除所述加锁标识。When the number of locks is 0, the server clears the lock identification.
  8. 根据权利要求4所述的锁重申方法,其特征在于,所述服务器根据所述加锁请求确 定所述目标对象之后,所述方法还包括:lock reiteration method according to claim 4, is characterized in that, after described server determines described target object according to described lock request, described method also comprises:
    当所述客户端及所述目标对象所在对象区域的加锁关系没有存储在特征日志时,所述服务器将所述客户端及所述目标对象所在对象区域的加锁关系存储在所述特征日志。When the locking relationship between the client and the object area where the target object is located is not stored in the feature log, the server stores the locking relationship between the client and the object region where the target object is located in the feature log .
  9. 一种锁管理方法,其特征在于,所述方法包括:A lock management method, characterized in that the method comprises:
    服务器获取目标对象的加锁标识;The server obtains the lock identifier of the target object;
    所述服务器在所述目标对象的扩展信息中记录所述加锁标识。The server records the lock identification in the extended information of the target object.
  10. 根据权利要求9所述的锁管理方法,其特征在于,所述方法还包括:The lock management method according to claim 9, wherein the method further comprises:
    所述服务器获取所述目标对象的锁数量;the server acquires the number of locks of the target object;
    所述服务器在所述目标对象的扩展信息中记录所述锁数量。The server records the number of locks in the extended information of the target object.
  11. 根据权利要求9或10所述的锁管理方法,其特征在于,所述方法还包括:The lock management method according to claim 9 or 10, wherein the method further comprises:
    当释放所述目标对象的锁时,所述服务器从所述目标对象的扩展信息中删除所述加锁标识。When releasing the lock of the target object, the server deletes the lock identification from the extended information of the target object.
  12. 根据权利要求9-11任一所述的锁管理方法,其特征在于,所述方法还包括:The lock management method according to any one of claims 9-11, wherein the method further comprises:
    当恢复所述目标对象的锁时,所述服务器从硬盘存储的所述扩展信息中获取所述加锁标识。When restoring the lock of the target object, the server acquires the lock identification from the extended information stored in the hard disk.
  13. 根据权利要求9-12任一所述的锁管理方法,其特征在于,所述方法应用于分布式文件存储系统。The lock management method according to any one of claims 9-12, wherein the method is applied to a distributed file storage system.
  14. 一种服务器,其特征在于,包括:A server, characterized in that it includes:
    接收单元,用于接收来自客户端的锁重申请求;A receiving unit for receiving a lock reiteration request from a client;
    确定单元,用于根据所述锁重申请求确定所述客户端对应的目标对象,所述目标对象为所述客户端在所述服务器重启后想要加锁的对象;a determining unit, configured to determine a target object corresponding to the client according to the lock reiteration request, where the target object is an object that the client wants to lock after the server restarts;
    重加锁单元,用于从所述目标对象对应的扩展信息中的加锁标识对所述目标对象进行加锁,所述加锁标识指示所述目标对象在所述服务器故障前加过锁。A re-locking unit, configured to lock the target object from a lock identifier in the extension information corresponding to the target object, where the lock identifier indicates that the target object was locked before the server fails.
  15. 根据权利要求14所述的服务器,其特征在于,所述扩展信息还包括加锁数量,所述服务器还包括标记单元,所述标记单元具体用于:The server according to claim 14, wherein the extended information further includes a lock quantity, the server further includes a marking unit, and the marking unit is specifically used for:
    当所述目标对象对应的锁重申请求的数量超出所述锁数量时,标记所述目标对象锁重申结束。When the number of lock reiteration requests corresponding to the target object exceeds the number of locks, the lock reiteration of the target object is marked as complete.
  16. 根据权利要求14所述的服务器,其特征在于,所述服务器还包括第一存储单元,所述第一存储单元具体用于:The server according to claim 14, wherein the server further comprises a first storage unit, and the first storage unit is specifically used for:
    当加锁成功的所述锁重申请求对应的所述客户端,及所述目标对象所在对象区域的加锁关系没有存储在特征日志时,将所述客户端及所述目标对象所在对象区域的加锁关系存储在所述特征日志。When the client corresponding to the successful lock reiteration request and the locking relationship of the object area where the target object is located are not stored in the feature log, the data of the client and the object area where the target object is located are The locking relationship is stored in the feature log.
  17. 根据权利要求14所述的服务器,其特征在于,所述服务器还包括加锁单元,所述加锁单元具体用于:The server according to claim 14, wherein the server further comprises a locking unit, and the locking unit is specifically used for:
    接收来自所述客户端的加锁请求;receiving a lock request from the client;
    根据所述加锁请求确定所述目标对象;Determine the target object according to the lock request;
    在所述目标对象对应的扩展信息中存储所述加锁标识。The lock identifier is stored in the extension information corresponding to the target object.
  18. 根据权利要求17所述的服务器,其特征在于,所述扩展信息还包括锁数量,所述加锁单元还用于:The server according to claim 17, wherein the extended information further includes the number of locks, and the locking unit is further configured to:
    相应增加所述锁数量。Increase the number of locks accordingly.
  19. 根据权利要求17所述的服务器,其特征在于,所述服务器还包括第一解锁单元,所述第一解锁单元具体用于:The server according to claim 17, wherein the server further comprises a first unlocking unit, and the first unlocking unit is specifically configured to:
    接收来自一个或多个客户端的解锁请求;receive unlock requests from one or more clients;
    根据所述解锁请求确定所述目标对象;Determine the target object according to the unlock request;
    当所述目标对象的解锁请求的数量与所述加锁请求的数量相同时,清除所述加锁标识。When the number of unlock requests of the target object is the same as the number of lock requests, the lock identifier is cleared.
  20. 根据权利要求18所述的服务器,其特征在于,所述服务器还包括第二解锁单元,所述第二解锁单元具体用于:The server according to claim 18, wherein the server further comprises a second unlocking unit, and the second unlocking unit is specifically configured to:
    接收来自所述客户端的解锁请求;receiving an unlock request from the client;
    根据所述解锁请求确定所述目标对象;Determine the target object according to the unlock request;
    相应减少所述锁数量;reduce the number of locks accordingly;
    当所述锁数量为0时,清除所述加锁标识。When the number of locks is 0, the lock identification is cleared.
  21. 根据权利要求17所述的服务器,其特征在于,所述服务器还包括第二存储单元,所述第二存储单元具体用于:The server according to claim 17, wherein the server further comprises a second storage unit, and the second storage unit is specifically used for:
    当所述客户端及所述目标对象所在对象区域的加锁关系没有存储在特征日志时,将所述客户端及所述目标对象所在对象区域的加锁关系存储在所述特征日志。When the locking relationship between the client and the object area where the target object is located is not stored in the feature log, the locking relationship between the client and the object region where the target object is located is stored in the feature log.
  22. 一种服务器,其特征在于,包括:A server, characterized in that it includes:
    获取单元,用于获取目标对象的加锁标识;The acquisition unit is used to acquire the lock identification of the target object;
    记录单元,用于在所述目标对象的扩展信息中记录所述加锁标识。A recording unit, configured to record the lock identification in the extended information of the target object.
  23. 根据权利要求22所述的服务器,其特征在于,The server of claim 22, wherein:
    所述获取单元,还用于获取所述目标对象的锁数量;The acquiring unit is also used to acquire the lock quantity of the target object;
    所述记录单元,还用于在所述目标对象的扩展信息中记录所述锁数量。The recording unit is further configured to record the number of locks in the extended information of the target object.
  24. 根据权利要求22或23所述的服务器,其特征在于,所述服务器还包括删除单元,The server according to claim 22 or 23, wherein the server further comprises a deletion unit,
    所述删除单元,用于当释放所述目标对象的锁时,从所述目标对象的扩展信息中删除所述加锁标识。The deletion unit is configured to delete the lock identification from the extended information of the target object when the lock of the target object is released.
  25. 根据权利要求22-24任一所述的服务器,其特征在于,所述服务器还包括读取单元,The server according to any one of claims 22-24, wherein the server further comprises a reading unit,
    所述读取单元,用于当恢复所述目标对象的锁时,从硬盘存储的所述扩展信息中获取所述加锁标识。The reading unit is configured to acquire the lock identification from the extended information stored in the hard disk when restoring the lock of the target object.
  26. 根据权利要求22-25任一所述的服务器,其特征在于,所述服务器应用于分布式文件存储系统。The server according to any one of claims 22-25, wherein the server is applied to a distributed file storage system.
  27. 一种计算机设备,其特征在于,包括:处理器以及存储器,A computer device is characterized in that, comprising: a processor and a memory,
    所述处理器用于执行所述存储器中存储的指令,使得所述计算机设备执行权利要求1至8中任一项所述的方法。The processor is configured to execute instructions stored in the memory to cause the computer device to perform the method of any one of claims 1 to 8.
  28. 一种计算机设备,其特征在于,包括:处理器以及存储器,A computer equipment, characterized in that it comprises: a processor and a memory,
    所述处理器用于执行所述存储器中存储的指令,使得所述计算机设备执行权利要求9至13中任一项所述的方法。The processor is configured to execute instructions stored in the memory, causing the computer device to perform the method of any one of claims 9 to 13.
  29. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在所述计算机上运行时,使得所述计算机执行如权利要求1至13中任一项所述的方法。A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, and when the computer program is executed on the computer, the computer is made to execute the functions as described in claims 1 to 13. The method of any one.
  30. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上执行时,所述计算机执行如权利要求1至13中任一项所述的方法。A computer program product, characterized in that, when the computer program product is executed on a computer, the computer executes the method according to any one of claims 1 to 13.
PCT/CN2020/141986 2020-10-16 2020-12-31 Locking reapplication method, lock management method, and server WO2022077777A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202080018013.5A CN114710976B (en) 2020-10-16 2020-12-31 Lock reiteration method, lock management method and server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
IN202031045050 2020-10-16
IN202031045050 2020-10-16

Publications (1)

Publication Number Publication Date
WO2022077777A1 true WO2022077777A1 (en) 2022-04-21

Family

ID=81207627

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/141986 WO2022077777A1 (en) 2020-10-16 2020-12-31 Locking reapplication method, lock management method, and server

Country Status (2)

Country Link
CN (1) CN114710976B (en)
WO (1) WO2022077777A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143097B1 (en) * 2003-07-30 2006-11-28 Hewlett-Packard Development Company, L.P. Method and apparatus for migrating file locks from one server to another
CN102375955A (en) * 2010-08-17 2012-03-14 伊姆西公司 System and method for locking files in combined naming space in network file system
US20160217051A1 (en) * 2013-06-27 2016-07-28 International Business Machines Corporation Unobtrusive Failover in Clustered Network-Attached Storage
CN108023939A (en) * 2014-11-12 2018-05-11 华为技术有限公司 The processing method and its system of server failure are locked in distributed system
US20190199801A1 (en) * 2015-12-14 2019-06-27 Huawei Technologies Co., Ltd. Lock Management Method in Cluster, Lock Server, and Client

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105208124A (en) * 2015-09-29 2015-12-30 华为技术有限公司 Method and device for managing locks and method and device for determining lock management servers
CN110990190A (en) * 2019-10-31 2020-04-10 苏州浪潮智能科技有限公司 Distributed file lock fault processing method, system, terminal and storage medium
CN111125048B (en) * 2019-12-06 2022-04-22 浪潮电子信息产业股份有限公司 Fault notification method, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143097B1 (en) * 2003-07-30 2006-11-28 Hewlett-Packard Development Company, L.P. Method and apparatus for migrating file locks from one server to another
CN102375955A (en) * 2010-08-17 2012-03-14 伊姆西公司 System and method for locking files in combined naming space in network file system
US20160217051A1 (en) * 2013-06-27 2016-07-28 International Business Machines Corporation Unobtrusive Failover in Clustered Network-Attached Storage
CN108023939A (en) * 2014-11-12 2018-05-11 华为技术有限公司 The processing method and its system of server failure are locked in distributed system
US20190199801A1 (en) * 2015-12-14 2019-06-27 Huawei Technologies Co., Ltd. Lock Management Method in Cluster, Lock Server, and Client

Also Published As

Publication number Publication date
CN114710976A (en) 2022-07-05
CN114710976B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
US10853339B2 (en) Peer to peer ownership negotiation
US9804929B2 (en) Centralized management center for managing storage services
US8239648B2 (en) Reclamation of thin provisioned disk storage
US8041907B1 (en) Method and system for efficient space management for single-instance-storage volumes
US8706694B2 (en) Continuous data protection of files stored on a remote storage device
US10852981B2 (en) System for migrating virtual tape volumes between filesystems
US8332600B2 (en) Storage system and method for operating storage system
US9176853B2 (en) Managing copy-on-writes to snapshots
US11169835B1 (en) VM data migration between storage devices
US9760457B2 (en) System, method and computer program product for recovering stub files
US11327686B2 (en) Apparatus and method for managing integrated storage supporting hierarchical structure
JP4726909B2 (en) Method, system and computer program for managing redundant storage of data in a storage hierarchy
US20110282917A1 (en) System and method for efficient resource management
CN106528338B (en) Remote data copying method, storage device and storage system
US20060156030A1 (en) Data processing system and method
US8868503B1 (en) Method and system for managing clones of replicated storage
CN111399760A (en) NAS cluster metadata processing method and device, NAS gateway and medium
US20110173356A1 (en) Exclusive access during a critical sub-operation to enable simultaneous operations
WO2022077777A1 (en) Locking reapplication method, lock management method, and server
WO2023273803A1 (en) Authentication method and apparatus, and storage system
US20190121899A1 (en) Apparatus and method for managing integrated storage
US11467929B2 (en) Reducing failover time between data nodes
US20240007441A1 (en) Internet protocol based security over port forwarding tunnels
US20240143454A1 (en) System and techniques for backing up scalable computing objects
US10592527B1 (en) Techniques for duplicating deduplicated data

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20957551

Country of ref document: EP

Kind code of ref document: A1