[DRBD-user] Problem to use DRBD with LVM controlled by Pacemaker

Phillip Frost phil at macprofessionals.com
Tue Jul 3 18:25:58 CEST 2012

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


On Jul 3, 2012, at 10:17 AM, Lars Marowsky-Bree wrote:

> On 2012-06-29T11:23:09, Phil Frost <phil at macprofessionals.com> wrote:
> 
>>> Jun 29 12:34:53 ss2 LVM[2386]: INFO: 0 logical volume(s) in volume
>>> group "storage" now active
>> Looks like your problem is right there. The LVM RA considers
>> starting the VG as failed if the VG doesn't contain any LVs.
> 
> I really wish someone had a good idea how to improve this in the RA, by
> the way. I still haven't found a good solution.

After a cursory look at the LVM2 source code, I don't think it's possible with the current model. The function invoked by vgchange -a (y/n) seems to be _vgchange_available in tools/vgchange.c [1]. That function seems to be nothing but:

- error checking
- activating / deactivating each LV in the VG individually

So, there simply isn't anything in the volume group metadata that would allow the RA to query if it is active or not. Since the active bit is an attribute of the LVs, not the VG, the only reasonable solution would seem to be introducing management of the LVs into the RA. That might bring some advantages in some failure modes where VGs can be only partially activated, at the expense of a more verbose configuration in Pacemaker.

[1] I couldn't find anything that seems to be an official online version of the LVM2 source, but this works: ftp://ftp.gwdg.de/pub/linux/misc/lvm2/tools/old/LVM2.2.00.08/tools/vgchange.c



More information about the drbd-user mailing list