FW: directories in mysql db.

Greg Richards greg.richards at gec-group.com
Wed Jan 16 05:56:02 GMT 2002


Eric,

Let me preface this by telling you that I am NOT a Samba Team
member, so take the following with a grain of salt.

I have been developing a storage management/document management
system using Samba's VFS.  During this process I evolved into
using the database for more and more of the processes involved.
Eventually I ended up trying to replace the actual files and
directories with database information, and stored the binary data
in blob fields (ala Oracle's IFS).  Well I have succeeded (mostly)
I can do what you are looking for (directory listings) as well as most
file operations.  I haven't worked out any of the file locking/sharing
issues yet (GOD HELP ME) and the manner in which some applications read
a file is giving me fits, probably related to the locking/sharing thing.
Despite the fact that I SUCK as a C programmer, the performance isn't too
bad, future optimization should improve it.

In short yes you can, if you would like I can share some code.

Greg Richards
Globetrotters Engineering Corp.

-----Original Message-----
From: samba-technical-admin at lists.samba.org
[mailto:samba-technical-admin at lists.samba.org]On Behalf Of
eric at persson.tm
Sent: Wednesday, January 16, 2002 2:55 AM
To: samba-technical at lists.samba.org
Subject: directories in mysql db.



Hi !

This mail will consist of one big thought and you fellows will most
probably laugh and throw empty cokecans in my direction. :)

Well, here goes nothing...

I have developed a web-file archive on unix which is used by a lot of
people. The files in the archive is not stored on the disk as usual,
instead the filenames and "properties" of the file is saved in a
mysqltable(really any database, but currently mysql) and on the file is
saved to disk with a id number as filename. The idnumbered filenames are
hashed in directory tree, depending on configuration. 

However, my bold question is! 

Can I modify samba to get filenames and stuff from a mysqltable upon
directory listing and when the file is accessed read the data from my
directory tree?

I guess this is very possible, the question is if it is A LOT of work or
just some work. :) Much of it depends on how the functions are
abstracted within the samba source. 

I havent looked much at the source in this respect, but maybe someone
with some feeling for the source could give me some thoughts about this.

Thanks in advance, and I will duck for the empty cokecans, the not-empty
ones to. :)

	eric





More information about the samba-technical mailing list