I just made backup of SD card with dd command:

dd if=/dev/mmcblk0 of=backup.img bs=64k

When I started copying, Gnome Files said that there is just 8.5GB of free space from total 400GB. I forgot that I changed SD card from 8GB to 16GB, so I copied 16GB instead of 8GB. The dd command succeed, so the remaining free space should be -7.5GB.

How is possible that the dd didn't fail? Gnome Files said 0 bytes of free space and the file was 16GB big. I haven't tried if the file is complete or corrupted, but during copy process the size of file was changing. Did the dd overwrite any data or was the rest stored in Cache? The backup.img was new file and fs is ext4.

I know that GUI is not the best tool for getting info, but I was lazy.

  • 2
    dd normally fails with "no space left" error. However xfs (and some older filesystems too) has some blocks reserved for the root user, you might have used this reserved space. Check with xfs_io -x -c resblks /mountpoint – VPfB Jul 30 '17 at 15:28
  • That would make sense. In this question is said that ext4 has reserved 5% of space by default and I haven't changed it. I thought that it should fail but I wasn't sure when it had root permissions. – Jirka Picek Jul 30 '17 at 16:16
  • 1
    To support VPfB's comment: read the example in my answer to another question. – Kamil Maciorowski Aug 14 '17 at 9:13

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.