[Dirvish] Oregon State Open Source Labs moving to dirvish

ml-it-dirvish at epigenomics.com ml-it-dirvish at epigenomics.com
Fri Oct 7 16:22:12 PDT 2005


On Wed, 5 Oct 2005 10:47:24 +0200,
 Leo Baltus <Leo.Baltus at tech.omroep.nl> wrote:
> BTW You can run multiple vaults in parallel. Just move your Runall and
> Dirvish  clauses away from master.conf and in as many .conf files as you
> would like to have parallel processes.
> Then let cron start:
> ... dirvish-runall --config /etc/dirvish/foo.conf
> ... dirvish-runall --config /etc/dirvish/bar.conf
>
> It would be nice however to let dirvish figure out which vault to
> handle in which process.

Hi!

Thanks for that hint in the right direction.

I rewrote the dirvish-cronjob script to contain something like this:

-- snip --

for vaultconf in /etc/dirvish/vaults/*.conf ; do

  vault=`basename $vaultconf .conf`
  vaultdir=$bank/$vault

  (
    echo `date '+%Y-%d-%m %H:%M:%S'` starting $vault

    /usr/sbin/dirvish-expire --vault $vault

    echo `date '+%Y-%d-%m %H:%M:%S'` dirvish-expire $vault returns $?

    /usr/sbin/dirvish-runall --config $vaultconf

    echo `date '+%Y-%d-%m %H:%M:%S'` dirvish-runall $vault returns $?

    #
    # bind the latest image to a directory named current
    #
    if [ $? -eq 0 -a -d $vaultdir/current ]; then
      umount -v $vaultdir/current
      mount -v --bind $vaultdir/`/bin/ls -r $vaultdir |grep -v dirvish|grep -v current | head -1` $vaultdir/current
    fi

  ) &

done

-- snap --

This assumes a master.conf containing everything as usual except for
Runall: entries. These are put into separate files (one for each vault)
in /etc/dirvish/vaults. The loop figures out the vaultname from the
.conf file and calls dirvish-expire and dirvish-runall just for this
vault. Such a vault.conf file looks like:

Runall:
        vaultname 22:00
config: /etc/dirvish/master.conf

This runs every vault in parallel. It works for me.

Greetings
-- 
Robert Sander                     Senior Manager Information Systems
Epigenomics AG    Kleine Praesidentenstr. 1    10178 Berlin, Germany
phone:+49-30-24345-330                          fax:+49-30-24345-555
http://www.epigenomics.com             robert.sander at epigenomics.com


More information about the Dirvish mailing list