All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yan Li <elliot.li.tech@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Yan Li <elliot.li.tech@gmail.com>
Subject: "btrfs replace" ERROR: checking status of targetdev
Date: Sat, 1 May 2021 14:39:21 -0700	[thread overview]
Message-ID: <CALc-jWxqFtRDGtdpPLeYw2+bb5rvB6pm=camqyAQ6nOjO5wE3A@mail.gmail.com> (raw)

Hi!

I have a raid1 btrfs with one device missing:
$ sudo mount -o compress-force=zstd:9,relatime,space_cache=v2,degraded
/dev/mapper/open_offsite_bak1 /mnt/offsite_bak
$ sudo btrfs fi show /mnt/offsite_bak
Label: none  uuid: 99acc0da-127f-4034-8d53-07851cbbccba
Total devices 4 FS bytes used 8.75TiB
devid    1 size 4.55TiB used 3.53TiB path dm-11
devid    2 size 12.73TiB used 8.76TiB path dm-12
devid    4 size 3.64TiB used 2.62TiB path dm-14
*** Some devices missing

Now I'm trying to replace it with another drive according to the
instructions on the wiki
(https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Using_btrfs_replace):

$ sudo btrfs replace start -r 3 /dev/mapper/open_offsite_bak5 /mnt/offsite_bak/
ERROR: checking status of dm-13: No such file or directory

/dev/mapper/open_offsite_bak5 indeed is a link to /dev/dm-13.
$ sudo btrfs replace start -r 3 /dev/dm-13 /mnt/offsite_bak/
shows exactly the same error.

The device is fine if I try:
sudo dd if=/dev/dm-13 of=/dev/null count=1

There's no error message in dmesg.

What could be the problem? I feel like it should be a stupid error on
my part but I just can't figure out. "btrfs replace" doesn't support
using a devicemapper device?

Kernel: 5.11.0-16-generic
btrfs-progs: 5.10.1-1build1
Both from Ubuntu 21.04 with latest updates.

Thanks!

--
Yan

             reply	other threads:[~2021-05-01 21:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 21:39 Yan Li [this message]
2021-05-01 22:16 ` "btrfs replace" ERROR: checking status of targetdev Yan Li
2021-05-02  0:44 ` Qu Wenruo
2021-05-02  2:08   ` Yan Li
2021-05-02  2:28     ` Qu Wenruo

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='CALc-jWxqFtRDGtdpPLeYw2+bb5rvB6pm=camqyAQ6nOjO5wE3A@mail.gmail.com' \
    --to=elliot.li.tech@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.