Open TheMadHau5 opened 3 years ago
Did you ever get it figured out? Same problem here...
I actually plan to try out the volume today and see if it still doesn't work. I'll tell you the results. (Edit: my drive seems to be slightly corrupted, looks to be bad sectors)
[...] and the filesystem would get remounted read-only. Sometimes the filesystem would get remounted without any action from me. Upon further inspection, it seems that nothing commits to disk; no files/directories I create survive an unmount+remount cycle.
Unfortunately, I have the same error :/
To know what I've done: I've compiled the program on Ubuntu 20.04 (to do that I've needed to substitute fmt::fmt-header-only
with fmt::fmt
in the CMakeLists.txt file). Then I've used it to successfully convert an NTFS volume to BTRFS (it didn't show any error and hence seemed to finish successfully.) Then I added the drive to /etc/fstab and now I always get this error where the drive gets forced to read only mode because it cannot write any change to the drive.
Here are my kernel logs after trying to change something on the drive/write something to the drive: Maybe the can help?
Here is the output when I run btrfs check:
In my conclusion it looks like the drive is healthy and the data is intact but somehow cannot write any change to it... Would be great to know how to fix this :)
Thanks @szaimen, I'll try to reproduce. Looks like a bug in btrfs-check
as well, if it's not finding the problem...
(Posting my logs here, just for additional information) btrfs-scrub.txt btrfs-check.txt btrfs-dmesg.txt
Maybe I should also mention that the problematic drive had those mount options enabled when I've started the conversion: windows_names,uid=user1,gid=group1,umask=007,nofail
(user and group are edited)
I can confirm that the tool seems to work great on Windows! So I'm going to convert my other drives on Windows.
@szaimen - do you mean that you ran ntfs2btrfs
while it was mounted?
Yes, thats possible. But I didn't access the drive while doing that.
Unfortunately I was proven wrong the last days because I had had issues with all drives that I converted with the tool and used on a Linux server afterwards. So not even the Windows version was able to convert the drives in a future proof way :/
I have the exact same issue as you all. I used Linux to convert the drive because I wanted BTRFS to dual boot with a filesystem that both OS-es support and work with. It converted the drive, and it worked just fine in Windows. In Linux however it doesn't even mount. It says free space cache has more free space than block group item
. Trying to use the repair command on it literally crashes the Linux driver which just gives up.
Also, some DMESG output:
Let me remind you that the drive is not really corrupt, it works fine in WIndows. One more thing I'd mention is that multiple folders were NTFS compressed using Compactor but in theory this shouldn't cause any issues since it just uses the features provided by NTFS and the repo says it should work. (Which it does on WIndows)
I'd be really happy if you could tell me a solution to this, since like this I cannot dual boot with the same drives.
I am getting similar issues here as well when defragging a partition that's been converted using ntfs2btrfs in Linux. Partition passes scrub tests but whenever I attempt a defrag it fails and goes read only.
May 27 00:56:33 hostname kernel: BTRFS info (device sdc2): the free space cache file (2194293129216) is invalid, skip it
May 27 00:57:04 hostname kernel: ------------[ cut here ]------------
May 27 00:57:04 hostname kernel: BTRFS: Transaction aborted (error -75)
May 27 00:57:04 hostname kernel: WARNING: CPU: 1 PID: 10734 at fs/btrfs/file-item.c:907 btrfs_del_csums+0x3be/0x400 [btrfs]
May 27 00:57:04 hostname kernel: Modules linked in: snd_seq_dummy snd_hrtimer snd_seq nft_objref nf_conntrack_netbios_ns nf_conntrack_br>
May 27 00:57:04 hostname kernel: crct10dif_pclmul usbhid crc32_pclmul ghash_clmulni_intel snd_timer aesni_intel cec syscopyarea crypto_>
May 27 00:57:04 hostname kernel: CPU: 1 PID: 10734 Comm: btrfs-transacti Tainted: P W OE 5.12.6-arch1-1 #1
May 27 00:57:04 hostname kernel: Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X570 Taichi, BIOS P4.30 04/14/2021
May 27 00:57:04 hostname kernel: RIP: 0010:btrfs_del_csums+0x3be/0x400 [btrfs]
May 27 00:57:04 hostname kernel: Code: 50 48 05 48 0a 00 00 f0 48 0f ba 28 03 72 1d 41 83 fe fb 74 38 41 83 fe e2 74 32 44 89 f6 48 c7 c>
May 27 00:57:04 hostname kernel: RSP: 0018:ffff9be610cdbb30 EFLAGS: 00010286
May 27 00:57:04 hostname kernel: RAX: 0000000000000000 RBX: 0000000647fc6000 RCX: 0000000000000027
May 27 00:57:04 hostname kernel: RDX: ffff8dc39ea586e8 RSI: 0000000000000001 RDI: ffff8dc39ea586e0
May 27 00:57:04 hostname kernel: RBP: ffff8dbd204a3000 R08: 0000000000000000 R09: ffff9be610cdb960
May 27 00:57:04 hostname kernel: R10: ffff9be610cdb958 R11: ffff8dc3bf27a7e8 R12: ffff8dbeab6d4e38
May 27 00:57:04 hostname kernel: R13: ffff8dbea4004800 R14: 00000000ffffffb5 R15: 00000006480ea000
May 27 00:57:04 hostname kernel: FS: 0000000000000000(0000) GS:ffff8dc39ea40000(0000) knlGS:0000000000000000
May 27 00:57:04 hostname kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May 27 00:57:04 hostname kernel: CR2: 00000fc5a7733000 CR3: 00000001045de000 CR4: 0000000000350ee0
May 27 00:57:04 hostname kernel: Call Trace:
May 27 00:57:04 hostname kernel: __btrfs_free_extent+0x4e4/0x940 [btrfs]
May 27 00:57:04 hostname kernel: __btrfs_run_delayed_refs+0x24f/0xfc0 [btrfs]
May 27 00:57:04 hostname kernel: ? _nohz_idle_balance+0x89/0x270
May 27 00:57:04 hostname kernel: btrfs_run_delayed_refs+0x73/0x1f0 [btrfs]
May 27 00:57:04 hostname kernel: btrfs_commit_transaction+0xf6/0xb70 [btrfs]
May 27 00:57:04 hostname kernel: ? start_transaction+0xce/0x5d0 [btrfs]
May 27 00:57:04 hostname kernel: transaction_kthread+0x12e/0x1a0 [btrfs]
May 27 00:57:04 hostname kernel: ? btrfs_cleanup_transaction.isra.0+0x570/0x570 [btrfs]
May 27 00:57:04 hostname kernel: kthread+0x133/0x150
May 27 00:57:04 hostname kernel: ? kthread_associate_blkcg+0xc0/0xc0
May 27 00:57:04 hostname kernel: ret_from_fork+0x22/0x30
May 27 00:57:04 hostname kernel: ---[ end trace 3bae44cf8d4b4eed ]---
May 27 00:57:04 hostname kernel: BTRFS: error (device sdc2) in btrfs_del_csums:907: errno=-75 unknown
May 27 00:57:04 hostname kernel: BTRFS info (device sdc2): forced readonly
May 27 00:57:04 hostname kernel: BTRFS: error (device sdc2) in __btrfs_free_extent:3216: errno=-75 unknown
May 27 00:57:04 hostname kernel: BTRFS: error (device sdc2) in btrfs_run_delayed_refs:2163: errno=-75 unknown
btrfs check also occasionally gives me a warning about ERROR: free space cache has more free space than block group item, this could leads to serious corruption, please contact btrfs developers
. I've already attempted --clear-space-cache v1
and --repair
to no avail
I managed to get around the crash by using btrfs check --repair --mode=lowmem
. It manages to repair all but 2 errors (by deleting these blocks, so there might be some data loss), attempting to repair these by removing --mode=lowmem
results in an error:
[2/7] checking extents
well this shouldn't happen, extent record overlaps but is metadata? [1000204107776, 16384]
The filesystem can be mounted on Linux after repair.
All of the following was done on linux, but the drive was converted from windows as the conversion failed on linux, with the error mentioner in #15.
I also experienced some issues with reflinking across subvolumes; all of my reflinked files would disappear within a minute, and the filesystem would get remounted read-only. Sometimes the filesystem would get remounted without any action from me. Upon further inspection, it seems that nothing commits to disk; no files/directories I create survive an unmount+remount cycle.
Running
btrfsck
gives the following output: