All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
  2004-02-09 10:36 [linux-lvm] " Douglas Kilpatrick
@ 2004-02-09 10:43 ` Måns Rullgård
  0 siblings, 0 replies; 7+ messages in thread
From: Måns Rullgård @ 2004-02-09 10:43 UTC (permalink / raw)
  To: linux-lvm

Douglas Kilpatrick <kilpatds@oppositelock.org> writes:

> I'm trying to setup a new box the same way my current box is
> setup. I've split the drives into two sections, one of which I'm
> combining into a RAID0 stripe, the other a RAID1 mirror set. (sorry
> for the redundancy.)
>
> lvm pvs
>
> complains about seeing 3 extra instances of the id, and decides that
> the PV is actually on /dev/sda (or /dev/sdb, depending on boot), not
> /dev/md1.

I have a similar setup and ran into the same problem.  I solved it by
placing this in /etc/lvm/lvm.conf:

devices {
        filter = [ "r,hd," ]
}

That tells lvm to never look at a block device with "hd" in the name.
You should probably change "hd" to "sd".

-- 
M�ns Rullg�rd
mru@kth.se

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
@ 2004-02-12 10:10 Douglas Kilpatrick
  2004-02-12 12:41 ` Luca Berra
  0 siblings, 1 reply; 7+ messages in thread
From: Douglas Kilpatrick @ 2004-02-12 10:10 UTC (permalink / raw)
  To: linux-lvm

=?iso-8859-1?q?M=E5ns_Rullg=E5rd?= <mru@kth.se> writes:

> Douglas Kilpatrick <kilpatds@oppositelock.org> writes:

> > complains about seeing 3 extra instances of the id, and decides that
> > the PV is actually on /dev/sda (or /dev/sdb, depending on boot), not
> > /dev/md1.

> I have a similar setup and ran into the same problem.  I solved it by
> placing this in /etc/lvm/lvm.conf:
>
> devices {
>         filter = [ "r,hd," ]
> }


That appears to have fixed it.  Thanks.

Doug
-- 
Doug Kilpatrick
kilpatds@oppositelock.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
  2004-02-12 10:10 [linux-lvm] Re: LVM2 on top of RAID1? (x86_64) Douglas Kilpatrick
@ 2004-02-12 12:41 ` Luca Berra
  2004-02-12 13:40   ` Kevin P. Fleming
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Berra @ 2004-02-12 12:41 UTC (permalink / raw)
  To: linux-lvm; +Cc: linux-lvm

Douglas Kilpatrick wrote:

> =?iso-8859-1?q?M=E5ns_Rullg=E5rd?= <mru@kth.se> writes:
> 
> 
>>Douglas Kilpatrick <kilpatds@oppositelock.org> writes:
> 
> 
>>>complains about seeing 3 extra instances of the id, and decides that
>>>the PV is actually on /dev/sda (or /dev/sdb, depending on boot), not
>>>/dev/md1.
> 
> 
>>I have a similar setup and ran into the same problem.  I solved it by
>>placing this in /etc/lvm/lvm.conf:
>>
>>devices {
>>        filter = [ "r,hd," ]
>>}
> 
i still believe it would be better if lvm ignored md component devices 
completely.

L.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
  2004-02-12 12:41 ` Luca Berra
@ 2004-02-12 13:40   ` Kevin P. Fleming
  2004-02-12 15:05     ` Luca Berra
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin P. Fleming @ 2004-02-12 13:40 UTC (permalink / raw)
  To: linux-lvm

Luca Berra wrote:

> i still believe it would be better if lvm ignored md component devices 
> completely.

In kernel 2.6 land this is easy to do as well (for everything, not just 
MD). When vgscan tries to open the device to read metadata, open it with 
O_EXCL. If any other kernel subsystem is currently using the device, 
then the open() will fail and vgscan can ignore the device.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
  2004-02-12 13:40   ` Kevin P. Fleming
@ 2004-02-12 15:05     ` Luca Berra
  2004-02-12 15:30       ` Joe Thornber
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Berra @ 2004-02-12 15:05 UTC (permalink / raw)
  To: linux-lvm

Kevin P. Fleming wrote:

> Luca Berra wrote:
> 
>> i still believe it would be better if lvm ignored md component devices 
>> completely.
> 
> 
> In kernel 2.6 land this is easy to do as well (for everything, not just 
> MD). When vgscan tries to open the device to read metadata, open it with 
> O_EXCL. If any other kernel subsystem is currently using the device, 
> then the open() will fail and vgscan can ignore the device.

this won't help if the device is not yet opened by md
i posted a patch to this list that checks for an md superblock.
i am pushing for consideration of this approach.

L.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
  2004-02-12 15:05     ` Luca Berra
@ 2004-02-12 15:30       ` Joe Thornber
  2004-02-12 15:54         ` Luca Berra
  0 siblings, 1 reply; 7+ messages in thread
From: Joe Thornber @ 2004-02-12 15:30 UTC (permalink / raw)
  To: linux-lvm

On Thu, Feb 12, 2004 at 09:06:03PM +0100, Luca Berra wrote:
> this won't help if the device is not yet opened by md
> i posted a patch to this list that checks for an md superblock.
> i am pushing for consideration of this approach.

One of the problems with LVM1 was that there was far too much hard
coded behaviour such as this.

- Joe

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] Re: LVM2 on top of RAID1? (x86_64)
  2004-02-12 15:30       ` Joe Thornber
@ 2004-02-12 15:54         ` Luca Berra
  0 siblings, 0 replies; 7+ messages in thread
From: Luca Berra @ 2004-02-12 15:54 UTC (permalink / raw)
  To: linux-lvm

Joe Thornber wrote:

> On Thu, Feb 12, 2004 at 09:06:03PM +0100, Luca Berra wrote:
> 
>>this won't help if the device is not yet opened by md
>>i posted a patch to this list that checks for an md superblock.
>>i am pushing for consideration of this approach.
> 
> 
> One of the problems with LVM1 was that there was far too much hard
> coded behaviour such as this.

This is a good point, but:
The current LVM2 behaviour is confusing for users that upgrade from 
2.4/lvm1 to 2.6/lvm2 so i would like to address it.
LVM2 already code already contains exceptions for MD devices.
since we have a configuration file we could add a configuration switch 
for ignoring devices with md superblocks (possibly defaulting to ignore, 
which is what users expect)


WDYT?

L.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-12 20:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-12 10:10 [linux-lvm] Re: LVM2 on top of RAID1? (x86_64) Douglas Kilpatrick
2004-02-12 12:41 ` Luca Berra
2004-02-12 13:40   ` Kevin P. Fleming
2004-02-12 15:05     ` Luca Berra
2004-02-12 15:30       ` Joe Thornber
2004-02-12 15:54         ` Luca Berra
  -- strict thread matches above, loose matches on Subject: below --
2004-02-09 10:36 [linux-lvm] " Douglas Kilpatrick
2004-02-09 10:43 ` [linux-lvm] " Måns Rullgård

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.