1

The short question is why is a move operation, moving within the same ext4 partition taking longer than a copy of the same files from a different drive?

The longer description of the scenario: I recently moved a large directory of files...I don't have exact numbers hnady, but maybe 40-50GB of data consisting mostly of small files in lots of directories (being nested 10 levels deep would not be uncommon). I moved it using rsync from a USB thumb drive (NTFS) to an internal hardisk (ext4 partition), and while I didn't time it, I kicked it off before going to bed and it was done before I got up. So probably no more than 8 hours, possibly rather less.

However I mistakenly rsynced it like this (not real dir names)

rsync -a /thumbdrive/a/b/c /harddrive/a/b/c

such that I wound up with an extra c directory.

So I corrected this by moving the second c up a level (copying over the higher-level c, which was empty except for the inner c). Thinking it should be a trivial operation, I did so from within Dophin (in a KDE desktop). It now been running for something like 9 or 10 hours and is still going...

Addendum: one more bit of info that may be important: that c folder contains 51 folders and 62 files. (I would expect Dolphin to be essentially doing a mv operation for each of those.)

Addendum 2: some time later I noticed that the progress (shown in KDE notification tray plasmoid) seemed to be stalled. The hard disk light was still contining to have vigorous activity, but the progress indicator was continuing to show to continue to be on the same file. This had not been the case earlier, when I was already wondering why it was taking so long, I checked periodically and saw lively progress over different files). Looking at the disk, I saw the the source of the move no long appeared to be there at all. I eventually gave up nd hit the stop button in the notification ui.

I realize this may point to KDE weirdness more than ext4 weirdness, and that at very least the layers of KDE stuff make it difficult to know if whatever weirdness occurred was file system related at all. But still, what I would consider useful answers would be someone who knows ext4 internal confirming or denying that such behavior from ext4 makes any sense, or someone who knows the relevant KDE bits with an explanation of how this could happen.

  • 4
    I have no idea what Dolphin is or what it's doing in this case, but movig (renaming) a directory to a location elsewhere in the same filesystem should absolutely be instantaneous. I think that what you're actually doing here must be something else. Are you copying it perhaps? – Celada Mar 15 '15 at 1:45
  • Dolphin is the KDE file manager. No, definitely not copying. It occurred to me to wonder if I had accidentally done so, but no the ui clearly said it was a move that was going on. – EricS Mar 15 '15 at 2:19
  • Are you sure you didn't accidentally move the files to a different filesystem? You can check what Dolphin is doing by running strace -p1234 where 1234 is the process ID of Dolphin (you can see that by running something like pidof dolphin). If you can't interpret the output of strace, post a few hundred lines of it. – Gilles Mar 15 '15 at 21:15
  • Yes, I'm quite sure I didn't move them to a different filesystem. I just moved them up a level. – EricS Mar 16 '15 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.