title: ext4: how to recover allocated inode
body: <p>I have a special problem with an ext4-filesystem on Ubuntu 16.04. I wanted to move some directories to a different location using the filemanager &quot;nautilus&quot;. For an unknown reason the transaction crashed. No the source-folder is empty as the target folder is too.</p>
  <p>I almost immediatly shutdown the PC and removed the HDD to a docking-station of a different system. I used tool &quot;extundelete&quot; to recover the lost data. Unfortunatly this did not work.</p>
  <p>To me it looks like the whole files are there, but the inode holding the data is not &quot;deleted&quot; it is &quot;allocated&quot;, so extundelete could not recover the &quot;not deleted&quot;-files.</p>
  <p>Here is my command and the output:</p>
  <pre><code>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 | .............&amp; .
  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 | .&gt;^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
  &lt;HERE FOLLOWES A LIST OF THE DIRECTORIES, NONE HAS A &quot;DELETED STATUS&quot;&gt;
  </code></pre>
  <p>Is there a way, a tutorial or any hint how I can copy/recover/repair this?</p>
  <p>Many thanks in advance</p>
  <p>Never found a working solution for this. I was able to &quot;recover&quot; files using the tool <a href="https://www.tecmint.com/photorec-recover-deleted-lost-files-in-linux/" rel="nofollow noreferrer">photorec</a>, which comes with testdisk on my Linux Mint.</p>
  <p>This tool is easy to use and it was able to find all files. BUT all files are corrupted and intermixed, so I guess they are lost anyway - back to square one...</p>