Zumastor controls snapshotting and remote replication of Linux block devices (volumes), and works with most common filesystems.
A snapshot is a view of the volume as it existed at a point in time. The administrator can trigger a snapshot manually, or ask Zumastor to take scheduled snapshots periodically (e.g. daily or hourly). Up to 64 snapshots are supported per volume. All snapshots for a particular volume are stored in a second block device, called the snapshot store, and can be accessed via virtual devices provided by ddsnap(8). Zumastor mounts the snapshots for volume 'foo' at /var/run/zumastor/volumes/foo-snapshots, and optionally also in the special directory .snapshot inside the root of the volume. Zumastor can also export the snapshots via NFS and/or Samba without manual edits of NFS or Samba configuration files.
Replication means sending snapshots from a local (or upstream) machine to a remote (or downstream) machine. When a volume is first replicated, its entire contents are sent. When it is replicated a second time, only the changed blocks are sent. The snapshot data can also be compressed during transmission to save bandwidth. Not all snapshots on a volume are replicated; you can do hourly snapshots, but only replicate once per day. On downstream machines, the downstream volume is always identical to the latest received snapshot. When a new snapshot arrives from upstream, the main volume is flipped transparantly to the new snapshot. If the main volume was being exported via NFS, clients who access that volume via NFS see the new snapshot contents as expected.
Define a new zumastor volume named volume based on the underlying volumes orgdev and snapdev. If specified, the metadev will be used for snapshot metadata storage (especially useful for NVRAM acceleration). If the initialize option is used, the newly created volume data will be overwritten with zeros, overwriting all data on the origin device.
The snapshot block and chunk sizes can be specified with the blocksize and chunksize options, respectively. They may only differ if separate metadata and snapshot devices are specified. Note that these values must be specified as powers of two and must be larger than 512 bytes.
The amount of RAM dedicated to the snapshot store cache defaults to min(128MB, system RAM/4), and can be tuned manually with the cachesize option. For instance, to increase the cache size to 512MB, use --cachesize 512M.
A mountpoint may be defined for the volume with the mountpoint option. It must be a directory with no other file system mounted there. Mount options that apply to that mount point may be defined with the mountopts option. The snapshot mountpoint under which the volume snapshots are mounted can be defined with the snappath option.
Used after define volume to specify the snapshot rotation for the volume. Each of snapshots is the maximum number of snapshots that will be held for the respective snapshot rotation interval. If this volume was previously a replication target, removes the source definition, since it is now a master. If volume is already defined, just updates the rotation limits.
By default, each newly created snapshot is mounted under the snapshot mountpoint specified by define volume, with each snapshot named for its creation time. But if the no-snapmount option is specified, the newly created snapshot will NOT be mounted. If the export option is used, each mounted snapshot will be exported via NFS. If the samba option is used, each mounted snapshot will be bind mounted to a directory following Samba's '@GMT-creation-time' naming convention under the volume mount point, and will be accessible via Samba's previous version interface. If the dotsnapshot option is used, the snapshot mountpoint will be bind mounted to the .snapshot directory under the volume mount point. If the no-snapmount option is specified, the export, samba, and dotsnapshot options will be ignored.
Used after define volume to specify the upstream host that is expected to replicate snapshots to this volume. If the volume was previously a master volume, removes the master definition, since it is now a replication target. If the optional interval (in seconds) is specified, the upstream server will be asked for updates at this interval and when the volume is started. It should be smaller than the automatic replication interval configured for this target on the upstream host. The name option allows you to specify a different remote_volume name on the upstream host. The yes option answers yes to all prompts.
Used after define volume to specify a downstream host to which the volume will be replicated to. If the optional interval (in seconds) is specified, the target (downstream) server will be replicated to at the given interval. The name option allows you to specify a different remote_volume name on the downstream host. The test option is used for testing purpose.
Stop automatic snapshotting and/or replication for volume and remove it from the zumastor database.
Stop automatic replication for a volume target and remove the target from the zumastor database.
Explicitly initiate a volume snapshot within the specified snapshot rotation. If no rotation type is specified, a manual snapshot is taken. A manual snapshot exists outside of the normal replication cycle is taken and a device mapper device is created. You must check the log file /var/log/zumastor/volume/master.log to determine the snapshot number. A device will be created on /dev/mapper/volume(snapshot_number). For manual snapshots, the usecount will drop to zero and the device will not be created after a zumastor is restarted.
Explicitly initiate a volume replication cycle to the specified host. If snap is specified then the snapshot with id snap will be replicated, unless a more recent snapshot has already been replicated. If snap is omitted then the most recent volume snapshot will be replicated. If seconds is specified, the script will sleep for the specified number of seconds before triggering a replication cycle. This is used internally to support periodic replication. The default is 0, meaning immediately.
Resize the origin/snapshot/metadata device of a zumastor volume to newsize.
Display the status of all the volumes if given no arguments. If a volume is given, only information for that volume is shown. If a snapshot id, snap, is given in additional, only the status of that single snapshot is displayed. The --usage argument displays additional snapshot usage information.
# Creating a snapshot schedule that will keep the last 5 hours as snapshots
zumastor project page: http://code.google.com/p/zumastor/