[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Meta-flag: don't activate on boot



Alasdair G Kergon <agk redhat com> writes:

> On Tue, Dec 13, 2005 at 12:19:39PM +0100, Trond Hasle Amundsen wrote:
>> It would be neat if there was a way to flag that a particular volume
>> group should not be activated by default, typically at boot time,
>> i.e. running 'vgchange -ay' shouldn't activate it. This is especially
>> useful in clustering environments, when you want to "share" a volume
>> group across several nodes for redundancy, but only activate it on one
>> node at a time.
>  
> You can already do this using tagging.

Ah... guess my mind was stuck with LVM1 :)

> Documentation:
>   Man pages for lvm, lvm.conf, vgchange, lvchange & lvcreate.
>
>   http://people.redhat.com/agk/talks/LVM2-LinuxTag2005/
>     Tagging, Slide 30 onwards
>
>   http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/LVM2/doc/tagging.txt?rev=1.1&content-type=text/plain&cvsroot=lvm2
>     original specification

Thanks for the pointers, that really helped. But I can't get this to
work. I create a section 'tags' in lvm.conf which defines what I want
to use:

tags {
    hosttags = 1
    sg {
        host_list = [ "test-db1.uio.no" ]
    }
}

With this, the host test-db1 should get the tag '@sg', right?

I configure 'volume_list' in the activation section to define which I
want to activate on this host (I've tried without setting this, no
change):

    volume_list = [ "internvg", "internvg2", "@*" ]

I then add a tag '@sg' to the VG/LV in question:

    lvchange --addtag @sg cf-test1-vg/data
    vgchange --addtag @sg cf-test1-vg

I've verified that the tags are set with '{vg,lv}s -o +tags', but
'{vg,lv}s @sg' doesn't yield any output.

I then try to activate the VG/LV:

    vgchange -ay cf-test1-vg
    lvchange -ay cf-test1-vg/data

But it doesn't work. As long as the 'tags' section exists in the
config file the LV 'cf-test1-vg/data' won't activate. I'm probably
doing something wrong here, but I can't figure out what..

The config will obviously be somewhat more complicated in production.

FWIW, the system is running RHEL4 with lvm2-2.01.14-2.0.RHEL4 and
kernel 2.6.9-11.ELsmp.

Another issue, possibly related: the 'lvm dumpconfig' command doesn't
show the 'tags' section at all.

Cheers,

-- 
Trond Hasle Amundsen <t h amundsen usit uio no>
Center for Information Technology Services, University of Oslo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]