f2fs 检查点损坏

f2fs 检查点损坏

一天前,我的 SSD 还可以正常使用。然后它突然损坏了我的主文件系统,导致在最详细的调试级别出现以下 fsck 输出:

Info: Fix the reported corruption.
Info: Force to fix corruption
Info: Force to fix corruption
Info: Debug level = 3
    Info: can't find /sys, assuming normal block device
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 536870912 (262144 MB)
Info: MKFS version
  "Linux version 5.4.0-72-generic (buildd@lcy01-amd64-019) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021"
Info: FSCK version
  from "Linux version 5.4.0-74-generic (buildd@lgw01-amd64-038) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021"
    to "Linux version 6.2.0-20-generic (buildd@lcy02-amd64-035) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0, GNU ld (GNU Binutils for Ubuntu) 2.40) #20-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  6 07:48:48 UTC 2023"
Info: superblock features = 0 : 
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000

+--------------------------------------------------------+
| Super block                                            |
+--------------------------------------------------------+
magic                               [0xf2f52010 : 4076150800]
major_ver                           [0x       1 : 1]
volum_name                          []
minor_ver                           [0x       b : 11]
log_sectorsize                      [0x       9 : 9]
log_sectors_per_block               [0x       3 : 3]
log_blocksize                       [0x       c : 12]
log_blocks_per_seg                  [0x       9 : 9]
segs_per_sec                        [0x       1 : 1]
secs_per_zone                       [0x       1 : 1]
checksum_offset                     [0x       0 : 0]
block_count                         [0x 4000000 : 67108864]
section_count                       [0x   1fe85 : 130693]
segment_count                       [0x   1ffff : 131071]
segment_count_ckpt                  [0x       2 : 2]
segment_count_sit                   [0x       a : 10]
segment_count_nat                   [0x      6e : 110]
segment_count_ssa                   [0x     100 : 256]
segment_count_main                  [0x   1fe85 : 130693]
segment0_blkaddr                    [0x     200 : 512]
cp_blkaddr                          [0x     200 : 512]
sit_blkaddr                         [0x     600 : 1536]
nat_blkaddr                         [0x    1a00 : 6656]
ssa_blkaddr                         [0x    f600 : 62976]
main_blkaddr                        [0x   2f600 : 194048]
root_ino                            [0x       3 : 3]
node_ino                            [0x       1 : 1]
meta_ino                            [0x       2 : 2]
cp_payload                          [0x       0 : 0]
crc                                 [0x       0 : 0]
version                       Linux version 5.4.0-74-generic (buildd@lgw01-amd64-038) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021
Info: total FS sectors = 536870912 (262144 MB)
    Invalid CP CRC offset: 0
    Invalid CP CRC offset: 0
[f2fs_do_mount:3512] Can't find valid checkpoint

我可以选择哪些选项来将文件系统恢复到工作状态?我愿意编写代码来恢复超级块和/或检查点,包括从现有的无效检查点和现有的超级块中组装出有效的检查点。驱动器中的其他文件系统都很好。

相关内容