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

DNE3: 'lfs getdirstripe -y DIR' does not print YAML output for directories

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.14.0, Lustre 2.16.0, Lustre 2.15.0
    • 3
    • 9223372036854775807

    Description

      Running "lfs getdirstripe -y DIR" does not print YAML-formatted output for a striped directory:

      # lfs getdirstripe -y /mnt/testfs/dir4
      lmv_stripe_count: 4
      lmv_stripe_offset: 0
      lmv_hash_type: fnv_1a_64
      mdtidx           FID[seq:oid:ver]
           0           [0x200000400:0x4:0x0]  
           2           [0x280000403:0x4:0x0]  
           3           [0x2c0000401:0x4:0x0]  
           1           [0x240000403:0x4:0x0]  
      

      This should print proper YAML-formatted information about the MDT object FIDs, similar to what "lfs getstripe -y FILE" does for regular files:

      # lfs getstripe -y /mnt/testfs/etc/hosts
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 2
      lmm_objects:
            - l_ost_idx: 2
              l_fid:     0x380000403:0xd:0x0
      

      However, this is also a bit confusing because "lfs getdirstripe DIR" on an unstriped directory does not print any MDT object FIDs for DIR:

      # lfs getdirstripe -v /mnt/testfs/dir
      lmv_stripe_count: 0 lmv_stripe_offset: 3 lmv_hash_type: none
      

      This is inconsistent with "lfs getstripe FILE" which prints OST object information for files even if they only have a single stripe.

      Since the "--yaml" option is currently broken, it would be OK to have this print out the MDT object FIDs for unstriped directories. Similarly, "lfs getdirstripe -v" doesn't appear to do anything for directories, so it should also be changed to print the MDT object FIDs.

      Attachments

        Activity

          People

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: