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

Re: [linux-lvm] Changing dev_t-devname mapping in lvmlib seems to be problematic



Hi Zdenek,

> If you expect stable behavior - and the best memory efficiency and the
> most supported features
>  - then I'd go this way for now.
It's quite frustrating, but I understand. Thanks.

> /dev/dm-xxx   gets  its  'xxx' value in the order in which they appear
> in the kernel processing.
> Thus you should never ever depend on any fixed 'xxx' here - i.e. do
> not reference /dev/dm-xxx
> anywhere in you code - since it may change between reboots.
Since my application is the one creating the dm-linear devices after
boot, I am controlling their dm names. So I know exactly how to
reference them.

> lvm.conf   - look for  setting 'filter='
I am using filter to match only a very small set of devices, something like:
filter = [ "a|^/dev/mapper/alex-|", "r/.*/" ]
So accept only something that looks like /dev/mapper/alex-...., reject
everything else (right?).

Still, when looking at a liblvm "_cache.devices" in gdb, I see a lot
of devices there (~300). Perhaps the filter does not affect this
particular cache.

I will try to put up a short code, which reproduces the problem....
although to reproduce it, I need to create a couple of dm-linears,
delete them, then re-create so that they receive different minor
numbers. So the code might not be as short after all....

Thanks,
  Alex.


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