Den 22.09.2023 08:48, skrev Wols Lists:
On 20/09/2023 23:39, Grant Edwards wrote:
Assuming GParted is smart enough to do overlapping moves, is it smart
enough to only copy filesystem data and not copy "empty" sectors?
According to various forum posts, it is not: moving a partion copies
every sector. [That's certainly the obvious, safe thing to do.]
Seeing as it knows nothing about filesystems, and everything about
partitions, it will treat the partition as an opaque blob and move it
as a single object ...
The partition in question is 200GB, but only 7GB is used, so I think
backup/restore is the way to go...
You would think so :-)
I use ext4, and make heavy use of hard links. Last time I tried a
straight copy (not backup/restore) I think the copied partition would
have been three times the size of the original - that is if it hadn't
run out of space first :-)
Just for completeness, you should check out the e2image command, though
NOT for direct in-place overlapping move. Something like "e2image -ra
$sourcevol $targetvol" has worked very well for me. That is obviously
NOT for overlapping move, but for a backup it is quite fast. If you are
moving to a bigger volume, I'd do resize as a separate step after the move.