B.H. Regarding the main issue, the drive that was "recovered" using Noah's trick (mount -o degraded then btrfs replace cancel) appears to be clean. At least, it passes scrub without any errors. It even contains all changes that were made during the replace was ongoing. Also i've run MD's consistency check on the destination drive which contains the corrupt FS and it appears to be clean from MD's point of view, so i think it can be considered a "proof" the btrfs replace was actually the source of the corruption. I'll try to reproduce the situation before trying to upgrade the kernel/btrfs-progs with smaller loopback devices. Not sure if it is reproducible so easily. The original replace operation took more than 5 days and i'm not going to play with the actual data again ;-). If the "corrupt" version of the FS may help in debugging the issue, please contact me today, before we have wiped it out. On Mon, Jun 29, 2015 at 11:08 AM, Duncan <1i5t5.duncan@xxxxxxx> wrote: > Mordechay Kaganer posted on Mon, 29 Jun 2015 08:02:01 +0300 as excerpted: >> 1. btrfs replace - as far as i understand, it's primarily intended for >> replacing the member disks under btrfs's raid. > > It seems this /can/ work. You demonstrated that much. But I'm not sure > whether btrfs replace was actually designed to do the single-device > replace. If not, it almost certainly hasn't been tested for it. Even if > so, I'm sure I'm not the only one who hadn't thought of using it that > way, so while it might have been development-tested for single-device- > replace, it's unlikely to have had the same degree of broader testing of > actual usage, simply because few even thought of using it that way. *If* replace is usable for single-drive FS, this method has the advantage that it can be cancelled in the middle and (for single drive, using Noah's trick) even after the operation has finished. For multi-drive FS, the trick wouldn't help as soon as any changes were made the the FS after the replace. -- משיח NOW! Moshiach is coming very soon, prepare yourself! יחי אדוננו מורינו ורבינו מלך המשיח לעולם ועד! -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
