Copy link to clipboard
Copied
Hi folks,
I have discovered a fairly significant yet obscure issue that will probably be affecting anybody working with Photoshop (and possibly other Adobe apps) and saving work onto NAS storage, such as a Synology, and using Recycle Bin on that NAS.
The NAS Recycle Bin will keep copies (versions) of files as they are deleted, as you would expect. But the issue is that with Photoshop, when you save/overwrite a file (a PSD, jpg, whatever it might be) what Photoshop seems to be doing in the background is:
1) creating a duplicate file called filename_01.xxx
2) replacing the original filename.xxx with this file
3) deleting the no-longer-needed filename_01.xxx file
So in doing this, the NAS sees a new file being created, then deleted, so it keeps a copy of that file in the NAS' Recycle Bin. So you can see the issue here... imagine you're working on a PSD, and you're saving every few minutes/hours, perhaps 10 or more times per day. Well, now you have 10 x duplicates (all potentially large files) sitting in your NAS' Recycle Bin. This means that instead of that 1 x 600mb PSD you're working on what you actually end up with is your PSD + 6GB of duplicates in your Recycle Bin, which probably won't be Emptied for 2-4 weeks (this is the default schedule for most NAS systems). In this last 2 weeks alone my studio has lost around 600GB space on our NAS storage due to this issue, forcing us to empty the recycle bin far more often that we'd want. Not to mention the massive amounts of unnecessary write/read ops to the NAS drives, which could be reducing their lifespan...
I'm not sure this is something that the NAS manufacturers can or should have to solve. It would be far better if these temporary files that are being written by Photoshop were being written not to the file's original path such as nas:\\work\project\psds but actually just on C: or some other non-NAS location, so that they don't get picked up by the NAS, ballooning massively. As long as nothing gets deleted on the NAS in the process it should work fine.
I would suggest that anyone using Photoshop (and maybe other Adobe software too...?) + NAS + NAS Recycle Bin is probably being affected by this issue, so it's worth checking if you're wondering why you're running out of storage space so quickly!
Cheers
Copy link to clipboard
Copied
Many apps do this. I'd recommend ALL apps do this because it greatly reduces file corruption. The problem with writing it somewhere else is that you'd still have to do the copy to the save location, and that could fail. Only by writing a complete new file, seeing it finish then doing the quick rename/replace can you get a reliable save. Somehow networks even manage to mess this up but otherwise we'd see a lot more corruption, because many misguided souls don't have even one backup...
Good warning about the recycle bin, thanks. Doesn't happen with local saves because the way a file is replaced bypasses the recycle bin.
Copy link to clipboard
Copied
Have you tried un-check save in Background in your Photoshop preferences? Maybe that will help but degrade performance. Change the way Photoshop saves files.
Copy link to clipboard
Copied
This is what Chris Cox called the Safe Save procedure. Yes, it's by design.
Background save is something else and unrelated.
Copy link to clipboard
Copied
How old files are replaces or updated is tricky. A new file is actually written and the update is committed by what is call an atomic write by some. It is a directory update where a single write delete the old file and commits the new file. File system are complex. New file are easier there is no old file to delete and no disk space the need to be returned to free space. Its a complex thing to do with a single write delete the old file directory entry write the new direct file record and update the disk free space mapping. You do not want two file on record the may be a power failure. You want the old or new not both. Two phase commits are also used in some file systems. There are many file system some better than others. That is why programs like check disk are required corruption can cause problems you need good recovery some things may be new and have not been backed up yet. You need need reliable file system with good recovery. ]Background saving is not different when it come to file system but some extra processing need to be done . Change need to be interlocked or buffered till the background save completes. Application like Photoshop can also build in their own safe guards. Software is not always perfect. In case they are having a software problems I was just trying to suggest trying a different software path.
Copy link to clipboard
Copied
I have seen more than one corrupted image from direct LAN open/saves to a server drive, so I always recommend working locally and moving the file back using the OS… But that may just be me!
Copy link to clipboard
Copied
Yes, Background saving is a completely separate thing, and not the issue here at all.
I understand now why this is happening, and it's what I suspected. I guess the bad news here then is that it's not really feasible to prevent this happening, unless we can somehow trick the NAS into ignoring any files that are created and deleted within a certain short time-frame say <60 seconds. But that's dirty, and I'm not sure it's possible anyway.