How are cifs network drives cached in Linux?

asked 2016-03-29 08:00:43 -0500

thingummybob gravatar image

updated 2016-03-29 12:02:29 -0500

nb gravatar image

Basic question here - no doubt someone will know ;0)

I'm finding out about mounting remote drives etc. and currently have an external HDD containing a pretty large music library attached to a Windows machine. I have successfully mounted this music library locally using cifs in fstab. All nice and dandy.

The library is quite large and all music files have embedded or attached art. Naturally the first time I open this library locally it takes time to build the content, as obviously it's having to draw all that data across the wireless network.

My question is twofold: firstly, what are the default policies on this share insofar as my Linux box keeps a cache of those contents and doesn't have to rescan the folder every time I boot up my machine?

Secondly - and related to the first question - what are the default time stamp options applied, and are those the most suitable for this specific use? Although I do update or modify my library, obviously this only happens infrequently, and I'd prefer to have some sort of manual call to rescan the library, absent of which Linux just 'knows' what's on there.

Part of my interest in time stamps is because I'm using a gnome based music player which obviously has the mounted network drive as its music library. Just as I don't want Fedora constantly scanning the library, nor do I want time stamps/the share acting in such a way as to cause the music player to rebuild its library every time I open it.

Any comments or suggestions?

edit retag flag offensive close merge delete


Hi, i honestly don't know and are supposing it is part of the application to cache (eg Files is caching long time and does not recognize changes, so i do have to manually refresh.) I found: man page see for cache= line. Maybe it helps. Best, CereS

ceres2009 gravatar imageceres2009 ( 2016-03-29 12:31:19 -0500 )edit

Yes, I read that. Lots of deprecation going on it seems. I can refine my question slightly: what aspect in particular should I be looking into with regard to how cifs basic file and cache i/o? From the quoted mount.cifs(8) and its default implementation of strictcache: "n this mode the client reads from the cache all the time it has Oplock Level II, otherwise - read from the server. As for write - the client stores a data in the cache in Exclusive Oplock case..."

Am I now any the wiser - bearing in mind I'm a beginner and not a network/Linux guru??

thingummybob gravatar imagethingummybob ( 2016-03-29 15:38:09 -0500 )edit