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 via email to