When I run e4rat-realloc -t for some files I obtain this message:
Cannot move extent - Invalid argument
And a list of parameter of the files.
This files are virtual disks, the smallest is 20GB.
I have other virtual disks that don't give this message but their size is at most of 1GB.
I successfully reproduced this issue.
The problem is the ioctl EXT4_IOC_MOVE_EXT, which is limited to EXT_MAX_BLOCKS (4GiB). This is why the kernel response with "invalid argument".
But does it really makes sense to reallocate such huge files to be in a row? I am pretty sure that they will not completely loaded into RAM. This will negatively affect your startup time.
For single file defragmentation I recommend e4defrag, which is part of e2fsprogs.
Log in to post a comment.