* [gentoo-user] LVM filter question
@ 2011-07-01 20:05 Alex Schuster
2011-07-01 20:38 ` David W Noon
0 siblings, 1 reply; 5+ messages in thread
From: Alex Schuster @ 2011-07-01 20:05 UTC (permalink / raw
To: gentoo-user
Hi there!
I am using LVM heavily, but I decided to not use it for some additional,
smaller hard drives I use for backups and that I do not want to spin up
every time I do LVM stuff, like pvscan, lvscan, vgchange. As all devices are
scanned in this case, I edited the filter in /etc/lvm/lvm.conf:
filter = [ "r|/dev/nbd.*|", "r|/dev/sdd|", "a/.*/" ]
This should reject /dev/sdd from scanning. But it doesn't, pvscan spins it
up. Any idea why it is not being ignored?
Wonko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] LVM filter question
2011-07-01 20:05 [gentoo-user] LVM filter question Alex Schuster
@ 2011-07-01 20:38 ` David W Noon
2011-07-02 12:19 ` Alex Schuster
0 siblings, 1 reply; 5+ messages in thread
From: David W Noon @ 2011-07-01 20:38 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
On Fri, 01 Jul 2011 22:05:12 +0200, Alex Schuster wrote about
[gentoo-user] LVM filter question:
[snip]
> filter = [ "r|/dev/nbd.*|", "r|/dev/sdd|", "a/.*/" ]
>
> This should reject /dev/sdd from scanning. But it doesn't, pvscan
> spins it up. Any idea why it is not being ignored?
The regular expression that precedes the one involving /dev/sdd
provides a clue: it would appear that LVM wraps the r.e. with ^ and $
so that it completes a string.
So, your r.e. should read:
r|/dev/sdd.*|
which decodes to "reject ^/dev/sdd.*$ ".
This suppresses the scans of /dev/sdd1, /dev/sdd2, etc.
Now, you might not have any partitions on /dev/sdd, but LVM cannot
readily know that without reading the partition table, which spins up
the drive. I guess LVM doesn't trust or, at least, depend upon udev
to supply the partition details.
--
Regards,
Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] LVM filter question
2011-07-01 20:38 ` David W Noon
@ 2011-07-02 12:19 ` Alex Schuster
2011-07-02 13:05 ` David W Noon
0 siblings, 1 reply; 5+ messages in thread
From: Alex Schuster @ 2011-07-02 12:19 UTC (permalink / raw
To: gentoo-user
David W Noon writes:
> On Fri, 01 Jul 2011 22:05:12 +0200, Alex Schuster wrote about
> [gentoo-user] LVM filter question:
>
> [snip]
>
> > filter = [ "r|/dev/nbd.*|", "r|/dev/sdd|", "a/.*/" ]
> >
> > This should reject /dev/sdd from scanning. But it doesn't, pvscan
> > spins it up. Any idea why it is not being ignored?
>
> The regular expression that precedes the one involving /dev/sdd
> provides a clue: it would appear that LVM wraps the r.e. with ^ and $
> so that it completes a string.
>
> So, your r.e. should read:
>
> r|/dev/sdd.*|
>
> which decodes to "reject ^/dev/sdd.*$ ".
>
> This suppresses the scans of /dev/sdd1, /dev/sdd2, etc.
>
> Now, you might not have any partitions on /dev/sdd, but LVM cannot
> readily know that without reading the partition table, which spins up
> the drive. I guess LVM doesn't trust or, at least, depend upon udev
> to supply the partition details.
Good idea, didn't think about this. I tried that, but it did not help.
/dev/sdd indeed has no partitions, the whole drive is a LUKS container.
Looks like this just does not work at all. Too bad. I have two big 1.5 TB
drives, one as system drive, the other as identical backup drive. And then
there are five more smaller drives for stuff I do not need regularly. Any
LVM operation takes a while when all those drives have to spin up first.
Another annoying problem is KDE's / Dolphin's trash. When I delete something
to the trash, all drives (or at least some, I have to investigate this
further) that have mounted partitions spin up, one after another.
Wonko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] LVM filter question
2011-07-02 12:19 ` Alex Schuster
@ 2011-07-02 13:05 ` David W Noon
2011-07-04 13:59 ` Alex Schuster
0 siblings, 1 reply; 5+ messages in thread
From: David W Noon @ 2011-07-02 13:05 UTC (permalink / raw
To: gentoo-user
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, 02 Jul 2011 14:19:08 +0200, Alex Schuster wrote about "Re:
[gentoo-user] LVM filter question":
>David W Noon writes:
[snip]
>> So, your r.e. should read:
>>
>> r|/dev/sdd.*|
>>
>> which decodes to "reject ^/dev/sdd.*$ ".
>>
>> This suppresses the scans of /dev/sdd1, /dev/sdd2, etc.
>>
>> Now, you might not have any partitions on /dev/sdd, but LVM cannot
>> readily know that without reading the partition table, which spins up
>> the drive. I guess LVM doesn't trust or, at least, depend upon udev
>> to supply the partition details.
>
>Good idea, didn't think about this. I tried that, but it did not help.
>/dev/sdd indeed has no partitions, the whole drive is a LUKS container.
My best suggestion is to create a maximal primary partition as /dev/sdd1
and use that as your LUKS volume. That way, LVM will receive the
partition details from udev and *might* not bother re-reading the
partition table (but don't bet big bucks on it).
- --
Regards,
Dave [RLU #314465]
======================================================================
dwnoon@ntlworld.com (David W Noon)
======================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
iEYEARECAAYFAk4PF4oACgkQRQ2Fs59Psv/rLQCffhO28wgWhz/zE+FYwkgRlOfO
8xEAoJvn8soQYrXjiuyRxb5ue+rwUuTt
=691b
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] LVM filter question
2011-07-02 13:05 ` David W Noon
@ 2011-07-04 13:59 ` Alex Schuster
0 siblings, 0 replies; 5+ messages in thread
From: Alex Schuster @ 2011-07-04 13:59 UTC (permalink / raw
To: gentoo-user
David W Noon wrote:
> My best suggestion is to create a maximal primary partition as /dev/sdd1
> and use that as your LUKS volume. That way, LVM will receive the
> partition details from udev and *might* not bother re-reading the
> partition table (but don't bet big bucks on it).
OK, I tried that now with an external drive that also spins down after some
minutes - hdparm -Y does not work for external drives it seems. I made a
single partition /dev/sdj1 (BTW, what will happen if I add 17 more drives?
and I run out of letters?), waited until the drive spun down, issued pvscan
and whooooooosh, the drive is back.
So it seems there is no solution, I think I just have to live with this.
AFAIK spinning up and down often is not too bad for a drive nowadays, but
some drives are 5 years old.
All drives also spin up when I let Digikam retrieve photos from my camera.
And it seems drives with mounted partitions also sometimes spin down then I
delete files, but I cannot reproduce this right now. Strange. But this would
be great, because it's annoying to let a drive spin up just because I delete
a file somewhere.
Thanks for your ideas David, too bad it didn't work.
Wonko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-04 14:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 20:05 [gentoo-user] LVM filter question Alex Schuster
2011-07-01 20:38 ` David W Noon
2011-07-02 12:19 ` Alex Schuster
2011-07-02 13:05 ` David W Noon
2011-07-04 13:59 ` Alex Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox