]> git.proxmox.com Git - pve-storage.git/commit
rbd: fix #3969: add rbd dev paths with cluster info
authorAaron Lauterer <a.lauterer@proxmox.com>
Wed, 13 Apr 2022 09:43:22 +0000 (11:43 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 27 Apr 2022 10:57:22 +0000 (12:57 +0200)
commitcfe46e2d4a97a83f1bbe6ad656e6416399309ba2
tree853e0a79b31ff5df5000bfd519088076f4fdf350
parent43f8112f0bb424f99057106d57d32276d7d422a6
rbd: fix #3969: add rbd dev paths with cluster info

By adding our own customized rbd udev rules and ceph-rbdnamer we can
create device paths that include the cluster fsid and avoid any
ambiguity if the same pool and namespace combination is used in
different clusters we connect to.

Additionally to the '/dev/rbd/<pool>/...' paths we now have
'/dev/rbd-pve/<cluster fsid>/<pool>/...' paths.

The other half of the patch makes use of the new device paths in the RBD
plugin.

The new 'get_rbd_dev_path' method the full device path. In case that the
image has been mapped before the rbd-pve udev rule has been installed,
it returns the old path.

The cluster fsid is read from the 'ceph.conf' file in the case of a
hyperconverged setup. In the case of an external Ceph cluster we need to
fetch it via a rados api call.

Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Makefile
PVE/Storage/RBDPlugin.pm
udev-rbd/50-rbd-pve.rules [new file with mode: 0644]
udev-rbd/Makefile [new file with mode: 0644]
udev-rbd/ceph-rbdnamer-pve [new file with mode: 0755]