<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Andreas,</p>
    <p>Well, that works.  I got the devices I would expect.  The ioctl()
      calls look identical.  The lengths are identical ( allowing for
      1024 factor ).  But my devices are 0.  Thanks for getting me going
      with the correct filefrag.  I'll report back when I sort out my
      problem.  <br>
    </p>
    <p>John<br>
    </p>
    <pre>pfe27.jbauer2 390> strace -o filefrag.strace ./misc/filefrag -v /nobackupp17/jbauer2/dd.dat
Filesystem type is: bd00bd0
File size of /nobackupp17/jbauer2/dd.dat is 104857600 (102400 blocks of 1024 bytes)
 ext:     device_logical:            physical_offset: length:  dev: flags:
   0:        0..   13311:  33431977984.. 33431991295:  13312: 0008: net
   1:        0..   13311: 164044554240..164044567551:  13312: 0009: net
   2:        0..   13311: 539103838208..539103851519:  13312: 000a: net
   3:        0..   13311:  48145154048.. 48145167359:  13312: 000b: net
   4:        0..   12287: 168782233600..168782245887:  12288: 000c: net
   5:        0..   12287: 168137900032..168137912319:  12288: 000d: net
   6:        0..   12287:  18729435136.. 18729447423:  12288: 000e: net
   7:        0..   12287: 163376496640..163376508927:  12288: 000f: last,net
/nobackupp17/jbauer2/dd.dat: 8 extents found

strace lines of interest for filefrag
</pre>
    <pre><font color="#AF5F00">ioctl(</font><font color="#CC0000">3</font>, <font color="#06989A">FS_IOC_FIEMAP</font>, <font color="#AF5F00">{</font>fm_start=<font color="#CC0000">0</font>, fm_length=<font color="#CC0000">18446744073709551615</font>, fm_flags=<font color="#CC0000">0x40000000</font> <font color="#3465A4">/* FIEMAP_FLAG_??? */</font>, fm_extent_count=<font color="#CC0000">292</font><font color="#AF5F00">}</font> => <font color="#AF5F00">{</font>fm_flags=<font color="#CC0000">0x40000000</font> <font color="#3465A4">/* FIEMAP_FLAG_??? */</font>, fm_mapped_extents=<font color="#CC0000">8</font>, ...<font color="#AF5F00">})</font> <font color="#4E9A06">=</font> <font color="#4E9A06">0</font>
<font color="#AF5F00">write(</font><font color="#CC0000">1</font>, <font color="#CC0000">" ext:     device_logical:       "</font>..., <font color="#CC0000">75</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">75</font>
<font color="#AF5F00">write(</font><font color="#CC0000">1</font>, <font color="#CC0000">"   0:        0..   13311:  33431"</font>..., <font color="#CC0000">72</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">72</font>
<font color="#AF5F00">write(</font><font color="#CC0000">1</font>, <font color="#CC0000">"   1:        0..   13311: 164044"</font>..., <font color="#CC0000">72</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">72</font>

strace lines of interest for llfie

<font color="#AF5F00">ioctl(</font><font color="#CC0000">3</font>, <font color="#06989A">FS_IOC_FIEMAP</font>, <font color="#AF5F00">{</font>fm_start=<font color="#CC0000">0</font>, fm_length=<font color="#CC0000">18446744073709551615</font>, fm_flags=<font color="#CC0000">0x40000000</font> <font color="#3465A4">/* FIEMAP_FLAG_??? */</font>, fm_extent_count=<font color="#CC0000">1024</font><font color="#AF5F00">}</font> => <font color="#AF5F00">{</font>fm_flags=<font color="#CC0000">0x40000000</font> <font color="#3465A4">/* FIEMAP_FLAG_??? */</font>, fm_mapped_extents=<font color="#CC0000">8</font>, ...<font color="#AF5F00">})</font> <font color="#4E9A06">=</font> <font color="#4E9A06">0</font>
<font color="#AF5F00">write(</font><font color="#CC0000">2</font>, <font color="#CC0000">"listExtents() fe_physical=342343"</font>..., <font color="#CC0000">72</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">72</font>
<font color="#AF5F00">write(</font><font color="#CC0000">2</font>, <font color="#CC0000">"listExtents() fe_physical=167981"</font>..., <font color="#CC0000">73</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">73</font>
<font color="#AF5F00">write(</font><font color="#CC0000">2</font>, <font color="#CC0000">"listExtents() fe_physical=552042"</font>..., <font color="#CC0000">73</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">73</font>
<font color="#AF5F00">write(</font><font color="#CC0000">2</font>, <font color="#CC0000">"listExtents() fe_physical=493006"</font>..., <font color="#CC0000">72</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">72</font>
<font color="#AF5F00">write(</font><font color="#CC0000">2</font>, <font color="#CC0000">"listExtents() fe_physical=172833"</font>..., <font color="#CC0000">73</font><font color="#AF5F00">)</font> <font color="#4E9A06">=</font> <font color="#4E9A06">73</font>

</pre>
    <div class="moz-cite-prefix">On 8/18/22 16:11, Andreas Dilger wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:17DE058E-FEF9-43FD-B39B-3A8BE7583B8F@whamcloud.com">
      <div>
        <div class="">On Aug 18, 2022, at 14:28, John Bauer <<a
            href="mailto:bauerj@iodoctors.com"
            class="moz-txt-link-freetext" moz-do-not-send="true">bauerj@iodoctors.com</a>>
          wrote:</div>
        <blockquote type="cite" class=""><br
            class="Apple-interchange-newline">
          <div class="">
            <div class="">
              <p class="">Andreas,</p>
              <p class="">Thanks for the reply.  I don't think I'm
                accessing the Lustre filefrag ( see below ).  Where
                would I normally find that installed? I downloaded the
                lustre-release git repository and can't find filefrag
                stuff to build my own.  Is that somewhere else?</p>
            </div>
          </div>
        </blockquote>
        filefrag is part of the e2fsprogs package ("rpm -qf $(which
        filefrag)"), so you need to download and install the
        Lustre-patched e2fsprogs from <u class=""><a
            href="https://downloads.whamcloud.com/public/e2fsprogs/latest/"
            class="moz-txt-link-freetext" moz-do-not-send="true">https://downloads.whamcloud.com/public/e2fsprogs/latest/</a></u><br
          class="">
        <div><br class="">
        </div>
        <blockquote type="cite" class="">
          <div class="">
            <div class="">
              <p class="">More info: <br class="">
              </p>
              <pre class="">pfe27.jbauer2 334> cat /sys/fs/lustre/version
2.12.8_ddn12
</pre>
            </div>
          </div>
        </blockquote>
        <div><br class="">
        </div>
        You should really use "lctl get_param version", since the Lustre
        /proc and /sys files move around on occasion.</div>
      <div><br class="">
      </div>
      <div>The PFL/FLR change for FIEMAP is not included in this
        version, but it _should_ be irrelevant because the file you are
        testing is using a plain layout, not PFL or FLR.<br class="">
        <blockquote type="cite" class="">
          <div class="">
            <div class="">
              <pre class="">pfe27.jbauer2 335> filefrag -v /nobackupp17/jbauer2/dd.dat
Filesystem type is: bd00bd0
File size of /nobackupp17/jbauer2/dd.dat is 104857600 (25600 blocks of 4096 bytes)
/nobackupp17/jbauer2/dd.dat: FIBMAP unsupported

pfe27.jbauer2 336> which filefrag
/usr/sbin/filefrag


</pre>
              <div class="moz-cite-prefix">John<br class="">
              </div>
              <div class="moz-cite-prefix"><br class="">
              </div>
              <div class="moz-cite-prefix">On 8/18/22 14:57, Andreas
                Dilger wrote:<br class="">
              </div>
              <blockquote type="cite"
                cite="mid:E166F2A4-5F6B-43CC-8E8E-055B25B9A97C@whamcloud.com"
                class="">
                What version of Lustre are you using?  Does "filefrag
                -v" from a newer Lustre e2fsprogs (1.45.6.wc3+) work
                properly?
                <div class=""><br class="">
                </div>
                <div class="">There was a small change to the Lustre
                  FIEMAP handling in order to handle overstriped files
                  and PFL/FLR files with many stripes and multiple
                  components, since the FIEMAP "restart" mechanism was
                  broken for files that had multiple objects on the same
                  OST index.  See LU-11484 for details.  That change was
                  included in the 2.14.0 release.</div>
                <div class=""><br class="">
                </div>
                <div class="">In essence, the fe_device field now
                  encodes the absolute file stripe number in the high 16
                  bits of fe_device, and the device number in the low 16
                  bits (as it did before).   Since "filefrag -v" prints
                  fe_device in hex and would show as
                  "0x<stripe><device>" instead of
                  "0x0000<device>", this was considered an
                  acceptable tradeoff compared to other "less
                  compatible" changes that would have been needed to
                  implement PFL/FLR handling.</div>
                <div class=""><br class="">
                </div>
                <div class="">That said, I would have expected this
                  change to result in your tool reporting very large
                  values for fe_device (e.g. OST index + N * 65536), so
                  returning all-zero values is somewhat unexpected. </div>
                <div class=""><br class="">
                </div>
                <div class="">Cheers, Andreas</div>
                <div class="">
                  <div class=""><br class="">
                    <blockquote type="cite" class="">
                      <div class="">On Aug 18, 2022, at 06:27, John
                        Bauer <<a href="mailto:bauerj@iodoctors.com"
                          class="moz-txt-link-freetext"
                          moz-do-not-send="true">bauerj@iodoctors.com</a>>
                        wrote:</div>
                      <br class="Apple-interchange-newline">
                      <div class="">
                        <div class="">Hi all,<br class="">
                          <br class="">
                          I am trying to get my llfie program (which
                          uses fiemap) going again, but now the struct
                          fiemap_extent structures I get back from the
                          ioctl call, all have fe_device=0.  The output
                          from lfs getstripe indicates that the devices
                          are not all 0.  The sum of the fe_length
                          members adds up to the file size, so that is
                          working.  The fe_physical members look
                          reasonable also.  Has something changed?  This
                          used to work.<br class="">
                          <br class="">
                          Thanks, John<br class="">
                          <br class="">
                          pfe27.jbauer2 300> llfie
                          /nobackupp17/jbauer2/dd.dat<br class="">
                          LustreStripeInfo_get()
                          lum->lmm_magic=0xbd30bd0<br class="">
                          listExtents() fe_physical=30643484360704
                          fe_device=0 fe_length=16777216<br class="">
                          listExtents() fe_physical=30646084829184
                          fe_device=0 fe_length=2097152<br class="">
                          listExtents() fe_physical=5705226518528
                          fe_device=0 fe_length=16777216<br class="">
                          listExtents() fe_physical=5710209351680
                          fe_device=0 fe_length=2097152<br class="">
                          listExtents() fe_physical=30621271326720
                          fe_device=0 fe_length=16777216<br class="">
                          listExtents() fe_physical=31761568366592
                          fe_device=0 fe_length=16777216<br class="">
                          listExtents() fe_physical=24757567225856
                          fe_device=0 fe_length=16777216<br class="">
                          listExtents() fe_physical=14196460748800
                          fe_device=0 fe_length=16777216<br class="">
                          listExtents() nMapped=8 byteCount=104857600<br
                            class="">
                          <br class="">
                          <br class="">
                          pfe27.jbauer2 301> lfs getstripe
                          /nobackupp17/jbauer2/dd.dat<br class="">
                          /nobackupp17/jbauer2/dd.dat<br class="">
                          lmm_stripe_count:  6<br class="">
                          lmm_stripe_size:   2097152<br class="">
                          lmm_pattern:       raid0<br class="">
                          lmm_layout_gen:    0<br class="">
                          lmm_stripe_offset: 126<br class="">
                          lmm_pool:          ssd-pool<br class="">
                          <span class="Apple-tab-span"></span>obdidx<span
                            class="Apple-tab-span"> </span><span
                            class="Apple-tab-span"></span>objid<span
                            class="Apple-tab-span">
                          </span><span class="Apple-tab-span"></span>objid<span
                            class="Apple-tab-span"> </span>
                          <span class="Apple-tab-span"></span>group<br
                            class="">
                          <span class="Apple-tab-span"></span>  126<span
                            class="Apple-tab-span"> </span>     13930025<span
                            class="Apple-tab-span">
                          </span>    0xd48e29<span
                            class="Apple-tab-span"> </span>            0<br
                            class="">
                          <span class="Apple-tab-span"></span>  113<span
                            class="Apple-tab-span"> </span>     13115889<span
                            class="Apple-tab-span">
                          </span>    0xc821f1<span
                            class="Apple-tab-span"> </span>            0<br
                            class="">
                          <span class="Apple-tab-span"></span>  120<span
                            class="Apple-tab-span"> </span>     14003176<span
                            class="Apple-tab-span">
                          </span>    0xd5abe8<span
                            class="Apple-tab-span"> </span>            0<br
                            class="">
                          <span class="Apple-tab-span"></span>  109<span
                            class="Apple-tab-span"> </span>     12785483<span
                            class="Apple-tab-span">
                          </span>    0xc3174b<span
                            class="Apple-tab-span"> </span>            0<br
                            class="">
                          <span class="Apple-tab-span"></span>  102<span
                            class="Apple-tab-span"> </span>     13811117<span
                            class="Apple-tab-span">
                          </span>    0xd2bdad<span
                            class="Apple-tab-span"> </span>            0<br
                            class="">
                          <span class="Apple-tab-span"></span>  116<span
                            class="Apple-tab-span"> </span>     13377285<span
                            class="Apple-tab-span">
                          </span>    0xcc1f05<span
                            class="Apple-tab-span"> </span>            0<br
                            class="">
                          <br class="">
_______________________________________________<br class="">
                          lustre-discuss mailing list<br class="">
                          <a
                            href="mailto:lustre-discuss@lists.lustre.org"
                            class="moz-txt-link-freetext"
                            moz-do-not-send="true">lustre-discuss@lists.lustre.org</a><br
                            class="">
                          <a class="moz-txt-link-freetext"
                            href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org"
                            moz-do-not-send="true">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br
                            class="">
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br class="">
                  <div class="">
                    <div dir="auto" class="">
                      <div dir="auto" class="">
                        <div dir="auto" class="">
                          <div dir="auto" class="">
                            <div dir="auto" class="">
                              <div dir="auto" class="">
                                <div class="">Cheers, Andreas</div>
                                <div class="">--</div>
                                <div class="">Andreas Dilger</div>
                                <div class="">Lustre Principal Architect</div>
                                <div class="">Whamcloud</div>
                                <div class=""><br class="">
                                </div>
                                <div class=""><br class="">
                                </div>
                                <div class=""><br class="">
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <br class="Apple-interchange-newline">
                    </div>
                    <br class="Apple-interchange-newline">
                    <br class="Apple-interchange-newline">
                  </div>
                  <br class="">
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
      <br class="">
      <div class="">
        <div dir="auto" class="">
          <div dir="auto" class="">
            <div dir="auto" class="">
              <div dir="auto" class="">
                <div dir="auto" class="">
                  <div dir="auto" class="">
                    <div>Cheers, Andreas</div>
                    <div>--</div>
                    <div>Andreas Dilger</div>
                    <div>Lustre Principal Architect</div>
                    <div>Whamcloud</div>
                    <div><br class="">
                    </div>
                    <div><br class="">
                    </div>
                    <div><br class="">
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <br class="Apple-interchange-newline">
        </div>
        <br class="Apple-interchange-newline">
        <br class="Apple-interchange-newline">
      </div>
      <br class="">
    </blockquote>
  </body>
</html>