[DRBD-user] LVM on top of DRBD - when/where vgchange -a y

Steven drbd at savetimehosting.com
Sat Sep 29 01:52:47 CEST 2007

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


Steven wrote:

Also, I believe you shoud add this in the script

dmsetup mknodes ##maybe not this line
vgscan --ignorelockingfailure
vgchange -ay --ignorelockingfailure

To make sure the volumes are scanned and activated.

I am testing now to see if this will work when the drdb device is 
created over a linux partition (over hardware raid10) with no file 
system, I see no reasons why but since I could not find any 
recommendations about the right stacking of devices one has to experiment.

Regards,


> Leroy van Logchem wrote:
>> Steven wrote:
>>> Hi,
>>>
>>> I have LVM2 on top of DRBD and it seem to work fine(with the proper 
>>> LVM device filters: ), this is a file server.
>>> I use it with with Xen, so I do NOT have the haresource configure to 
>>> mount any LV as these are brought up by Xen.
>>>
>>> The problem is that when a host is brought down the hot standby is 
>>> brought on-line BUT the vgchange command is NOT issued at the right 
>>> time or not at all:
>>> *Secondary node*
>>> [root at deimos lvm]# lvscan
>>>   inactive          '/dev/DATA/VSI' [1.00 GB] inherit
>>>   inactive          '/dev/DATA/IMG' [10.00 GB] inherit
>>>
>> Try adding this just after the drbddisk:: in haresources and before 
>> the mounting of filesystems.
>>
>> #!/bin/sh
>> #
>> # Startup script for Logical Volume Management
>> # Arthur van Rooij @ WL|Delft Hydraulics july 2007
>> #
>> ##
>>
>> start()
>> {
>>        echo "Setting up Logical Volume Management"
>>        /sbin/vgscan
>>        /sbin/vgchange -a y
>>        sleep 5
>> }
>>
>> stop()
>> {
>>        echo "Stopping Logical Volume Management"
>>        /sbin/vgchange -a n
>> }
>>
>> # See how we were called.
>>
>>
>> case "$1" in
>>   start)
>>    start
>>    ;;
>>
>>   stop)
>>    stop
>>    ;;
>>
>>   restart)
>>    stop
>>    sleep 2
>>    start
>>    ;;
>>   *)
>>    echo "usage: $0 {start|stop|restart}"
>>    exit 1
>>    ;;
>> esac
>>
>>
> Thanks a lot, that solved my issue perfectly the first shot.
>
> Regards,
>
>
>


-- 
Steven Dugway




More information about the drbd-user mailing list