[DRBD-user] LVM and DRBD

Etienne Pretorius etiennep at kingsley.co.za
Wed Feb 16 10:48:49 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 15/02/2011 19:03, Roland Friedwagner wrote:
> Am Dienstag 15 Februar 2011 schrieb Etienne Pretorius:
>
>> [root at 0-0-0:/tmp] pvcreate /dev/drbd0<== INIT PV
>>    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<== INIT PV ??
>>    Physical volume "/dev/drbd0" successfully created
>>    Volume group "vm" successfully created
> Your PV labeling seems to be lost from pvcreate to vgcreate!?
> =>  Data written to /dev/drbd0 lost?
>
Yes, you are right. I also get an error on the console saying
[  558.940032] device-mapper: table: 253:4: linear: dm-linear: Device 
lookup failed
when I try to create a logical volume.

Seems like the changes are not persistent on the drdb device.
> Test this one:
> ^^^^^^^^^^^^^^
> write:
> echo "HELLO" | dd of=/dev/vgsys/test02 oflag=direct bs=512 cbs=512 conv=block
echo "HELLO" | dd of=/dev/vgsys/test02 oflag=direct bs=512 cbs=512 
conv=block
dd: opening `/dev/vgsys/test02': No such file or directory

Debian based machine, does not have /dev/vgsys at all. Looked for it on 
another debian based machine just to make sure.

> read:
> dd if=/dev/vgsys/test02 iflag=direct bs=512 count=1 | strings
> =>  HELLO
> write:
> echo "FOOBAR" | dd of=/dev/vgsys/test02 oflag=direct bs=512 cbs=512 conv=block
> read:
> dd if=/dev/vgsys/test02 iflag=direct bs=512 count=1 | strings
> =>  FOOBAR
>
> You may to have rearange the filter to first see drbd device:
> filter = [ "a|drbd.*|", "a|md.*|", "r|.*|" ]
>
Changed the filter, problem still persists.

Thank you.



More information about the drbd-user mailing list