LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2014, 08:27 PM   #1
ferite
Member
 
Registered: Jul 2014
Posts: 30

Rep: Reputation: Disabled
s it worth it to disable journaling to preserve a flash drive?


Hi.

I am applying some tweaks to my system in order to expand the life expectancy of the Flash drive where the OS is installed (eMMC card, that is a kind of SD, it has wear leveling). These include disabling swap, using noatime flag for / partition and mounting '/tmp', '/var/log', '/var/tmp' on memory.

Now the last recommendation I have found is to disable journal. But the system has to have the best resistance to power failures as possible. So I am not sure if it worths to disable the feature that makes ext4 recoverable when there is a power outage, only to avoid (some or many?) writes to memory.

It is a headless system, that has a main application that updates a text file, say once per minute. Other than this, the system only should run the daemons installed with an Ubuntu minimal install.

Thanks.
 
Old 10-10-2014, 09:40 PM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Considering the cost of flash cards, and the potential cost of a system crash, I don't think it's worth it. The card will be long obsolete before it's worn out by writes anyway,
 
Old 10-10-2014, 10:11 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
I have heard persons recommend not putting /swap on flash drives because of the number of writes, but I've not heard anyone recommend disabling journaling. Given the usefulness of journaling in case of a system crash, I would be reluctant to disable it.
 
Old 10-11-2014, 11:31 AM   #4
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgosnell View Post
Considering the cost of flash cards, and the potential cost of a system crash, I don't think it's worth it. The card will be long obsolete before it's worn out by writes anyway,
Unfortunately is not so easy. Although the memory I am using to store the OS is for many means like an SD card, it is a onboard chip. It means that when it is out, the motherboard will be out too. Because of this, I am doing my best to preserve it.

Quote:
Originally Posted by frankbell View Post
I have heard persons recommend not putting /swap on flash drives because of the number of writes, but I've not heard anyone recommend disabling journaling. Given the usefulness of journaling in case of a system crash, I would be reluctant to disable it.
I am thinking the same. But I would like to get some correlation between the intensity in which applications save files, and the journal activity, so I can at least get some approach to the life span of the eMMC memory.
 
Old 10-11-2014, 04:56 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
All ssd's go bad. They all slow down sooner than you'd like. They are kind of a bad choice for many things.

If you have to protect the system you have no choice but to implement some form of data protection by either filesystem of some kind. It may be possible to run some form of OS in ram on boot so that your drive is maybe used less. It would be writes or changes.

May be possible to write changes to other media also like remote iscsi.

A good quality ssd ought to do OK for a few years I'd think under normal use. In a simple few text edits, it might last 10 years.

Last edited by jefro; 10-11-2014 at 04:57 PM.
 
Old 10-12-2014, 11:05 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
I've had the journaling come to my rescue on several occasions over the years, so I'd never even thing of disabling it.
 
Old 10-12-2014, 12:06 PM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
If you disable journaling and then have a system crash that does not mean that the system cannot recover the file system. The system will run fsck against the entire partition. This will result in a lot of reads on the SSD. perhaps a few writes, and will be very slow.

------------------------
Steve tites
 
Old 10-14-2014, 04:47 PM   #8
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Thanks jefro, David and jailbait for your comments.

As jefro said, I think the best way to make the system as power failure resistant as possible, and do not worry about wearing the Flash storage, is boot to RAM. After my research I think the best way to load the system to RAM on boot is by applying this script.

As usual I would appreciate if there is any thought on this matter.

Last edited by ferite; 10-14-2014 at 05:56 PM.
 
Old 10-14-2014, 04:59 PM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
The system always boots to ram, no? (goes from storage device to ram)
 
Old 10-14-2014, 06:01 PM   #10
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
The system always boots to ram, no? (goes from storage device to ram)
@keefaz. If you refer to my last message, I forgot to insert the link to the thread I was trying to point. By running this script (once) you can make a "standard" Ubuntu system always creates a RAM filesystem. The only directory mounted from the real storage device is /home, so all things you save there are persisted.
 
Old 10-14-2014, 10:16 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Some ssd's offer built in ways to protect data also.
 
  


Reply

Tags
flash cards, journal



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
Using Arch linux as Mac Time Machine server - write access disable journaling failing psycroptic Linux - Hardware 7 04-10-2014 01:26 AM
[SOLVED] Linux services - disable startup but preserve the kill guna_pmk Linux - Server 4 10-24-2013 11:32 AM
disable journaling on ext3 Andrastus Linux - Hardware 11 02-02-2010 06:08 PM
ext3's journaling optimizes hard drive head motion? i.you Linux - Software 1 10-05-2006 08:55 AM
ext3's journaling optimizes hard drive head motion i.you Linux - Kernel 2 10-04-2006 05:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:24 PM.

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