Ext4 journaling on a (micro)sdcard

Ask questions about Arch Linux ARM. Please search before making a new topic.

Ext4 journaling on a (micro)sdcard

Postby linuxfan » Fri Mar 28, 2014 3:50 pm

Hi all,

I installed ArchLinux on an Olimex board Olinuxino Maxi (ARM CPU, root filesystem on SD card) about 4 months ago.

The device is meant to be a bridge from an apparatus with serial port and the Internet. This is done by using the integrated ethernet port and a Usb-to-serial dongle plugged in the Olinuxino. This device runs a kind of web server written by me, and an ssh server for administration purposes. All was working very well.

Last week, i.e. after 4 months from install, the device stopped working. I went to see, and I found the SDcard was unmountable because of FS errors. The kernel was loading fine, though. I took out the old SDcard and put in place a new one, with the latest image of ArchLinux for Olinuxino on it. The board went up normally and the day after, using ssh, I reconfigured all the things and reloaded my software.

Then I decided to investigate the broken SDcard. Plugged in my PC and attempted to mount it. It worked, but the whole directory /etc was missing... Unmounted, and fsck found a LOT of errors. Corrected, and still other errors. I am not sure if I want to try again to fsck it, or format it again, or both or neither.

Then I looked better at the new SDcard, working fine in its place, and I noticed that the root file system was an EXT4 with JOURNALING enabled. I think that journaling is no good for a flash device, so I turned it off (not very simple, from remote).

Now I want to know:

1. If somebody knows better than me how can journaling impact on a SDcard which works very little (the only duty of the board is to run a ssh server and a web server which writes only a little log of accesses on disk), she/he could tell me more.

2. If I am true thinking that journaling is no good for a board like Olimex Olinuxino, than the Archlinux team should consider to NOT enable journaling by default. I can say that my SDcard was a Kingston (good brand?), new or semi-new.

Thank you in advance,
Linuxfan
linuxfan
 
Posts: 2
Joined: Fri Mar 28, 2014 2:30 pm

Re: Ext4 journaling on a (micro)sdcard

Postby renegat » Sat Mar 29, 2014 7:47 pm

I agree that ext4 with journal enabled is suboptimal for any flash drive which have limited write cycles by design - even if the kernel used by ALARM at least for Odroid-U2 (3.8 'Unicycling Gorilla') has support for F2fs (Flash-Friendly File System) built in.

EDIT:
As I do know now after using f2fs on a mSDHC mounted as /home for several weeks this 'Flash-Friendly File System' is highly damageable by power failures, generally unstable and there is no repair tool like fsck.
When its broken all data is lost - not really suited for an os.

BTW:
An original Kingston microSDHC has 'Product Lifetime Warranty':
From Kingston-page:
$this->bbcode_second_pass_quote('', 'T')he following Kingston products are covered by this warranty for the life of the product:
Memory modules including ValueRAM®, HyperX®, Retail Memory and Kingston system-specific memory; Flash memory cards (e.g., Secure Digital, Secure Digital HC and XC, CompactFlash, MultiMediaCard, SmartMedia) and Flash adapters.
Last edited by renegat on Tue Apr 15, 2014 7:57 am, edited 1 time in total.
Odroid U3+ / U3 / U2 / C1+ / XU4 / HC1 / MC1
RPi 1B / 1B+ / 2B / 3B / Zero WH
renegat
 
Posts: 26
Joined: Sat Oct 12, 2013 1:56 pm

Re: Ext4 journaling on a (micro)sdcard

Postby linuxfan » Sat Mar 29, 2014 11:02 pm

I am not sure about what Kingston really means with "Life Warranty". The SDcard will cease to work, some day!

Anyway, I decided to test again the old card: after one or two fsck, it started to work without problem.

I found a few files and dirs in /lost+found (this is normal), but at least I noticed a very strange thing - a couple of text file contained clearly wrong characters, like just some bit wrong in a single sector. I would like to re-write this sectors, but probably I can't because of the flash logic in the middle.

Thinking about the journaling, I think that, at least in my case, it is not guilty (too few data written).

I will wait for some info. Thank for the reply.
linuxfan
 
Posts: 2
Joined: Fri Mar 28, 2014 2:30 pm


Return to User Questions

Who is online

Users browsing this forum: Google [Bot] and 10 guests