archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <>
To: LVM general discussion and development <>,
	Andrei Borzenkov <>
Subject: Re: [linux-lvm] Option devices/dir different from /dev does not work
Date: Mon, 28 Jan 2019 11:01:57 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Dne 26. 01. 19 v 22:14 Andrei Borzenkov napsal(a):
> I attempt to put device nodes for volumes in sub-directory of /dev to
> avoid accidental conflict between device name and volume group and
> general /dev pollution. VxVM always did it, using /dev/vx as base
> directory, so I would use something like /dev/lvm.

That is a very HARD task you want to achieve - I'd probably better advice you 
to avoid doing this.

First - please start out with reasoning.

Normally it really DOES NOT matter where device node is - it's in /dev and you 
can create as my subdirs there - it will not help anything - as any app can 
still find the node be there.

You CANNOT change where /dev/dm-XXX node will appear - it's made by kernel 
just one any DM device is created. Udev ONLY controls it's symlink.

With LVM - we advice users to use  /dev/vg/lv  links - although you will find 
out there are way more of them in your /dev  pointing to final /dev/dm node - 
so you SHOULD be using these symlinks for passing devices to VxVM.

If all your work is because you want to avoid LVM commands to access device
you've created and passed to your VMs - you have number of way  easier 
solutions - personally I'd recommend to use FILTERS (in lvm.conf). Just 
'accept' devices which are possible PVs for your hosting machine (be it 
/dev/sd* or whatever else you have) and reject any other device from scanning 
- this will greatly improve performance, avoids various scanning troubles and 
also makes your VMs completely separated.

In the upstream (unstable git HEAD) we have something named 'scan_lvs' in 
lvm.conf  - where you can globally disable scanning of any activated LV  (DM 
device with LVM- UUID prefix) - but it's also not a perfect solution in case 
you would need to use same actived devices locally and some others not.



  reply	other threads:[~2019-01-28 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-26 21:14 [linux-lvm] Option devices/dir different from /dev does not work Andrei Borzenkov
2019-01-28 10:01 ` Zdenek Kabelac [this message]
2019-01-28 10:29 ` Peter Rajnoha

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:

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

  git send-email \ \ \ \ \

* 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).