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

lfs getstripe does not print globbed file names when using options such as --stripe-count and --stripe-size

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • Lustre 2.7.0
    • None
    • sles11sp4
    • 9223372036854775807

    Description

      Apologies if duplicate (didn't see anything on quick search).

      Normally, when using "lfs getstripe" on globbed files (e.g. "lfs getstripe dir/*") without any options, the stripe information will be prefaced with a file name:

      $ lfs getstripe 64g.64/1g.[12]
      64g.64/1g.1
      lmm_stripe_count: 1
      lmm_stripe_size: 1048576
      lmm_pattern: 1
      lmm_layout_gen: 0
      lmm_stripe_offset: 28
      obdidx objid objid group
      28 22888 0x5968 0

      64g.64/1g.2
      lmm_stripe_count: 1
      lmm_stripe_size: 1048576
      lmm_pattern: 1
      lmm_layout_gen: 0
      lmm_stripe_offset: 41
      obdidx objid objid group
      41 22884 0x5964 0

      If, however, you only want a subset of the information (e.g. just the count and size), it just spits out the count and size of every file without showing the associated file name:

      $ lfs getstripe --stripe-count --stripe-size 64g.64/1g.[12]
      lmm_stripe_count: 1
      lmm_stripe_size: 1048576
      lmm_stripe_count: 1
      lmm_stripe_size: 1048576

      For consistency and parseability, it would be nice if this was consistent and it would also print the file name like so when multiple files given:

      $ lfs getstripe --stripe-count 64g.64/1g.[12] #### PROPOSED ####
      64g.64/1g.1
      lmm_stripe_count: 1
      lmm_stripe_size: 1048576
      64g.64/1g.2
      lmm_stripe_count: 1
      lmm_stripe_size: 1048576

      Likewise, there is an inconsistency between when you give just one specifier vs. when you specify two or more. For instance, if you just specify --stripe-count, it does not give the "lmm_stripe_count:" prefix whereas it does when you also specify something else like --stripe-size above.

      $ lfs getstripe --stripe-count 64g.64/1g.[12]
      1
      1

      Ideally, it seems like you would want the options like --stripe-count to act just like the default no-option case except just printing the requested subset.

      Thanks.

      Attachments

        Issue Links

          Activity

            People

              pjones Peter Jones
              kolano Paul Kolano (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: