Verifying a 64 GB MicroSD Card

Having just acquired a pair of 64 GB MicroSD cards for the HDR-AS30V camera, I found that I don’t have enough free disk space for 64 GB of white noise and, thus, can’t use the same technique as for the 32 GB card. I now, however, have a stockpile of helmet camera video files that are close enough to white noise for my purposes and come in convenient chunks.

Start by copying enough big video files to nearly fill the card:

sudo mount /dev/sdb1 /mnt/backup
sudo mount -o uid=ed /dev/sdc1 /mnt/part
FUSE exfat 1.0.1
cd /mnt/backup/Video
find -iname MAH*MP4 -size +3G | head -16 | xargs -I{} rsync -vrt --progress {} /mnt/part
sending incremental file list
MAH00122.MP4
  4,275,755,727 100%   11.94MB/s    0:05:41 (xfr#1, to-chk=0/1)

sent 4,276,799,695 bytes  received 35 bytes  12,487,006.51 bytes/sec
total size is 4,275,755,727  speedup is 1.00
... snippage ...

The head -16 ensures that you won’t waste a lot of time copying too many files. The card has about 59 GB free, so 16 x 4 GB is about right.

The -vrt adds verbosity and omits permission settings that ExFAT doesn’t understand; otherwise, you’d just use -va and be done with it.

Then tuck some smaller files into the remaining nooks and crannies:

find -iname MAH*MP4 -size -400M | head -16 | xargs -I{} rsync -vrt --progress {} /mnt/part
... snippage ...

Some fiddling with the -size -400M and head -16 values may be in order, depending on how many snippets of video data you may have.

Compare the copies with the original files:

cd /mnt/part
for f in * ; do find /mnt/backup/Video/ -name $f | xargs diff $f ; done

If you don’t see anything, then they’re all good!

There’s probably an algorithmic solution that would eliminate the guesstimation, but very nearly all of the time goes to copying and comparing, so it can’t make much difference.

2 thoughts on “Verifying a 64 GB MicroSD Card

  1. Had the same problem, thought it was my dvr till I figured out it was the new flash drive.
    A tool that worked for me: f3read.
    f3write fills the flash drive with random files, and f3read checks them.
    http://oss.digirati.com.br/f3/

    1. Looks like a good set of utilities with better reports. It seems everybody falls for a “too good to be true” memory deal once (or twice)… [sigh]

      Thanks for the tip…

Comments are closed.