1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
David Teigland 74a388cca1 pvscan: autoactivate a VG once
When a VG has multiple PVs, and all those PVs come online
at the same time, concurrent pvscans for each PV will all
create the individual pvid files, and all will often see
the VG is now complete.  This causes each of the pvscan
commands to think it should activate the VG, so there
are multiple activations of the same VG.  The vg lock
serializes them, and only the first pvscan actually does
the activation, but there is still a lot of extra overhead
and time used by the other pvscans that attempt to
activate the already active VG.  This can lead to a backlog
of pvscans and timeouts.

To fix this, this adds a new /run/lvm/vgs_online/ dir that
works like the existing /run/lvm/pvs_online/ dir.  Each pvscan
that wants to activate a VG will first try to exlusively create
the file vgs_online/<vgname>.  Only the first pvscan will
succeed, and that one will do the VG activation. The other
pvscans will find the vgname file exists and will not do the
activation step.

When a PV goes offline, the vgs_online file for the corresponding
VG is removed.  This allows the VG to be autoactivated again
when the PV comes online again.  This requires that the vgname be
stored in the pvid files.
2019-02-21 15:17:41 -06:00
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore tools: add generated headers to .gitignore 2017-03-10 13:13:41 +00:00
args.h vdo: document types vdo and vdo-pool 2019-01-28 22:39:10 +01:00
cmdnames.h doc: change fsf address 2016-01-21 12:11:37 +01:00
command-lines.in vdo: complete matching with thin syntax 2019-01-28 22:18:17 +01:00
command.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
command.h cleanup: fix some typos 2017-07-10 14:58:33 +02:00
commands.h add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
dumpconfig.c lvmconfig: Add options to produce file preamble 2017-08-05 16:23:34 +01:00
errors.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
formats.c doc: change fsf address 2016-01-21 12:11:37 +01:00
license.inc pre-release 2017-03-28 16:11:35 +01:00
lv_props.h commands: new method for defining commands 2017-02-13 08:20:10 -06:00
lv_types.h Add dm-writecache support 2018-11-06 14:18:41 -06:00
lvchange.c raid: fix (de)activation of RaidLVs with visible SubLVs 2018-12-11 16:35:34 +01:00
lvconvert_poll.c debug: more display_lvname usage 2017-06-27 08:28:36 +02:00
lvconvert_poll.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvconvert.c lvconvert: pass force and yes options for vdo conversion 2019-01-28 22:17:27 +01:00
lvcreate.c vdo: complete matching with thin syntax 2019-01-28 22:18:17 +01:00
lvdisplay.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvextend.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd-static.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
lvm2cmdline.h commands: fix memory debug for cmd defs 2017-05-01 15:27:14 -05:00
lvm-static.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm.c debug: tracing error path 2017-06-27 00:27:36 +02:00
lvmcmdlib.c dmeventd: lvm vdo support 2018-07-09 15:29:16 +02:00
lvmcmdline.c hints: fix hint flock when using lvm shell 2019-01-15 12:23:16 -06:00
lvmdiskscan.c remove unused full filter 2018-12-04 14:06:46 -06:00
lvpoll.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvreduce.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvremove.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvrename.c toollib: make it possible to also process internal VGs, add 'include_internal' switch to process_each_vg fn 2016-06-20 11:33:42 +02:00
lvresize.c lvresize: support passing --yes to fsadm 2017-06-21 14:03:29 +02:00
lvscan.c Remove lvmetad 2018-07-11 11:26:42 -05:00
Makefile.in makefile: fixes build for older system 2018-12-17 11:41:38 +01:00
polldaemon.c Remove lvmetad 2018-07-11 11:26:42 -05:00
pvchange.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
pvck.c Add cmd arg to more functions 2018-06-15 11:03:55 -05:00
pvcreate.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
pvdisplay.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
pvmove_poll.c pvmove: move code from tools to lib 2017-12-01 12:18:32 +01:00
pvmove_poll.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pvmove.c Remove unused clvm variations for active LVs 2018-06-07 16:17:04 +01:00
pvremove.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
pvresize.c pvresize: update message 2018-06-08 14:36:59 +02:00
pvscan.c pvscan: autoactivate a VG once 2019-02-21 15:17:41 -06:00
reporter.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
segtypes.c doc: change fsf address 2016-01-21 12:11:37 +01:00
stub.h Remove vgconvert 2018-06-13 14:14:03 -05:00
tags.c doc: change fsf address 2016-01-21 12:11:37 +01:00
tool.h configure: avoid repeative inclusion of configure.h 2018-12-21 19:19:50 +01:00
toollib.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
toollib.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
tools.h add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vals.h vdo: document types vdo and vdo-pool 2019-01-28 22:39:10 +01:00
vgcfgbackup.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
vgcfgrestore.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgchange.c lvmlockd: make lockstart wait for existing start 2019-01-16 10:49:04 -06:00
vgck.c Remove lvmetad 2018-07-11 11:26:42 -05:00
vgcreate.c lvmlockd: make lockstart wait for existing start 2019-01-16 10:49:04 -06:00
vgdisplay.c tidy: Add missing underscores to statics. 2017-10-18 15:58:13 +01:00
vgexport.c lvmlockd: primarily use vg_is_shared 2018-06-01 13:15:22 -05:00
vgextend.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgimport.c Remove lvmetad 2018-07-11 11:26:42 -05:00
vgimportclone.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgmerge.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgmknodes.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
vgreduce.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgremove.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgrename.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
vgscan.c vgscan: drop 'take a while' message 2019-01-28 11:22:42 -06:00
vgsplit.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00