When used on "host", the device will be initialized and the OST
will be enabled. On client nodes, the OSC will be avaiable.
Requires --node
+ Optional --obduuid Specifies the UUID used for the obd.
If --lov lov_name is used, this device is added to lov.
--mtpt /mnt/point mds_name lov_name|osc_name
def error(*args):
msg = string.join(map(str,args))
- print msg
+ print "Error: ", msg
sys.exit(1)
#
if options.has_key('obdtype'):
obdtype = options['obdtype']
-
if obdtype == 'obdecho':
fstype = ''
else:
obdname = new_name('OBD_'+ node_name)
oscname = new_name('OSC_'+ node_name)
ostname = new_name('OST_'+ node_name)
- obd_uuid = new_uuid(obdname)
+ if options.has_key('obduuid'):
+ obd_uuid = options['obduuid']
+ obd = lookup(lustre, obd_uuid)
+ if obd:
+ error("Duplicate OBD UUID:", obd_uuid)
+ else:
+ obd_uuid = new_uuid(obdname)
ost_uuid = new_uuid(ostname)
osc_uuid = new_uuid(oscname)
short_opts = "ho:i:m:"
long_opts = ["ost", "osc", "mtpt", "lov=", "node=", "mds=", "net", "tcpbuf=",
"route", "router", "merge=", "format", "reformat", "output=",
- "obdtype=", "in=", "help", "batch="]
+ "obdtype=", "obduuid=", "in=", "help", "batch="]
opts = []
args = []
options = {}
usage()
for o, a in opts:
- if o in ("-h", "--help"):
- usage()
- if o in ("-o", "--output"):
- options['output'] = a
+ # Commands to create new devices
if o == "--ost":
options['ost'] = 1
if o == "--osc":
options['router'] = 1
if o == "--lov":
options['lov'] = a
- if o in ("-m", "--merge"):
- options['merge'] = a
+
+ # Options for commands
if o == "--obdtype":
options['obdtype'] = a
+ if o == "--obduuid":
+ options['obduuid'] = a
if o == "--tcpbuf":
options['tcpbuf'] = a
+
+ # lmc options
+ if o in ("-h", "--help"):
+ usage()
+ if o in ("-o", "--output"):
+ options['output'] = a
+ if o in ("-m", "--merge"):
+ options['merge'] = a
if o == "--format":
options['format'] = 1
if o == "--reformat":