Why I cannot format a microSD to ext4?

2

I have a Toshiba Class 10 64GB microSD that I want to use in a tablet (Cyanogenmod 11) by formatting it ext4.

So I did the usual thing (under Fedora 20): created a single Linux partition with sfdisk, then created the ext4 partition with mkfs.ext4 /dev/sdf1 without problems. Then, I just tried to mount it with mount -t ext4 /dev/sdf1 /mnt/sd/, but I got a journal error:

 JBD2: no valid journal superblock found
 EXT4-fs (sdf1): error loading journal 

Tried googling this, but didn't find anything useful.

Any ideas?

Thanks!

L.

Luis A. Florit

Posted 2014-08-17T19:40:40.610

Reputation: 151

If you have Windows handy, I suggest checking the card with h2testw. It might simply be broken. Yes, this can also occur with new devices.

– Daniel B – 2014-08-17T19:44:05.800

@DanielB: mkfs.ext4 -c shows no errors. – Luis A. Florit – 2014-08-17T19:46:38.460

1Additionally please understand, that ext4 is an extremely poor fit for an SD card - it has a static journal, and SD cards typically have static block mapping - this means, that you will wear out the card in no time. – Eugen Rieck – 2014-08-17T20:04:10.647

@EugenRieck: My SD card was formatted exfat, but exfat has a nasty bug with caching files (acknowledge by Microsoft) that prevents to copy many small files on it in reasonable time. I've 55000 files to load to it, and failed many times because of this. I've my pen drives formatted ext3/4 for a long time now, without problems. Which problem are you referring to? Thanks. – Luis A. Florit – 2014-08-17T20:29:56.620

He’s referring to repeated writes to the same block(s). Because SD cards don’t do wear leveling, this block will be destroyed in no time. Buuut you can also use ext4 without journaling. :) – Daniel B – 2014-08-17T21:11:54.807

A memory pen ("USB Stick") typically has a dynamic block map, an SD card typically a static mapping. This means, that wearout of an SD card is higher (by orders of magnitude) than of an USB stick. YMMV, but I recommend something like YAFFS. – Eugen Rieck – 2014-08-17T21:38:40.383

I see. Anyway, I think I won't have the problem anymore since I had to disable the journaling to be able to format the SD card (my original problem), and now I can mount it. No idea what happens. – Luis A. Florit – 2014-08-17T22:38:32.603

"SD cards don’t do wear leveling" -- Contradicted by these answers: http://electronics.stackexchange.com/questions/27619/is-it-true-that-a-sd-mmc-card-does-wear-levelling-with-its-own-controller – sawdust – 2014-08-18T06:57:43.027

Answers

2

Try formatting without journaling and it should work:

mke2fs -t ext4 -O ^has_journal /dev/sdf1

Being an SD card, you probably don't want journaling enabled.

victorbrca

Posted 2014-08-17T19:40:40.610

Reputation: 21

Welcome, and thanks for answering this question. Would you consider adding a few sentences to your answer to explain why journaling would not be desirable on an SD card? – fixer1234 – 2014-11-27T04:40:07.067

I already said this in a comment to my original post. Anyway it seems it is a hardware problem. – Luis A. Florit – 2014-11-28T10:47:02.717