All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian Völker" <cvoelker@knebb.de>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Adding Device Fails - Why?
Date: Tue, 2 Mar 2021 22:24:15 +0100	[thread overview]
Message-ID: <6779a8c3-6a77-b1dd-a90e-49e03ee61619@knebb.de> (raw)
In-Reply-To: <f2237d9e-bd3a-f694-b64e-f229b67a1064@gmx.com>

Hi,

thanks to Qu Wenruo it worked for me as he suggested.
So I created my additional drbd device and put the encryption on top of 
it. To workaround the issue with adding a device with /dev/mapper/ as 
prefix I created in my /root a node with the same major and minor 
numbers as the dm-* device. Once the device got added I removed the 
created node and everything went fine. Trying to use a created symlink 
did not work, neither adding the dm-* device directly.

Steps in detail:
 >root@backuppc41:/dev/mapper# ll
 >insgesamt 0
 >crw------- 1 root root 10, 236  2. Mär 13:27 control
 >lrwxrwxrwx 1 root root       7  2. Mär 13:48 crypt_drbd1 -> ../dm-3
 >lrwxrwxrwx 1 root root       7  2. Mär 13:48 crypt_drbd2 -> ../dm-4
 >lrwxrwxrwx 1 root root       7  2. Mär 13:48 crypt_drbd3 -> ../dm-5

The device to be added is crypt_drbd3 so I need to find the major/minor 
number of the dm-5 device:

 >root@backuppc41:/dev# ll /dev| grep dm-5
 >brw-rw---- 1 root disk    253,   5  2. Mär 13:48 dm-5

Ok, got all I need. Now going to create the (temp) device node:
 >root@backuppc41:~# mknod ~/temp_node b 253 2

Now I was finally able to add the device by the created node:
 >root@backuppc41:~# btrfs de add /root/temp_node /mnt

Now remove the temp_node and I rebooted the box. After reboot the device 
was still added to my btrfs-filesystem. Perfect!

Thanks again to all!

/KNEBB


      reply	other threads:[~2021-03-03  2:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 11:19 Adding Device Fails - Why? Christian Völker
2021-03-01 11:44 ` Hugo Mills
2021-03-01 12:06 ` Qu Wenruo
2021-03-01 12:10   ` Christian Völker
2021-03-01 17:24 ` Christian Völker
2021-03-02  1:18   ` Qu Wenruo
2021-03-02  7:10     ` Christian Völker
2021-03-02  7:26     ` Christian Völker
     [not found]     ` <4890dd37-3ef1-e589-9fd1-543a993436c4@knebb.de>
2021-03-02  7:31       ` Qu Wenruo
2021-03-02 21:24         ` Christian Völker [this message]

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=6779a8c3-6a77-b1dd-a90e-49e03ee61619@knebb.de \
    --to=cvoelker@knebb.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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.