All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Cannot create PV on /dev/dm-NN (/dev/dm-N works)
@ 2018-03-27 10:38 Michael Fladischer
  2018-03-28  8:27 ` Zdenek Kabelac
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Fladischer @ 2018-03-27 10:38 UTC (permalink / raw)
  To: linux-lvm

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?

Cheers,

-- 
Michael Fladischer
Fladi.at

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

* Re: [linux-lvm] Cannot create PV on /dev/dm-NN (/dev/dm-N works)
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2018-03-28  8:27 UTC (permalink / raw)
  To: LVM general discussion and development, Michael Fladischer

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

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

* Re: [linux-lvm] Cannot create PV on /dev/dm-NN (/dev/dm-N works)
  2018-03-28  8:27 ` Zdenek Kabelac
@ 2018-03-28  8:59   ` Michael Fladischer
  2018-03-28 10:08   ` Roger Heflin
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Fladischer @ 2018-03-28  8:59 UTC (permalink / raw)
  To: LVM general discussion and development


[-- Attachment #1.1: Type: text/plain, Size: 535 bytes --]

On Wed, 2018-03-28 at 10:27 +0200, Zdenek Kabelac wrote:
> 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....

Thanks, I figured it out. As it happens those devices with two digits
had a GPT on them. Once I erased the primary copy at the beginning of
the devices, I was able to use pvcreate on them.

Cheers,
-- 
Michael Fladischer
Fladi.at

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3269 bytes --]

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

* Re: [linux-lvm] Cannot create PV on /dev/dm-NN (/dev/dm-N works)
  2018-03-28  8:27 ` Zdenek Kabelac
  2018-03-28  8:59   ` Michael Fladischer
@ 2018-03-28 10:08   ` Roger Heflin
  1 sibling, 0 replies; 4+ messages in thread
From: Roger Heflin @ 2018-03-28 10:08 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Michael Fladischer

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/

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

end of thread, other threads:[~2018-03-28 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.