TS-4720 Doublestore
This series supports DoubleStore which can be used to significantly increase the reliability of MMC cards. See our white paper for more information on the concept. This board supports using the eMMC in a single card doublestore configuration. Dual card configuration is not supported over the SD and eMMC.
The eMMC image is approximately 1.6GB which is designed to fit in a single card Doublestore. Approximately 55% of the drives is available in the default image, but plenty of packages in apt can be removed from the default image if not in use.
In Linux most of the interaction with Doublestore is done using sdctl. To see the runtime information:
sdctl --stats
# These values use variable=value, so you can also use eval to
# easily access these variables in scripts:
eval $(sdctl --stats)
if [ fallback_configuration = "same disk" ];
then echo "Using Doublestore
fi
These are all of the values output from "sdctl --stats": This value is just tracking the sdctl pid:
nbdpid=289
Total read requests:
nbd_readreqs=50
Total read blocks (512B):
nbd_read_blks=1186
Total write requests:
nbd_writereqs=0
Total write blocks (512B):
nbd_write_blks=0
If there is an access past the end of the drive this will count attempts. This is caused by software bugs in higher up Linux layers.
nbd_seek_past_eof_errs=0
SD/eMMC power cycles. The controller will automatically power cycle the card in a few error conditions or failed read/writes, but this does not necessarily indicate a failure. This can also increment any time a card is hotswapped.
sdcard_resets=3
Total address changes before a read. During a read/write the address will automatically increment, but for noncontiguous access the address must be rewritten.
read_seeks=43
Total address changes before a write.
write_seeks=0
Size (hex) of the card.
size=0x0
Human readable size of the card.
humanized_size=0KB
fb_offset=0 primary_tainted=0 primary_failed=0 fallback_tainted=0 fallback_failed=0 resilver_pct_done=0 lifetime_write_blks=0 humanized_lifetime_write_blks=0KB errors=0 unrecoverable_errors=0 conflicts=0 fallback_configuration="same disk"
You can use the dblstorctl utility to work with DoubleStore on your Linux workstation. The simplest way to get doublestore set up is to first take a backup of your SD image, and then use dblstorctl on a workstation to convert it:
export INPUTIMAGE="yourimagebackup.dd"
eval $(stat -c "imgsize=%s" $INPUTIMAGE)
dblstorctl --primary ${INPUTIMAGE}.dblstor --fallback /dev/null --init --writeimg "$INPUTIMAGE" --size=${imgsize}B
This will output yourimagebackup.dd.dblstor which can be written directly to both SD cards:
dd if=yourimagebackup.dd bs=4M conv=fsync of=/dev/sdb # replace sdb with your SD card device
The board will boot the same using the DoubleStore MicroSD cards, but sdctl includes additional information:
# sdctl --stats nbdpid=338 nbd_readreqs=1508 nbd_read_blks=95490 nbd_writereqs=0 nbd_write_blks=0 nbd_seek_past_eof_errs=0 sdcard_resets=4 read_seeks=1261 write_seeks=0 size=0x641800 humanized_size=3.35GB fb_offset=-6559744 primary_tainted=0 primary_failed=0 fallback_tainted=0 fallback_failed=0 resilver_pct_done=0 lifetime_write_blks=59038888 humanized_lifetime_write_blks=30.22GB errors=0 unrecoverable_errors=0 conflicts=0 fallback_configuration="separate disk"
fallback_configuration should read "seperate disk" when booting doublestore correctly. For diagnostics, the tainted and failed settings are the most relevant:
primary_tainted=0 primary_failed=0 fallback_tainted=0 fallback_failed=0
When a card is tainted, the LED near the card will begin to blink. This indicates Doublestore has seen the card perform an unexpected behavior that DoubleStore was able to correct.