]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
provisioning: require at least one drive per server
authorBrian Warner <warner@lothar.com>
Fri, 7 Sep 2007 06:08:21 +0000 (23:08 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 7 Sep 2007 06:08:21 +0000 (23:08 -0700)
src/allmydata/provisioning.py

index ae0cd8a7490a316e660b2a1da8487f19e61d53ed..bcc7a804e35c8461709a797fc0054ada644752fc 100644 (file)
@@ -557,8 +557,9 @@ class ProvisioningTool(rend.Page):
                              number(total_file_check_rate,
                                     "Hz")])
 
-            total_drives = mathutil.div_ceil(int(total_share_space),
-                                             int(drive_size))
+            total_drives = max(mathutil.div_ceil(int(total_share_space),
+                                                 int(drive_size)),
+                               num_servers)
             add_output("Drives",
                        T.div["Total drives: ", number(total_drives), " drives"])
             drives_per_server = mathutil.div_ceil(total_drives, num_servers)