Picked up a Sandisk 32 GB Micro SD Card from a reputable supplier for $0.62/GB, in the hope that Santa will deliver a helmet camera:
Until that happy event, I verified that it can store and return 32 GB of white noise with absolute fidelity.
It came formatted with an empty FAT32 filesystem that allows single files up to 4 GB. Reformatting with exFAT supports vastly larger capacities and, in this case, allows single files up to 32 GB. Whether it’s actually legal to use exFAT on a Linux box remains up for grabs, but installing
exfat-utils, which drags in
exfat-fuse, does the trick.
Verifying the SD Card capacity went swimmingly, much along the lines of the original recipe. The data file size came from the card’s FAT-32 formatting and is a smidge less than the capacity after reformatting the card with exFAT. Close enough for this purpose.
dd bs=1K count=31154656 if=/dev/urandom of=/mnt/part2/Testdata/Testdata.bin (This took the better part of an hour; I didn't record it.) sudo mkexfatfs -i babeface -n SanDisk32GB /dev/sdb1 mkexfatfs 1.0.1 Creating... done. Flushing... done. File system created successfully. sudo dumpexfat /dev/sdb1 dumpexfat 1.0.1 Volume label SanDisk32GB Volume serial number 0xbabeface FS version 1.0 Sector size 512 Cluster size 32768 Sectors count 62325760 Free sectors 62317504 Clusters count 973719 Free clusters 973711 First sector 0 FAT first sector 128 FAT sectors count 7616 First cluster sector 7744 Root directory cluster 7 Volume state 0x0000 FATs count 1 Drive number 0x80 Allocated space 0% time rsync --progress /mnt/part2/Testdata/Testdata.bin /mnt/part/Test.bin Testdata.bin 31902367744 100% 9.15MB/s 0:55:24 (xfer#1, to-check=0/1) sent 31906262150 bytes received 31 bytes 9594425.55 bytes/sec total size is 31902367744 speedup is 1.00 real 55m25.791s user 3m16.088s sys 2m7.808s df -h /mnt/part Filesystem Size Used Avail Use% Mounted on /dev/sdb1 30G 30G 4.0M 100% /mnt/part time diff /mnt/part2/Testdata/Testdata.bin /mnt/part/Test.bin real 28m43.878s user 0m4.044s sys 0m42.902s ll /mnt/part/Test.bin -rwxr-xr-x 1 ed root 31902367744 Dec 2 18:32 /mnt/part/Test.bin* rm /mnt/part/Test.bin df -h /mnt/part Filesystem Size Used Avail Use% Mounted on /dev/sdb1 30G 4.1M 30G 1% /mnt/part
I’m probably easily impressed, but wow that’s a lot of data in a little chip of plastic… for $20 delivered.