Whamcloud - gitweb
Branch b1_4_newconfig2
authornathan <nathan>
Wed, 3 Aug 2005 23:55:42 +0000 (23:55 +0000)
committernathan <nathan>
Wed, 3 Aug 2005 23:55:42 +0000 (23:55 +0000)
b=6663
remove client llogs from mkfs.lustre

lustre/ldlm/ldlm_lib.c
lustre/utils/mkfs_lustre.c
lustre/utils/module_setup.sh

index 5155c7c..803fdb4 100644 (file)
@@ -189,7 +189,7 @@ int mgc_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
         int rc;
         ENTRY;
 
-        if (!strcmp(name, LUSTRE_MGC_NAME)) {
+        if (strcmp(name, LUSTRE_MGC_NAME) == 0) {
                 rq_portal = MGS_REQUEST_PORTAL;
                 rp_portal = MGC_REPLY_PORTAL;
                 connect_op = MGS_CONNECT;
index 02cecd5..b33eb7d 100644 (file)
@@ -557,10 +557,8 @@ static int load_modules(struct mkfs_opts *mop)
         rc = load_module("_lustre");
         if (rc) return rc;
 
-        if (IS_OST(&mop->mo_ldd)) 
-                rc = load_module("oss");
-        if (IS_MDT(&mop->mo_ldd)) 
-                rc = load_module("mds");
+        /* FIXME currently use the MDT to write llogs, should be a MGS */
+        rc = load_module("mds");
         vprint("done\n");
         return rc;
 }
@@ -791,11 +789,14 @@ int write_llog_files(struct mkfs_opts *mop)
                 /* Write client startup logs */
                 numnids = jt_getnids(nidarray, 
                                      sizeof(nidarray) / sizeof(nidarray[0]));
+#if 0
+//Let the MGS create the client logs after the MDT has registered 
                 if (numnids <= 0) {
                         fprintf(stderr, "%s: Can't figure out local nids, "
                                 "skipping client log creation\n", progname);
                         goto out_jt;
                 }
+
                 snprintf(mdcname, sizeof(mdcname), "%s-mdc", 
                          mop->mo_ldd.ldd_fsname);
                 while (numnids) {
@@ -818,15 +819,18 @@ int write_llog_files(struct mkfs_opts *mop)
 #12 L add_uuid nid=c0a80202 nal_type=0 0:(null) 1:NID_uml2_UUID
 #13 L add_conn 0:MDC_uml1_mdsA_MNT_client 1:NID_uml2_UUID
                 */
-                //FIXME use gethostname for nid uuid? 
+                        /* FIXME we need to put _all_possible_nids_ for 
+                           every server in the client startup llog.  client
+                           will then choose which nid to use. */
                         do_jt(jt_lcfg_add_uuid, "add_uuid", 
                               mop->mo_ldd.ldd_svname /*FIXME mds name */,
                               libcfs_nid2str(mop->mo_hostnid.primary), 0);
                         do_jt(jt_lcfg_attach,   "attach", "mdc", mdcname, 
                               mdcname/*uuid*/, 0);
                         do_jt(jt_lcfg_device,   "cfg_device", mdcname, 0);
-                        do_jt(jt_lcfg_setup,    "setup", mop->mo_ldd.ldd_svname,
-                              libcfs_nid2str(mop->mo_hostnid.primary), 0);
+                        /* mdc_setup client_uuid server_uuid */
+                        do_jt(jt_lcfg_setup,    "setup", cliname, 
+                              mop->mo_ldd.ldd_svname, 0);
                         if (mop->mo_hostnid.backup != PTL_NID_ANY) {
                                 do_jt(jt_lcfg_add_uuid, "add_uuid", 
                                       libcfs_nid2str(mop->mo_hostnid.backup),
@@ -840,6 +844,7 @@ int write_llog_files(struct mkfs_opts *mop)
                                 do_jt(jt_lcfg_set_timeout, "set_timeout", 
                                       mop->mo_timeout, 0);
                 }
+#endif
         }
 
 out_jt:        
index 92a975c..74adfe6 100755 (executable)
@@ -49,11 +49,12 @@ if [ `grep -c lustre $MODFILE` -eq 0 ]; then
     echo Modifying $MODFILE
     echo "# Lustre modules added by $0" >> $MODFILE
     if [ $KVER -eq 24 ]; then
-       echo alias _lustre ksocknal portals $FSFLT >> $MODFILE
-       echo below mds _lustre osc >> $MODFILE
-       echo below oss _lustre ost >> $MODFILE
-       echo below ost _lustre >> $MODFILE
-       echo below llite _lustre osc mdc >> $MODFILE
+       echo alias _lustre portals >> $MODFILE
+       echo add above _lustre ksocknal $FSFLT >> $MODFILE
+       echo add below mds _lustre osc >> $MODFILE
+       echo add below oss _lustre ost >> $MODFILE
+       echo add below ost _lustre >> $MODFILE
+       echo add below llite _lustre osc mdc >> $MODFILE
        echo alias lustre llite >> $MODFILE
     else
        echo "install kptlrouter $MP portals && $MPI kptlrouter" >> $MODFILE