[Zope] Mounted Databases with ZEO and Zope 2.7.2

Travis Miller travis at ctln.org
Mon Aug 16 01:13:12 EDT 2004


hi

i am no dbtab expert and would appreciate any further discussion on 
this subject that might help make mount points in zope more 
clear...anyone?  ;-)

even though some of this may add to the scope of this discussion, it 
could be beneficial. i will try to outline our approach, results and 
observations below...


we've been using mount points quite extensively on our zope server. 
basically we have ~30 plone sites running on one zope instance (and 
expect more). but for scalability and manageability we thought it best 
early on, to separate each portal object into its own Data.fs file. 
some benefits...

   * split up database packing. isolates potential db pack errors. packs 
finish quicker.

   * easier to move to other zope instances than .zexp files?

   * smoother migration to zeo.

   ...just increases flexibility.

this has worked great for us. we've made safe, tested migrations as 
python, zope and plone versions have migrated as well as moving to a 
zeo cluster.


now, more in the direction of kosh's post...

when we decided we wanted to use all these mount points, we wanted the 
actual plone site to be the mounted object, not a folder which would 
contain the plone object. in hind site, it was really kind of silly and 
should have just created a new mount point and then created the plone 
object within it, but that would be 20/20 wouldn't it? B-)   ...but, 
the point is that we solved this by creating a new zope instance with 
its regular Data.fs file, creating the plone site with the desired id 
(www) in the root of that db, and then mounting that new Data.fs file, 
back into the actual zope instance we were working with.

so, in the new, temporary zope instance::

   zope.conf
   -------------------------------
   <zodb_db main>
     mount-point /
     <filestorage>
       path $INSTANCE/var/Data.fs
     </filestorage>
   </zodb_db>

   zmi
   -------------------------------
   /www (Portal)      # create portal object

then, in the regular zope instance::

   zope.conf
   -------------------------------
   <zodb_db main>
     mount-point /
     <filestorage>
       path $INSTANCE/var/Data.fs
     </filestorage>
   </zodb_db>
   <zodb_db com.example.www>
     mount-point /Portals/example.com/www
     <filestorage>
       path $INSTANCE/var/Portals/example.com/www/Data.fs
     </filestorage>
   </zodb_db>

   zmi
   -------------------------------
   /Portals (Folder)                    # create folder
   /Portals/example.com (Folder)        # create folder
   /Portals/example.com/www (Portal)    # create zodb mount point


(hope that helps illustrate)

now, what was interesting, was mounting that portal specific Data.fs 
file back as the main/root database of the temporary instance, showed 
that new, empty folders had been created in the db:

   zmi
   -------------------------------
   /www (Portal)                     # portal created earlier
   /Portals (Folder)                 # folder created by mounting db
   /Portals/example.com (Folder)     # folder created by mounting db

further exploring this showed that moving the plone portal (www) into 
these folders and then moving the Data.fs file back to the regular 
instance, still resulted in a successful outcome.

so it seems as if the 'mount-point' directive in the zodb_db config 
indicates where the object is to be placed in the database tree, but 
also indicates where to pull the object from in the mounted db. part of 
finding the object includes walking back up the db tree...(like 
acquisition?)


so, perhaps if kosh created a folder at the root of the archived 
Data.fs and moving everything into it, and then mounting it with that 
folder's id as part of the mount point, maybe the expected results 
could be achieved??? maybe looking back at the archived Data.fs file as 
the root mount again would show that an 'archive' folder had been 
generated when the db was mounted???

archived db instance::

   zope.conf
   -------------------------------
   <zodb_db main>
     mount-point /
     <filestorage>
       path $INSTANCE/var/Archive.fs
     </filestorage>
   </zodb_db>

   zmi
   -------------------------------
   /archive (Folder)     # create folder
   /archive/* (*)        # move stuff from root into 'archive' folder


archive mounted instance::

   zope.conf
   -------------------------------
   <zodb_db main>
     mount-point /
     <filestorage>
       path $INSTANCE/var/Data.fs
     </filestorage>
   </zodb_db>
   <zodb_db main>
     mount-point /archive
     <filestorage>
       path $INSTANCE/var/Archive.fs
     </filestorage>
   </zodb_db>

   zmi
   -------------------------------
   /archive (Folder)    # create zodb mount point
   /archive/* (*)       # all the stuff that was moved to the 'archive' 
folder


obviously this is not a configuration for zeo, but the same seems to 
still apply when split across a zeo configuration.

geeess, that took longer than expected. hope its clear though. hope 
this helps and that someone more authoritative can shed some light on 
this! :-)

thanks,
travis


On Aug 15, 2004, at 12:58 PM, kosh wrote:

> I am having a problem getting databases to mount properly with ZEO. I 
> have an
> older Data.fs file that I started a ZEO server with and I wanted to be 
> able
> to mount it on one of the zope clients under /archive. Under the 
> Control
> Panel the db shows up however inside the ZMI even after using the ZODB 
> Mount
> Point product that is part of zope and clicking on the folder it 
> created I
> can't see anything from that database. If I change the mount point to 
> / then
> I can see everything in it as expected so I suspect something is 
> strange
> about how it is being mounted but I could find no docs on how to fix 
> that.
>
>
> This is the config section for that mount.
>
>   <zodb_db archive>
>    mount-point /archive
>    <zeoclient>
>      server 192.168.0.1:10001
>      storage archive
>      name archivezeo
>      var $INSTANCE/var
>    </zeoclient>
>    cache-size 10000
>  </zodb_db>
>
> If I change mount-point to / I can then see everything on it but that 
> pretty
> much defeats the point the doing this.
>
> I even tried copying this file locally and using
>
> <zodb_db old>
>     # Main FileStorage database
>     <filestorage>
>       path $INSTANCE/var/Data.fs
>     </filestorage>
>     mount-point /old
>     cache-size 40000
> </zodb_db>
>
> That did not work either but it works if the mount point is set to /
>
> Any help would be appreciated
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>



More information about the Zope mailing list