From ccaa0d56574c58886ccfa5ce0e51d70eb2443b46 Mon Sep 17 00:00:00 2001
From: rread <rread>
Date: Wed, 30 Oct 2002 18:38:36 +0000
Subject: [PATCH] * add --fstype arg to both --mds and --ost eg:    lmc ...
 --node node --fstype ext3 --mds mds1 $MDSDEV $MDSSIZE    lmc ... --node node
 --fstype ext3 --ost $OSTDEV $OSTSIZE

---
 lustre/utils/lmc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lustre/utils/lmc b/lustre/utils/lmc
index 6f34b2b84a..2477170ca2 100755
--- a/lustre/utils/lmc
+++ b/lustre/utils/lmc
@@ -476,6 +476,8 @@ def add_route(gen, lustre, options, args):
 
 
 def add_mds(gen, lustre, options, args):
+    fstype = 'extN'
+
     if len(args) < 1:
         usage()
 
@@ -484,6 +486,9 @@ def add_mds(gen, lustre, options, args):
     else:
         error("--mds requires a --node argument")
 
+    if options.has_key('fstype'):
+        fstype = options['fstype']
+
     mds_name = new_name(options['mds'])
     if mds_name != options['mds']:
         warning("name:", options['mds'], "already used. using:", mds_name)
@@ -504,7 +509,7 @@ def add_mds(gen, lustre, options, args):
         error("NODE: ", node_name, "not found")
 
 
-    mds = gen.mds(mds_name, mds_uuid, "extN", devname, get_format_flag(options),
+    mds = gen.mds(mds_name, mds_uuid, fstype, devname, get_format_flag(options),
                   net_uuid, node_uuid, dev_size=size)
     lustre.appendChild(mds)
                    
@@ -526,6 +531,8 @@ def add_ost(gen, lustre, options, args):
 
     if options.has_key('obdtype'):
         obdtype = options['obdtype']
+    if options.has_key('fstype'):
+        fstype = options['fstype']
     if obdtype == 'obdecho':
         fstype = ''
     else:
@@ -660,7 +667,7 @@ def parse_cmdline(argv):
     short_opts = "ho:i:m:"
     long_opts = ["ost", "osc", "mtpt", "lov=", "node=", "mds=", "net", "tcpbuf=",
                  "route", "router", "merge=", "format", "reformat", "output=",
-                 "obdtype=", "obduuid=", "in=", "help", "batch="]
+                 "obdtype=", "fstype=", "obduuid=", "in=", "help", "batch="]
     opts = []
     args = []
     options = {}
@@ -694,6 +701,8 @@ def parse_cmdline(argv):
         # Options for commands
         if o == "--obdtype":
             options['obdtype'] = a
+        if o == "--fstype":
+            options['fstype'] = a
         if o == "--obduuid":
             options['obduuid'] = a
         if o == "--tcpbuf":
-- 
GitLab