IRC #olimex 2015-11-13

[13:24:33] <blapppp> Hi there!
[13:25:01] <blapppp> Have some of you already worked with https://www.olimex.com/Products/SOM/A13/A13-SOM-256/ ?
[13:27:53] <blapppp> Noone here ? ;)
[14:17:53] <_tom_> hello
[14:18:40] <_tom_> I'm considering the purchase of the A13 board and wondering about the best power supplying
[14:19:02] <_tom_> especially powering with the batteries
[14:19:35] <_tom_> is there any good/tested solution to prvent the image being currupted when the batteries start to run out of power?
[14:20:02] <_tom_> some circuit that would test it and then inform the system to perform the shutdown before it dies?
[14:20:38] <_tom_> \help
[14:38:49] <keesj> _tom_: most (linux) based systems try to fix the powerloss at higher level. at least I don't know of any router that can be attached to a UPS
[14:39:59] <keesj> but yea , they don't have must interesting data. choosing the right file system / using a database often will be enough.
[14:42:03] <keesj> that said. doing a shutdown when a GPIO gets low sounds like a trivial solution
[14:43:45] <_tom_> the reason I'm asking this
[14:44:07] <_tom_> is because so far I have played with Arietta board
[14:44:37] <_tom_> and already have had a few cases when the SD image got corrupted when the batteries power got too low
[14:45:20] <_tom_> have found such a solution in the meantime: http://raspi.tv/2013/controlled-shutdown-duration-test-of-pi-model-a-with-2-cell-lipo
[14:47:17] <_tom_> so when you guys power Olimex boards with batteries, you do not bother about the SD/NAND images curruption?
[14:47:48] <_tom_> there is a warning about that in A13 documentation...
[14:49:10] <_tom_> "It is recommended to always make a software “turn off” of the board. After that you can safely remove the power supply. If you disconnect the power supply (either the USB or the power supply) before turning off the board you may corrupt your SD card. If your board has NAND memory you can corrupt the image located on the NAND memory."
[14:49:45] <_tom_> so how do you solve that?
[14:49:57] <keesj> I am not doing such much projects here to be honest. SD/NAND/MMC corruption are actually very hard to prevent and my guess is that indeed most people won't care because at the OS level we have things like journaling file systems. the read danger is the software inside the MMC that can move blocs and fully corrupt the storage
[14:51:10] <keesj> you shutdown properly indeed (when you have a battery) or hope for the best
[14:51:23] <keesj> what kind of corruption did you experience?
[14:53:07] <keesj> I found http://www.theregister.co.uk/2015/09/24/future_is_data_integrity_not_confidentiality/ a very interesting read
[15:16:57] <_tom_> in Arietta case, there were two partitions - the boot one and the system one
[15:17:41] <_tom_> and AFAIR the 2nd partition were getting corrupted - the partition information
[15:17:59] <_tom_> so it was possible to recover the data, but the partition was not visible to the ssytem
[15:26:21] <keesj> but file system level corrution ? e.g. something that can be solved by using a journaling system?
[15:27:53] <_tom_> hmmm, not sure - that was the MBR formatted SD card with FAT
[15:28:52] <keesj> yea that kinda is why MS switched to exFAT (and made it non free for others to use).
[15:29:45] <keesj> At my previous company (to keep backward compability) we used a fuse file system on a FAT partition(so you can still plug a card into M$ without getting if formatted)
[15:31:18] <keesj> I suggest just swiching to ext4 (check the correct flags like disable access time) enable only meta-data journaling and rely on higher level stuff like (sqlite) databases. but in the end I think you are righ and proper shutdown is a very nice feature.
[18:36:51] <_tom_> keesj: thanks - will try with ext4