January 16, 20233 yr I have a drive with btrfs that is corrupted. I want to use btrfs restore but my drive had many files with compression set to zstd, as it is supported by the kernel. But the version of btrfs-progs installed on 6.11.5 does not have the zstd flag enabled, and thus errors when trying to restore files with zstd compression. Quote ERROR: copying data for <path> failed ERROR: btrfs not compiled with zstd support I looked into compiling but with the dev tools plugin being depreciated, it seems like a bit of a hassle. Well, I started down this path after I realized my unRAID parity possibly became out of sync. unRAID certainly could've protected me more but I'll take the blame. For anyone interested in what happened: Quote After rebooting, my btrfs partition was unmountable due to write errors on the HD controller (of course this isn't detected by SMART, SMART tests, or the runs of preclearing). The array was in a poor state due to a partition not being mountable. Multiple writes failed to my btrfs partition, so parity was a bit out of sync (it in theory contained the data to correctly emulate my disk or use read/modify/write), though unRAID did not appear to realize this. This becomes a problem later. Also, /mnt/user was empty, and I mistakenly assumed that it would stay this way without some intervention in the GUI or command line specific to unRAID. However, once I bypassed the btrfs errors to mount it and recover, unRAID revelaed /mnt/user to the rest of the system to do as it pleases. This is because I mounted it to the place unRAID expected, /mnt/disk4. What confuses me is that I mounted /mnt/disk4 as ro, and it was the smallest drive so it should be written to first. This seemed to be the behavior when the drive failed, as it would report input/output errors, and so writing to /mnt/user also did. However, to my horror, syslogd was writing syslogs from my router and unraid itself to /mnt/user. Unfortunately this included thousands of lines of btrfs parent transid verify failed. I think this would've been fine if it used read/modify/write, however my drives never spin down so I set it to use turbo reconstruct write. That means it would try reading from my failed disk without knowing that writes had failed. If this modified the any part of the btrfs tree metadata structure, any leaf nodes below it would be unreachable, according to experts in #btrfs irc, and I would use information about the files and its types. When trying to build btrfs-progs myself, I ran into several issues and am currently stuck on a couple issues. After going through and installing missing dependencies from https://packages.slackware.com/, I was able to get configure getting decently far. However: openat() function doesn't exist I did check fcntl.h and it certainly looks like openat is defined, just whether or not there is a separate openat64 depending on #defines, though it's been a while since I programmed backtrace and some issue with documentation generation, both can be fixed with flags blkid, uuid packages not found, not on slackware.com stopped commenting out checks at this point Edited January 27, 20233 yr by robobub
January 18, 20233 yr Author Solution After realizing I might actually have dataloss from some mishaps with parity, I've started down this path and ran into issues, added to the first post. EDIT: Solved through making a temporary array where I could start an ubuntu docker and compile it. The binary then runs on the base slackware outside of docker just fine. Edited January 27, 20233 yr by robobub
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.