From 79e8240429ab4d2f03a766ad43cb80e9f4651f58 Mon Sep 17 00:00:00 2001
From: Manuel Franceschini <manuel.franceschini@gmail.com>
Date: Wed, 19 Mar 2008 10:47:30 +0000
Subject: [PATCH] Add option to change default file_storage_dir

Author: manuel.franceschini
Reviewed-by: iustinp
---
 scripts/gnt-cluster | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster
index 492ebee21..f0c65132f 100755
--- a/scripts/gnt-cluster
+++ b/scripts/gnt-cluster
@@ -44,7 +44,8 @@ def InitCluster(opts, args):
                              vg_name=opts.vg_name,
                              mac_prefix=opts.mac_prefix,
                              def_bridge=opts.def_bridge,
-                             master_netdev=opts.master_netdev)
+                             master_netdev=opts.master_netdev,
+                             file_storage_dir=opts.file_storage_dir)
   SubmitOpCode(op)
   return 0
 
@@ -315,6 +316,12 @@ commands = {
                           " [%s]" % constants.DEFAULT_BRIDGE,
                         metavar="NETDEV",
                         default=constants.DEFAULT_BRIDGE,),
+            make_option("--file-storage-dir", dest="file_storage_dir",
+                        help="Specify the default directory (cluster-wide)"
+                             " for storing the file-based disks [%s]" %
+                             constants.DEFAULT_FILE_STORAGE_DIR,
+                        metavar="DIR",
+                        default=constants.DEFAULT_FILE_STORAGE_DIR,),
             ],
            "[opts...] <cluster_name>",
            "Initialises a new cluster configuration"),
-- 
GitLab