<div dir="ltr"><br><div class="gmail_extra"><br clear="all"><div><b>Jordi Soucheiron</b><br>
Software Engineer<br><a style="color:rgb(102,153,0)" href="mailto:jsoucheiron@dexmatech.com" target="_blank">jsoucheiron@dexmatech.com</a><br>
<br>
<b>DEXMA</b><div>Marie Curie, 8-14, Barcelona, ES-08042<b><br></b><div>5 Penn Plaza, Suite 2300, New York, NY 10001<br>t: (+34) 93 181 01 96<br><div><a href="http://www.dexmatech.com" target="_blank">www.dexmatech.com</a><br>
<br>Follow us on <a href="http://www.twitter.com/dexma" target="_blank">Twitter</a> and <a href="http://www.linkedin.com/company/247838" target="_blank">Linkedin</a><br>Síguenos en <a href="http://www.twitter.com/dexma_ES" target="_blank">Twitter</a> y <a href="http://www.linkedin.com/company/dexma-tech" target="_blank">Linkedin</a><br>
</div></div></div></div>
<br><br><div class="gmail_quote">2013/7/11 Nils Toedtmann <span dir="ltr"><<a href="mailto:voyage-linux-mail@nils.toedtmann.net" target="_blank">voyage-linux-mail@nils.toedtmann.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Voyage community<br>
<br>
<br>
First: Voyage Linux is great! It makes building embedded systems<br>
significantly easier - thanks to everyone who contributed!<br>
<br>
<br>
I have a number of questions about writing data to CF on ALIX (before<br>
you rant about even wanting to do this - see my use case and motivation<br>
in the PS below).<br>
<br>
I apologize in advance if i haven't found existing answers in the Voyage<br>
documentation. I did do some research, but admit that being only a<br>
sysadmin, i didn't dive into the depths of Voyage's development docs.<br>
<br>
<br>
Here are my questions:<br>
<br>
* Most documentation says that CF wears down quickly when many write<br>
operations happen. But those docs are 5-10 years old. Do modern<br>
'industrial grade' CF cards still suffer from this problem? I wonder<br>
because nowadays it is pretty common to use flash based SSDs in<br>
write-heavy systems.<br></blockquote><div>Heavy writing in SSD is not usually a good idea. The disks will inevitably wear down eventually. It's only a matter of time, but it may be worth it depending on what you need to do. </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* PC Engine recommend [1] to have partitions aligned to flash's 2K or<br>
4K page size. But most partitioning software assumes 63 sectors (512<br>
bytes each) per track. How would i partition a CF card such that the<br>
partitions are aligned properly, e.g. using Voyage's fdisk? Maybe just<br>
use multiples of '8 tracks = 63*4K'?<br>
<br>
* I have the rootfs on a ro partition, and write my data to a separate<br>
rw partition. Is it safe to assume that even if a powercycle corrupts my<br>
data partition, that the rootfs partition is still intact?<br></blockquote><div>It should work just fine. I've known many people that has a factory default values in ro partitions and restore it in case of failure of the rw partition. I use rw for the whole disk most of the time and I mount the logs directories in ram. I usually sync this directories every hour or so to reduce the cf wear. </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* Besides your recommendations to adjust the vm.dirty_* syscontrols<br>
when writing to CF [2] - What are your recommended file systems and<br>
mount options for rw data partitions to reduce the risk of data loss on<br>
a powercycle? E.g. i see people recommending to use ext3 or ext4 with<br>
'journal=data' and/or 'sync' (at the expense of reduced write speed). Is<br>
that sound?<br></blockquote><div>Journaling systems increase the number of writes to the CF. You should consider If it's worth it. Remember that ext3 is basically ext2 + journaling. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* Does Voyage Linux do a file system check when it mounts additional<br>
file systems if they have fs_passno=2 (6th field) in /etc/fstab? Does<br>
the fsck call include the "-y" option to force automatic fixing mode?<br>
<br>
* Would it work if i symlinked /var/log/ into a rw data partition and<br>
removed it from 'SYNC_DIRS' in /etc/init.d/voyage-sync ?<br></blockquote><div>You don't need to symlink it, just mount it there ;) And yes, it should work</div><div><br></div><div>Sorry but I can't help you with the others</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Any advise would be greatly appreciated!<br>
<br>
<br>
Cheers, /nils.<br>
<br>
<br>
[1] <a href="http://www.pcengines.ch/cfperf.htm" target="_blank">http://www.pcengines.ch/cfperf.htm</a><br>
[2] <a href="http://linux.voyage.hk/content/getting-started-v09x" target="_blank">http://linux.voyage.hk/content/getting-started-v09x</a><br>
<br>
<br>
PS: Disclaimer & use case:<br>
<br>
I know that CF is not advised for permanent storage when powercycles can<br>
happen at any time. We use ALIX + Voyage linux to collect and cache, and<br>
send sensor data to central servers. The data we write to CF is not<br>
critical. However, for a number of reasons it would be very helpful if<br>
the data survived powercycles:<br>
<br>
* Cached sensor data that hasn't been sent out yet (some of our ALIXes<br>
have unstable uplinks, e.g. 3G) would not get lost<br>
<br>
* Stored states would allow the data collection to resume significantly<br>
quicker<br>
<br>
* Logs up to just before a system fault (e.g. OOM) would be very<br>
helpful for debugging<br>
<br>
_______________________________________________<br>
Voyage-linux mailing list<br>
<a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a><br>
<a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/listinfo/voyage-linux</a><br>
</blockquote></div><br></div></div>