【问题标题】:ext4: how to recover allocated inodeext4:如何恢复分配的 inode
【发布时间】:2018-04-01 21:06:26
【问题描述】:

我对 Ubuntu 16.04 上的 ext4 文件系统有一个特殊的问题。我想使用文件管理器“nautilus”将一些目录移动到不同的位置。由于未知原因,交易崩溃了。不,源文件夹是空的,因为目标文件夹也是。

我几乎立即关闭了 PC 并将 HDD 移至不同系统的扩展坞。我使用工具“extundelete”来恢复丢失的数据。不幸的是,这不起作用。

在我看来,整个文件都在那里,但保存数据的 inode 没有“删除”,而是“分配”了,因此 extundelete 无法恢复“未删除”文件。

这是我的命令和输出:

extundelete --inode 4730457 /dev/sdh1
NOTICE: Extended attributes are not restored.
Loading filesystem metadata ... 1877 groups loaded.
Group: 577
Contents of inode 4730457:
0000 | fd 41 e8 03 00 10 00 00 33 4f bf 5a 64 4f bf 5a | .A......3O.ZdO.Z
0010 | a4 39 bf 5a 00 00 00 00 e8 03 3b 00 08 00 00 00 | .9.Z......;.....
0020 | 00 00 08 00 3a 00 00 00 0a f3 01 00 04 00 00 00 | ....:...........
0030 | 00 00 00 00 00 00 00 00 01 00 00 00 bc 26 20 01 | .............& .
0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0050 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0060 | 00 00 00 00 d5 24 79 29 00 00 00 00 00 00 00 00 | .....$y)........
0070 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
0080 | 20 00 00 00 7c c9 b5 58 f0 2b 9b 4d 98 2b 49 52 |  ...|..X.+.M.+IR
0090 | 15 3e 5e 59 b4 77 ac d3 00 00 00 00 00 00 00 00 | .>^Y.w..........
00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00b0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00d0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00f0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................

Inode is Allocated
File mode: 16893
Low 16 bits of Owner Uid: 1000
Size in bytes: 4096
Access time: 1522487091
Creation time: 1522487140
Modification time: 1522481572
Deletion Time: 0
Low 16 bits of Group Id: 1000
Links count: 59
Blocks count: 8
File flags: 524288
File version (for NFS): 695805141
File ACL: 0
Directory ACL: 0
Fragment address: 0
Direct blocks: 127754, 4, 0, 0, 1, 18884284, 0, 0, 0, 0, 0, 0
Indirect block: 0
Double indirect block: 0
Triple indirect block: 0

File name                                       | Inode number | Deleted status
.                                                 4730457
..                                                5376234
<HERE FOLLOWES A LIST OF THE DIRECTORIES, NONE HAS A "DELETED STATUS">

有什么方法、教程或任何提示我可以复制/恢复/修复它吗?

在此先感谢

从来没有找到一个可行的解决方案。我能够使用我的 Linux Mint 上的 testdisk 附带的工具 photorec 来“恢复”文件。

此工具易于使用,并且能够找到所有文件。但是所有文件都已损坏并混合在一起,所以我想它们无论如何都会丢失 - 回到第一格......

【问题讨论】:

    标签: ext4


    【解决方案1】:

    如何检查该文件是否真的消失了?通过使用以下命令。

    find . -inum 4730457
    

    find . -inum <inum>
    

    如果您可以使用此命令找到该文件,则该文件仍然存在。

    【讨论】:

    • 当使用extundelete 实用程序时,建议卸载受影响的分区,所以......这个命令应该如何使用?
    猜你喜欢
    • 2014-04-20
    • 2011-05-21
    • 2020-01-19
    • 2015-02-08
    • 2015-06-22
    • 2022-08-03
    • 1970-01-01
    • 2013-09-18
    • 1970-01-01
    相关资源
    最近更新 更多