You are not logged in.
Hey.
A internal disk drive with BTRFS on it containing files shared among Arch and Windows using maharmstone's WinBtrfs driver became unmountable after a Windows bluescreen.
In Windows, the drive and drive letter show up, but it can't be searched, shows no size or disk space used and freezes and crashes Explorer when right-clicked, forcing a hard reset of the PC. When trying to mount in Arch it fails with a error message:
~ $ sudo mount /dev/sda1 /mnt/
mount: /mnt: mount(2) system call failed: No such file or directory.
dmesg(1) may have more information after failed mount system call.Last lines in dmesg:
[ 2923.674654] BTRFS info (device sda1): first mount of filesystem 14f1e9d1-039d-4697-b869-56d329a6565a
[ 2923.674687] BTRFS info (device sda1): using crc32c (crc32c-intel) checksum algorithm
[ 2923.674701] BTRFS info (device sda1): using free-space-tree
[ 2924.113803] BTRFS warning (device sda1): failed to read fs tree: -2
[ 2924.116283] BTRFS error (device sda1): open_ctree failedI do not think the drive is broken but is more likely corrupted as the partitions and size of the partitions shows up when executing "lsblk". And executing "sudo btrfs filesystem show" prints out more information about the drive such as uuid and bytes used.
Are there steps I can do to repair the drive and keep the data on it? Non-destructive commands such as "btrfs check" prints out an error when trying to open the filesystem, leaving me out of ideas for figuring out what is wrong with it. Or is my only option reformating the whole drive, and can it be done the usual way with fdisk?
Offline
You can use https://wiki.archlinux.org/title/SMART to check if the drive is healthy.
But since it started after a Windows bluescreen, I suspect "only" a fault in the BTRFS.
In my experience, BTRFS is good and robust, but when it breaks, there is no way to repair, but you can try:
have a look at https://man.archlinux.org/man/btrfs-check.8
For next time: I would recommend FAT32, exFAT, (NTFS) as common base for exchange data between Win<>Linux.
When using NTFS be sure to read https://wiki.archlinux.org/title/Dual_b … ibernation
Offline
I performed an extended self-test of the drive with no reported errors. Would it be a vice to add the "--repair" flag to "btrfs check"? Any other commands exits with the error "ERROR: cannot open file system". Could it cause irreversible damage to the drive if attempting to repair it?
Offline
You could post the entire smart output here, to have us a look too,
sudo smartctl --all /dev/...
- You have a backup ? Reformat the broken BTRFS and you are good...
- You don't have a backup, and the drive has valuable data ? Then seek professional help, paid service... Don't use the drive anymore, right now.
- Else you could proceed with the --repair option.
More professional would be :
If you have a empty spare drive, you could "dd" the broken drive 1:1 somewhere else on the spare drive, and then try the repair on the copy /image.
Some general hints: https://wiki.archlinux.org/title/File_recovery
Offline
It does not contain any valuable data that I can't get again from the internet. The reason I want to salvage it is because of how long it will take to download all that again, and some might need a bit of searching to find it again.
Guess I was lucky I had procrastinated with transferring personal data from the temporary drive to the big now corrupted drive. In any case I'll experiment with the --repair flag and if that doesn't work I'll just reformat the drive. Made a link to Pastebin with the log, will expire within a day.
Offline
The smart values looks ok.
Offline