Not supported: Management Console Agent, even if operating on Windows OS, is not compatible. Other platforms, including mobiles.
Functionalities Covered: Synchronization, File Caching, Hybrid jobs, local file access and access over SMB.
Configure files locks in a job
Monitor and manage locked files in a job
Peculiarities and limitations
Configure files locks in a job
Install the Agent on each device, administrative privileges are required. The installation automatically includes the Agent Resilio File locking driver. Confirm the driver's installation during setup.
Create a job and assign the Agents. Choose one Agent as the Priority Agent, it will perform the role of the Lock Server - it manages all metadata of locked files in the job and distributes it to others.
Activate the "Shared locks" option on the Settings tab. For existing jobs, this feature can be toggled on/off, necessitating a restart of the Agents for changes to take effect.
Additionally, there’s an editbox to ignore locks for some files in the job. Syntax is the same as in Files and Folder ignore list and is based on wildcards.
Monitor and manage locked files in a job
Access the 'File locks' tab in the job run to monitor locked files in the job. This tab provides details on locked files, associated processes, Agents, and lock specifics.
The information is received upon request from the Lock Server. If it’s not connected to the MC, no info can be fetched here.
Unlock files for others by:
- closing the file on the device.
- manually from the File lock tab. Select a file (multi-selection is not supported) and click "Unlock". File will become available for other users for editing, even though it will remain open on the device.
- automatically after the configured lock timeout. Default is 5 hours, counting from the last access time of the file. In most app's usage scenarios it matches the Lock duration reported on the MC.
Username reported - is the SID of the user who opened the files. To learn the username run command wmic useraccount get name,sid
in elevated Command Prompt.
To interpret the lock type and app’s requested access, refer below, where RWD stands for Read-Write-Delete:
Manage the driver
Ensure the Resilio File locking driver is running by querying its state in Command Prompt as Administrator using the command: sc query rsldrv
. Other commands are sc query/start/stop rsldrv
. For PowerShell use sc.exe query/start/stop rsldrv
If the driver is not running, the Agents will report the corresponding error in the jobs.
Peculiarities and limitations
Not supported for MC Agent, even if it might be a Windows OS. MC Agent may report driver errors though.
Not supported for Agents connected to a cloud storage (e.g. Primary Storages in File cache and Hybrid jobs) for Resilio Agents version pre 4.0.100.40.
Files that were opened before job creation are not locked and are not reported as locked in MC. Same refers to functionality "Restart the job on the Agent".
Agent and driver must be running together for the functionality to work. If the Agent process is stopped, while the driver is working, the user won’t have access to any file in the job folder. If you need to stop the Agent for a reason, be sure to stop the driver as well.
Renaming of the locked files on remote devices works with peculiarities and may lead to edit conflicts. Try avoiding renames of the locked files and their parent directories. Examples include, but are not limited to:
- If a file is opened on a deviceA, and a different file with the same name is moved (not copied) in its place on deviceB, the file is replaced without any error.
- Similarly, such file can be renamed on deviceB, and it will be propagated to remote devices.
- Similarly, on deviceB renaming of a file that is not locked to a file that is locked works without any errors.
If a file is accessed through SMB and SMB connection is dropped, the file gets unlocked.
For files accessed over SMB (in cache jobs, for example) on Locked files tab:
- no process is reported, it’s unknown
- the user SID reported is the user who was authorized while mounting SMB share, the same user name as returned in net files command executed on SMB server.
- the Agent reported is the Cache gateway server in the job.
Files accessed over SMB require additional time to set and release locks. It may be up to 10 seconds.