[DRBD-user] LVM and DRBD

Etienne Pretorius etiennep at kingsley.co.za
Tue Feb 15 16:56:46 CET 2011

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Tue, 2011-02-15 at 16:37 +0200, Etienne Pretorius wrote:
> Hello List,
> 
> This is more lvm centric, just wandered if anyone could point out what I
> have done wrong.
> 
> I have the following setup:
> 
> sda1 => +---+ 
>         |md0| 
> sdb1 => +---+ => lvm:system-drdb => drdb:r0 => lvm:vm
> 
> Before the creation of volume group vm:
> 
>   "/dev/mapper/system-drbd" is a new physical volume of "1.78 TiB"
>   --- NEW Physical volume ---
>   PV Name               /dev/mapper/system-drbd
>   VG Name               
>   PV Size               1.78 TiB
>   Allocatable           NO
>   PE Size               0   
>   Total PE              0
>   Free PE               0
>   Allocated PE          0
>   PV UUID               Hsxjgt-KqDI-wNvd-ngqG-3sx3-DoyW-ZbOwxP
> 
> After creation of volume group vm:
>   --- Physical volume ---
>   PV Name               /dev/dm-3
>   VG Name               vm
>   PV Size               1.78 TiB / not usable 4.00 MiB
>   Allocatable           yes 
>   PE Size               4.00 MiB
>   Total PE              466795
>   Free PE               466795
>   Allocated PE          0
>   PV UUID               Hsxjgt-KqDI-wNvd-ngqG-3sx3-DoyW-ZbOwxP
> 
> The filter in /etc/lvm.conf is set to:
> 
> filter = [ "a|md.*|", "a|drbd.*|", "r|.*|" ]
> 
> BUT when I try and create a Logical Volume, the following happens:
> 
> lvm> lvcreate vm -n freeradius -L 102400000K
>   device-mapper: reload ioctl failed: Invalid argument
>   Aborting. Failed to activate new LV to wipe the start of it.
>   Node /dev/mapper/vm-freeradius was not removed by udev. Falling back
> to direct node removal.
> 
> Does anybody have any idea why I can not create a Logical Volume in the
> Volume Group?
> 
Changed the /etc/lvm.conf filter to:
filter = [ "a|^/dev/md.*|", "a|^/dev/drbd.*|", "r|.*|" ]

But now, when I reboot the machine I need to recreate the whole physical
volume to be able to use it again.

[root at 0-0-0:/tmp] drbdadm primary r0
[root at 0-0-0:/tmp] pvcreate /dev/drbd0
  Physical volume "/dev/drbd0" successfully created
[root at 0-0-0:/tmp] lvm
lvm> pvdisplay 
  --- Physical volume ---
  PV Name               /dev/md0
  VG Name               system
  PV Size               1.82 TiB / not usable 3.79 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              476931
  Free PE               0
  Allocated PE          476931
  PV UUID               0IHkdd-bNWK-ElVc-ITeX-7TBt-0Zmp-yxeQA0
   
  "/dev/dm-3" is a new physical volume of "1.78 TiB"
  --- NEW Physical volume ---
  PV Name               /dev/dm-3
  VG Name               
  PV Size               1.78 TiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               nZMgAA-LKij-zNMM-TqEn-qIGG-75Nr-tVasx3
   
lvm> vgcreate vm /dev/drbd0
  No physical volume label read from /dev/drbd0
  Physical volume "/dev/drbd0" successfully created
  Volume group "vm" successfully created
lvm> lvcreate vm -n freeradius -L 102400000K
  Logical volume "freeradius" created
lvm> lvremove vm/freeradius
Do you really want to remove active logical volume freeradius? [y/n]: y
  Logical volume "freeradius" successfully removed
lvm> quit
  Exiting.

It there anyway that I can say that DRBD not need to perform a 
         "drbdadm primary r0"

> Thank You,
> Etienne Pretorius
> 
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user





More information about the drbd-user mailing list