I have an external drive formatted with BTRFS that seems refuses to mount:
$ sudo mount -vs -t btrfs -o ro,recovery,errors=continue /dev/sdb2 /media/user/dir mount: /dev/sdb2: can't read superblock
However, when BTRFS thinks that all the superblocks are okay:
$ sudo btrfs rescue super-recover -v /dev/sdb2 All Devices: Device: id = 1, name = /dev/sdb2 Before Recovering: [All good supers]: device name = /dev/sdb2 superblock bytenr = 65536 device name = /dev/sdb2 superblock bytenr = 67108864 device name = /dev/sdb2 superblock bytenr = 274877906944 [All bad supers]: All supers are valid, no need to recover
And if I try specifying
mount uses 1k units, so you have to divide by 4 on a system with 4k blocks) to use one of the alternative superblocks, I get the same error.
btrfs restore also seems to have no trouble reading data from the drive, and
btrfs check complains only about an invalid cache entry (and
clear_cache doesn't help when mounting). This has happened once before on another drive and
btrfs check --repair also didn't work. As there is a large amount of data on this drive, I'm a bit reluctant to copy everything elsewhere with
btrfs restore (which also means finding space elsewhere), reformat, and copy everything back.
Is there a way to fix this issue? Is there a way to invoke
btrfs directly so that it performs the mount instead of relying on
mount? I couldn't find a
 I'm a bit reluctant to use
btrfs check --repair as it is comes with lots of warnings about being a measure of last resort, especially after it not working previously.