Index: b/lustre/utils/mount_lustre.c =================================================================== --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -484,10 +484,39 @@ set_params: snprintf(real_path, sizeof(real_path), "%s/%s", path, MAX_SECTORS_KB_PATH); rc = write_file(real_path, buf); - if (rc && verbose) - fprintf(stderr, "warning: writing to %s: %s\n", - real_path, strerror(errno)); + if (rc) { + if (verbose) + fprintf(stderr, "warning: writing to %s: %s\n", + real_path, strerror(errno)); + return rc; + } + } + + /* if device is multipath device, tune its slave devices */ + snprintf(real_path, sizeof(real_path), "%s/slaves/*", path); + rc = glob(real_path, GLOB_NOSORT, NULL, &glob_info); + if (rc == GLOB_NOMATCH) { + /* no slave device is not an error */ + rc = 0; } + if (rc) { + if (verbose) + fprintf(stderr, "warning: %s. " + "failed to read entries under %s/slaves\n", + strerror(errno), path); + return rc; + } + + for (i = 0; i < glob_info.gl_pathc; i++){ + char *slave; + slave = basename(glob_info.gl_pathv[i]); + snprintf(real_path, sizeof(real_path), "/dev/%s", slave); + rc = set_blockdev_tunables(real_path); + if (rc) + break; + } + globfree(&glob_info); + return rc; }