Multiple storage on zope/Zeo
by
kedai
—
last modified
Aug. 30, 04 01:30 PM
Zope/Zeo can have multiple storage mounted at anytime. Be default, zope already have two storages mounted ootb (w version 2.7.x); main and temporary_folder. Here's how to add more storage.
Mounting multiple storage in Zope:
Follow through these steps:
add another declaration, specify another and change the filename:
<zodb_db anotherdb>
Main FileStorage database
<filestorage> #we have a storage of type filestorage
path $INSTANCE/var/Anotherdb.fs #path to our new storage
</filestorage>
mount-point /somewhere #where it will be mounted
</zodb_db>
- now open zmi, and add somewhere, and voile, we have another storage mounted.
note: there used to be other type of storages - BerkeleyStorage, OracleStorage, etc. I haven't yet worked with these other implementation, so can;t say much. IIRC, BerkeleyStorage is no longer maintained.
Mounting multiple storage in Zeo:
Almost the same steps are needed. The difference is that some changes are done in zeo.conf::
- open instancehome/etc/zeo.conf
- by default, there's a declaration for the main storage (do this on the zeo server):
<filestorage 1>
path $INSTANCE/var/Data.fs
</filestorage>
- add another one:
<filestorage servis>
path $INSTANCE/var/Anotherdb.fs
</filestorage>
- edit instancehome/etc/zope.conf (at all zeo clients):
<zodb_db main>
mount-point /
<zeoclient>
server 10.1.1.2:9999
storage 1
name zeostorage
var $INSTANCE/var
</zeoclient>
</zodb_db>
<zodb_db svcs>
mount-point /somewhere #out mount point in zmi
<zeoclient>
server 10.1.1.2:9999 #where the storage is served (our ZSS)
storage Anotherdb #our storage name
name zeostorageservis
var $INSTANCE/var
</zeoclient>
</zodb_db>
we're done. notice that with zeo, we can actually have many zeo servers, and zeo clients can actually mount any storage.