Corrupted file system on eMMC with iMX6SL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Corrupted file system on eMMC with iMX6SL

3,057 Views
samuelrythm
Contributor I

Hi all,

We observe sometimes a file system corruption on the eMMC that we are not able to explain. Once it happened, either on rootfs or on data partition, the system is still working but affected files cannot be accessed as input / output error appears when we try to.

The output 'fsck' the command is as following :

fsck from util-linux 2.27.1

e2fsck 1.42.13 (17-May-2015)

/dev/sdc2 contains a file system with errors, check forced.

Pass 1: Checking inodes, blocks, and sizes

Pass 2: Checking directory structure

Entry 'bluetooth' in /var/lib (4103) has deleted/unused inode 16391.  Clear? no
Entry 'bluetooth' in /var/lib (4103) has an incorrect filetype (was 2, should be 0).

Fix? no
Entry 'dropbear' in /etc (8193) has deleted/unused inode 16390.  Clear? no
Entry 'dropbear' in /etc (8193) has an incorrect filetype (was 2, should be 0).

Fix? no
Entry 'random-seed' in /etc (8193) has deleted/unused inode 8243.  Clear? no
Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

Block bitmap differences:  -36700 -65798 -(66561--66562)

Fix? no
Inode bitmap differences:  -8243 -(16390--16392) -16394

Fix? no
Directories count wrong for group #8 (6, counted=3).

Fix? no

/dev/sdc2: ********** WARNING: Filesystem still has errors **********
/dev/sdc2: 941/32768 files (17.3% non-contiguous), 58432/131072 blocks

Our system configuration :

- iMX6SL

- eMMC Micron in MCP package (MT29PZZZ4D4BKESK-18)

- Freescale BSP 3.14.52

Are there any known issues on that topic? Can mistake be on driver side?

For now, only way to fix it is formatting corrupted partition. Is there any other workaround which would fix file system without formatting (keeping data alive)?

Thank you for your help,

Samuel

Labels (2)
0 Kudos
4 Replies

1,900 Views
larsweyrauch
Contributor II

Hello Samual,

I couldnt help you in case of these corrupted Files, but maybe you can try using User Enhanced Area to extend the normal P/E Cycles of the MLC Flash inside the Micron eMMC from 3K up to approx. 30K. Normally the Boot Area and the two RPMB Areas are already using SLC Mode, only the User Data Area is working completely as MLC (with 3K P/E Cycle). You can split this Area into 4 general purpose Areas, with ea formattet either as MLC or SLC. But remember, that using SLC mode instead of MLC mode, will decrease your overall capacity by 2. So using your EMMC completely in SLC Mode will dercrease capacity frm 4GB to 2GB, but increasig relaibility by a factor of ~10

for a more detailed Information, you can use Micron technical note TN-52-07

Your Micron MCP consits by a 128Mx32 Elpida LPDDR2 EDB4432BBBJ-1D and a 4GB Micron MTFC4GACAAAM-1M WT

eMMC Datasheet could be found here: https://www.micron.com/~/media/documents/products/data-sheet/emmc/broadmarket_embedded/emmc_ps8210_v...

0 Kudos

1,900 Views
samuelrythm
Contributor I

Hi Igor,

Thank you for your answer.

Do you think think that setting rootfs in Read Only mode can limit corruption appearance?

Anyway, if we diagnose one, do you know a way to fix it properly without formatting the whole partition? Any specific options in fsck?

Best,

Samuel

0 Kudos

1,900 Views
igorpadykov
NXP Employee
NXP Employee

Hi Samuel

I think setting rootfs in Read Only mode will not help.

Best regards

igor

0 Kudos

1,900 Views
igorpadykov
NXP Employee
NXP Employee

Hi Samuel

corruptions can be caused by sudden turning off board power,  so

recommended to use linux command poweroff. Also in general flash

memory has a limited lifespan with a limited number of write cycles, so

one can try brand new emmc.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos