Unclear on the interaction between cache drives and SMB


Recommended Posts

I have shared folders I want to access over SMB. A couple of those I have set to cache with my single nvme cache drive, for speedy updates. Now, to access the share, write to it over SMB, etc., while benefiting from the cache, do I share the cache drive over SMB and use that path from windows, or is this accomplished transparently and I only need to map the shares on the array themselves?

 

Thanks for clarifying.

Edited by Freedomfries
Link to comment
13 minutes ago, Freedomfries said:

only need to map the shares on the array themselves

This^

 

In fact, I never even bother to map, just browse the network to access the shares.

 

Best if you don't even share disks. And even when working directly on the server, don't mix disks and user shares when moving or copying. Since the user shares are just another view of the disks, it is possible to accidentally try to copy a file onto itself, with the result that it gets wiped.

Link to comment
3 minutes ago, trurl said:

accidentally try to copy a file onto itself

There are a couple of ways user shares can produce unexpected results. Not really a problem if you are aware of them.

  1. If you mix user shares and disks when moving/copying files, you can actually lose data, because Linux doesn't realize that the source path and the destination path might actually be the same file, and so tries to overwrite what it is trying to read. This is often referred to as the User Share Copy Bug.
  2. The Linux command for Move and Rename are the same, mv. So when you try to move files from one user share to another, Linux will often simply rename the files so they have a different path on the same disk, in violation of any user share settings such as included disks. The workaround for this is to copy from source to destination, so that new files get created following the user share settings, then deleting from the source.

 

  • Like 1
Link to comment

One more question regarding cacheing. I have a single 500gb nvme cache drive. I'm unclear about the way cacheing works with respect to the folders on the array assigned to be cached. Does the cache function transfer the entire share onto the cache disk, or only progressively as items are read/written to disk? I have 2TB worth of movies in a share. This obviously raises a question of whether I should cache it. My inclination is not to.

 

 

Edited by Freedomfries
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.