how to clear locked files

Urumiko

Dabbler
Joined
Jul 2, 2017
Messages
32
Hi all I have what is I assume a classic problem but I cant find details on how to fix it within truenas Core.

Basically i am accessing SMB shares from a windows machine, Occasionally if a file transfer or edit is interrupted due to a software error, I find that file is locked to an orphaned session and the only way I know to clear the lock is to reboot the server.

Is there an easy way to clear this lock in the truenas shell? Please go easy on me, I'm not great with the shell
 

Sokonomi

Contributor
Joined
Jul 15, 2018
Messages
115
Im running into similar issues, though im not sure what the cause is.

I mainly have this issue with photoshop files. I open them up, work on them, but when it comes time to save it says the file is in use (no sh#t..) and I have to go and rename the old files so I can save new ones again. The old files let themselves be renamed, but not deleted. They eventually release somehow and then I can delete them. But this is very unwanted behavior and I would rather risk overwriting since I'm really the only one accessing the NAS.

So the short version; Can TrueNAS prevent files being locked?
 
Top