All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] pvcreate fails on a software RAID metadisk
Date: Fri, 5 Oct 2001 03:31:59 -0600	[thread overview]
Message-ID: <20011005033158.J31725@turbolinux.com> (raw)
In-Reply-To: <20011005103053.A2938@colombina.comedia.it>

On Oct 05, 2001  10:30 +0200, Luca Berra wrote:
> On Thu, Oct 04, 2001 at 02:46:43PM -0600, Andreas Dilger wrote:
> > On Oct 04, 2001  11:59 -0800, Bill Ellis wrote:
> > > <55555> lvm_check_partitioned_dev -- LEAVING with ret: TRUE
> > 
> > This is a problem - MD devices are not partitioned.  Have a look at
> > this function to see why it thinks so.
> 
> no this should be normal
> i believe the problem lies somewhere else in the damned cache
> i tested it on one of my systems, i have 4 disks and 4 md devices there
> md/0 is not detected
> md/1 to md/3 are

Well, a quick look into lvm_check_partitioned_dev.c makes me think the
whole thing is broken.  lvm_check_partitioned_dev() is only checking
if this is a block device (via lvm_get_device_type()).  If you look at
pv_get_size(), it is depending on this to return FALSE if it is not a
partitioned device type (which it never does now).

Running "cvs annotate tools/lib/lvm_check_partitioned_dev.c" shows that
"akergon" is in the hot seat now (having re-written 90% of this file).
What is probably needed is to move the unpartitioned devices code out
from lvm_check_dev() into another helper function, which can be called
from lvm_check_dev(), lvm_check_partitioned_dev(), lvm_partition_count(),
and lvm_check_whole_disk_dev().

Then lvm_check_partitioned_dev() can return FALSE if it is a whole disk
device, lvm_check_whole_disk_dev() will return TRUE, lvm_partition_count()
should probably return 1 for a whole disk device.

Cheers, Andreas
--
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

  reply	other threads:[~2001-10-05  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-04 16:16 [linux-lvm] pvcreate fails on a software RAID metadisk Bill Ellis
2001-10-04 19:59 ` Bill Ellis
2001-10-04 20:46   ` Andreas Dilger
2001-10-05  8:30     ` Luca Berra
2001-10-05  9:31       ` Andreas Dilger [this message]
2001-10-05  9:13 ` yves.alloyer
2001-10-05 19:31   ` Luca Berra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011005033158.J31725@turbolinux.com \
    --to=adilger@turbolabs.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.