Comment 0 for bug 911529

Revision history for this message
Removed by request (removed3425744) wrote :

I'm using Ubuntu 12.04 dev with e2fsprogs 1.42~WIP-2011-10-16-1ubuntu1. I wanted to defragment a big file (~9 GB) but sometimes e4defrag does nothing because it thinks the file is optimized and a few seconds later it defragments the file and is reducing the most times the extents of this file. Here is an example:

Command: e4defrag -v '/virtualbox/VirtualBox VMs/Ubuntu 32 Bit/Ubuntu 32 Bit.vdi'
Result: [1/1]/virtualbox/VirtualBox VMs/Ubuntu 32 Bit/Ubuntu 32 Bit.vdi: 100% extents: 71 -> 71 [ OK ]

The file was'nt defragmented and directly after this I used the same command again and got:

[1/1]/virtualbox/VirtualBox VMs/Ubuntu 32 Bit/Ubuntu 32 Bit.vdi: 100% extents: 71 -> 69 [ OK ]

The file was now defragmented. I tried the command again:

[1/1]/virtualbox/VirtualBox VMs/Ubuntu 32 Bit/Ubuntu 32 Bit.vdi: 100% extents: 69 -> 69 [ OK ]

The file wasn't defragmented but on the next try:

[1/1]/virtualbox/VirtualBox VMs/Ubuntu 32 Bit/Ubuntu 32 Bit.vdi: 100% extents: 69 -> 68 [ OK ]

The file was defragmented and the behaviour on the last try was a little different:

[1/1]/virtualbox/VirtualBox VMs/Ubuntu 32 Bit/Ubuntu 32 Bit.vdi: 100% extents: 68 -> 68 [ OK ]

The extents wasn't reduced but the file was defragmented which needed some minutes. I don't know why e4defrag is sometimes defragmenting an already previously defragmented file and sometimes not. And why aren't the extents reduced to the minimum size possible on the first try?