Re: Option devices/dir different from /dev does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux