Re: [gentoo-user] LVM filter question
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 whooosh, 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
Re: [gentoo-user] LVM filter question
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
Re: [gentoo-user] LVM filter question
-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] == dwn...@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-
Re: [gentoo-user] LVM filter question
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] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* dwn...@ntlworld.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* signature.asc Description: PGP signature