TS-7600 DoubleStore

From embeddedTS Manuals
MicroSD.png Click to download the latest 4GB DoubleStore SD card image.

This series supports DoubleStore which can be used to significantly increase the reliability of SD cards. This allows one SD image to be written to two cards allowing redundancy among both SD cards. See our white paper for more information on the concept. Development can take place with a single MicroSD card, but for using DoubleStore 2 MicroSD cards are used.

Note: Due to the design of the SBC and its use of the NXP bootstream, the device cannot directly boot from a DoubleStore dataset. The device must first boot from on-board media (SPI, NAND, eMMC), and the initramfs will then find the DoubleStore dataset and mount it to the Debian directory. From there, the unit can boot to Debian on the DoubleStore dataset, either manually with the 'exit' command, or by setting up the initramfs to boot straight to Debian. See the Initramfs section for more details on setting up the initramfs to accomplish this.

The default SD image is 3GB which is designed to fit in a dual-card Doublestore configuration. When dual card doublestore is used it stores the same image on both cards and also includes metadata and checksums for the entire image.

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.dblstor bs=4M conv=fsync of=/dev/sdb # replace sdb with your SD card device

Note that the stock DoubleStore image linked at the top of this section can be used in place of 'yourimagebackup.dd' to write our stock image to a two card DoubleStore set.


The board will boot the same using the DoubleStore MicroSD cards, but dblstorctl includes additional information:

# dblstorctl --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.