Discussion:
[linux-lvm] Slow response from lvs and vgs commands
John Griffith
2015-01-19 21:05:39 UTC
Permalink
Hi All,

Wondering if anybody had any info on why lvs and vgs commands may be
taking up to 3 minutes to respond? In my particular case I'm running
Ubuntu 14.04 as a KVM Instance, with the default version of LVM2
(2.02.98).

There's not anything overly interesting going on with the system, I've
had as few as 1 Volume and as many as 5 when this occurs. The only
thing that may be unique is that this is during testing so there's a
lot of create/delete activity taking place. Don't know if that might
have anything to do with it.

I'm wondering if there's something I should be looking at more closely
to debug this, or if there's a way to filter the lvs and vgs commands
to make them more efficient?

Any help or suggestions would be greatly appreciated.

Thanks,
John
Alasdair G Kergon
2015-01-19 22:21:34 UTC
Permalink
Post by John Griffith
I'm wondering if there's something I should be looking at more closely
to debug this, or if there's a way to filter the lvs and vgs commands
to make them more efficient?
Add -vvvv to the command lines and see if that helps you to see
where the slowness is.

Alasdair
John Griffith
2015-01-19 22:58:06 UTC
Permalink
Post by Alasdair G Kergon
Post by John Griffith
I'm wondering if there's something I should be looking at more closely
to debug this, or if there's a way to filter the lvs and vgs commands
to make them more efficient?
Add -vvvv to the command lines and see if that helps you to see
where the slowness is.
Alasdair
Thanks Alasdair,

Turns out I got a great suggestion to wrap this up in strace via the
IRC channel. Turns out I'm scanning on some devices that are being
plugged in and out of the system and the failure is due to the fact
that the raw device gets ripped out from under the vgscan.

Going to try limiting the devices I interact with via lvm.conf, I
think that will address the issue.

Thanks,
John
Marcos Dutra
2015-01-27 15:04:49 UTC
Permalink
This post might be inappropriate. Click to display it.
Zdenek Kabelac
2015-01-28 09:28:48 UTC
Permalink
Post by Marcos Dutra
Hi everybody,
I have the same problem when I use vgs command, so I used vgs -vvv command and
it was slow when the output command showed me this "Archiving volume group
"vgoracle" metadata (seqno 3)", I have many vgs with this status, Archiving
volume group xxx, Is it normal? What can I do to solve this?
If you are creating lots of randomly named VGs - then you'll need to manual
prune /etc/lvm/archive directory.

When you use consistently the same VG name - you could configure some limits
via lvm.conf settings:

backup/retain_min
backup/retain_days

(Or you could disable backup completely)

Zdenek

Loading...