---
name: "fsck.f2fs"
section: "8"
platform: "linux"
package: "f2fs-tools"
version: "1.17.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/fsck.f2fs"
---

# fsck.f2fs(8)

check a Linux F2FS file system

## NAME

fsck.f2fs - check a Linux F2FS file system

## SYNOPSIS

**fsck.f2fs** \[ **-a** *enable auto fix* \] \[ **-f** *enable force fix* \] \[ **-H** \] \[ **-M** *show file map* \] \[ **-p** *enable preen mode* \] \[ **-t** *show stored directory tree* \] \[ **-d** *debugging-level* \] *device*

## DESCRIPTION

**fsck.f2fs** is used to check an f2fs file system (usually in a disk partition). *device* is the special file corresponding to the device (e.g. */dev/sdXX*).

The exit code returned by **fsck.f2fs** is 0 on success and -1 on failure.

## OPTIONS

- **-a** *enable auto fix*

  Enable to run file system check only if a bug was reported by the F2FS kernel module. It is disabled by default.

- **-f** *enable force fix*

  Enable to fix all the inconsistency in the partition.

- **-H**

  Specify support write hint.

- **-M** *show files map*

  Enable to show all the filenames and inode numbers stored in the image

- **-p** *enable preen mode*

  Same as "-a" to support general fsck convention.

- **-t** *show stored directory tree*

  Enable to show every directory entries in the partition.

- **-d** *debug-level*

  Specify the level of debugging options. The default number is 0, which shows basic debugging messages.

- **-N**

  Answer "No" for all questsions.

- **--nolinear-lookup**

  Tune linear lookup fallback, must specify an argument, 0: enable linear lookup, 1: disable linear lookup. For android case, it will disable linear lookup by default.

- **--fault\_injection=%d** *enable fault injection*

  Enable fault injection in all supported types with specified injection rate.

- **--fault\_type=%d** *configure fault injection type*

  Support configuring fault injection type, should be enabled with fault\_injection option, fault type value is shown below, it supports single or combined type.\
   \===========================      ===========\
   Type\_Name                        Type\_Value\
   \===========================      ===========\
   FAULT\_SEG\_TYPE                   0x00000001\
   FAULT\_SUM\_TYPE                   0x00000002\
   FAULT\_SUM\_ENT                    0x00000004\
   FAULT\_NAT                        0x00000008\
   FAULT\_NODE                       0x00000010\
   FAULT\_XATTR\_ENT                  0x00000020\
   FAULT\_COMPR                      0x00000040\
   FAULT\_INODE                      0x00000080\
   FAULT\_DENTRY                     0x00000100\
   FAULT\_DATA                       0x00000200\
   FAULT\_QUOTA                      0x00000400

- Initial checking code was written by Byoung Geun Kim \<bgbg.kim@samsung.com\>.

  ## AUTHOR

Jaegeuk Kim \<jaegeuk@kernel.org\> reworked most parts of the codes to support fixing any corrupted images.

## AVAILABILITY

**fsck.f2fs** is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.

## SEE ALSO

**[mkfs.f2fs(8)](/mkfs.f2fs/8.md),** **[dump.f2fs(8)](/dump.f2fs/8.md),** **[defrag.f2fs(8)](/defrag.f2fs/8.md),** **[resize.f2fs(8)](/resize.f2fs/8.md),** **[sload.f2fs(8)](/sload.f2fs/8.md).**
