by burnt-resistor · 11mo ago · 0 comments
If a user has double storage available, it's probably best to do the old-fashioned "defrag" by single-threaded copying all files and file metadata to a newly-formatted volume.
At our size and use case the timing was usually close to perfect. The pools were getting close to full and fragmented as larger disks became inexpensive.
Read the defrag code in other well-established fs like ext4 or btrfs. They all have limitations(or caveats, if you will). It's one of those problems where you just have to throw money at it and hope for the best. Even Microsoft kinda just gave up on it because it's really a pointless exercise at this point in time and age.