Whamcloud - gitweb
LU-1279 utils: mount.lustre load ptlrpc module if necessary
authorBobi Jam <bobijam@whamcloud.com>
Thu, 18 Oct 2012 10:10:09 +0000 (18:10 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 Oct 2012 23:57:43 +0000 (19:57 -0400)
When LNET modules have not loaded, and mounting multiple targets at
the same time could fail. Use mount.lustre to load the network modules
if necessary.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I9d7a4007cc5b233055a4a985237b01ff0874cf54
Reviewed-on: http://review.whamcloud.com/4292
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
lustre/utils/mount_lustre.c

index fe1920f..374815e 100644 (file)
@@ -514,6 +514,12 @@ int main(int argc, char *const argv[])
        progname = strrchr(argv[0], '/');
        progname = progname ? progname + 1 : argv[0];
 
        progname = strrchr(argv[0], '/');
        progname = progname ? progname + 1 : argv[0];
 
+       /*
+        * LU-1279. When LNET modules have not loaded, and mounting multiple
+        * targets at the same time could fail.
+        */
+       rc = system("/sbin/modprobe ptlrpc 2>&1 > /dev/null");
+
        set_defaults(&mop);
 
        rc = osd_init();
        set_defaults(&mop);
 
        rc = osd_init();