TS-4710 DoubleStore: Difference between revisions

From embeddedTS Manuals
(Created page with "The TS-471X supports DoubleStore which can be used to significantly increase the reliability of SD cards. See our [http://www.embeddedarm.com/about/resource.php?item=628 whit...")
 
No edit summary
Line 1: Line 1:
The TS-471X supports DoubleStore which can be used to significantly increase the reliability of SD cards.  See our [http://www.embeddedarm.com/about/resource.php?item=628 white paper] for more information on the concept.  When the board first boots, the bootrom will automatically detect and boot from the card whether it is formatted with DoubleStore or has standard formatting.
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 [http://www.embeddedarm.com/about/resource.php?item=628 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.


When sdctl is launched it will automatically detect as well if the card is running doublestore.  You can run "sdctl" to print whether it detects Doublestore as dblstor_autodetect_ok=0 or 1Our provided SD card images are not provided with Doublestore enabled to simplify development.
The default SD image is 3GB which is designed to fit in a dual-card Doublestore configurationWhen 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 convert a standard image to DoubleStore using the steps provided in the [[#Web Interface|web interface section describing Duplicating a card]].  Keep in mind when moving to Doublestore this will reduce the disk space by 44% due to the addition of the duplicated data, and the CRCs.  On a dual card configuration, so your Linux root filesystem has to be small enough to fit after this conversion. Read speed is limited to 88% of the maximum speed.
You can use the [ dblstorctl] utility to work with DoubleStore on your Linux workstationThe 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:
<source lang=bash>
export INPUTIMAGE="yourimagebackup.dd"
eval $(stat -c "imgsize=%s" $INPUTIMAGE)
dblstorctl --primary ${INPUTIMAGE}.dblstor --fallback /dev/null --init --writeimg "$INPUTIMAGE" --size=${imgsize}B
</source>


After converting to DoubleStore, you can run "sdctl" to get statistics on the running card:
This will output yourimagebackup.dd.dblstor which can be written directly to both SD cards:
<source lang=bash>
dd if=yourimagebackup.dd bs=4M conv=fsync of=/dev/sdb # replace sdb with your SD card device
</source>
 
The board will boot the same using the DoubleStore MicroSD cards, but sdctl includes additional information:
<pre style="font-family:monospace,Courier New ;background:black; width:18cm; white-space: pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; color:white; ">
# 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"
</pre>
 
fallback_configuration should read "seperate disk" when booting doublestore correctly.  For diagnostics, the tainted and failed settings are the most relevant:
<pre>
primary_tainted=0
primary_failed=0
fallback_tainted=0
fallback_failed=0
</pre>
 
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.

Revision as of 18:02, 23 August 2013

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.

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