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

PFID updates fail on a full OST after mirror extend

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • Lustre 2.16.1
    • None
    • 3
    • 9223372036854775807

      After a successful "lfs mirror extend", the PFID information stored
      in the original OST objects may remain inconsistent with the new
      layout on the MDT when an OST is full.

      mdd_object_pfid_replace() updates the OST objects in a separate
      transaction after the layout merge has completed. However,
      lod_trans_space_check() rejects this transaction with -ENOSPC
      when the target's cached statfs state contains OS_STATFS_ENOSPC
      or OS_STATFS_ENOINO.

      The mirror extension reports success, but the original objects
      retain their old PFID component IDs. Tools inspecting OST objects
      can consequently classify them as non-mirrored and skip them
      during mirror-based space reclamation.

      Steps to reproduce:
      1. Create and write a single-stripe file on OST0.
      2. Fill OST0 using a separate file and confirm that further writes
         fail with ENOSPC.
      3. Wait for the MDT's OSP statfs cache to observe the full OST.
      4. Extend the file with a mirror on another OST with free space:
         lfs mirror extend -N -c1 -o1 <file>
      5. Inspect the original object's on-disk filter_fid before further
         client I/O can repair it, and compare its component_id with the
         corresponding lcme_id in the MDT layout.

      Actual result:
      Mirror extension succeeds, but the original object's component_id
      does not match the updated layout.

      Expected result:
      PFID replacement should be attempted even when the OST is reported
      as full. Updating the existing filter_fid normally reuses existing
      inode space, so the LOD space precheck should not prevent it.
      Actual backend allocation errors must still be handled.

      The proposed fix allows PFID replacement transactions to bypass
      the LOD space precheck and adds a regression test for mirror
      extension with a full source OST.

            vkuznetsov Vitaliy Kuznetsov
            vkuznetsov Vitaliy Kuznetsov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: