btrfs icon indicating copy to clipboard operation
btrfs copied to clipboard

Mounting Issue on Linux After Driver Use

Open abdulrahman1s opened this issue 2 years ago • 1 comments

After lightly using this driver on Windows 10, I've encountered an issue where, upon returning to Linux after a reboot, the partition becomes unmountable. Strangely, it still functions correctly on Windows but not on Linux. When I ran btrfs check here is the output I received:

[abdulrahman@fedora ~]$ sudo btrfs check /dev/sdb2
[sudo] password for abdulrahman: 
Opening filesystem to check...
Checking filesystem on /dev/sdb2
UUID: 73aa26f0-dd8c-4847-9ea4-4d21be04b7aa
[1/7] checking root items
[2/7] checking extents
ref mismatch on [76217286656 32768] extent item 0, found 1
data extent[76217286656, 32768] referencer count mismatch (root 5 owner 1200445 offset 46379008) wanted 0 have 1
backpointer mismatch on [76217286656 32768]
extent item 127805100032 has multiple extent items
ref mismatch on [127805100032 352256] extent item 1, found 6
data extent[127805100032, 352256] bytenr mimsmatch, extent item bytenr 127805100032 file item bytenr 127805276160
data extent[127805100032, 352256] size mimsmatch, extent item size 352256 file item size 106496
data extent[127805100032, 352256] referencer count mismatch (root 5 owner 1349468 offset 6184960) wanted 0 have 1
data extent[127805100032, 352256] bytenr mimsmatch, extent item bytenr 127805100032 file item bytenr 127805382656
data extent[127805100032, 352256] size mimsmatch, extent item size 352256 file item size 12288
data extent[127805100032, 352256] bytenr mimsmatch, extent item bytenr 127805100032 file item bytenr 127805394944
data extent[127805100032, 352256] size mimsmatch, extent item size 352256 file item size 32768
data extent[127805100032, 352256] referencer count mismatch (root 5 owner 1349299 offset 0) wanted 0 have 1
data extent[127805100032, 352256] bytenr mimsmatch, extent item bytenr 127805100032 file item bytenr 127805427712
data extent[127805100032, 352256] size mimsmatch, extent item size 352256 file item size 32768
data extent[127805100032, 352256] referencer count mismatch (root 5 owner 1349300 offset 0) wanted 0 have 1
data extent[127805100032, 352256] bytenr mimsmatch, extent item bytenr 127805100032 file item bytenr 127805276160
data extent[127805100032, 352256] size mimsmatch, extent item size 352256 file item size 176128
data extent[127805100032, 352256] referencer count mismatch (root 5 owner 1200445 offset 39325696) wanted 0 have 1
backpointer mismatch on [127805100032 352256]
ref mismatch on [144012468224 114688] extent item 1, found 2
data extent[144012468224, 118784] size mimsmatch, extent item size 114688 file item size 118784
data extent[144012468224, 118784] referencer count mismatch (root 5 owner 1200445 offset 40083456) wanted 0 have 1
backpointer mismatch on [144012468224 114688]
ref mismatch on [144705114112 335872] extent item 1, found 2
data extent[144705114112, 335872] bytenr mimsmatch, extent item bytenr 144705114112 file item bytenr 144705314816
data extent[144705114112, 335872] size mimsmatch, extent item size 335872 file item size 225280
data extent[144705114112, 335872] referencer count mismatch (root 5 owner 1200445 offset 39501824) wanted 0 have 1
backpointer mismatch on [144705114112 335872]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree
cache and super generation don't match, space cache will be invalidated
[4/7] checking fs roots
root 5 inode 1200207 errors 200, dir isize wrong
root 5 inode 1200445 errors 3400, nbytes wrong, some csum missing, link count wrong
ERROR: errors found in fs roots
found 921968492544 bytes used, error(s) found
total csum bytes: 899525708
total tree bytes: 1330364416
total fs tree bytes: 196345856
total extent tree bytes: 69156864
btree space waste bytes: 193873413
file data blocks allocated: 1368275304448
 referenced 919200276480

Subsequently, I tried btrfs check --repair but regrettably, the partition remains unmountable.

Here is the output of the mount command:

[abdulrahman@fedora ~]$ sudo mount -t btrfs -o recovery,nospace_cache,nospace_cache /dev/sdb2 /mnt/disk
mount: /mnt/disk: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

I would greatly appreciate any assistance in resolving this issue.

abdulrahman1s avatar Sep 08 '23 01:09 abdulrahman1s

btrfs check --repair should not be used until you have tried everything else. It might have corrupted your filesystem even further (I made https://github.com/ErrorNoInternet/overmask just for running btrfs check --repair without damaging the filesystem).

What does dmesg say when you try to mount?

ErrorNoInternet avatar Sep 23 '23 14:09 ErrorNoInternet