linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Roger Heflin <rogerheflin@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Michael Fladischer <michael@fladi.at>
Subject: Re: [linux-lvm] Cannot create PV on /dev/dm-NN (/dev/dm-N works)
Date: Wed, 28 Mar 2018 05:08:52 -0500	[thread overview]
Message-ID: <CAAMCDecBhszSbP=-_zeSevEhfDgLyhowADR7ySmZFYnsSEvR2g@mail.gmail.com> (raw)
In-Reply-To: <5bf42865-57aa-9bbf-9d0b-2e2e34d74a8c@redhat.com>

I suggest you should never directly be touching the /dev/dm* devices
via that name.

Always touch the actual named device (/dev/mpath, /dev/vgname/lv  A
given dm device can be a number of other devices (lv,s, mpath, mpath
components, encrypted device, md raid, and probably some others).
From just the dm* name you really don't know which kind of device it
is, and there is a lot of risk of confusion and/or data loss.

I have debugged situations were someone went in and partitioned all of
their /dev/dm* devices and some of those devices were actually the
LV's and others were they created PV's on other LV's.   Without a few
commands you cannot easily know what the dm* device is, so access it
via the more sensibly named device.



On Wed, Mar 28, 2018 at 3:27 AM, Zdenek Kabelac <zkabelac@redhat.com> wrote:
> Dne 27.3.2018 v 12:38 Michael Fladischer napsal(a):
>>
>> Hi,
>>
>> I'm unable to create PVs on Multipath-Volumes that are available at
>> /dev/dm-NN where N~[0-9] but I can create them on single digit devices
>> like /dev/dm-9:
>>
>> # pvcreate /dev/dm-6
>>    Physical volume "/dev/dm-6" successfully created.
>>
>> # pvcreate /dev/dm-16
>>    Device /dev/dm-16 not found (or ignored by filtering).
>>
>> My Version of LVM is 2.02.168 from Debian 9.
>> The filter ist set to a permissive value:
>>    filter = [ "a|.*|" ]
>>    global_filter = [ "a|.*|" ]
>>
>> Any ideas why two or more digits in the device path can cause it to be
>> filtered by pvcreate?
>>
>
>
>
> Hi
>
>
> lvm2 is detecting  multipath 'component' devices - those are not allowed to
> be used for pvcreate.
>
> You can use  'pvcreate -vvv' to get more information - there will be printed
> the reason why devices are rejected....
>
> Eventually if you can't figure this out yourself - provide this trace in
> attachment.
>
>
> Regards
>
> Zdenek
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

      parent reply	other threads:[~2018-03-28 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 10:38 [linux-lvm] Cannot create PV on /dev/dm-NN (/dev/dm-N works) Michael Fladischer
2018-03-28  8:27 ` Zdenek Kabelac
2018-03-28  8:59   ` Michael Fladischer
2018-03-28 10:08   ` Roger Heflin [this message]

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='CAAMCDecBhszSbP=-_zeSevEhfDgLyhowADR7ySmZFYnsSEvR2g@mail.gmail.com' \
    --to=rogerheflin@gmail.com \
    --cc=linux-lvm@redhat.com \
    --cc=michael@fladi.at \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).