linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
	Andrei Borzenkov <arvidjaar@gmail.com>
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: <d5a5f70a-8313-3b37-c84f-29e080d5df53@redhat.com> (raw)
In-Reply-To: <ba63b761-d169-a290-3cd9-c6d61f4d5514@gmail.com>

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.

1.
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.

2.
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.

3.
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.

4.
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.


Regards

Zdenek

  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:
  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=d5a5f70a-8313-3b37-c84f-29e080d5df53@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=arvidjaar@gmail.com \
    --cc=linux-lvm@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).