All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: "Sarraf, Ritesh" <Ritesh.Sarraf@netapp.com>,
	Ritesh Raj Sarraf <rsarraf@netapp.com>
Subject: Re: [linux-lvm] Missing error handling in lv_snapshot_remove
Date: Fri, 09 Aug 2013 11:50:40 +0200	[thread overview]
Message-ID: <5204BB70.9060604@redhat.com> (raw)
In-Reply-To: <52039E15.10908@netapp.com>

Dne 8.8.2013 15:33, Ritesh Raj Sarraf napsal(a):
> Hello Zdenek,
>
> On Wednesday 07 August 2013 02:43 PM, Zdenek Kabelac wrote:
>>
>> You are breaking the lvm2 logic thus pushing the code to go
>> through unexpected error code path - user is never supposed to open
>> so called 'private' /dev/mapper/ devices.
>
> Just checking if this applies to other device types of DM, or just LVM?
>
> We recommend our users to rely on /dev/mapper/* Multipath Devices, as
> _persistent_ ones.
>
> We also recommend to pvcreate on top of /dev/mapper/* Multipath Devices.


multipath  !=  lvm2

Multipath has its own rules how to use devices and make the available for use.

In lvm2 you could use lvm.conf preferred_names in this form:

preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]

But it's rather distro-specific how the multipath devices are made available 
for the user - so the names above are mostly usable for RedHat distors
(I think Suse uses slightly different logic)

Note - using   pvcreate on /dev/mapper is nothing against the lvm2 rule.

lvm2 rule is about supported device path for LVs -  whenever you try to use 
LV,  you should always use    '/dev/vgname/lvname'  path.

So   /dev/mapper/vgname-lvname  is not supported way though it will work in 
most cases - but i.e. one of the problems you may have is, that your tool 
would need to properly handle '-' symbol here,  other issue could be, that in 
/dev/mapper you see a lot more devices i.e. all mirror legs and other so 
called private devices which you could  misuse for 'mount' and do a lot of 
damage to internal metadata.

So the simple rule for LVs is to use   /dev/vgname/lvname.

Zdenek

  reply	other threads:[~2013-08-09  9:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 17:37 [linux-lvm] Missing error handling in lv_snapshot_remove Bastian Blank
2013-08-07  9:13 ` Zdenek Kabelac
2013-08-07 12:36   ` Bastian Blank
2013-08-07 13:32     ` Alasdair G Kergon
2013-08-07 15:13     ` Zdenek Kabelac
2013-08-08 13:33   ` Ritesh Raj Sarraf
2013-08-09  9:50     ` Zdenek Kabelac [this message]
2013-08-07  9:22 ` Andreas Pflug
2013-08-07  9:41   ` Zdenek Kabelac
2013-08-07 17:18     ` Andreas Pflug
2013-08-08 10:01       ` Zdenek Kabelac
2013-08-09  7:57         ` Andreas Pflug
2013-08-09  9:40           ` Zdenek Kabelac

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=5204BB70.9060604@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=Ritesh.Sarraf@netapp.com \
    --cc=linux-lvm@redhat.com \
    --cc=rsarraf@netapp.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.