linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Gang He <GHe@suse.com>
To: Zdenek Kabelac <zkabelac@redhat.com>,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] devices/dir configuration option in /etc/lvm/lvm.conf can be edited?
Date: Mon, 14 Oct 2019 10:52:02 +0000	[thread overview]
Message-ID: <CH2PR18MB32063E1556F117BA9B9F5285CF900@CH2PR18MB3206.namprd18.prod.outlook.com> (raw)
In-Reply-To: <5b456c7b-13bf-b7fc-9347-eb54ccb6cc72@redhat.com>

Hi Zdenek,

Thanks for explaining.
That means we should tell the user, you should not edit this option (dir = "/dev") in the lvm.conf, right?

Thanks
Gang

> -----Original Message-----
> From: Zdenek Kabelac [mailto:zkabelac@redhat.com]
> Sent: 2019��10��14�� 18:40
> To: LVM general discussion and development <linux-lvm@redhat.com>; Gang
> He <GHe@suse.com>
> Subject: Re: devices/dir configuration option in /etc/lvm/lvm.conf can be
> edited?
> 
> Dne 14. 10. 19 v 10:00 Gang He napsal(a):
> > Hello List,
> >
> > By default, devices/dir configuration option in /etc/lvm/lvm.conf is "=/dev".
> > But, if I edit this configuration option, e.g. dir = "/dev/lvm", then lvcreate
> command will fail.
> >
> > sles12sp4-node:/dev # lvcreate -L2G -ay -n testlv vgdata
> >    /dev/lvm/vgdata/testlv: not found: device not cleared
> >    Aborting. Failed to wipe start of new LV.
> >
> > I am using lvm 2.02.183(or 180), this option can be edit individually?
> > or any other option will affect this option, then lead to lvcreate failure.
> 
> Hi
> 
> The option is not so easy to explain:
> 
> In the first place on a today's system you shall never ever need to change this
> setting - as majority of systems runs 'udev' or something similar in a fixed
> position /dev.
> 
> So symlinks & devices appears at this directory (and without 'lvm2' direct
> work) only as a consequence of configured udev rules.
> 
> So now surely comes the obvious question -  why the 'setting' even exists
> when you should always use '/dev' anyway right ;) ?
> 
> And here the answer is longer -  lvm2 is very 'oldish' project from 'dark' era
> before udev took control over devices - and in this old era you could have
> configured different device directory for devices created by lvm2 - since it's
> been lvm2 physically creating these devices.
> 
> The usability for normal users is relatively questionable since almost every
> user wants his devices in /dev dir anyway, but couple wanted to maintain
> separate dir for lvm2 devices.
> 
> The 'other' use-case is for testing - where i.e. lvm2 test suite is/(or was) able to
> run its tests in completely isolated device directory.
> 
> But to be able to use this 'capability' - one has to enable other lvm.conf
> setting:  'activation/verify_udev_operations=1'  - when enabled lvm2 will
> ensure devices are in give directory.
> 
> But !!!! (and it's BIG BUT) this shall never be enabled on a system with running
> udevd and /dev  dir set - as basically nothing else then udevd is supposed to
> be creating anything in /dev dir.
> 
> So hopefully this explains most of the question you may have about this
> setting.
> 
> Regards
> 
> Zdenek
> 
> 

  reply	other threads:[~2019-10-14 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  8:00 [linux-lvm] devices/dir configuration option in /etc/lvm/lvm.conf can be edited? Gang He
2019-10-14 10:39 ` Zdenek Kabelac
2019-10-14 10:52   ` Gang He [this message]
2019-10-14 10:55     ` Zdenek Kabelac
2019-10-14 13:19     ` Alasdair G Kergon
2019-10-15  2:19       ` Gang He

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=CH2PR18MB32063E1556F117BA9B9F5285CF900@CH2PR18MB3206.namprd18.prod.outlook.com \
    --to=ghe@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=zkabelac@redhat.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 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).