ssgrowd Copyright 2005 Matt Griswold, dev/IT Released under the GNU General Public License, see COPYING Latest version at http://oss.devit.com/matt/#ssgrowd ################################################################################ # description ssgrowd is a simple daemon that checks LVM snapshots and grows the diff space if needed. It requires both libdevmapper and liblvm. ################################################################################ # config check src/config.h for user changable variables: CHUNK_SZ - size to grow by in megs THRESHOLD_SZ - megs left on snapshot that will trigger grow CYCLE_TIME - number of microseconds between checks In a nutshell, every CYCLE_TIME it checks all LVM snapshots and if the diff space is less than THRESHOLD_SZ, it extends it by CHUNK_SZ. The defaults are not heavily tested, I imagine that some tweaking could be in order. One thing you'll want to watch for is making sure that you check often enough and grow by enough that you're growing faster than is possible for your disc to write. ** WARNING ** While I do use this and haven't encountered a problem yet, I don't claim that it is without flaw. If a snapshot overflows it's diff space, it WILL corrupt the whole snapshot partition, so make sure you set the timing variables appropiately. ################################################################################ # installation LVM2_SRCDIR must be set to the location of your LVM2 source directory, either edit src/Makefile and set it or pass on the command line to make. It is used to link to the static LVM library, so make sure that's built before hand. add -DDEBUG to CFLAGS for debug information add -DTIMEXEC to CFLAGS for loop timing to build it, type make or make LVM2_SRCDIR= make install will install ssgrowd to $(prefix)/sbin ssgrowd.init is a sys v start up script, copy it to /etc/init.d/ssgrowd and link if you wish to make it run at start up. ################################################################################ # use ssgrowd will start the daemon and fork into the background. To see the command line options, use ssgrowd --help. ################################################################################ # contact Questions, comments, bugs, etc. Matt Griswold 0x6B2E514F 6CF4 A97B 55A5 BBD6 FF06 6F0B F99D 7C86 6B2E 514F http://oss.devit.com/matt/