Folders are automatically created in Freenas shared drive

We have a freenas drive in the network, it works fine but we have noticed that numerous ‘LOST- 123456789’ folders keeps getting generated.

The version of is FREENAS 9.3 STABLE-201501162230.

What I need to know is what is causing this issue and how can this be stopped. The folders keep multiplying everyday. And they are automatically created in the root folder of the share drive.

Even if we try to delete these folders or the file inside (filename is _D721U~C), it says that they do not exist anymore, leaving me unable to delete the file and the folder. What could be causing this issue? Any help or suggestions would be appreciated. Thank you.

See the photos below:


FreeNAS 9.3 has been end of life since 2017 IIRC.

That looks like a mangled name, which happens if a filename contains characters that are illegal in SMB.

Now, what’s causing these to end up in lost-123456789-folders, I can’t say. Do you have a client creating files and/or folders on your server using illegal filenames (for example : ? * < > " | \)? It could be an automated process of some sort.

For example, some applications automatically create a temporary file when you open a document, what if one of your apps does so in a poorly thought out way?

Ultimately it’s just as awalkerix said. You’re running woefully outdated software, trying to troubleshoot it further is likely not effective use of anyone’s time.

A passing word of caution is to always sanitise your images to avoid doxing yourself or potentially share sensitive details.

The “lost” directories are something that can be generated by the vfs_streams_depot Samba VFS module in certain situations. It has never been a supported TrueNAS / FreeNAS configuration, but some people long ago may have fiddled with VFS objects when we exposed them directly (which we stopped doing in FreeNAS 11.2 IIRC).

       vfs_streams_depot - EXPERIMENTAL module to store alternate data streams in a central directory.

Obviously not a great choice. You’re better off updating to a modern truenas version and sticking to supported configurations.

       In the case of an already existing data streams directory for a newly created file the streams directory will be renamed to
       "lost-%lu", random(). With this option lost stream directories will be removed instead of renamed.