Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

SMB: Deleting large folders fails from macOS Finder

overshoot

Member
Joined
Jul 16, 2019
Messages
69
Here is a screenshot where we can see that while deleting the main folder AERIALS_RAW containing subfolders, the finder will modify one of the subfolder DJI_A01524_C003... (as can be seen in the terminal window where the date matches the actual time at a minute difference) and then fail on that same folder. Nothing else is accessing this folder other than the Mac trying to delete it.
Using AFP or SMB doesn't make any difference...

Screen Shot 2019-10-29 at 7.07.31 PM.png
 

JaimieV

Neophyte Sage
Joined
Oct 12, 2012
Messages
742
I'm still interested in iX/dev response too.

Don't switch the share type to Mac - what that field actually means is "Will this be shared by SMB or AFP?", and I think it's going to be made more obvious in a future release. The default VFS objects are going to be changed too - and their behaviour is in development also. So it's all a bit in flux just now.

Aaaaand probably will be every year as Apple release a new macOS with different bugs. Yay.
 

overshoot

Member
Joined
Jul 16, 2019
Messages
69
Thanks! I've told my colleague to use FTP for now which works... sad!

Let's see what new releases bring us.
 

statalently

Member
Joined
Oct 11, 2019
Messages
33
I have also had trouble deleting large/complicated folder structures with Macs, but I found that using rm -r in Terminal instead of the Finder has minimized the problems.
 

overshoot

Member
Joined
Jul 16, 2019
Messages
69
I have also had trouble deleting large/complicated folder structures with Macs, but I found that using rm -r in Terminal instead of the Finder has minimized the problems.
Yes that's for sure. It works as long as you avoid using the Finder to delete those folders. So clearly not a Server issue here.
But of course, it's not convenient for users to use "rm -rf" as they have no idea how to do so + they would end up deleting the entire data on the Server and maybe erase their root disk as well... ;-)
 

statalently

Member
Joined
Oct 11, 2019
Messages
33

seanm

Senior Member
Joined
Jun 11, 2018
Messages
501
During my testing of FreeNAS I remember sometimes seeing errors deleting folders from Macs. I thought it was due to screwy permissions or the presense of symlinks, but they were also very big folders with many files, maybe it was that characteristic. But I've just now tried to reproduce the issue and I no longer can.
 

XStylus

Junior Member
Joined
Nov 22, 2017
Messages
16
Sorry to necropost, but just wanted to chime in to say that behavior still seems to be happening, even on on FreeNAS 11.3-U2 under MacOS 10.14.6.

I'd delete a folder containing a large number of files and folders, and after deleting a few things it'd come back with "This operation can't be completed because item "___" is in use." I'd attempt again and again, and each time the item would be different.

In reading previous posts on this thread, are we coming to the conclusion that this is a Finder bug? I can't recall running into this issue when accessing an SMB share hosted on a Windows machine or MacOS machine, so I'm curious what's different.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
7,078
Sorry to necropost, but just wanted to chime in to say that behavior still seems to be happening, even on on FreeNAS 11.3-U2 under MacOS 10.14.6.

I'd delete a folder containing a large number of files and folders, and after deleting a few things it'd come back with "This operation can't be completed because item "___" is in use." I'd attempt again and again, and each time the item would be different.

In reading previous posts on this thread, are we coming to the conclusion that this is a Finder bug? I can't recall running into this issue when accessing an SMB share hosted on a Windows machine or MacOS machine, so I'm curious what's different.
If you're in column mode in finder, try switching to something different.
 

overshoot

Member
Joined
Jul 16, 2019
Messages
69
I think it's totally fine to necropost this thread since it is still relevant as of today.

I am still facing the same issues nearly a year after and that's sad that the Finder doesn't co-exists fine with SMB under FreeNAS.

Another example is when editing a picture under preview stored on the server and saving the modification, it won't let me do it.
I have to copy that file on my Desktop, and then copy it back on the server.
 

overshoot

Member
Joined
Jul 16, 2019
Messages
69
I actually updated FreeNAS from the 11.3-U4 to 11.3-U5 and it seems to work now.
I've been using macOS Catalina and was keeping it up to date when this happened.

However the issue of deleting large folders still remains.
 

242spot

Junior Member
Joined
Dec 15, 2015
Messages
18
Hi,

I appreciate this is NOT a solution, but this is my crude work around to save time.

One of the uses for my TrueNas is as a FTP server for my CCTV cameras to connect to and store video files. The cameras are 4MP high res and so the data piles up over the months / years. Trying to delete this data is painful via OSX finder as I get "The operation can’t be completed because some items had to be skipped" message.

Like I say, it's not a fix, but...

I use Cyberduck FTP client to delete the files. It's not lightning quick, however, will do it in one go and hence negates my constant inout. I just let it run in the background.

A crude solution, but it works for my needs. Hope this helps others.
 

MountainMan

Neophyte
Joined
Dec 10, 2020
Messages
4
Just an FYI, in case it's related....

I've been testing TrueNAS Scale and my major problem with SMB (and Catalina) has been transfers with a large number of small files getting "stuck", with the Mac reporting "The operation can’t be completed because an item with the name “<some-file-name>” already exists." and Samba core dumping. :( (JIRA issue here). Trying to debug things, I came across this bug report in Samba's tracker about a change in default last year for fruit:zero_file_id from yes to no. According to that author it has a noticeable affect still when copying a large number of files. Setting it to "yes" again definitely had some affect on my issue, although it didn't resolve it completely. Just thought it might be worth a try to see what affect it has on mass deletion.

I am curious though, are any of you able to successfully copy 2k+ files in a pass with Catalina? Wondering if it's just me and some weird config. :)
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
7,078
Just an FYI, in case it's related....

I've been testing TrueNAS Scale and my major problem with SMB (and Catalina) has been transfers with a large number of small files getting "stuck", with the Mac reporting "The operation can’t be completed because an item with the name “<some-file-name>” already exists." and Samba core dumping. :( (JIRA issue here). Trying to debug things, I came across this bug report in Samba's tracker about a change in default last year for fruit:zero_file_id from yes to no. According to that author it has a noticeable affect still when copying a large number of files. Setting it to "yes" again definitely had some affect on my issue, although it didn't resolve it completely. Just thought it might be worth a try to see what affect it has on mass deletion.

I am curious though, are any of you able to successfully copy 2k+ files in a pass with Catalina? Wondering if it's just me and some weird config. :)
I haven't had much time to devote to SCALE SMB issues yet. My intuition is that it's an issue with VFS module stacking in vfs_fruit and vfs_io_uring. The reason for changing zero_file_id value IIRC was due to issues with MacOS in some edge cases (they expect non-zero file ids).
 
Top