I just finished migrating a mail server from CentOS 7 over to CentOS 8. The mail store was in /var/vmail.
The data was migrated with rsync:
rsync -rltDPH /var/vmail/* root@new-hostname:/var/vmail/
I ran du -skh
inside /var/vmail
on the old (CentOS 7 server).
I then ran the same command on the new CentOS 8 server. There were a number of directories that had different sizes, but 1 in particular stood out to me.
On the old server, it shows that it is using 26G.
On the new server, it shows that it is using 33G.
The CentOS 8 server's filesystem is ext4. If I recall correctly, I was also using ext4 on the CentOS 7 server -- but I have already destroyed that server, so I can't confirm.
I have an off-site CentOS 7 server used for backup purposes. That backup server's filesystem is XFS. It shows the backup - from the new server - for the directory in question to also be using 26G.
The backup server uses the same rsync
command (rsync -rltDPH
) to copy things down.
I became more curious, so I copied this directory to an ext4 partition on my Ubuntu laptop (Ubuntu 18.04). Ubuntu is also reporting a usage of 26G.
I know the whole conversation about why df and du show different values.
Why does CentOS 8 ext4 filesystem show du
results of a directory about 7G larger than an ext4 filesystem on Ubuntu 18.04, as well as an XFS filesystem on CentOS 7 (and another ext4 filesystem on CentOS 7)?