From eb553c25475bd00828787574d3ec300b75b1bd11 Mon Sep 17 00:00:00 2001 From: rread Date: Mon, 16 Sep 2002 19:35:31 +0000 Subject: [PATCH] * print a message when a duplicate mds or lov name is used --- lustre/utils/lmc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lustre/utils/lmc b/lustre/utils/lmc index 57620d9..bb6377f 100755 --- a/lustre/utils/lmc +++ b/lustre/utils/lmc @@ -113,6 +113,10 @@ def error(*args): print "Error: ", msg sys.exit(1) +def warning(*args): + msg = string.join(map(str,args)) + print "Warning: ", msg + # # manage names and uuids # need to initialize this by walking tree to ensure @@ -481,6 +485,8 @@ def add_mds(gen, lustre, options, args): error("--mds requires a --node argument") mds_name = new_name(options['mds']) + if mds_name != options['mds']: + warning("name:", options['mds'], "already used. using:", mds_name) devname = args[0] if len(args) > 1: size = args[1] @@ -585,7 +591,10 @@ def add_lov(gen, lustre, options, args): if len(args) < 4: usage() - name = options['lov'] + name = new_name(options['lov']) + if name != options['lov']: + warning("name:", options['lov'], "already used. using:", name) + mds_name = args[0] stripe_sz = args[1] stripe_count = args[2] -- 1.8.3.1