LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-22-2013, 05:00 PM   #1
romagnolo
Member
 
Registered: Jul 2009
Location: Montaletto
Distribution: Debian GNU/Linux
Posts: 107

Rep: Reputation: 5
Wear leveling, Compression and Journaling Filesystem for SD cards


I'm looking for the ideal filesystem to place in my SD card holding the root of the operating system.

The FS must support journaling in order to provide better data safeness; compression is also quite necessary considering that cheap SDs can't usually hold a whole small/medium-sized FS; also, wear leveling would be appreciated given the nature of the underlying memory device.

I had a look at some of the most common and "production-level" FS, such as JFFS2, LogFS, UBIFS, etc, but these either can't work with SD cards (they require RAW flash memory access) or don't provide the required features expressed above.

If you know something please let me know.
 
Old 03-22-2013, 05:14 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,317

Rep: Reputation: Disabled
Ext2. No journal. You do not want writes on your SSD in every 5 seconds - that's what journaling does. Journal does not make your filesystem safer, it merely speeds up recovery in case of crash. Ext4 with trim may be reasonable if your drive supports it.
 
Old 03-22-2013, 08:47 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,222

Rep: Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196
I have never heard of a SD card with wear leveling. If you need secure data then don't use SD cards. There are newer solid state drives for this task. Even older IBM microdrives might be a better choice than SD card.

I agree that the common Ext2 is the main choice for most users on flash media. Any sort of extra use by journals could cause it to fail sooner.

Btrfs is a production filesystem with compression and a number of protection tools but the type of data you wish to use is the most important first step. What are you doing with the sd card and system?
 
Old 03-23-2013, 11:41 AM   #4
romagnolo
Member
 
Registered: Jul 2009
Location: Montaletto
Distribution: Debian GNU/Linux
Posts: 107

Original Poster
Rep: Reputation: 5
The SD card is gonna be the root device for a notebook. Data safeness may actually be reconsidered as not the highest priority of the FS since an rc0.d (rc6.d) backup of the card may be scheduled to dump into the integrated hard-drive.

Data compression is a determinant factor since even simple algorithms such as LZO provide overall compression rates of 3x and improve read/write speed. This is especially true for cheap SD cards.

I've tried EXT2 bounded to the e2compr patch which introduces support for compression. The FS came out unstable over the short term.

I'm reluctant to Btrfs as, while it's still in alpha stage, it's FAQ/notes clearly state that it "sometimes may lose data" for pleasure.

Currently I'm looking around Reiser4 to see if it may be suitable for the SD card. Its main problem is that its intrinsic journaling must be disabled, but at fist it doesn't seem possible.
 
Old 03-25-2013, 04:51 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,222

Rep: Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196Reputation: 3196
I read an interesting thing about btrfs.

"If you have ever created thousands of files in a directory on an ext file system and then deleted the files, you may have noticed that doing an ls on the directory would take much longer than you’d expect given that there may only be a few files in the directory. You may have even had to run this command:

e2fsck -D /dev/sda1

to re-optimize your directories in ext. This is due to a flaw in how the directory indexes are stored in ext: they cannot be shrunk. So once you add thousands of files and the internal directory index tree grows to a large size, it will not shrink back down as you remove files. This is not the case with Btrfs. In Btrfs we store a file index next to the directory inode within the file system B-tree. The B-tree will
grow and shrink as necessary, so if you create a billion files in a directory and then remove all of them, an ls will take only as long as if you had just created the directory."

From here. http://static.usenix.org/publication...pdfs/Bacik.pdf
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Most Lightweight Non-Journaling Filesystem Super TWiT Linux - Software 2 07-06-2011 04:44 PM
Security implications for Wear-Leveling of Hard Disks Completely Clueless Linux - Security 9 03-17-2010 11:03 AM
What journaling filesystem has good recovery tools? eco Linux - Server 5 01-20-2009 09:00 AM
Understanding Journaling FileSystem Jzarecta Linux - Software 7 01-02-2006 02:59 PM
What journaling filesystem do you use? jeremy Linux - General 1 08-29-2001 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:56 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