public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Webb <chris@arachsys.com>
To: Kent Overstreet <kent.overstreet@gmail.com>
Cc: linux-bcachefs@vger.kernel.org
Subject: [PATCH] [ktest] Test simple drive replacement on a replicated fs
Date: Tue, 12 Oct 2021 10:11:38 +0100	[thread overview]
Message-ID: <20211012091138.GB11670@arachsys.com> (raw)
In-Reply-To: <20211012090745.GA11670@arachsys.com>

This currently fails because metadata doesn't get copied to the
replacement device, although the data content of the filesystem
does get replicated during the data rereplicate step.

Signed-off-by: Chris Webb <chris@arachsys.com>
---
 tests/bcachefs/replication.ktest | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/bcachefs/replication.ktest b/tests/bcachefs/replication.ktest
index 7057fa7..569b984 100644
--- a/tests/bcachefs/replication.ktest
+++ b/tests/bcachefs/replication.ktest
@@ -629,3 +629,17 @@ test_replicas_gc()
 
     bcachefs fsck /dev/sd[bcdef]
 }
+
+# Fails
+test_replace_replica()
+{
+    bcachefs format --errors=panic --replicas=2 /dev/sd[bc]
+    mount -t bcachefs -o degraded /dev/sdb /mnt
+
+    bcachefs device add -f /mnt /dev/sdd
+    bcachefs data rereplicate /mnt
+    umount /mnt
+
+    mount -t bcachefs -o degraded /dev/sdd /mnt
+    umount /mnt
+}

  reply	other threads:[~2021-10-12  9:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12  9:07 Metadata rereplication not triggering Chris Webb
2021-10-12  9:11 ` Chris Webb [this message]
2021-10-12 18:19 ` Kent Overstreet
2021-10-13 16:52   ` Chris Webb
2021-10-13 17:29     ` Kent Overstreet
2021-10-13 19:39       ` Chris Webb

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=20211012091138.GB11670@arachsys.com \
    --to=chris@arachsys.com \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcachefs@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