Hi
I am trying to do a wear leveling test on a series of SD cards. I relation to this my idea was to use dd to write, read, rewrite and reread the same "first block" on the SD card - my for doing this is the following -
dd if=data of=/dev/sdb bs=512 count=1 conv=fsync rm readdata >/dev/null dd if=/dev/sdb of=readdata bs=512 count=1 conv=fsync
I then do a md5sum on data and readdata to ensure that everything is ok, afterwards I overwrite the same block with zeroes,
dd if=zero of=/dev/sdb bs=512 count=1 conv=fsync rm zerodata >/dev/null dd if=/dev/sdb of=zerodata bs=512 count=1 conv=fsync
Again I compare the md5sum of zero and zerodata, these two processes keep occuring over and over again.
Now to my question, can I be sure that my operating system, flushes the data to the SD card. From the man dd, I get the following:
"" sync pad every input block with NULs to ibs-size; when used with block or unblock, pad with spaces rather than NULs
fdatasync physically write output file data before finishing
fsync likewise, but also write metadata ""
Or am I not writing anything at all to the SD card?
Thanks in advance for your input
Jesper Nielsen