LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 02-12-2015, 11:00 AM   #1
ma_synchronic
LQ Newbie
 
Registered: Feb 2015
Posts: 4

Rep: Reputation: Disabled
Which root filesystem for embedded system using SD card and that can restart ?


Hi,

I use an embedded system such as :
- customized from Atmel SAMA5D3_Xplained
- using only an SD card high capacity (SDHC 8 Go, class 10)
- boot from SD card (no flash drive)
- use 2 partitions :
-- FAT : for bootloader and kernel
-- ext3 : for root file system, with option noatime,nodiratime,barrier=1 (in fstab)

My question :
I want to change my partition system such as :
- FAT : for bootloader and kernel (like previously)
- ext4 : for root file system and a few write (only during update binaries)
- ??? : for additional files (environ 10 files) but with a lot of write
But I don't know which file system is the better choice for this 3rd partition.

I read other discussion and I read often that Ext4 and JFS would be a good choice, but I fear that appeals to sync is slow.
 
Old 02-12-2015, 11:39 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
I say ext4 without journal.
 
Old 02-12-2015, 01:11 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I like XFS and use that. I also use ext2 for my boot partition.

I've never used ext3 for anything.

(Stepping up on my soap box)

When making embedded systems and having things like Compact Flash, SD card, or other forms of "flash" drives. My rules of thumb are that I minimize all writes to disk as much as possible, if not near entirely. Why? Because constant writes and re-writes eventually degrade the flash drive. The individual storage points get a bias or small charge where eventually they'll be so biased that they can no longer be logically switched, thereby leaving them stuck at either 1 or 0 permanently. That's what causes flash drives to eventually wear out.

There is wear leveling which is performed by the file management system, and likely nothing special needs to be applied to use that, I don't know but I'm betting the default file system for most modern kernels just does that as a common practice no matter what the storage media is.

However if you have greater than 50% of the disk used and then have a remaining 50% say, and you use close to half of that, or let's just say for whatever space you have, you commonly use/re-use 50% or more of that as you run and end up writing, erasing, re-writing stuff; wear leveling IMHO isn't going to help you, because the space for performing this leveling is limited due to the fact that you're using half or more of your disk already, and anything which is stored but left alone such as RFS binary files and so forth, those aren't going to be moved as part of the leveling.

Use of a RAM drive is good to do. Many hobby and embedded boards have little RAM to start with though, so just a heads up.

(Tripping backwards off that soap box, sorry for "going on")
 
Old 02-12-2015, 01:25 PM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Also to recommend is F2FS but it is still in experimental stage. It is developed/built minding the usb/sd flash drives. It reduces wearing.
 
Old 02-13-2015, 04:31 AM   #5
ma_synchronic
LQ Newbie
 
Registered: Feb 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank's for each response.

My 3rd partition contains files used such as :
- some log files (2 text files) where new log is appended at end of file, but they are a lot of writing
-- so theses writing don't use the same secteur of SD card and theses files can use 1Go dedicated
- the other files is modified anywhere, but they are some writing
-- so theses writing can use the same secteur of SD card

My problem is that I don't RAM disk because my application (security and access control system) should not lose information if I turn off the power of board.
In the worst case, I accept to lose data but never journal because it's an embedded autonomous system.

The file system that write first data then write journal seems a good choice for log file on append. Because if the system loses the last log (less 10 events since 5 seconds) after the turn off.

Today on a another embedded system board (with AM3517 and kernel 2.6.36), I use ext4 with commit 10 minutes and I call sync() after each writing for the more important file. But this sync() call can slow down system during a some seconds (< 5sec)
 
Old 02-13-2015, 07:58 AM   #6
ma_synchronic
LQ Newbie
 
Registered: Feb 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Here's what I could use for the partition with log files :
- UBIFS, PRAMFS, F2FS or YAFFS

Here the file system ignored because there are obsolete or read-only or RAM only :
- JFFS2, SquashFS, RomFS, CRAMFS and LogFS

If you are an "good" or a better choice, I'm interested.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] root file system starting address in Nand flash info for kernel in embedded boards ayyasprings Linux - Embedded & Single-board computer 0 10-15-2014 06:45 PM
[SOLVED] How can I do to make the system check the root filesystem next boot? stf92 Slackware 6 10-12-2014 09:04 AM
after expanding filesystem, system reports correct filesize but only root can write jonas_berlin Linux - General 6 01-15-2012 02:36 PM
what to do when automatic file system check of the root filesystem fails? kayaksport15 Linux - Newbie 4 07-08-2008 07:31 AM
Can you add a regular PCI card to an embedded system? Cadmus Linux - Embedded & Single-board computer 2 01-16-2008 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration