Skip to contentSkip to conversation

LVM2: vgscan is long...

linux-lvm Daniel Chénard 3 participants 3 messages Feb 18, 2004

lore
Share & tools
lore
#0 lore raw

In my lvm.conf, I have set my filter

filter = [ "a|hda*|", "a|hdb*|", "a|hdc*|" ]
filter = [ "r|cdrom|", "r|hdd*|" ]

but, when I do

time lvm vgscan
Reading all physical volumes. This may take a while...

real    3m41.199s
user    0m0.889s
sys     0m1.088s

and ps -ef show me many modprobe -q -- block_major*

So, in my rc.sysinit, I do
"action $"Setting up Logical Volume Management:" /sbin/lvm vgscan --mknodes && /sbin/lvm vgchange -a y"

So, 3m41.19 for a vgscan is too long for me. Anybody could help me to reduce this time??

Daniel Chénard
Croesus Finansoft Inc.
Réputé pour créer de la richesse

Croesus Finansoft Inc.
2 Place Laval, Suite 510
Laval, Quebec
Canada H7N 5N6
Site Web: www.croesus.com

[email protected]
Tel: +1 450-662-6101, 145
Fax: +1 450-662-3629

PS: The Light at the End of The Tunnel
will be turned off until further
notice due to budget cutbacks.
--The Management

#1 lore raw
Quoted 4 lines · Daniel Ch�nard

In my lvm.conf, I have set my filter

filter = [ "a|hda*|", "a|hdb*|", "a|hdc*|" ]
filter = [ "r|cdrom|", "r|hdd*|" ]

Only one filter applies: merge them into one line. e.g.
filter = [ "a|hda*|", "a|hdb*|", "a|hdc*|", "r|.*|" ]

And if this is 2.6, you may find the LVM2 source code in CVS runs faster.

Alasdair

Signature · 1 line
[email protected]
#2 lore raw
In reply to Daniel Chénard
Quoted 2 lines · Daniel Ch?nard

So, 3m41.19 for a vgscan is too long for me. Anybody could help me to reduce this time??

If you are using 2.6 you could try the latest LVM2 tools from CVS. There is a filter that uses sysfs to speed up vgscan (took a 35 second scan to 2 seconds on my system).

- Joe