On Sun, 22 Jan 2023 21:06:29 +0000, Steve Fairhead wrote: > I was cloning a server with rsync in preparation for a major upgrade > (elderly OpenBSD to 7.2). I noticed that the home partition usage was a > good deal greater on the new machine than the old (as seen by df). > > After a lot of analysis, I found that all user folders (and all other > folders/partitions) were near-enough identical on both machines, except > for one - my boss's ;) . After more analysis, I found that it was his > Maildir (using dovecot) that was weird: > > - Old machine: 49 GB > - New machine: 188 GB > > Figures as measured with du -sk, which I realise is sector-oriented, but > still... And yes, my boss does a *lot* of email. > > After yet more testing, I did a recursive copy of the old 49 GB Maildir > to a spare folder on the same home partition on the old machine. This > came up, again, as 188 GB.
You probably copied a large number of sparse files where the holes got expanded. If you use rsync with the -S flag (or use tar) you should end up with a similar disk usage on the new machine. > (FWIW, Windows via Samba reported "140 GB; size on disk 204 GB" for both > the original "49 GB" Maildir and the 188 GB copy.) That is because Windows is summing the file sizes which include the holes whereas du doesn't count the holes (since they take up no space on the disk). - todd