Am Fri, 1 Jul 2016 22:14:00 +0200 schrieb Dmitry Katsubo <dm...@mail.ru>:
> Hello everyone, > > Question #1: > > While doing defrag I got the following message: > > # btrfs fi defrag -r /home > ERROR: defrag failed on /home/user/.dropbox-dist/dropbox: Success > total 1 failures > > I feel that something went wrong, but the message is a bit misleading. > > Provided that Dropbox is running in the system, does it mean that it > cannot be defagmented? That is probably true. Files that are mapped into memory (like running executables) cannot be changed on disk. You could make a copy of that file, remove the original, and rename the new into place. As long as the executable is running it will stay on disk but you can now defragment the file and next time dropbox is started it will use the new one. > Question #2: > > Suppose that in above example /home/ftp is mounted as another btrfs > array (not subvolume). Will 'btrfs fi defrag -r /home' defragment it > (recursively) as well? Yes, last time I tried the command crossed file system boundaries. It will simply report ioctl errors if it operates on incompatible files and continue its way. -- Regards, Kai Replies to list-only preferred. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html