From: Rian Hunter <rian@thelig.ht>
To: linux-btrfs@vger.kernel.org
Subject: FS corruption when mounting non-degraded after mounting degraded
Date: Tue, 19 Jan 2016 03:28:53 -0800 (PST) [thread overview]
Message-ID: <alpine.OSX.2.20.1601190308520.34954@ioko> (raw)
In my raid6 setup, a disk was soft-failing on me. I pulled the disk,
inserted a new one, mounted degraded, then did btrfs-replace while
running some RW jobs on the FS.
My jobs were taking too long. It seems like raid6 btrfs-replace without
the source disk is not very fast. So I unmounted the FS, inserted the
soft-failing disk again, remounted normally (non-degraded) and restarted
the (now much faster) btrfs-replace.
I checked on the status sometime later and there were hundreds if not
thousands of "transid verify failure" messages in my dmesg.
Additionally the btrfs-replace operation had outright failed.
After removing the soft-failing disk, and mounting degraded again, it now
seemed that some files in the FS were corrupted and in some instances
accessing certain files would actually cause the kernel to loop
indefinitely while eating up memory.
Nothing was corrupted before I mounted the soft-failing disk in
non-degraded mode. This leads me to believe that btrfs doesn't
intelligently handle remounting normally previously degraded arrays. Can
anyone confirm this?
I would highly recommend some sort of fast failure or DWIM behavior for
this, e.g.:
$ mount -o degraded /dev/sda1 /mnt
$ touch /mnt/newfile.txt
$ unmount /mnt
$ # plugin other device, e.g. /dev/sdb
$ mount /dev/sda1 /mnt
STDERR: Ignoring /dev/sdb1, FS has changed since mounting degraded
without it.
Alternatively:
STDERR: Cannot mount file system with device /dev/sdb1, FS has changed
since mounting degraded without it.
Rian
next reply other threads:[~2016-01-19 11:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 11:28 Rian Hunter [this message]
2016-01-19 13:54 ` FS corruption when mounting non-degraded after mounting degraded Duncan
2016-01-21 16:26 ` Rich Freeman
2016-01-21 17:15 ` Chris Murphy
2016-01-21 22:25 ` Rian Hunter
2016-01-21 23:51 ` Chris Murphy
2016-01-22 1:21 ` Rian Hunter
2016-01-22 3:38 ` Chris Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.OSX.2.20.1601190308520.34954@ioko \
--to=rian@thelig.ht \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).