[DRBD-user] drbd+lvm no bueno
Eric Robinson
eric.robinson at psmnv.com
Fri Jul 27 12:45:46 CEST 2018
> > Lars,
> >
> > I put MySQL databases on the drbd volume. To back them up, I pause
> > them and do LVM snapshots (then rsync the snapshots to an archive
> > server). How could I do that with LVM below drbd, since what I want is
> > a snapshot of the filesystem where MySQL lives?
>
> You just snapshot below DRBD, after "quiescen" the mysql db.
>
> DRBD is transparent, the "garbage" (to the filesystem) of the "trailing drbd
> meta data" is of no concern.
> You may have to "mount -t ext4" (or xfs or whatever), if your mount and
> libblkid decide that this was a "drbd" type and could not be mounted. They are
> just trying to help, really.
> which is good. but in that case they get it wrong.
Okay, just so I understand....
Suppose I turn md4 into a PV and create one volume group 'vg_under_drbd0', and logical volume 'lv_under_drbd0' that takes 95% of the space, leaving 5% for snapshots.
Then I create my ext4 filesystem directly on drbd0.
At backup time, I quiesce the MySQL instances and create a snapshot of the drbd disk.
I can then mount the drbd snapshot as a filesystem?
>
> > How severely does putting LVM on top of drbd affect performance?
>
> It's not the "putting LVM on top of drbd" part.
> it's what most people think when doing that:
> use a huge single DRBD as PV, and put loads of unrelated LVS inside of that.
>
> Which then all share the single DRBD "activity log" of the single DRBD volume,
> which then becomes a bottleneck for IOPS.
>
I currently have one big drbd disk with one volume group over it and one logical volume that takes up 95% of the space, leaving 5% of the volume group for snapshots. I run multiple instances of MySQL out of different directories. I don't see a way to avoid the activity log bottleneck problem.
More information about the drbd-user
mailing list