Mounted Databases with ZEO and Zope 2.7.2
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
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@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 )
Travis Miller wrote:
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).
Wow. Why? ;-)
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.
This sounds like the correct thing to do :-)
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.
Correct.
part of finding the object includes walking back up the db tree...(like acquisition?)
No idea what you mean by this.
obviously this is not a configuration for zeo, but the same seems to still apply when split across a zeo configuration.
What do you mean by this? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
hi On Aug 16, 2004, at 7:02 AM, Chris Withers wrote:
Travis Miller wrote:
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).
Wow. Why? ;-)
why have so many portals? or why have so many in a single instance? ;-) * each of our agency divisions & clients have very unique needs and wants for plone. * seems as though one instance would be easier to administer and maintain. ???
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.
This sounds like the correct thing to do :-)
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.
Correct.
part of finding the object includes walking back up the db tree...(like acquisition?)
No idea what you mean by this.
ok. # the mount-point directive defines the point where to mount the object in the # destination db, but also tells where to pull the object from in the source db. mount-point /Portals/example.com/www so, if in the source db, i create the plone portal object(www) in the /Portals/example.com folder, the mount-point config finds that www object there and then mounts it in the same path in the destination db. however, if i create that plone portal object anywhere else along that path (/Portals/www, /www) in the source db, the same mount-point configuration finds the object and mounts it according to the mount-point directive.
obviously this is not a configuration for zeo, but the same seems to still apply when split across a zeo configuration.
What do you mean by this?
my example configurations show a single zope instance setup. the same configuration could be achieved through a zeo setup. single 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> zeo setup:: zeo.conf ------------------------------- <filestorage main> path $INSTANCE/var/Data.fs </filestorage> <filestorage com.example.www> path $INSTANCE/var/Portals/example.com/www/Data.fs </filestorage> zope.conf ------------------------------- <zodb_db main> mount-point / <zeoclient> server zeoserver:8080 storage main var $INSTANCE/var </zeoclient> </zodb_db> <zodb_db com.example.www> mount-point /Portals/example.com/www <zeoclient> server zeoserver:8080 storage com.example.www var $INSTANCE/var </zeoclient> </zodb_db> thanks, travis
Travis Miller wrote:
* seems as though one instance would be easier to administer and maintain. ???
*shrugs* I guess, but it means you have to use exactly the same server setup for each. I'd probably have done on each in their own instance..
# the mount-point directive defines the point where to mount the object in the # destination db, but also tells where to pull the object from in the source db. mount-point /Portals/example.com/www
so, if in the source db, i create the plone portal object(www) in the /Portals/example.com folder, the mount-point config finds that www object there and then mounts it in the same path in the destination db. however, if i create that plone portal object anywhere else along that path (/Portals/www, /www) in the source db, the same mount-point configuration finds the object and mounts it according to the mount-point directive.
Yeah, that's just normal acquisition happening :-)
my example configurations show a single zope instance setup. the same configuration could be achieved through a zeo setup.
Right, yep :-) And with ZEO you could split your storages across seperate servers, which is also something you may want to do if any of your sites grows significantly... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
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.
As Travis pointed out, the mount path controls not only where to mount the database, but also what bit of it to mount. You'd need to, for example, mount up your archive .fs, move everything from the root to a folder called /archive, then mount /archive in your "real" storage. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Chris Withers -
kosh -
Travis Miller