Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4810

Mount command unexpectedly sets block device parameter "max_sectors_kb"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.7.0, Lustre 2.5.4
    • Lustre 2.5.0
    • None
    • RHEL 6.4/ distro IB
      Kernel 2.6.32-358.23.2.el6.atlas.x86_64
      lustre-2.5.0 head
    • 3
    • 13229

    Description

      We've killed our MDT more than once because we were caught off guard by this behavior of the mount command. The array with the MDT devices doesn't support larger than 2kB transfers. The mpt2sas driver sets max_hw_sectors_kb to 16383, and then this code sets max_sectors_kb to 16383 as well. We run into problems when we scan the inodes (reading directly from block device) as part of our purge process.

      We would prefer that the command just emit a warning instead of making the change.

      http://git.whamcloud.com/?p=fs/lustre-release.git;a=blob;f=lustre/utils/mount_utils_ldiskfs.c;h=dfb9e6cba750a2a5a20e2d28d7814612522ab3a4;hb=HEAD#l1039

              snprintf(real_path, sizeof(real_path), "%s/%s", path,
                       MAX_HW_SECTORS_KB_PATH);
              rc = read_file(real_path, buf, sizeof(buf));
              if (rc) {
                      if (verbose)
                              fprintf(stderr, "warning: opening %s: %s\n",
                                      real_path, strerror(errno));
                      /* No MAX_HW_SECTORS_KB_PATH isn't necessary an
                       * error for some device. */
                      rc = 0;
              }
      
              if (strlen(buf) - 1 > 0) {
                      snprintf(real_path, sizeof(real_path), "%s/%s", path,
                               MAX_SECTORS_KB_PATH);
                      rc = write_file(real_path, buf);
                      if (rc) {
                              if (verbose)
                                      fprintf(stderr, "warning: writing to %s: %s\n",
                                              real_path, strerror(errno));
                              /* No MAX_SECTORS_KB_PATH isn't necessary an
                               * error for some device. */
                              rc = 0;
                      }
              }
      

      Attachments

        Issue Links

          Activity

            People

              niu Niu Yawei (Inactive)
              blakecaldwell Blake Caldwell
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: