Skip to contentSkip to conversation

lvm pvscan or vgscan very slow

linux-lvm Ling Li 3 participants 6 messages Feb 12, 2004 – Feb 14, 2004

lore
Share & tools
lore

Ling Li

author
#0 lore raw

I am using Fedora 1 with some packages updated from the fedora development in order to use kernel 2.6 and LVM2. The operation lvm pvscan' and lvm vgscan' are very slow, taking about 20-30 min. Is this normal, or is this because there is no /etc/lvm.conf file?

Here are the system settings:

device-mapper-1.00.07-2
kernel-smp-2.6.1-1.65
lvm-1.0.3-17
lvm2-2.00.08-2
mkinitrd-3.5.19-1

Root partitions on a SCSI disk, no LVM.
Some data partitions on an 80G IDE disk, with LVM2: 1 PV 1 VG 3 LVs.

--Ling

#1 lore raw
Quoted 4 lines · Ling Li

I am using Fedora 1 with some packages updated from the fedora development in order to use kernel 2.6 and LVM2. The operation lvm pvscan' and lvm vgscan' are very slow, taking about 20-30 min. Is this normal, or is this because there is no /etc/lvm.conf file?

It shouldn't be that slow!

Look at your system log and/or run with -vvv to see why it's so slow.

We've a couple of speed-ups that might help (one uses sysfs to reduce the number of devices to scan) - they're in the queue of things waiting to be checked into CVS after the repository move.
I'll try to get them imported tomorrow.

Alasdair

Signature · 1 line
[email protected]
author
#2 lore raw
Quoted 2 lines · Alasdair G Kergon

It shouldn't be that slow!
Look at your system log and/or run with -vvv to see why it's so slow.

# lvm pvscan -vvv > ~/pvscan-list
# grep "Added to device cache" pvscan-list  | wc -l
  15813

I guess the number of devices to be scanned is just too large (and my computer is also a very slow one). Is there some way to specify a narrower range of devices to be scanned in LVM2?

Quoted 4 lines

We've a couple of speed-ups that might help (one uses sysfs to reduce the number of devices to scan) - they're in the queue of things waiting to be checked into CVS after the repository move.
I'll try to get them imported tomorrow.

This kind of patch will definitely help!

--Ling

#3 lore raw
Quoted 3 lines · Ling Li

I guess the number of devices to be scanned is just too large (and my computer is also a very slow one). Is there some way to specify a narrower range of devices to be scanned in LVM2?

The filter lines in lvm.conf. See doc/example.conf and man lvm.conf.

Quoted 5 lines
Quoted 4 lines

We've a couple of speed-ups that might help (one uses sysfs to reduce the number of devices to scan) - they're in the queue of things waiting to be checked into CVS after the repository move.
I'll try to get them imported tomorrow.

This kind of patch will definitely help!

Both changes are in CVS now.

Info on how to get code out of CVS:
http://www.sistina.com/products_CVS.htm
BUT replace the 'cvs -d :pserver:' lines with those shown on:
http://sources.redhat.com/lvm2/

Alasdair

Signature · 1 line
[email protected]
author
#4 lore raw
Quoted 6 lines · Alasdair G Kergon
Quoted 1 line · Ling Li

I guess the number of devices to be scanned is just too large (and my computer is also a very slow one). Is there some way to specify a narrower range of devices to be scanned in LVM2?

The filter lines in lvm.conf. See doc/example.conf and man lvm.conf.

Got it. The man page says lvm.conf is only loaded during the "initialization phase of LVM." Does this mean I have to reboot the computer for the new lvm.conf to be in effect? Can I just send some signal to some process?

--Ling

#5 lore raw
Quoted 10 lines · Ling Li
Quoted 7 lines · Alasdair G Kergon
Quoted 3 lines · Ling Li

I guess the number of devices to be scanned is just too large (and my computer is also a very slow one). Is there some way to specify a narrower range of devices to be scanned in LVM2?

Quoted 6 lines
Quoted 1 line

The filter lines in lvm.conf. See doc/example.conf and man lvm.conf.

Got it. The man page says lvm.conf is only loaded during the "initialization phase of LVM." Does this mean I have to reboot the computer for the new lvm.conf to be in effect? Can I just send some signal to some process?

No, just run vgscan after setting up your filter in lvm.conf.

Quoted 8 lines

--Ling

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

Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat, Inc.
Consulting Development Engineer                   Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-