News | Overview | One Solution | License | How to get it working | Links

How to get it working

get it

The sources are kept in sourceforce CVS. To check them out, do this:

cvs -d co drbs

a nightly CVS-tarball is also available.


I am in the transistion to use autoconf for this project, please report any glitches of the build system (and send a patch to fix them, if possible).

run the buildconf script to generate the configure script and the Makefiles, after that, a simple make should build the binaries

I am aware that some checks are missing (e.g. boost is used but not checked. If anybody could lend a hand and send a patch for the build script, that would be nice.

a simple "make" should build 3 executables: blobmaster, blobserver and blobclient.


Right now the blobmaster has its listenport hardwired (it's 8000, you could change this). The blobmaster is not detaching, just start it in it's own shell:

ctrl-c will stop the blobmaster.

the blobservers need its working directory. You could prepare them for 10 blobservers:

for p in `seq 10000 10009` ; do mkdir -p root_$p/files root_$p/logs ; done

now you could start 10 blobserver, to listen on the port range 10000-10009:

for p in `seq 10000 10009` ; do ./blobserver -l $p -r  `pwd`/root_$p ; done

to stop the blobservers all, just do:

killall blobserver.

Right now, the blobmaster has to run alredy , to start the blobserver.

When the blobmaster and the blobserver are running, then you could start using the blobclient:

joerg@dilbert:/fs1/home/joerg/src/drbs>./blobclient --upload md5.o
upload: file: md5.o
do_upload, masterhost:localhost, masterport: 8000
replF written
blobid: 2
blobservercount: 3
File 'md5.o', len: 7684
will call do_upload_to_blobserver: []
do_upload_to_blobserver: 10006
writen: 7684, blobid: 2, filelen: 7684
will call do_upload_to_blobserver: []
do_upload_to_blobserver: 10001
writen: 7684, blobid: 2, filelen: 7684
will call do_upload_to_blobserver: []
do_upload_to_blobserver: 10003
writen: 7684, blobid: 2, filelen: 7684
uploads_to_bs_ok: 3
upload done

Here the example file md5.o is uploaded, the blobid is "2". The blob was stored on the servers with the ports 10006, 10001, 10003.

You could retrieve the blob:

joerg@dilbert:/fs1/home/joerg/src/drbs> ./blobclient --download 2 foobar
download: blobid: 2 -> file: foobar
blobservercount: 3
get the blob from port: 10006
ok: y
filelen: 7684
download done 
joerg@dilbert:/fs1/home/joerg/src/drbs> l foobar
-rw-r--r--    1 joerg    users        7684 2004-05-23 10:56 foobar
joerg@dilbert:/fs1/home/joerg/src/drbs> cmp foobar md5.o 

you see, that you have to decide the filename to which it should be downloaded (drbs only knows about blobs, not about meta file information).

That it right now. Feedback is welcome. If you have e.g. build problems just drop me a mail: Logo Copyright © 2004 by Jörg Beyer. All rights reserved.