[tahoe-dev] Build problems: using installed packages, and install failure

Brian Warner warner at lothar.com
Sat Jan 30 22:53:58 UTC 2010

Jack Lloyd wrote:

> An unrelated question about something that will matter to me in about
> 6 months: is there a way to reduce the space allocated to a Tahoe
> node?  Say, it is set up to use 10 Gb of space, but then free disk
> starts running low, and I want to reduce it to 8. Obviously I could
> kill the node and then restart from nothing, but it would be nice if
> there is a clean way to randomly remove N% of the current shares
> leaving the rest intact. (Obviously at an architecture level Tahoe
> deals with that beautifully, but I haven't noticed anything on the
> management side to actually do it).

The easiest way to do that is to rm -rf the prefix directories until
you've gotten down to the space you want:

 cd BASEDIR/storage/shares
 rm -rf 22
 rm -rf 23
 rm -rf 2a

Thanks to the way tahoe computes storage index strings, this is
effectively random (and uniform, if there are enough shares). Don't
delete the incoming/ directory (although it should get remade if
necessary). You can probably do this while the node is running (there
might be a tiny window between a mkdir and a rename where the server
might experience an exception if you delete the directory it's about to
use, but that should only hurt the one share that was being uploaded at
the time, and from the client's point of view, that's indistinguishable
from deleting the directory a moment after they'd uploaded the share).

You can delete several at once (e.g. rm -rf 2?) to go faster. The
prefixes are the first two characters of a base32 string, so in a
well-populated server there will be 1024 of them, so deleting "2?" will
delete about 3% of the shares.


More information about the tahoe-dev mailing list