Personal tools
From JonDonym Wiki
Jump to: navigation, search

En2.png De2.png    <- prev | Content | next ->

Contents

Setup a Tahoe-LAFS storage node

Tahoe-LAFS is used by JonDonym to offer a storage grid. The nodes are operated by verified operators. The following howto describes a setup of a storage node. To avoid decryption of stored data by node operators, each operator can setup max. 2 storage nodes.

Requirements

Tahoe-LAFS is written in Python. In order to install the software you have to install first unzip make, gcc, g++, python, python-dev and it is recommed to install the Python libraries Python-SetupTools, Python-GMP, Python-OpenSSL, Python-Twisted and Python-Foolscap too. For Debian/Ubuntu servers you can do this job with aptitude:

aptitude install unzip make gcc g++ python python-dev python-setuptools python-gmpy python-openssl python-twisted libssl-dev

Download and compile Tahoe-LAFS

You can download the latest stable release of Tahoe-LAFS from the project download website. Unpack the archive and run "python setup.py build". We recommend the installation in a subdirectory of /opt.

# cd /opt
# wget http://tahoe-lafs.org/source/tahoe-lafs/releases/allmydata-tahoe-x.y.z.zip
# unzip allmydata-tahoe-x.y.z.zip
# cd allmydata-tahoe-x.y.z
# python setup.py build
# chmod -R go+r /opt/allmydata-tahoe-x.y.z

The last step is needed because the tahoe daemon should not run with root privileges and the setup does not set the permissions of some files correct.

Hint: You need at least 64MB free disk space in /tmp. Default installation for vservers ist 16MB for /tmp. Please increase the size for /tmp if needed bevor you run the setup.

Create a new system user the daemon

It is not recommeded to run the tahoe daeon with root privileges.

# adduser --quiet --system --disabled-password --home /var/lib/tahoe --shell /bin/sh --group tahoe-daemon

Hint: A subdirectory of $HOME may contain the stored data. Please create $HOME of the user tahoe-daemon on the device, you want to use for the date store.

Create and configure the storage node

You have to create a template for the configuration files of your storage first. We use the $HOME directory of the user tahoe-daemon for all configuration and storage data. You can replace $HOME by any other empty directory. In this case you have to adapt the other commands too.

# su tahoe-daemon
$ /opt/allmydata-tahoe-x.y.z/bin/tahoe create-node $HOME

Afterwards you have to edit the configuration file tahoe.cfg. In the section [node] you have to set a name for your node. Please use your operator name with 1 or 2 for your nodes. You can setup at max. 2 storage nodes.

[node]
nickname = operatorname1|2

If your server have more than one IP address, please choose one IP address for the tub.location. With this IP address your node will be listed at the status page. The tub.port you will find in the configuration file client.port.

tub.port = 12345
tub.location = 123.123.123.123:12345


In the section [client] of the configuration file tahoe.cfg you have to set the introducer address. You will get this value from JonDos. It looks like:

[client]
introducer.furl = pb://piqnxz5dsfkjbs3454cf4gvczu@123.123.123.123:56789/introducer


In the section [storage] of the configuration file tahoe.cfg you can configure your storage space and the duration, how long uploaded data are stored. We want to keep data for 1-2 month. Nodes with small storage space (< 500 GB) keep uploaded data for one month, other nodes for 2 month.

[storage]
enabled = true
#readonly =
reserved_space = 20GB
expire.enabled = True
expire.mode = age
expire.override_lease_duration = 1 month   # if your node have less than 500 GB disk space
expire.override_lease_duration = 2 month   # if your node have more than 500 GB disk space

reserved_space defines how much disk space is reserved: the storage server will not accept any data that causes the amount of free disk space to drop below this value.

Start/Stop the storage node

For start and stop of the storage node switch to the daemon UID and use the following commands:

# su tahoe-daemon
$ /opt/allmydata-tahoe-x.y.z/bin/tahoe start $HOME
$ /opt/allmydata-tahoe-x.y.z/bin/tahoe restart $HOME
$ /opt/allmydata-tahoe-x.y.z/bin/tahoe stop $HOME

If you did not create the the node in $HOME you to replace $HOME by the directory you used for create-node.

A sys-V-init script for Linux server is coming soon as possible.

It will take a few minutes and your storage node will be visible at the JonDonym Storage Server Status.


Wir speichern nicht