It appears that "vgscan --mknodes" also creates this symlink, and creates it
pointing to /dev/mapper/<name> instead of to /dev/dm-X like udev does.
controller-1:/dev# vgscan -v --mknodes
Wiping cache of LVM-capable devices
Wiping internal VG cache
Reading all physical volumes. This may take a while...
Using volume group(s) on command line.
Found volume group "nova-local" using metadata type lvm2
Found volume group "cgts-vg" using metadata type lvm2
Found volume group "cinder-volumes" using metadata type lvm2
Using logical volume(s) on command line.
The link /dev/cinder-volumes/cinder-volumes-pool should have been created by
udev but it was not found. Falling back to direct link creation.
controller-1:/dev# ls -l /dev/cinder-volumes/
total 0
lrwxrwxrwx 1 root root 7 Jun 20 22:43 anchor-lv -> ../dm-9
lrwxrwxrwx 1 root root 49 Jun 20 23:09 cinder-volumes-pool ->
/dev/mapper/cinder--volumes-cinder--volumes--pool
This is a bad thing, because running the above or "vgmknodes" and then running
"vgchange -an cinder-volumes" will leave the /dev/cinder-volumes directory with
a dangling symlink in it.
This in turn breaks /usr/lib/ocf/resource.d/heartbeat/LVM, which (perhaps
erroneously) uses the existence of a non-empty /dev/<volume_group> directory as
a test to see if the volume group is active or not.
Chris
On 06/20/2016 04:43 PM, Chris Friesen wrote:
Found it. /usr/lib/udev/rules.d/11-dm-lvm.rules is what makes the
/dev/<VG>/<LV> symlink for normal devices, but for a thin pool with a thin
volume in it it will exit without making a symlink because
DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1 is set.
Given that both vgmknodes and the udev rules come from the lvm2 package, it'd be
nice if they agreed on whether or not a symlink should be created and if so
where it should link to.
Chris
On 06/20/2016 03:53 PM, Chris Friesen wrote:
If I run it I get this:
controller-1:/dev# vgmknodes -v
Using logical volume(s) on command line.
Found same device /dev/sda6 with same pvid Fw6C1IZABbnspIT23RbOGf2DXuB4zMhS
Found same device /dev/sda5 with same pvid 1s1dPDodojAS0kqToIRy4hiXFjCp2t2o
Found same device /dev/sda6 with same pvid Fw6C1IZABbnspIT23RbOGf2DXuB4zMhS
Found same device /dev/drbd4 with same pvid 6yk0HVTSbU9Amo6mwPKt3nZPnBIXBlhR
Found same device /dev/sda5 with same pvid 1s1dPDodojAS0kqToIRy4hiXFjCp2t2o
The link /dev/cinder-volumes/cinder-volumes-pool should have been created by
udev but it was not found. Falling back to direct link creation.
So it thinks that udev should have already made it. Also, the symlink it
generates looks different than the symlinks already in /dev/cinder-volumes, in
that it points to /dev/mapper/<name> rather than pointing to the "real"
/dev/dm-X device like the others.
controller-1:/dev# ls -l /dev/cinder-volumes/
total 0
lrwxrwxrwx 1 root root 7 Jun 20 17:57 anchor-lv -> ../dm-9
lrwxrwxrwx 1 root root 49 Jun 20 21:48 cinder-volumes-pool ->
/dev/mapper/cinder--volumes-cinder--volumes--pool
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-0bc1df18-45d0-4477-9c57-36876d3f82d4 -> ../dm-19
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-2fff261f-8860-4b86-8b2e-49bddcf47e9b -> ../dm-17
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-48744604-6b02-4f11-ba02-3f692d109953 -> ../dm-15
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-8dabc793-e46d-4849-a2fb-dd3d4bc2c988 -> ../dm-20
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-be3c9ddb-a6eb-43ca-ac37-5554756a4c13 -> ../dm-16
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-eef89318-fa8e-4ca2-a8a7-fe8e143d8792 -> ../dm-14
lrwxrwxrwx 1 root root 8 Jun 20 17:57
volume-f11a7d88-1ad3-4e89-a594-e824019725bb -> ../dm-18
Given the above, I think that something other than vgmknodes must be involved.
Chris
On 06/20/2016 03:03 PM, Ilya Boka wrote:
Command vgmknodes
On Mon, Jun 20, 2016 at 10:52 PM, Chris Friesen
<chris.friesen@windriver.com> wrote:
Hi,
Can someone tell me what creates the /dev/<volgroup>/<volume symlinks? Is
this LVM or udev (and if udev, do you know which rule)?
I'm seeing some interesting behaviour where if I create a thin pool it
creates a symlink for the pool, but once I create a thin volume within the
pool then the pool symlink disappears.
Thanks,
Chris
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/