=================
Operational notes
=================


Packing
=======

ZODBs packing operation ist commutative with the operation of appending
transactions, so that for a series of transactions X and a point in time T the
following holds:

pack(T) + append(X) == append(X) + pack(T)

Due to this you are free to pack storages any way you want:

- via zeopack to a zeoraid server
- via zeopack to each of the backend storages
- via pack on your application server

We do *recommend* to pack them shortly after each other to avoid application
errors WRT historical data. (Those won't be database errors but your
application will fail to undo or retrieve historical data reliably.)


Monitoring
==========

The controller script that comes with ZEORaid returns Nagios-compatible exit
codes and thus the status command can be used directly as a Nagios command.


Starting with degraded storages
===============================

ZEORaid can start with degraded storages, as long as one functioning storage
is available.

When starting with a degraded storage, make sure that the initialisation code
of that storage does not block until the storage becomes available. 

For example, ZEO client's ClientStorage will by default block until the ZEO
server becomes available. In case you want to start without the ZEO server
being available, you need to configure the option `wait false` into your
corresponding. zeoclient section.


Recovery in Multi-ZEORaid setups
================================

If multiple ZEORaid servers are used in parallel and a storage has failed then
recovery needs some extra steps:

- Stop all ZEORaid servers except one

- Recover the failed storage on the remaining ZEORaid server

- Restart the redundant ZEORaid servers

Note: Not following these steps won't cause a core meltdown, however, without
following those steps you will not be able to successfully recover a failed
storage under load. There is a feature wish recorded in launchpad that will
implement a behaviour which will allow to keep the redundant ZEORaid servers
running.
