rc = client_obd_disconnect(obd, cobd->master_real_exp, 0);
rc = client_obd_connect(obd, cobd->cache_exp, &conn,
- NULL, 0);
+ NULL, OBD_OPT_REAL_CLIENT);
if (rc)
GOTO(out, rc);
cobd->cache_real_exp = class_conn2export(&conn);
rc = client_obd_disconnect(obd, cobd->cache_real_exp, 0);
rc = client_obd_connect(obd, cobd->master_exp, &conn,
- NULL, 0);
+ NULL, OBD_OPT_REAL_CLIENT);
if (rc)
GOTO(out, rc);
cobd->master_real_exp = class_conn2export(&conn);
COBD_MDS=${COBD_MDS:-"cobd_mds"}
COBD_OST=${COBD_OST:-"cobd_ost"}
CMOBD_MDS=${CMOBD_MDS:-"cmobd-mds"}
-CMOBD_MDS2=${CMOBD_MDS2:-"cmobd-mds2"}
MASTER_LMV=${MASTER_LMV1:-master-lmv1}
CACHE_LMV=${MASTER_LMV1:-cache-lmv1}
--fstype $BACK_FSTYPE --dev $MDS2_MASTER_DEV --size $MDSSIZE \
--lmv $MASTER_LMV --format || exit 10
-${LMC} -m $config --add lov --lov $MASTER_LOV --lmv $CACHE_LMV \
+${LMC} -m $config --add lov --lov $CACHE_LOV --cachelmv $CACHE_LMV --masterlmv $MASTER_LMV \
--stripe_sz $STRIPE_SIZE --stripe_cnt $STRIPECNT --stripe_pattern 0 || exit 20
-${LMC} -m $config --add lov --lov $CACHE_LOV --lmv $MASTER_LMV \
---stripe_sz $STRIPE_SIZE --stripe_cnt $STRIPECNT --stripe_pattern 0 || exit 20
-
-${LMC} -m $config --add ost --ost $MASTER_OST --node $NODE --lov $MASTER_LOV \
---fstype $BACK_FSTYPE --dev $OST_MASTER_DEV --size $OSTSIZE || exit 21
-
${LMC} -m $config --add ost --ost $CACHE_OST --node $NODE --lov $CACHE_LOV \
--fstype $BACK_FSTYPE --dev $OST_CACHE_DEV --size $OSTSIZE || exit 21
${LMC} -m $config --add cobd --node $NODE --cobd $COBD_MDS \
--master_obd $MASTER_LMV --cache_obd $CACHE_LMV || exit 22
-${LMC} -m $config --add cobd --node $NODE --cobd $COBD_OST \
---master_obd $MASTER_LOV --cache_obd $CACHE_LOV || exit 22
-
${LMC} -m $config --add mtpt --node $NODE --path /mnt/lustre \
---lmv $COBD_MDS --lov $COBD_OST || exit 30
+--lmv $COBD_MDS --lov $CACHE_LOV || exit 30
+
+${LMC} -m $config --add cmobd --node $NODE --cmobd $CMOBD_MDS \
+--master_obd $MASTER_LMV --cache_obd $CACHE_MDS1 || exit 23
+
elif master_class == 'mds':
self.master = get_mdc(db, self.name, self.master_uuid)
elif master_class == 'lmv':
- client_uuid = "%s_lmv_master_UUID" % (self.name)
+ #tmp fix: cobd and cmobd will use same uuid, so use const name here
+ client_uuid = "%s_lmv_master_UUID" % "master"
self.master = LMV(master_obd, client_uuid, self.name);
else:
panic("unknown master obd class '%s'" %(master_class))
elif cache_class == 'mds':
self.cache = get_mdc(db, self.name, self.cache_uuid)
elif cache_class == 'lmv':
- client_uuid = "%s_lmv_cache_UUID" % (self.name)
+ client_uuid = "%s_lmv_cache_UUID" % (self.name)
self.cache = LMV(cache_obd, client_uuid, self.name);
else:
panic("unknown cache obd class '%s'" %(cache_class))
elif master_class == 'mds':
self.master = get_mdc(db, name, self.master_uuid)
elif master_class == 'lmv':
- client_uuid = "%s_lmv_master_UUID" % (self.name)
+ #tmp fix: cobd and cmobd will use same uuid, so use const name here
+ client_uuid = "%s_lmv_master_UUID" % "master"
self.master = LMV(master_obd, client_uuid, self.name);
else:
panic("unknown master obd class '%s'" %(master_class))
elif cache_class == 'mds':
self.cache = get_mdc(db, name, self.cache_uuid)
elif cache_class == 'lmv':
- client_uuid = "%s_lmv_cache_UUID" % (self.name)
+ client_uuid = "%s_lmv_cache_UUID" % "cache"
self.cache = LMV(cache_obd, client_uuid, self.name);
else:
panic("unknown cache obd class '%s'" %(cache_class))
ret = 40
elif type in ('lmv',):
ret = 45
- elif type in ('cmobd',):
- ret = 50
elif type in ('mountpoint', 'echoclient'):
- ret = 70
+ ret = 60
+ elif type in ('cmobd',):
+ ret = 70
else:
panic("Unknown type: ", type)
('master_obd', "Specify the real device for the cache obd system.", PARAM),
('cache_obd', "Specify the cache device for the cache obd system.", PARAM),
('cobd', "Specify COBD name", PARAM),
+ ('cachelmv', "Specify cache lmv name", PARAM, ""),
+ ('masterlmv', "Specify master lmv name", PARAM, ""),
# cmobd
('master_obd', "Specify the master device for the cmobd system.", PARAM),
""" create a lov """
lmv_name = get_option(options, 'lmv')
+ cache_lmv_name = get_option(options, 'cachelmv')
+ master_lmv_name = get_option(options, 'masterlmv')
lov_orig = get_option(options, 'lov')
name = new_name(lov_orig)
if name != lov_orig:
warning("name:", lov_orig, "already used. using:", name)
mds_name = get_option(options, 'mds')
- if not mds_name and not lmv_name:
+ if not mds_name and not lmv_name and not cache_lmv_name and not master_lmv_name:
error("LOV: MDS or LMV must be specified.");
stripe_sz = get_option_int(options, 'stripe_sz')
lmv = findByName(lustre, lmv_name, "lmv")
lmv.appendChild(gen.ref("lovconfig", lovconfig_uuid))
lmv.appendChild(gen.ref("client", uuid))
+
+
+ if cache_lmv_name:
+ lmv = findByName(lustre, cache_lmv_name, "lmv")
+ lmv.appendChild(gen.ref("lovconfig", lovconfig_uuid))
+ lmv.appendChild(gen.ref("client", uuid))
+
+ if master_lmv_name:
+ lmv = findByName(lustre, master_lmv_name, "lmv")
+ lmv.appendChild(gen.ref("lovconfig", lovconfig_uuid))
+ lmv.appendChild(gen.ref("client", uuid))
lovconfig = gen.lovconfig(lovconfig_name, lovconfig_uuid, uuid)
lustre.appendChild(lovconfig)