maharmstone / ntfs2btrfs

GNU General Public License v2.0
705 stars 32 forks source link

How to fix these inode errors. #71

Closed jarrard closed 1 year ago

jarrard commented 1 year ago

Just need help fixing this. Drive can currently mount and I see files, BUT (look at code error output)

Converted under Linux. Worked. Had flag set as NTFS so I changed that to Linux in gnome disk utility. Only gparted check sees it as btrfs now for some reason, odd, but whatever.

I did try to run btrfs check repair on it but it was taking too long so left that behind, looks like it had bad super byte for every file on partition which is about 1 trillion files, lol (I'd die old man by the time it finishes.)

Anyway looks like the real problem is just these inode errors, could be related to specific files on partition I don't know, how to fix I wonder? Google search just gives dangerous scatterbrain ideas as always.

Opening filesystem to check...
Checking filesystem on /dev/nvme1n1p1
UUID: 8df49133-8a77-495a-9379-dba452115eec
found 1669610401792 bytes used, error(s) found
total csum bytes: 1627717308
total tree bytes: 2827878400
total fs tree bytes: 845709312
total extent tree bytes: 107020288
btree space waste bytes: 258052358
file data blocks allocated: 1666782523392
referenced 1666782523392

[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
root 5 inode 664258 errors 1, no inode item
root 5 inode 664488 errors 1, no inode item
root 5 inode 664694 errors 1, no inode item
root 5 inode 678029 errors 1, no inode item
root 5 inode 678308 errors 1, no inode item
root 5 inode 678456 errors 1, no inode item
root 5 inode 678575 errors 1, no inode item
root 5 inode 678747 errors 1, no inode item
root 5 inode 679018 errors 1, no inode item
root 5 inode 680493 errors 1, no inode item
root 5 inode 680719 errors 1, no inode item
root 5 inode 681053 errors 1, no inode item
root 5 inode 681299 errors 1, no inode item
root 5 inode 681421 errors 1, no inode item
root 5 inode 681730 errors 1, no inode item
root 5 inode 682343 errors 1, no inode item
ERROR: errors found in fs roots
jarrard commented 1 year ago

Additional journalctl output

May 13 14:11:19 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:11:19 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:11:19 underverse-linux kernel: BTRFS error (device nvme1n1p1): error loading props for ino 663089 (root 5): -5
May 13 14:11:19 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:11:19 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:11:19 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:11:19 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:12:53 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:12:53 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:13:24 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:13:24 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:16 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:16 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:30 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:30 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:30 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:30 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:33 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:33 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:33 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:33 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:46 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:46 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:46 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:46 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:46 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:46 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:46 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:46 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:46 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:46 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:46 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:46 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:47 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:47 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:47 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:47 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:47 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:47 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:47 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:47 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:15:47 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:15:47 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:16:11 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:16:11 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:16:11 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:16:11 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:16:14 underverse-linux kernel: BTRFS critical (device nvme1n1p1): corrupt leaf: root=5 block=300619284480 slot=63 ino=664258, invalid previous key objectid, have 663105 expect 664258
May 13 14:16:14 underverse-linux kernel: BTRFS error (device nvme1n1p1): read time tree block corruption detected on logical 300619284480 mirror 1
May 13 14:17:07 underverse-linux kernel: BTRFS info (device nvme1n1p1): scrub: started on devid 1
maharmstone commented 1 year ago

Thanks. I think I'll probably need to know what files these inodes refer to...

Could you please do a rollback (ntfs2btrfs -r /dev/nvme1n1p1), and send me the output of the following? You might need to install sleuthkit.

istat /dev/nvme1n1p1 664001
istat /dev/nvme1n1p1 664231
istat /dev/nvme1n1p1 664437
istat /dev/nvme1n1p1 677772
istat /dev/nvme1n1p1 678051
istat /dev/nvme1n1p1 678199
istat /dev/nvme1n1p1 678318
istat /dev/nvme1n1p1 678490
istat /dev/nvme1n1p1 678761
istat /dev/nvme1n1p1 680236
istat /dev/nvme1n1p1 680462
istat /dev/nvme1n1p1 680796
istat /dev/nvme1n1p1 681042
istat /dev/nvme1n1p1 681164
istat /dev/nvme1n1p1 681473
istat /dev/nvme1n1p1 682086

(The NTFS inode numbers are 257 less than the btrfs ones.)

jarrard commented 1 year ago

Thanks. I think I'll probably need to know what files these inodes refer to...

From what I can tell, none. They refer to none when I tried those commands.

In the end I just moved important files off and wiped the drive and did it all from scratch. ntfs2btrfs hasn't ever worked (cleanly) for me the past 3 times I've tried it sorry to say.

I'll close this now.