Mac Encrypted USB drive giving different capacity

backupdisk-spacemacrsync

I have an existing 1T USB drive (disk5 in the screenshot). I formatted another 1T USB drive (disk4) and starts to rsync files from disk5 to disk4.

Near the end (the current state in the screenshot) I still have 100+G of files that I'm unable to copy to disk4.

From the screenshot, there are still about 250K files and 26 folders not copied over to disk4. Yet disk4 has less free disk space.

Based on finder, the size of the uncopied files is 110G.

Things I that tried:

  1. empty Trash
  2. run rsync with –delete

disk4 is essentially a "rsync -a" backup of disk5, what cause the huge discrepancy in disk space?

Anything else I can do or missed?

Disk Utility Information for both drives

UPDATE

Based on hunch, I did the following.

  1. reformatted disk4 again
  2. using Finder, first copy some folders with huge files (VM images)
  3. after the above copy completed, copy rest of folders

All files fits into disk4 this time!

I'm not sure, which of these fix it.

  1. reformatting
  2. copying large files first
  3. not using rsync
  4. none of the above

UPDATE 2

Here's the Information for both drives after the above Update.

Notice that:

  • Used space is almost the same (0.18G less in disk4)
  • 36203 files more reported in disk5
  • 27 folders more reported in disk5

"rsync -av" did not report any more files to sync.

I guess Apple is hiding some files.

Disk Utility Information for both drives after reformatting disk4

Best Answer

You could look to folders that you can zip into a compressed folder. This should give you additional space on disk4, so long as you erase the files that have been added to the compressed zip file. You can either use Compress Files in Finder or zip in Terminal.

UPDATE

While this does not address rsync directly, this is another option that you may consider.

If this is solely a backup, and you are not actively using the data on disk4, i.e. it would only be used to restore lost data, or recover incremental data, then I would say try CrashPlan by Code42. The software is free and you do not need to buy their premium cloud backup services to use the local backup functionality. The only thing is that without the premium plan, I do not think that they unlock the ability to set the backup schedule for local backup. They do however give you a thirty-day free trial for the premium service, so you can determine how important having control over the backup schedule is.

It works very well, and is very light on resource utilization, so you won't know it is there. I in fact view it as a flaw in the software, as they are only addressing a single core of multicore processors, which can extend initial back up times. You have control over how much you allow CrashPlan to use your systems resources.

The benefit is that it significantly compresses the data to the backup drive, depending obviously on the data you are backing up. While you cannot use the information directly from Finder, the GUI lets you see the file structure and you can easily restore a single file or the entire disk.