F2FS: can't mount FS: "Wrong bitmap size"

Post Reply
darkusas
Posts: 4
Joined: Mon May 13, 2019 3:14 pm
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 3 times
Been thanked: 0
Contact:

F2FS: can't mount FS: "Wrong bitmap size"

Unread post by darkusas » Tue May 14, 2019 12:18 am

Hello,

I need to use some wear leveling fs for SD card flash. The best that I found was F2FS, but I can't make it work :(

Hear is my configuration: Hardware/Software:
ODROID-N2
32GB eMMC + ( ubuntu-18.04.2-4.9-minimal-odroid-n2-20190329.img.xz )
64GB Adata SD-Card


I stuck with the problem :

Code: Select all

root@odroid:~# dmesg | tail
[ 2781.101615] F2FS-fs (mmcblk1p1): Wrong bitmap size: sit: 128, nat:3712
[ 2781.103056] F2FS-fs (mmcblk1p1): Failed to get valid F2FS checkpoint
[ 2781.264150] F2FS-fs (mmcblk1p1): Wrong bitmap size: sit: 128, nat:3712
[ 2781.265706] F2FS-fs (mmcblk1p1): Failed to get valid F2FS checkpoint

Steps to reproduce:

0) apt install f2fs-tools

Code: Select all

root@odroid:~# apt install f2fs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
f2fs-tools is already the newest version (1.11.0-1.1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1) fdisk /dev/mmcblk1

Code: Select all

Disk /dev/mmcblk1: 58.9 GiB, 63249055744 bytes, 123533312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x75d6fe04

Device         Boot Start       End   Sectors  Size Id Type
/dev/mmcblk1p1       2048 123533311 123531264 58.9G 83 Linux
2) mkfs.f2fs -f -l backup /dev/mmcblk1p1

Code: Select all

root@odroid:~# mkfs.f2fs -l backup /dev/mmcblk1p1

        F2FS-tools: mkfs.f2fs Ver: 1.11.0 (2018-07-10)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = backup
Info: Trim is enabled
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 123531264 (60318 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 4.9.170-27 (root@builder_n2) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) ) #1 SMP PREEMPT Mon Apr 29 12:45:24 -03 2019"
Info: [/dev/mmcblk1p1] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: This device doesn't support BLKDISCARD
Info: Overprovision ratio = 0.820%
Info: Overprovision segments = 494 (GC reserved = 251)
Info: format successful
3) mount -t f2fs /dev/mmcblk1p1 /mnt/SDCARD

Code: Select all

root@odroid:~# mount -t f2fs /dev/mmcblk1p1 /mnt/SDCARD
mount: /mnt/SDCARD: wrong fs type, bad option, bad superblock on /dev/mmcblk1p1, missing codepage or helper program, or other error.
root@odroid:~# dmesg | tail
[ 2781.101615] F2FS-fs (mmcblk1p1): Wrong bitmap size: sit: 128, nat:3712
[ 2781.103056] F2FS-fs (mmcblk1p1): Failed to get valid F2FS checkpoint
[ 2781.264150] F2FS-fs (mmcblk1p1): Wrong bitmap size: sit: 128, nat:3712
[ 2781.265706] F2FS-fs (mmcblk1p1): Failed to get valid F2FS checkpoint
I tried other configurations without success.

Please help me.
Am I doing something wrong?

indium
Posts: 93
Joined: Thu May 28, 2015 2:27 pm
languages_spoken: english, ukrainian
Location: Ukraine
Has thanked: 0
Been thanked: 1 time
Contact:

Re: F2FS: can't mount FS: "Wrong bitmap size"

Unread post by indium » Tue May 14, 2019 5:19 am

I need to use some wear leveling fs for SD card flash.
This is absolutely pointless on block devices like eMMC, SD, SSD. They have wear leveling implemented inside, your F2FS won't do anything except slowing down the storage. Things like it is for bare NAND devices, like for example that one found in Cubieboard 2.

darkusas
Posts: 4
Joined: Mon May 13, 2019 3:14 pm
languages_spoken: english
ODROIDs: ODROID-N2
Has thanked: 3 times
Been thanked: 0
Contact:

Re: F2FS: can't mount FS: "Wrong bitmap size"

Unread post by darkusas » Tue May 14, 2019 3:13 pm

Are you sure this is pointless?
I found that only industrial grade SD have built-in wear leveling.

Let's assume you're right, then which file system is the best for SD ?
(data type on card: lots of small files, like log files and config backups. + influxDB )
indium wrote:
Tue May 14, 2019 5:19 am
I need to use some wear leveling fs for SD card flash.
This is absolutely pointless on block devices like eMMC, SD, SSD. They have wear leveling implemented inside, your F2FS won't do anything except slowing down the storage. Things like it is for bare NAND devices, like for example that one found in Cubieboard 2.

User avatar
odroid
Site Admin
Posts: 32368
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 147 times
Been thanked: 325 times
Contact:

Re: F2FS: can't mount FS: "Wrong bitmap size"

Unread post by odroid » Tue May 14, 2019 3:28 pm

We've been selling this industrial MLC MicroSD card from several years ago.
https://www.hardkernel.com/shop/16gb-in ... -n2-linux/
https://www.mouser.com/datasheet/2/669/ ... 285144.pdf

But, all of other consumer grade MicroSD/eMMC/SSD also have the wear-leveling feature too.
So generic EXT4 file system must be enough since tons of Android Smartphones are using the EXT4.
These users thanked the author odroid for the post:
darkusas (Wed May 15, 2019 1:46 am)

indium
Posts: 93
Joined: Thu May 28, 2015 2:27 pm
languages_spoken: english, ukrainian
Location: Ukraine
Has thanked: 0
Been thanked: 1 time
Contact:

Re: F2FS: can't mount FS: "Wrong bitmap size"

Unread post by indium » Wed May 15, 2019 4:39 am

Let's assume you're right, then which file system is the best for SD ?
odroid has answered already, wear levelling is present on every flash based block device. If you start writing to the same sector on it (the same LBA), controller will remap this sector each time somewhere else, it won't allow bashing that poor NAND page. As of "the best FS for SD card". I'll only add, that for SD cards the best is FAT, because it's part of the SD specification and internal card controller may expect its presence (and MBR potentially as well), otherwise it may go nuts. I have one such card - it goes afwully bad when is formatted with ext4, it just doesn't work; but once you reformat it to FAT, - it becomes a well behaved SD card. :) This is not necessarily true for every card, but there are such. For SDXC cards - exFAT.
These users thanked the author indium for the post:
darkusas (Wed May 15, 2019 1:00 pm)

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests