2

I have two hard drives (same size, same partitions, same model) that have been synchronized using FreeFileSync. They are used to store data, not the system. After sync, the drives should report same free and used disk space but it is not the case.

First drive (used for storage) reports 781 GB of used disk space, while second drive (backup) report only 778 GB. To get that information, I right clicked on the disk then choose properties.

First, I was thinking that synchronising tool was not doing is job (by excluding some files) but using other file synchronisation tools (like SyncToy or DirSyncPro) give me same result (no difference in files reported justify a delta of 2 GB).

Also: if I go to drive root folder, select everything (all files and folders) and right click then choose properties, total reported files size is 778 GB on both drives. If i look closer at the numbers, there is a small difference of a few megabytes between the two drives however.

Notes :

  • Computer have been restarted several times.

  • Recycle bin have been emptied on both drives (if I go to $RECYCLE.BIN folder, both are almost empty (only a few KB).

  • Shadow copy is disabled. vssadmin list shadows doesn't report anything.

  • Windows Explorer folder settings have been modified to display system files and hidden files.

  • I have run "Error checking" tool (with "Automatically fix file system" enabled) on both disks.

Why is there a difference in used and free space between the two drives? How can I solve this?

2

2 Answers 2

5

Alternate data streams

Your source files might have NTFS Alternate data streams. If your backup/synchronization software is not aware of them, they won't be copied to the target. There are many tools that can display them, and since Windows Vista you can do dir /r, which displays not only files but their alternate data streams as well.

Different filesystem cluster size

Disk space taken up by a file is rounded up, as a file takes a whole number of filesystem clusters. E.g. if your file's size is 3000 bytes, and filesystem cluster size is 4K, then the file will take 4K exactly. If your two filesystems use different cluster size, then amount of disk space wasted in this manner will be different.

Other rarely-used NTFS features

NTFS has several other features which may or may not be supported by your backup software:

  • Compression. If compressed files are uncompressed during copying, they will take more space.
  • Sparse files: Special care must be taken when copying these, otherwise they will "explode", e.g. take much more space and not be sparese anymore.
  • Reparse points, hard links, and many other features that can confuse your backup software.

Conslusion

Don't rely on filesystem totals. Use some kind of auditing to make sure your files are copied properly. For example, you may try md5deep to calculate hashes and compare files.

1
  • 1
    Good call on the alternative data streams, I forgot about them :) +1
    – mprill
    Dec 25, 2012 at 22:31
1

This issue is connected to the backward compatibility of Windows Vista and later. In those systems some folders that had "known" names in Windows XP are mapped to the new locations using NTFS Directory Junction Points.

An example of such mappnig is: \Documents and Settings\<username>\Application Data being mapped to \Users\<username>\AppData\Roaming.

It is possible that you have some application data in your %appdata% that is counted twice by Windows' disk space usage tools. Or perhaps there are other Junction Points or file symbolic links that are affecting this measurement.

To check if the backup drive contains the Junction Points use dir /A:L /S in it's root and compare it to what it returns on the source drive. If they are the same then your problem lies elsewhere.

If they are not the same then in order to copy your data correctly you have to use a program that understands NTFS Directory Junction Points and can copy them as well, one of such programs is Microsoft Robocopy or plain xcopy.

Another possibility are files in use, on Windows only the VSS can copy files in use.

I'd personally use Robocopy with these options:

  • /COPYALL - COPY ALL file info
  • /B - copy files in Backup mode
  • /SEC - copy files with SECurity
  • /MIR - MIRror a directory tree
  • /R:n - number of Retries
  • /W:n - Wait time between retries
  • /LOG - Output log file
  • /NFL - No file logging
  • /NDL - No dir logging

ROBOCOPY source destination /COPYALL /B /SEC /MIR /R:0 /W:0 /LOG:log.txt /NFL /NDL

The wait timers are defined so that files in use won't stall your copy process.

You can also use xcopy with /B which Copies the Symbolic Link itself versus the target of the link.

But generally performing a copy of an on-line file system, that is in use by currently running OS is a tricky matter if you don't want to use VSS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .