On Sat, Dec 6, 2014 at 2:17 AM, Tomasz Chmielewski <t...@virtall.com> wrote:
> After we run again btrfs device delete missing /home, the newly created > directory eventually (/home/backup/ma-int/weekly.tmp) is being detected as > "csum failed ino ...". Unmount the volume and run btrfs check, without repair: 1. If that comes up clean then chances are this is file corruption and you can mount and do: btrfs scrub start -r <MP> This will show you filenames for corrupt files you'll need to locate backups to restore from eventually. Then unmount it again and do: btrfs check --init-csum-tree <dev> This will remove the current checksum tree and calculate new checksums (only very recent btrfs-progs does this, I tested with 3.17.3), so any files that are corrupt will no longer be flagged as corrupt, and you should be able to remove the missing device and resume the balance needed to restore normal operation for the mirrored volume. If you don't have recent btrfs-progs, the initialization of the csum tree will strip the csums entirely, and you'll need to recreate the file system (or live without checksums). 2. I'm going to bet btrfs check doesn't come up clean, based on the additional problems you reported. In this case it's not file corruption, but filesystem corruption. Even though the mirror isn't intact, there's a possibility this small hole in the file system can be repaired with very recent fsck patches from Josef. You'd have to check whether the patches he's submitted in the last month or so to the list have been incorporated into btrfs-progs integration branch; and build a btrfs-progs that has them. Then use --repair and cross fingers. Certainly before 2. and probably even before 1, you ought to go ahead and get anything off the volume you care about, seeing as right now it's at least mounting. It'd be good to know either way if it works. And if it doesn't work, take a btrfs-image of the fs, Josef might be interested in testing against it seeing as only a 4KB hole was punched into the file system. -- Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html