DirectoryStorage is a Storage for ZODB, the object database used by Zope. (It is actually a package, not a ZopeProduct.) It uses ordinary files and directories to store revisions of ZODB objects; one file per revision per object. It is reputedly a bit slower than the standard FileStorage. See also APE.
The following features differentiate DirectoryStorage from other storages:
- A very simple file format; one file per revision per object. Your data is not locked away inside an unfamiliar, opaque database.
- Designed for disaster-preparedness. Restore service after a disaster faster and with greater confidence.
- Storage Replication. Efficiently and robustly keep an online backup copy of your storage up to date with the latest changes from the master.
- Designed for fault tolerance. Any bugs (in DirectoryStorage, or elsewhere) are less likely to irretrievably destroy your data.
etc.
Example of [zeo.conf]? section that makes Zeo use directory storage:
%import DirectoryStorage
<directorystorage 1>
path $INSTANCE/var/directorystorage
read-only off
</directorystorage>
Replace filestorage section with this. Remember to initialise storage first (see install guide). (You don't have to use custom_zodb.py modules in recent Zope any more.)
ZEO compatibility --simon, Sun, 25 Apr 2004 09:25:28 -0700 reply
doc/install says:
DirectoryStorage works well with ZEO 2. The version of ZEO distributed with ZODB 3.1 requires a patch to support 'Extension Methods', which are are needed to be able to access the snapshot feature across the ZEO link. You can find the patch in doc/extension.diff. ZODB 3.2 already includes this patch. (ZODB 3.2 has not been released at the time of writing) DirectoryStorage has not been thoroughly tested with ZEO 1. The snapshot feature is known to not work.
Which ZEO version comes with zope 2.7 ?
effective-user compatibility --simon, Sun, 25 Apr 2004 09:28:34 -0700 reply
Also, what's the status of:
DirectoryStorage is currently not compatible with Zope's -u switch, which allows Zope to be started as root, and drop root privelidges soon after startup. The problem arises because DirectoryStorage may need to create many files before root privelidges are dropped, and these files will have the wrong owner. This is a confirmed problem in Zope 2.6, and may be resolved in Zope 2.7.
more dumb questions --simon, Sun, 25 Apr 2004 15:46:46 -0700 reply
DS recommends reiserfs. How much slower will it be if I use my regular ext3 ? --
...
- Can I create a reiserfs partition on part of my hard drive without reformatting ? How do I do that ?
- ...
- I like large/flat directories. How wrong would it be to choose chunky format on ext3 ?
- ...
- "Create an instance of the DirectoryStorageToolkit? class somewhere." How do I do that ?
- ...
some dumb answers :-) -- Wed, 12 May 2004 12:33:08 -0700 reply
Can I create a reiserfs partition on part of my hard drive without reformatting ? How do I do that ?
i assume you're on linux and have some ext2/ext3 partitions that you want to keep. You'll have to shrink the existing partitions and add a new one. GNU parted helps with the first part... http://www.gnu.org/software/parted/manual/html_node/parted_toc.html then use fdisk or cfdisk as usual for adding the new partition.
I like large/flat directories. How wrong would it be to choose chunky format on ext3 ?
Note that Toby's not kidding about large ... bushy format creates something like 60,000 files in some subdirectories. But I think you'd have to try it and see. I (slinkP) currently run my crappy homepage with bushy format on ext3. No problems noticed with that so far.
"Create an instance of the DirectoryStorageToolkit?? class somewhere." How do I do that ?
"Add" menu in the ZMI... same way as for adding e.g. a Page Template, Python Script, etc.
ZEO compatibility -- Wed, 12 May 2004 12:41:46 -0700 reply
ZEO that ships with Zope 2.7.0 does not require patching, it has the necessary method.
I'm not clear on how the releases relate, but I think it's more or less the same as ZODB 3.3.2 ?
Minimal? -- Tue, 18 May 2004 05:23:39 -0700 reply
Why does the source code of BaseDirectoryStorage? say Minimal has fallen into disrepair? The DS homepage would lead me to believe it's a feature.