ext4magic セグフォルト

ext4magic セグフォルト

誤って削除した多くのファイルを含むディレクトリを回復しようとしています。皮肉なことに、これはバックアップを設定しようとしたときの大きな間違いでした!私は指示に従っていますここ:

ext4magic コマンドがヒストグラムを正常に生成しました。

[root] /mnt/reos-storage-2 $ ext4magic /dev/sda2 -H -a $(date -d "-70minutes" +%s)
Filesystem in use: /dev/sda2

|-----------c_time  Histogram-----------------  after  --------------------  Wed Jun 23 10:42:35 2021
1624441775 :        0 |                                                  |   Wed Jun 23 10:49:35 2021
1624442195 :       43 |**************************************************|   Wed Jun 23 10:56:35 2021
1624442615 :        0 |                                                  |   Wed Jun 23 11:03:35 2021
1624443035 :        1 |**                                                |   Wed Jun 23 11:10:35 2021
1624443455 :        0 |                                                  |   Wed Jun 23 11:17:35 2021
1624443875 :        3 |****                                              |   Wed Jun 23 11:24:35 2021
1624444295 :        0 |                                                  |   Wed Jun 23 11:31:35 2021
1624444715 :        0 |                                                  |   Wed Jun 23 11:38:35 2021
1624445135 :        0 |                                                  |   Wed Jun 23 11:45:35 2021
1624445555 :        0 |                                                  |   Wed Jun 23 11:52:35 2021


|-----------d_time  Histogram-----------------  after  --------------------  Wed Jun 23 10:42:35 2021
1624441775 :        0 |                                                  |   Wed Jun 23 10:49:35 2021
1624442195 :        0 |                                                  |   Wed Jun 23 10:56:35 2021
1624442615 :        1 |*                                                 |   Wed Jun 23 11:03:35 2021
1624443035 :     9380 |**************************************************|   Wed Jun 23 11:10:35 2021
1624443455 :        0 |                                                  |   Wed Jun 23 11:17:35 2021
1624443875 :        0 |                                                  |   Wed Jun 23 11:24:35 2021
1624444295 :        1 |*                                                 |   Wed Jun 23 11:31:35 2021
1624444715 :        0 |                                                  |   Wed Jun 23 11:38:35 2021
1624445135 :        0 |                                                  |   Wed Jun 23 11:45:35 2021
1624445555 :        0 |                                                  |   Wed Jun 23 11:52:35 2021


|-----------cr_time Histogram-----------------  after  --------------------  Wed Jun 23 10:42:35 2021
1624441775 :        0 |                                                  |   Wed Jun 23 10:49:35 2021
1624442195 :       33 |**************************************************|   Wed Jun 23 10:56:35 2021
1624442615 :        1 |**                                                |   Wed Jun 23 11:03:35 2021
1624443035 :        0 |                                                  |   Wed Jun 23 11:10:35 2021
1624443455 :        0 |                                                  |   Wed Jun 23 11:17:35 2021
1624443875 :        0 |                                                  |   Wed Jun 23 11:24:35 2021
1624444295 :        0 |                                                  |   Wed Jun 23 11:31:35 2021
1624444715 :        0 |                                                  |   Wed Jun 23 11:38:35 2021
1624445135 :        0 |                                                  |   Wed Jun 23 11:45:35 2021
1624445555 :        0 |                                                  |   Wed Jun 23 11:52:35 2021
ext4magic : EXIT_SUCCESS

ただし、追加のコマンドはデフォルトでsegfaultで終了します。

[root] /mnt/reos-storage-2 $ ext4magic /dev/sda2 -a 1624442615 -f r sftp_data -l
Filesystem in use: /dev/sda2

Using  internal Journal at Inode 8
Activ Time after  : Wed Jun 23 11:03:35 2021
Activ Time before : Wed Jun 23 11:56:09 2021
Segmentation fault

私ができることはありますか?


より多くの背景

背景として、おおよそ次のステップでこれを達成しました。

一生懸命インターネット検索を行った後、できるだけ早くファイルシステムをアンマウントしました。当初、私はこれを使ってこれをしました

umount -l /mnt/reos-storage-1

-lumountはまだ使用されているパーティションをアンマウントできないため、このオプションを使用します。次に私はそうしました

fuser -cuk /mnt/reos-storage-1/

次に私は走った

fsck /dev/sda2

実際、ext4magicはこれをお勧めしません。

extundelete次に、失敗したファイルを修復してみました。

[root] /mnt/reos-storage-2 $ extundelete --restore-directory /mnt/reos-storage-1/sftp_data /dev/sda2
NOTICE: Extended attributes are not restored.
Loading filesystem metadata ... 29027 groups loaded.
Loading journal descriptors ... 0 descriptors loaded.
extundelete: Extent block checksum does not match extent block while finding inode for mnt
extundelete: Extent block checksum does not match extent block while finding inode for mnt
Failed to restore file /mnt/reos-storage-1/sftp_data
Could not find correct inode number past inode 2.
Try altering the filename to one of the entries listed below.
File name                                       | Inode number | Deleted status
extundelete: Operation not permitted while restoring directory.
extundelete: Operation not permitted when trying to examine filesystem
[root] /mnt/reos-storage-2 $ man umount
[root] /mnt/reos-storage-2 $ extundelete --restore-all /dev/sda2
NOTICE: Extended attributes are not restored.
Loading filesystem metadata ... 29027 groups loaded.
Loading journal descriptors ... 0 descriptors loaded.
Searching for recoverable inodes in directory / ... 
0 recoverable inodes found.
Looking through the directory structure for deleted files ... 
0 recoverable inodes still lost.
No files were undeleted.

次に、aptを使用してext4magicをインストールし、指示に従って次のコマンドを実行してログをバックアップしました。

debugfs -R "dump <8> /tmp/sda2.journal" /dev/sda2

ベストアンサー1

おすすめ記事