I'm making backups of my SD card as a preventative measure using the desktop tool "SD Card Copier". Whenever I make a backup using this tool, I end up with 2GB less free space ("Available") reported by the OS on the copy. It literally vanishes from what I can tell.

For example I had ~6GB free before I copied and the duplicate it creates has ~4GB free. I see this on the SSH screen after logging in (and also in the file manager on the desktop) :

Filesystem      Size  Used Avail Use% Mounted on
|*| /dev/root   117G  108G  3.6G  97% /

I've tried expanding the filesystem under raspi-config which didn't change anything.

What happened to the 2GB space and how can I recover it to get the formerly available free space back to where it was before the copy (IE - Get that 2GB back)? Are there temp files created in the backup procedure that can be removed?

I'm hoping some Unix or Raspbian guru knows what's occurring here. Thanks in advance.

  • Just to clarify, the duplicated card has less free space than the original? Are the two cards of the same capacity/size to start with? – Roger Jones Jan 10 '19 at 13:21
  • Hi, yes and yes. They're both SanDisk 128GB cards formatted the exact same way. – Col_JohnMatrix Jan 10 '19 at 13:31
  • On the duplicate card are the proc, dev and sys directories populated or empty? These are virtual filesystems created on-the-fly by the kernel and so don't actually take up space on the physical card but may have been copied over to the duplicate in error. Otherwise I'd suggest using something like rsync -nia /path/to/original/ /path/to/duplicate/ to list the differences between the two cards. Beware running that command on a "live" system though, might give you more false positives than useful information :( – Roger Jones Jan 10 '19 at 16:52
  • Ok. I ran the following and it produced a 20MB text file. I read a bit on the output from the 'i' flag, but, to sum it up, how do I interpret this output? Is it just the first character being 'c' that means "Changed"? lsblk <br/> mkdir usbstick <br/> sudo mount /dev/sda2 ~/usbstick <br/> mkdir sddata <br/> sudo mount /dev/mmcblk0p2 sddata <br/> sudo rsync -nia ~/sddata ~/usbstick > backup_diff.txt <br/> – Col_JohnMatrix Jan 11 '19 at 14:46
  • @RogerJones I made a C program to strip the extraneous data out of the output file from the previous message, but, as you said, the amount of bogus data is a lot to sort through. Even after doing that it reduced 43k lines down to 18k. Regarding your previous question, yes, the proc, dev, and sys DIRs ALL contain data, BUT none contained more than a few hundred KB (except for sys which contained 38MB), which still leaves the question unanswered as to how there can be a 2GB discrepancy between the original and copy. – Col_JohnMatrix Jan 12 '19 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.