remote file system

David Collier-Brown davec-b at
Wed Oct 4 03:05:26 GMT 2006

   On slightly old-fashioned way was to keep the directories, but
to replace the file with symlinks when they were migrated. That
way on could ls the directories on the pre-archive server's disk
and find out where everything was.

   The "berk" archiver used
	ln -s "`pwd`/$file:$tape:$date" $file
to create a symlink which was actually a copy of the table-of-contents
entry for the file.


Novgorodsky, Sergey wrote:
> Hi,
> I'm working on a software which is using Samba server to receive files for a long-term storage.
> The files are replicated to a remote host(I have a separate program that does that); local file system has size limits and  some local files are periodically deleted to free up the space. 
> When user makes request to my Samba server to read back some files, I need to check if they are still stored locally and if not, fetch them  from a remote location, after that Samba can work as usual.
> My question is - what is the best way to handle read requests in such system ?
> Specifically, calls like SMB_VFS_OPENDIR and SMB_VFS_OPEN?
> I can write a VFS module and provide my SMB_VFS_OPEN function which will check the file location and send request to remote host to retrieve a file. I understand I'll have to block till file arrives and then do something like
> "return SMB_VFS_NEXT_OPEN(...)" ?
> What about SMB_VFS_OPENDIR? I don't want to fetch all the the remote files every time I get this request...
> Can I somehow make up the SMB_STRUCT_DIR structure to return from OPENDIR without actually copying 
> the remote files?
> Any suggestions?
> Thank you in advance,
> Sergey Novgorodsky

David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at           |                      -- Mark Twain
(416) 223-5943

More information about the samba-technical mailing list