From: Brian Warner Date: Sun, 16 Jan 2011 20:58:22 +0000 (-0800) Subject: Set "reserved_space=1G" in newly-created storage nodes. Closes #1208. X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=45212d800043f05f749ae565f178ba9557215b06;p=tahoe-lafs%2Ftahoe-lafs.git Set "reserved_space=1G" in newly-created storage nodes. Closes #1208. --- diff --git a/docs/configuration.rst b/docs/configuration.rst index e350c8a4..73ae3a24 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -359,6 +359,10 @@ Storage Server Configuration same thing. Likewise, "1MiB", "1024KiB", and "1048576B" all mean the same thing. + "``tahoe create-node``" generates a tahoe.cfg with + "``reserved_space=1G``", but you may wish to raise, lower, or remove the + reservation to suit your needs. + ``expire.enabled =`` ``expire.mode =`` diff --git a/src/allmydata/scripts/create_node.py b/src/allmydata/scripts/create_node.py index 928add11..26891b91 100644 --- a/src/allmydata/scripts/create_node.py +++ b/src/allmydata/scripts/create_node.py @@ -126,7 +126,7 @@ def create_node(config, out=sys.stdout, err=sys.stderr): storage_enabled = not config.get("no-storage", None) c.write("enabled = %s\n" % boolstr[storage_enabled]) c.write("#readonly =\n") - c.write("#reserved_space =\n") + c.write("reserved_space = 1G\n") c.write("#expire.enabled =\n") c.write("#expire.mode =\n") c.write("\n") diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index b8e9b8a6..b8aa298d 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -213,6 +213,7 @@ class CreateNode(unittest.TestCase): self.failUnless("\n[storage]\nenabled = false\n" in content) else: self.failUnless("\n[storage]\nenabled = true\n" in content) + self.failUnless("\nreserved_space = 1G\n" in content) # creating the node a second time should be rejected rc, out, err = self.run_tahoe(argv)