NB Wrong Size with du/gdu on large data sets (not really)

After “backup” (rsync+script kidding) I’ll check sizes both on source and destination.

On source:

[ilyxa@wombatneo ~]$ uname -a ; du -sk /backup_ext1/orca/media/Photos/BCN_2017/
Linux wombatneo 5.11.13-arch1-1 #1 SMP PREEMPT Sat, 10 Apr 2021 20:47:14 +0000 x86_64 GNU/Linux
44912743 /backup_ext1/orca/media/Photos/BCN_2017/

On destination:

ilyxa@snooky:~$ uname -a ; du -sk /storarray/nas/photos/2017/BCN_2017/
SunOS snooky 5.11 11.4.31.88.5 i86pc i386 i86pc
44990403 /storarray/nas/photos/2017/BCN_2017

Wat? Not a big deal, only few megabytes was “lost” (wait, 77 Mb = not “few”), btw it can be a problem…

Okay, let’s confirm size some other way on source:

[ilyxa@wombatneo ~]$ du -bs /backup_ext1/orca/media/Photos/BCN_2017/
46074017832 /backup_ext1/orca/media/Photos/BCN_2017/

And on destination:

ilyxa@snooky:~$ gdu -bs /storarray/nas/photos/2017/BCN_2017/
46074017832 /storarray/nas/photos/2017/BCN_2017/

Much better 😉 man du (or man gdu on Solaris) can help a little (apparent-size AND block-size to check). Sure I always double-check my personal backups everytime (rsync is ok, but I always re-calculate chsums on both site with standalone handmade script).

Leave a Reply

Your email address will not be published. Required fields are marked *