TS-4710 DoubleStore: Difference between revisions
No edit summary |
m (Links auto-updated for 2022 re-branding ( http://www.embeddedarm.com/about/resource.php?item=628 → http://www.embeddedTS.com/about/resource.php?item=628 https://files.embeddedarm.com/apps/dblstorctl/dblstorctl-x86 → https://files.embeddedTS.com/apps/dblstorctl/dblstorctl-x86)) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
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. | 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.embeddedTS.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. | ||
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. | 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 [ | You can use the [https://files.embeddedTS.com/apps/dblstorctl/dblstorctl-x86 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: | ||
<source lang=bash> | <source lang=bash> | ||
export INPUTIMAGE="yourimagebackup.dd" | export INPUTIMAGE="yourimagebackup.dd" | ||
eval $(stat -c "imgsize=%s" $INPUTIMAGE) | eval $(stat -c "imgsize=%s" $INPUTIMAGE) | ||
dblstorctl --primary ${INPUTIMAGE}.dblstor --fallback | dblstorctl --primary ${INPUTIMAGE}.dblstor --fallback ${INPUTIMAGE}.dblstor.fallback --init --writeimg "$INPUTIMAGE" --size=${imgsize}B | ||
</source> | </source> | ||
This will output yourimagebackup.dd.dblstor which can be written directly to both SD cards: | This will output yourimagebackup.dd.dblstor which can be written directly to both SD cards: | ||
<source lang=bash> | <source lang=bash> | ||
dd if=yourimagebackup.dd bs=4M conv=fsync of=/dev/sdb # replace sdb with your SD card device | dd if=yourimagebackup.dd.dblstor bs=4M conv=fsync of=/dev/sdb # replace sdb with your SD card device | ||
</source> | </source> | ||
Latest revision as of 16:49, 17 January 2022
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 ${INPUTIMAGE}.dblstor.fallback --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
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.