[lustre-discuss] Project quota and odd mv behavior

Hans Henrik Happe happe at nbi.dk
Tue Dec 16 06:39:45 PST 2025


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] 
http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/2023-February/018511.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20251216/0d9ba0b4/attachment.htm>
-------------- next part --------------
renameat2(AT_FDCWD, "project1/d1", AT_FDCWD, "project0/", RENAME_NOREPLACE) = -1 EEXIST (File exists)   
newfstatat(AT_FDCWD, "project0/", {st_mode=S_IFDIR|0755, st_size=11264, ...}, 0) = 0  
renameat2(AT_FDCWD, "project1/d1", AT_FDCWD, "project0/d1", RENAME_NOREPLACE) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "project0/d1", 0x7ffc50bfe9e0, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
renameat(AT_FDCWD, "project1/d1", AT_FDCWD, "project0/d1") = -1 EXDEV (Invalid cross-device link)                                                                                                                                                             
newfstatat(AT_FDCWD, "project1/d1", {st_mode=S_IFDIR|0755, st_size=11264, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "project0/d1", 0x7ffc50bfebe0, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
rmdir("project0/d1")                    = -1 ENOENT (No such file or directory)                         
mkdir("project0/d1", 0700)              = 0                                                                                    
newfstatat(AT_FDCWD, "project0/d1", {st_mode=S_IFDIR|0700, st_size=1024, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "project1/d1", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3                                  
fstat(3, {st_mode=S_IFDIR|0755, st_size=11264, ...}) = 0
mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4163c22000
getdents64(3, 0x7f4163c22040 /* 4 entries */, 131072) = 96
getdents64(3, 0x7f4163c22040 /* 0 entries */, 131072) = 0                                                                      
munmap(0x7f4163c22000, 135168)          = 0             
close(3)                                = 0                                                                                    
renameat2(AT_FDCWD, "project1/d1/f1", AT_FDCWD, "project0/d1/f1", RENAME_NOREPLACE) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "project0/d1/f1", 0x7ffc50bfe490, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
renameat(AT_FDCWD, "project1/d1/f1", AT_FDCWD, "project0/d1/f1") = 0
-------------- next part --------------
renameat2(AT_FDCWD, "project1/d1", AT_FDCWD, "project0", RENAME_NOREPLACE) = -1 EEXIST (File exists)
newfstatat(AT_FDCWD, "project0", {st_mode=S_IFDIR|0755, st_size=6, ...}, 0) = 0
renameat2(AT_FDCWD, "project1/d1", AT_FDCWD, "project0/d1", RENAME_NOREPLACE) = -1 EXDEV (Invalid cross-device link)
newfstatat(AT_FDCWD, "project1/d1", {st_mode=S_IFDIR|0755, st_size=26, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "project0/d1", 0x7ffd697ce260, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
rmdir("project0/d1")                    = -1 ENOENT (No such file or directory)       
mkdir("project0/d1", 0700)              = 0                                                                                                                                                                                                                   
newfstatat(AT_FDCWD, "project0/d1", {st_mode=S_IFDIR|0700, st_size=6, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, "project1/d1", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3                                                                                                                                                                                
fstat(3, {st_mode=S_IFDIR|0755, st_size=26, ...}) = 0
getdents64(3, 0x562300b70320 /* 4 entries */, 32768) = 96
getdents64(3, 0x562300b70320 /* 0 entries */, 32768) = 0
close(3)                                = 0                                                                                    
renameat2(AT_FDCWD, "project1/d1/f1", AT_FDCWD, "project0/d1/f1", RENAME_NOREPLACE) = -1 EXDEV (Invalid cross-device link)
newfstatat(AT_FDCWD, "project1/d1/f1", {st_mode=S_IFREG|0644, st_size=2147483648, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "project0/d1/f1", 0x7ffd697cdd10, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
unlink("project0/d1/f1")                = -1 ENOENT (No such file or directory)                                                                                                                                                                               

-------------- next part --------------
renameat2(AT_FDCWD, "project1/d1", AT_FDCWD, "project0/d1", RENAME_NOREPLACE) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "project0/d1", 0x7ffcb4086eb0, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
renameat(AT_FDCWD, "project1/d1", AT_FDCWD, "project0/d1") = -1 EXDEV (Invalid cross-device link)                              
newfstatat(AT_FDCWD, "project0/d1", 0x7ffcb4087000, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "project1/d1", {st_mode=S_IFDIR|0755, st_size=11264, ...}, AT_SYMLINK_NOFOLLOW) = 0                       
newfstatat(AT_FDCWD, "project0/d1", 0x7ffcb4086b60, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
rmdir("project0/d1")                    = -1 ENOENT (No such file or directory)
mkdir("project0/d1", 0700)              = 0                                                                                    
newfstatat(AT_FDCWD, "project0/d1", {st_mode=S_IFDIR|0700, st_size=1024, ...}, AT_SYMLINK_NOFOLLOW) = 0                        
openat(AT_FDCWD, "project1/d1", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3                                                                                                                                                                                
fstat(3, {st_mode=S_IFDIR|0755, st_size=11264, ...}) = 0                                                                       
mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a2080b000
getdents64(3, 0x7f9a2080b040 /* 4 entries */, 131072) = 96                                                                                                                                                                                                    
getdents64(3, 0x7f9a2080b040 /* 0 entries */, 131072) = 0                                                                      
munmap(0x7f9a2080b000, 135168)          = 0                                                                                    
close(3)                                = 0                                                                                    
newfstatat(AT_FDCWD, "project1/d1/f1", {st_mode=S_IFREG|0644, st_size=2147483648, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "project0/d1/f1", 0x7ffcb4086610, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)                                                                                                                                           
unlink("project0/d1/f1")                = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "project1/d1/f1", O_RDONLY|O_NOFOLLOW) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2147483648, ...}) = 0                                                                                                                                                                                                 
openat(AT_FDCWD, "project0/d1/f1", O_WRONLY|O_CREAT|O_EXCL, 0600) = 4
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0                                                                           
ioctl(4, BTRFS_IOC_CLONE or FICLONE, 3) = -1 EOPNOTSUPP (Operation not supported)
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0           
mmap(NULL, 4202496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a1fdfe000                                
uname({sysname="Linux", nodename="fend01.cluster", ...}) = 0                                                                   
copy_file_range(3, NULL, 4, NULL, 9223372035781033984, 0) = 2147479552


More information about the lustre-discuss mailing list