[DRBD-user] drbd+lvm no bueno
lars.ellenberg at linbit.com
Thu Jul 26 17:31:03 CEST 2018
On Thu, Jul 26, 2018 at 04:32:17PM +0200, Veit Wahlich wrote:
> Hi Eric,
> Am Donnerstag, den 26.07.2018, 13:56 +0000 schrieb Eric Robinson:
> > Would there really be a PV signature on the backing device? I didn't
> > turn md4 into a PV (did not run pvcreate /dev/md4), but I did turn
> > the drbd disk into one (pvcreate /dev/drbd1).
Yes (please view in fixed with font):
| PV signature | VG extent pool |
|.... drbd1 .... .... .... .... | drbd metadata |
|.... md4 .... .... .... .... .... .... .... ...|md metadata|
> both DRBD and mdraid put their metadata at the end of the block device,
> thus depending on LVM configuration, both mdraid backing devices as well
> as DRBD minors bcking VM disks with direct-on-disk PVs might be detected
> as PVs.
> It is very advisable to set lvm.conf's global_filter to allow only the
> desired devices as PVs by matching a strict regexp, and to ignore all
> other devices, e.g.:
> global_filter = [ "a|^/dev/md.*$|", "r/.*/" ]
> or even more strict:
> global_filter = [ "a|^/dev/md4$|", "r/.*/" ]
Not if he want DRBD to be his PV...
then he needs to exclude (reject) the backend,
and only include (accept) the DRBD.
But yes, I very much recommend to put an explicit white list
of the to-be-used PVs into the global filter, and reject anything else.
Note that these are (by default unanchored) regexes, NOT glob patterns.
(Above examples get that one right, though r/./ would be enough...
but I have seen people get it wrong too many times, so I thought I'd
mention it here again)
> After editing the configuration, you might want to regenerate your
> distro's initrd/initramfs to reflect the changes directly at startup.
Yes, don't forget that step ^^^ that one is important as well.
But really, most of the time, you really want LVM *below* DRBD,
and NOT above it. Even though it may "appear" to be convenient,
it is usually not what you want, for various reasons,
one of it being performance.
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
DRBD® and LINBIT® are registered trademarks of LINBIT
please don't Cc me, but send to list -- I'm subscribed
More information about the drbd-user