[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 02/24] Replace PV_MIN_SIZE with function pv_min_size()

Dne 30.1.2011 21:22, Milan Broz napsal(a):
> On 01/30/2011 09:15 PM, Zdenek Kabelac wrote:
>> i.e. if you configure pv_min_size = 10MB - you cannot create  smaller PV - as
>> it would be invisible in your system - IMHO it could eventually lead to bigger
>> confusion - you create small PV, which will be invisible for lvm tools...
>> If you want to create and see smaller PV - lvm.conf needs to be set to smaller
>> value.
> How it differs from filters line in principle?
> If you want to see device, you have to set filer properly.
> Of course it will prevent pv creation, because device is filtered out,
> but on another level.

That's the purpose - to be a very simple and universal filter - to remove such
devices out of any touch by any lvm scanning code (see RHBZ 644578).

You could create complicated lvm.conf per each host - to handle small local
block devices (FDD or whatever you could be attached these days on USB
and present itself as a small storage device /dev/sdX) and allow to support
only larger drives by some smart regex patters unique to each host - or you
could use this simple option to allow LVM only for devices which are i.e. 10GB
in size minimum.

IMHO added new 'filter' config option would just add code like this:

if (dev_size < pv_min_size) goto err;
if (dev_size < configure_pv_min_size) goto err;

With the advantage to pvcreate or pvresize to get 'invisible' devic as it
would be filtered out for any further usage.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]