Skip to contentSkip to conversation

f2fs not mountable: CRC validation failed

DISCUSSION Piergiorgio Sartor 2 participants 3 messages Mar 26, 2017 – Mar 27, 2017

lore
Share & tools
lore
#0 lore raw

Hi all,

I apologize in advance in case this is the
wrong place for support (if so, please
point me in the right direction).

I've an USB stick formatted with f2fs,
used under Linux on a RPi2.
To be clear, it is a USB device, not
an SD card.

After a crash, the USB stick is not mountable
any more.
There is no HW error on the stick.

A "fsck" returns, among other information:

[f2fs_crc_valid: 486] CRC validation failed: cal_crc = 3543933224, blk_crc = 719768680 buff_size = 0xffc [f2fs_crc_valid: 486] CRC validation failed: cal_crc = 1071250051, blk_crc = 2385854943 buff_size = 0xffc [f2fs_do_mount:2018] Can't find valid checkpoint

And it does not perform any check / repair.

I'm a bit puzzled, I wonder if there is way
to force a repair, partially could be OK too.

Clearly, "fsck.f2fs -f" did not work.

Any chance to save some data?

f2fs-tools is version 1.8.0 (I guess it's latest).

System is Fedora 25, the tool is self compiled.

Thanks a lot in advance, in case other information are required, please let me know.

bye,

Signature · 5 lines
piergiorgio

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
#1 lore raw

Hello,

Quoted 15 lines · Piergiorgio Sartor

Hi all,

I apologize in advance in case this is the
wrong place for support (if so, please
point me in the right direction).

I've an USB stick formatted with f2fs,
used under Linux on a RPi2.
To be clear, it is a USB device, not
an SD card.

After a crash, the USB stick is not mountable
any more.
There is no HW error on the stick.

Quoted 5 lines

A "fsck" returns, among other information:

[f2fs_crc_valid: 486] CRC validation failed: cal_crc = 3543933224, blk_crc = 719768680 buff_size = 0xffc [f2fs_crc_valid: 486] CRC validation failed: cal_crc = 1071250051, blk_crc = 2385854943 buff_size = 0xffc [f2fs_do_mount:2018] Can't find valid checkpoint

Wow, this means all the checkpoint blocks were corrupted by USB stick, since we always guarantee one of them should be valid, which can be used as trusted root index. I'm in doubt whether or not USB stick supports cache_flush reliably tho.

If you have a chance, now f2fs supports multiple devices, so you'd better use two paritions: one is very small local storage and the other is an USB stick, so that local storage keeps superblock and checkpoint more reliably.

Quoted 8 lines

And it does not perform any check / repair.

I'm a bit puzzled, I wonder if there is way
to force a repair, partially could be OK too.

Clearly, "fsck.f2fs -f" did not work.

Any chance to save some data?

Hmm, fsck.f2fs always starts from valid checkpoint and superblock, so you can't. In order to retrieve some data, it needs to scan whole image to get inodes, but it looks like another tool that we need to implement.

Thanks,

Quoted 21 lines

f2fs-tools is version 1.8.0 (I guess it's latest).

System is Fedora 25, the tool is self compiled.

Thanks a lot in advance, in case other information are required, please let me know.

bye,

Signature · 9 lines
piergiorgio

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot

#2 lore raw

Hi,

thanks for the answer.

Quoted 20 lines · Jaegeuk Kim

Hello,

Quoted 17 lines · Piergiorgio Sartor

Hi all,

I apologize in advance in case this is the
wrong place for support (if so, please
point me in the right direction).

I've an USB stick formatted with f2fs,
used under Linux on a RPi2.
To be clear, it is a USB device, not
an SD card.

After a crash, the USB stick is not mountable
any more.
There is no HW error on the stick.

A "fsck" returns, among other information:

Quoted 7 lines
Quoted 3 lines

[f2fs_crc_valid: 486] CRC validation failed: cal_crc = 3543933224, blk_crc = 719768680 buff_size = 0xffc [f2fs_crc_valid: 486] CRC validation failed: cal_crc = 1071250051, blk_crc = 2385854943 buff_size = 0xffc [f2fs_do_mount:2018] Can't find valid checkpoint

Wow, this means all the checkpoint blocks were corrupted by USB stick, since we always guarantee one of them should be valid, which can be used as trusted root index. I'm in doubt whether or not USB stick supports cache_flush reliably tho.

Well, it was quite an hard crash, the Rpi2 was not reachable via ssh and it was lost by the DNS server (not any more resolvable).
It seems to me it is possible the crash was so severe to damage the fs indepedently from the USB stick capabilities...
BTW, it is plenty of reports of SD card damaged by crash of RPi2.

Quoted 3 lines

If you have a chance, now f2fs supports multiple devices, so you'd better use two paritions: one is very small local storage and the other is an USB stick, so that local storage keeps superblock and checkpoint more reliably.

Which kernel version support this? Furthermore, the "small local storage" would be, in this case, the SD card, which does not seem to me reliable (if this is required).

Quoted 5 lines
Quoted 5 lines

And it does not perform any check / repair.

I'm a bit puzzled, I wonder if there is way
to force a repair, partially could be OK too.

Quoted 7 lines
Quoted 3 lines

Clearly, "fsck.f2fs -f" did not work.

Any chance to save some data?

Hmm, fsck.f2fs always starts from valid checkpoint and superblock, so you can't. In order to retrieve some data, it needs to scan whole image to get inodes, but it looks like another tool that we need to implement.

OK, well, when it will be ready... :-)

In any case, it would be good to have such a tool, if the fs can be recovered by it.

I think my only option, right now, is to re-install the system.

Quoted 1 line

Thanks,

Thank you,

bye,

pg

Quoted 21 lines
Quoted 21 lines

f2fs-tools is version 1.8.0 (I guess it's latest).

System is Fedora 25, the tool is self compiled.

Thanks a lot in advance, in case other information are required, please let me know.

bye,

Signature · 9 lines
piergiorgio

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Signature · 5 lines
piergiorgio

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot