]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Make snapshot creation trump snapshot removal.
authorAndre Noll <maan@systemlinux.org>
Wed, 26 Aug 2009 11:24:12 +0000 (13:24 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 26 Aug 2009 11:24:12 +0000 (13:24 +0200)
This patch changes the behaviour of dss in case the following three
conditions are all met:

(1) There is at least one snapshot which could be deleted
    (orphaned, redundant, outdated).
(2) Disk space is not low.
(3) A new snapshot is due.

A common case where these conditions are fulfilled is when dss is
started after it was not running for some time, for example due to
a server crash on Friday evening...

In this situation the old code created a new snapshot only after all
orphaned/redundant/outdated have been removed, which can take hours
and is not what one usually wants to happen in the above mentioned
scenario. Instead, it is desirable to create a new snapshot ASAP,
and only after this snapshot has been created, the removal of old
snapshots should take place.

This patch implements this behaviour and goes even one step further:
If disk space is not low and a new snapshot is due or being created,
dss won't trigger snapshot removal any more.

Another positive side effect of this change is that snapshot creation
times become more stable since the rsync process will only be
interrupted by a rm process if disk space is low.


No differences found