[DRBD-user] LVM and DRBD

Roland Friedwagner roland.friedwagner at wu-wien.ac.at
Tue Feb 15 18:03:02 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.


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?

Test this one:
^^^^^^^^^^^^^^
write:
echo "HELLO" | 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
=> 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|.*|" ]


-- 
Roland.Friedwagner at wu.ac.at            Phone: +43 1 31336 5377
IT Services - WU (Vienna University of Economics and Business) 



More information about the drbd-user mailing list