[dm-devel] Re: LVM on dmraid breakage

Luca Berra bluca at comedia.it
Tue Aug 7 09:17:47 UTC 2007


On Mon, Aug 06, 2007 at 10:45:02AM -0400, Phillip Susi wrote:
>>udev is not the only thing on earth that wants to activate a volume
>>group. what if i wanted to do it manually?
>
>Then you do so manually.  This discussion is about what the system does 
>automatically.
And by activating a vg manually i don't benefit from the filter? why?

What about if it is a ha-cluster suite that needs to activate the volume
group. I can't have udev activate that on sight, it will probably
corrupt data.

>>whoever wrote about editing the conf file?
>>i wrote about detecting that a device is already in user by
>>device-mapper and skipping that.
>
>Johnathan Brassow suggested adding the devices claimed by dmraid to 
>lvm's filter spec in its conf file.

probably because this is the only available way now.
anyway this method tends to suck when you have a complex setup.
and lvm device filters are not very intuitive to setup.

>What I am saying is to generalize your suggestion.  Rather than 
>specifically code the lvm tools to use the dm ioctls to check if a 
>device is in use and avoid using it, take a more general approach that 
>will work on similar problems as well, that don't involve device mapper 
>targeting the underlying device, and may be easier to implement.

Let's make a deal, you code that in udev, and in the meantime try to
convince Linus in ditching partition detection code from kernel.
I will code the filter for current lvm.

>If udev uses pvscan on each disk to find out if it is a member of a vg, 
>it can then note which vg it is a member of in its db.  Then it can 
>invoke lvm to attempt to activate that vg, explicitly telling lvm which 
>devices comprise the known pvs of that vg ( since it knows this 
>information ), rather than letting lvm scan /dev/sd*.  When dmraid 
>activates a raid set, udev can note that the physical disk is claimed by 
>dmraid, and it will never ask lvm to do anything with it.
doing this will require changing how lvm tools work.
1) disable the automatic vgscan performed by every lvm command
2) modify pvscan to be able to scan a single device

L.


-- 
Luca Berra -- bluca at comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \




More information about the Ataraid-list mailing list