主权项 |
1. In a system including a group of servers that communicate with each other over a first network and issue storage commands to a shared data storage system over a second network, a method of managing locks of files stored in the shared data storage system using a master lock that includes a data field for storing an address of one of the servers in the group to identify such server as a current server for managing the locks of files stored in the shared data storage system, said method comprising:
at a first server of the group, receiving a request to update a particular file stored in the shared data storage system from an application executing within the first server; determining, by the first server, whether an address of another server in the group is stored in the data field of the master lock; if the data field of the master lock does not contain an address of another server in the group, updating the data field of the master lock to store an address of the first server and obtaining a lock to the particular file; if the data field of the master lock does contain the address of another server in the group, communicating with said another server over the first network using the address, a request to obtain the lock to the particular file; and after the lock to the particular file is obtained, performing an input-output operation on the particular file to fulfill the request to update the particular file. |