All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding Device Fails - Why?
@ 2021-03-01 11:19 Christian Völker
  2021-03-01 11:44 ` Hugo Mills
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Christian Völker @ 2021-03-01 11:19 UTC (permalink / raw)
  To: linux-btrfs

Hi all,

I am using BTRS on a Debian10 system. I am trying to extend my existing 
filesystem with another device but adding it fails for no reason.

This is my setup of existing btrfs:

  2x DRBD Devices (Network RAID1)
  top of each a luks encrypted device (crypt_drbd1 and crypt_drbd3):

vdb                         254:16   0  1,1T  0 disk
└─drbd1                     147:1    0  1,1T  0 disk
   └─crypt_drbd1             253:3    0  1,1T  0 crypt
vdc                         254:32   0  900G  0 disk
└─drbd2                     147:2    0  900G  0 disk
   └─crypt2                  253:4    0  900G  0 crypt
vdd                         254:48   0  800G  0 disk
└─drbd3                     147:3    0  800G  0 disk
   └─crypt_drbd3             253:5    0  800G  0 crypt /var/lib/backuppc



I have now a third drbd device (drbd2) which I encrypted, too (crypt2). 
And tried to add to existing fi.
Here further system information:

Linux backuppc41 5.10.0-3-amd64 #1 SMP Debian 5.10.13-1 (2021-02-06) 
x86_64 GNU/Linux
btrfs-progs v5.10.1

root@backuppc41:~# btrfs fi sh
Label: 'backcuppc'  uuid: 73b98c7b-832a-437a-a15b-6cb00734e5db
         Total devices 2 FS bytes used 1.83TiB
         devid    3 size 799.96GiB used 789.96GiB path dm-5
         devid    4 size 1.07TiB used 1.06TiB path dm-3


I can create an additional btrfs filesystem with mkfs.btrfs on the new 
device without any issues:

root@backuppc41:~# btrfs fi sh
Label: 'backcuppc'  uuid: 73b98c7b-832a-437a-a15b-6cb00734e5db
         Total devices 2 FS bytes used 1.83TiB
         devid    3 size 799.96GiB used 789.96GiB path dm-5
         devid    4 size 1.07TiB used 1.06TiB path dm-3

Label: none  uuid: b111a08e-2969-457a-b9f1-551ff65451d1
         Total devices 1 FS bytes used 128.00KiB
         devid    1 size 899.96GiB used 2.02GiB path /dev/mapper/crypt2


But I can not add this device to the existing btrfs fi:
root@backuppc41:~# wipefs /dev/mapper/crypt2 -a
/dev/mapper/crypt2: 8 bytes were erased at offset 0x00010040 (btrfs): 5f 
42 48 52 66 53 5f 4d

root@backuppc41:~# btrfs device add /dev/mapper/crypt2 /var/lib/backuppc/
ERROR: error adding device 'dm-4': No such file or directory

This is what I see in dmesg:
[43827.535383] BTRFS info (device dm-5): disk added /dev/drbd2
[43868.910994] BTRFS info (device dm-5): device deleted: /dev/drbd2
[48125.323995] BTRFS: device fsid 2b4b631c-b500-4f8d-909c-e88b012eba1e 
devid 1 transid 5 /dev/mapper/crypt2 scanned by mkfs.btrfs (4937)
[57799.499249] BTRFS: device fsid b111a08e-2969-457a-b9f1-551ff65451d1 
devid 1 transid 5 /dev/mapper/crypt2 scanned by mkfs.btrfs (5178)



And these are the mapping in dm:

root@backuppc41:~# ll /dev/mapper/
insgesamt 0
lrwxrwxrwx 1 root root       7 28. Feb 21:08 backuppc41--vg-root -> ../dm-1
lrwxrwxrwx 1 root root       7 28. Feb 21:08 backuppc41--vg-swap_1 -> 
../dm-2
crw------- 1 root root 10, 236 28. Feb 21:08 control
lrwxrwxrwx 1 root root       7  1. Mär 12:12 crypt2 -> ../dm-4
lrwxrwxrwx 1 root root       7 28. Feb 20:21 crypt_drbd1 -> ../dm-3
lrwxrwxrwx 1 root root       7 28. Feb 20:21 crypt_drbd3 -> ../dm-5
lrwxrwxrwx 1 root root       7 28. Feb 21:08 vda5_crypt -> ../dm-0


Anyone having an idea why I can not add the device to the existing 
filesystem? The error message is not really helpful...

Thanks a lot!

/KNEBB




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-03  2:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.