]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: allow mounting images on Windows
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 30 Jul 2020 11:40:31 +0000 (11:40 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 18 Nov 2020 10:31:24 +0000 (10:31 +0000)
commit4af1ae2093c6dfc915b043afb2e53a67d2ee1e0d
treedfabd4e26e7e178dc559f462048dea81daddcf14
parentc17c53f460254c29e961227e19484c527fd08fc7
rbd: allow mounting images on Windows

This change will allow mapping rbd images on Windows, leveraging the
WNBD[1] Virtual Storport Miniport driver [2].

The behavior and CLI is similar to the Linux rbd-nbd, with a few
notable differences:

* device paths cannot be requested. The disk number and path will
  be picked by Windows. If a device path is provided by the user
  when mapping an image, it will be used as an identifier, which
  can also be used when unmapping the image.
* the "show" command was added, which describes a specific mapping.
  This can be used for retrieving the disk path.
* the "service" command was added, allowing rbd-wnbd to run as a
  Windows service. All mappings are currently perisistent, being
  recreated when the service stops, unless explicitly unmapped.
  The service disconnects the mappings when being stopped.
* the "list" command also includes a "status" column.

The purpose of the "service" mode is to ensure that mappings survive
reboots and that the Windows service start order can be adjusted so
that rbd images can be mapped before starting services that may depend
on it, such as VMMS.

The mapped images can either be consumed by the host directly or exposed
to Hyper-V VMs.

While at it, we'll skip building rbd-mirror as it's quite unlikely that
this daemon is going to be used on Windows for now.

[1] https://github.com/cloudbase/wnbd
[2] https://docs.microsoft.com/en-us/windows-hardware/drivers/storage/overview-of-storage-virtual-miniport-drivers

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
src/common/win32/service.cc
src/tools/CMakeLists.txt
src/tools/rbd_wnbd/CMakeLists.txt [new file with mode: 0644]
src/tools/rbd_wnbd/rbd_wnbd.cc [new file with mode: 0644]
src/tools/rbd_wnbd/rbd_wnbd.h [new file with mode: 0644]
src/tools/rbd_wnbd/wnbd_handler.cc [new file with mode: 0644]
src/tools/rbd_wnbd/wnbd_handler.h [new file with mode: 0644]
win32_build.sh
win32_deps_build.sh