s it worth it to disable journaling to preserve a flash drive?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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,
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.
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
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.