<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Thanks for digging up the LUs that I somehow didn't manage to find.<br>
<br>
Also, I noticed that the XFS trace was for the case where Lustre is
fast (walking/creating the tree and rename files).<br>
<br>
I've attached the other case (dest: project0/d1) for XFS. If I'm
interpreting it right it seems that on XFS mv is using reflinks for
the copy:<br>
<br>
ioctl(4, BTRFS_IOC_CLONE or FICLONE, 3) = 0 <br>
<br>
That explains why it is fast on XFS and a full copy on Lustre which
doesn't support this operation.<br>
<br>
I'm not sure I see the logic in the mv implementation. It should be
possible to handle both cases by walking/creating the tree and
rename files. I will dig deeper into the mv code to figure out what
is going on.<br>
<br>
Cheers,<br>
Hans Henrik<br>
<br>
<div class="moz-cite-prefix">On 17/12/2025 21.15, Andreas Dilger
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0A793A8D-BF23-41FD-9898-93E16BB5F13E@thelustrecollective.com">
<pre wrap="" class="moz-quote-pre">Looking at the strace output, it appears in all cases that the *directory*
rename is returning EXDEV, as it should be the case (to preserve the projid
for that directory tree). In the XFS case, it is refusing to do the file
rename across projects also (returning EXDEV and forcing userspace to do the
file copy, which is very inefficient), while Lustre allows the file rename
to succeed (just reassinging the project quota usage).
In the lustre-mv-copy case, it appears that "mv" is not trying to rename the
file again after it creates the target directory, as it does in the lustre-mv
case. Instead it just copies the file, which seems like a bug in "mv".
It looks like the renameat2() flags have not been implemented yet:
<a class="moz-txt-link-freetext" href="https://jira.whamcloud.com/browse/LU-12272">https://jira.whamcloud.com/browse/LU-12272</a> - RENAME_NOREPLACE
<a class="moz-txt-link-freetext" href="https://jira.whamcloud.com/browse/LU-11557">https://jira.whamcloud.com/browse/LU-11557</a> - RENAME_EXCHANGE
<a class="moz-txt-link-freetext" href="https://jira.whamcloud.com/browse/LU-19720">https://jira.whamcloud.com/browse/LU-19720</a> - RENAME_WHITEOUT
Probably implementing RENAME_NOREPLACE support would be the most important
and useful flag, since "mv" is always trying this first. RENAME_EXCHANGE
could be useful for some applications, while RENAME_WHITEOUT is for overlayfs.
Cheers, Andreas
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">On Dec 17, 2025, at 05:54, Hans Henrik Happe via lustre-discuss <a class="moz-txt-link-rfc2396E" href="mailto:lustre-discuss@lists.lustre.org"><lustre-discuss@lists.lustre.org></a> wrote:
To be more specific:
Server:
- Lustre 2.15.7
- Rocky Linux 8.10 (4.18.0-553.53.1.el8_10.x86_64)
Client:
- Lustre 2.15.7, but same outcome on 2.15.5
- Rocky Linux 9.6 (5.14.0-570.42.2.el9_6.x86_64)
- glibc-2.34-168.el9_6.23.x86_64
- coreutils-8.32-39.el9.x86_64
On 17/12/2025 13.22, Hans Henrik Happe via lustre-discuss wrote:
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">It's 2.15.7.
On 17/12/2025 03.36, Andreas Dilger wrote:
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">There have definitely been some fixes in this area.
What version of Lustre are you running?
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">On Dec 16, 2025, at 07:39, Hans Henrik Happe via lustre-discuss <a class="moz-txt-link-rfc2396E" href="mailto:lustre-discuss@lists.lustre.org"><lustre-discuss@lists.lustre.org></a> wrote:
Hi,
It seems like the inherited project quota issue [1] with mv has been resolved with XFS in RHEL9. However, Lustre is a bit strange.
Given a "src" and "dst"(empty) dir these two ways of calling mv behaves differently:
mv src dst/ (work: no copy)
mv src dst/src (copy, then delete)
I've attached an strace output for both Lustre and XFS. It seems like mv is handling the fact that Lustre don't have renameat2 a bit differently.
Before I dig further. Is this behavior known?
Cheers,
Hans Henrik
[1] <a class="moz-txt-link-freetext" href="http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/2023-February/018511.html">http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/2023-February/018511.html</a>
<lustre-mv.strace><xfs-mv.strace><lustre-mv-copy.strace>_______________________________________________
lustre-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a>
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="" class="moz-quote-pre">Cheers,
Hans Henrik
_______________________________________________
lustre-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a>
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">
Andreas Dilger
Principal Lustre Architect
<a class="moz-txt-link-abbreviated" href="mailto:adilger@thelustrecollective.com">adilger@thelustrecollective.com</a>
</pre>
</blockquote>
<br>
</body>
</html>