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

lfs quota -v skips OSTs with sparse target indices

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • Lustre 2.17.0
    • Server: Lustre master 2.17.57_dirty / Almalinux 9.7
      Client: Lustre master 2.17.57_dirty / Almalinux 9.7
    • 3
    • 9223372036854775807

      Lustre master 2.17.57_dirty does not display per-OST quota
      information when OST indices are sparse or start at a high index.

      The filesystem has eight OSTs with indices 256 through 263:

      256: himfs-OST0100_UUID ACTIVE
      ...
      263: himfs-OST0107_UUID ACTIVE

      The following command displays the global quota and MDT entries, but
      does not display any OST entries:

      lfs quota -v -hg 1000 /himfs

      It also reports:

      Total allocated block limit: 0k

      The command exits with rc=0.

      Querying an OST explicitly works:

      lfs quota --ost 256 -hg 1000 /himfs

      Root cause:

      print_obd_quota() calls llapi_get_obd_count(), which returns the number
      of targets. It then incorrectly uses the loop counter as the target
      index:

      for (i = 0; i < count; i++)
      qctl->qc_idx = i;

      With eight OSTs at indices 256 through 263, this queries nonexistent
      indices 0 through 7. ENODEV is ignored, so the command returns success
      without displaying OST quota information.

      The actual target indices should be obtained with
      llapi_get_target_uuids() and used for qc_idx.

      The same count-versus-index assumption is also present in
      lfs_reset_quota() and should be corrected by the same change.

      Expected result:

      lfs quota -v should display all configured OSTs regardless of whether
      their indices are contiguous or start at zero.

            noskov Sergey Noskov
            noskov Sergey Noskov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: