[linux-lvm] clvmd locking disabled

Stepan Kadlec skadlec at gk-software.com
Tue Nov 4 08:47:31 UTC 2008



Milan Broz wrote:
> Stepan Kadlec wrote:
>> ok, I have recompiled it with --with-cluster=internal, but still seeing:
>>
>> WARNING: Locking disabled. Be careful! This could corrupt your metadata.
> 
> Is it during clvmd initialization only?
> 
> clvmd tries to initialize locks for possible already activated volumes
> (mostly safety/force restart check, clvmd must start before clustered LVs
> are activated anyway)
> 
> It simply run lvs command (forcing nolocking for this command)
> to check which volumes are activated.
> The log message is misleading here...
> 
> After clvmd initialization, it should work as expected.
> 

I have looked into the sources:

1) the clvmd starts the thread lvm_thread_fn() from clvmd.c
2) it calls the init_lvm() function from lvm-functions.c
3) it calls the get_initial_state() function from lvm-functions.c
4) in get_initial_state is following call:

FILE *lvs = popen
             ("lvm lvs  --config 'log{command_names=0 prefix=\"\"}' 
--nolocking --noheadings -o vg_uuid,lv_uuid,lv_attr,vg_attr",
              "r");

-> it calls lvm command with the --nolocking option - this is passed to 
all following steps:

5) the lvm commands calls lvm_run_command() function from lvmcmdline.c
6) it calls init_locking() function from locking.c
7) init_locking() than print the "locking disabled" warning, because the 
--nolocking option

SO:
a) is it alright, that the "lvm lvs" command is internally called with 
--nolocking option?
b) does it mean, that locking works alright for the rest of clvmd 
operations but the get_initial_state() call? in this case the debug 
message is very confusing.

bye stepan

> Milan
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 

-- 
Eurosoftware s.r.o.
skadlec at gk-software.com
+420 379 307 379
+420 724 554 104




More information about the linux-lvm mailing list