[DRBD-user] Life cycle od drbd 8.0.x && snapshots in drbd (not lvm)

Martin Gombac( martin at isg.si
Fri Oct 23 16:12:06 CEST 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


how long will 8.0.* be supported? By that i mean receiving bug fixes?
I'm currently choosing between 8.0 and 8.3 drbd centos packages.

In 2004 Lars wrote this:
The problem is: snapshotting a DRBD device.
For *why* this might be a problem, read the other thread again ;)

  "consistent" denotes data that is useable, but usually needs a
  journal replay/undo of certain pending transactions, or even a
  short fsck or similar, to actually be clean.

  "clean" denotes data that is consistent
  and has *no* pending transactions.

To snapshot a DRBD device, you have several options.

You can use LVM2 on top of DRBD. Then for the process of taking
	the snapshot, you can ignore DRBD, and just do as usual.
	You need to take the snapshot on the DRBD primary!

	For LVM2 on top of DRBD, you need to configure certain
	filter settings, otherwise LVM would bypass DRBD and
	recognize and access the lower level devices directly.
	See: http://thread.gmane.org/gmane.linux.network.drbd/4813

If you insist on using DRBD on top of LVM,
	you can still do clean snapshots, you do not need to stop
	drbd, you do not need to make the primary secondary, you
	can take the snapshot on either node.
	But you will have a *short downtime*, as long as it takes
	to shut down all services cleanly, umount, create the
	snapshot, mount, and start the services again.

If you don't care about a the *cleanness*, and are satisfied with
	a merely consistent snapshot (see Definition above), just
	do your snapshot anytime and any node, ignoring the
	existence of DRBD... and if it does not work, (you are not
	able to access or use it, because it is not clean enough),
	try again: snapshot creation is racing with the users
	modifing the device (applications and file system) for a
	clean view of the data.

There are file systems that have their own suspend and resume
hooks. One of them is XFS, which will only work with DRBD 0.7+
If you happen to use some of these, you can always do a clean
snapshot by suspending the active (mounted) file system,
creating the snapshot, and tell the fs to resume again.

Eventually we will built in into the user space tools or into the
module, or both, some hooks to guarantee a clean snapshot.
This does not seem to be that difficult, but it will take some
time to do it right, and somebody just has to do it :)


	Lars Ellenberg

Is this ready yet or should i just put lvm on top of drbd and use lvm 
for snapshots?


More information about the drbd-user mailing list