From 2a48283e53b547e879677784349c069417c88f7e Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Thu, 6 Sep 2007 23:08:21 -0700
Subject: [PATCH] provisioning: require at least one drive per server

---
 src/allmydata/provisioning.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/allmydata/provisioning.py b/src/allmydata/provisioning.py
index ae0cd8a7..bcc7a804 100644
--- a/src/allmydata/provisioning.py
+++ b/src/allmydata/provisioning.py
@@ -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)
-- 
2.45.2