dnbd3:分布式网络块设备(版本3)

  • l9_658510
    了解作者
  • 235.4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-16 10:49
    上传日期
dnbd3-分布式网络块设备(版本3) 版本3(dnbd3)中的分布式网络块设备是类似于的网络协议,用于实现基于分布式块的存储系统。 这种基于块的分布式存储系统由dnbd3组件,一个或多个服务器和几个客户端组成。 服务器旨在使用dnbd3将虚拟磁盘映像作为块设备公开给客户端。 客户端从服务器请求数据块,并可以实施负载平衡机制以连接到最快的可用服务器以进行数据交换。 该存储库包含以下dnbd3组件的源代码: dnbd3 : dnbd3的Linux内核模块客户端 dnbd3-bench :测试dnbd3的基准实用程序 dnbd3-fuse : dnbd3的保险丝客户端 dnbd3-server :为dnbd3提供虚拟磁盘映像的服务器 可以为以下Linux内核版本和Unix发行版构建dnbd3组件: 具有Linux内核5.10.x或5.4.x的Archlinux 具有Linux内核5.
dnbd3-master.zip
内容介绍
# dnbd3 - distributed network block device (version 3) The distributed network block device in version 3 (dnbd3) is a network protocol similar to [nbd](https://github.com/NetworkBlockDevice/nbd) to implement a distributed block-based storage system. Such a distributed block-based storage system consists of dnbd3 components, namly one or more servers and several clients. Servers are meant to expose virtual disk images as block devices to clients using dnbd3. Clients request data blocks from servers and can implement a load balancing mechanism to connect to the fastest available server for data exchange. This repository contains the source code for the following dnbd3 components: - **dnbd3**: Linux kernel module client for dnbd3 - **dnbd3-bench**: Benchmark utility to test dnbd3 - **dnbd3-fuse**: Fuse client for dnbd3 - **dnbd3-server**: Server to serve virtual disk images for dnbd3 The dnbd3 components can be built for the following Linux kernel versions and Unix distributions: - Archlinux with **Linux kernel 5.10.x** or **5.4.x** - Raspberry Pi OS with **Linux kernel 5.4.x** - Ubuntu 20.04 with **Linux kernel 5.4.x** - Ubuntu 18.04 with **Linux kernel 4.19.x** - CentOS 8 with **Linux kernel 4.18.x** - AlmaLinux 8 with **Linux kernel 4.18.x** - FreeBSD 12.x and 13.x (only user space programs, eg. dnbd3-server) ## Build ### Preliminaries A build of the dnbd3 components requires the installation of the following build tools and libraries under your supported Unix distribution. #### Archlinux with Linux kernel 5.10.x or 5.4.x ```shell pacman -S git \ make \ cmake \ gcc \ linux-headers \ # or linux-lts-headers fuse2 \ jansson \ afl \ dpkg \ rpm-tools ``` #### Raspberry Pi OS with Linux kernel 5.4.x ```shell apt-get install git \ make \ cmake \ gcc \ raspberrypi-kernel-headers \ libfuse-dev \ libjansson-dev \ afl \ rpm ``` #### Ubuntu 20.04 with Linux kernel 5.4.x ```shell apt-get install git \ make \ cmake \ gcc \ linux-headers-generic \ libfuse-dev \ libjansson-dev \ rpm ``` Note that `afl` is not available on Ubuntu 20.04 and should be built from the [original sources](https://github.com/google/AFL). #### Ubuntu 18.04 with Linux kernel 4.19.x ```shell apt-get install git \ make \ cmake \ gcc \ linux-headers-generic \ libfuse-dev \ libjansson-dev \ afl \ rpm ``` #### CentOS 8 with Linux kernel 4.18.x ```shell yum install git \ make \ cmake \ gcc \ kernel-devel \ elfutils-libelf-devel \ fuse-devel \ jansson-devel \ rpm-build ``` Note that `afl` is not available on CentOS 8 and should be built from the [original sources](https://github.com/google/AFL). #### AlmaLinux 8 with Linux kernel 4.18.x ```shell yum install git \ make \ cmake \ gcc \ kernel-devel \ elfutils-libelf-devel \ fuse-devel \ jansson-devel \ libatomic \ rpm-build ``` Note that `afl` is not available on AlmaLinux 8 and should be built from the [original sources](https://github.com/google/AFL). #### FreeBSD 12.x and 13.x ```shell pkg install git \ cmake \ gcc \ pkgconf \ fusefs-libs \ jansson \ afl \ rpm4 ``` ### Preparation Before a build takes place, you should create a `build` directory inside the root folder of the repository. After that, change your working directory to that new directory as follows: ```shell mkdir build cd build ``` ### Configuration A build of the dnbd3 components can be configured and customized by the following configuration variables (CMake cache entries): | Variable | Type | Values | Default value | Description | |:-----------------------------|:-------|:----------------------------------------|:------------------------------|----------------------------------------------------------------------| | `CMAKE_BUILD_TYPE` | STRING | {`Debug`, `Release`} | `Debug` | Build configuration of the dnbd3 project. | | `KERNEL_BUILD_DIR` | PATH | {`a` .. `z`, `A` .. `Z`, `/`, `_`, `-`} | /lib/modules/`uname -r`/build | Path to Linux kernel modules to compile against. | | `KERNEL_INSTALL_DIR` | PATH | {`a` .. `z`, `A` .. `Z`, `/`, `_`, `-`} | /lib/modules/`uname -r`/extra | Path to install Linux kernel modules. | | `DNBD3_KERNEL_MODULE` | OPTION | {`ON`, `OFF`} | `ON` | Build the dnbd3 Linux kernel module. | | `DNBD3_CLIENT_FUSE` | OPTION | {`ON`, `OFF`} | `ON` | Enable build of dnbd3-fuse. | | `DNBD3_SERVER` | OPTION | {`ON`, `OFF`} | `ON` | Enable build of dnbd3-server. | | `DNBD3_SERVER_FUSE` | OPTION | {`ON`, `OFF`} | `OFF` | Enable FUSE-Integration for dnbd3-server. | | `DNBD3_SERVER_AFL` | OPTION | {`ON`, `OFF`} | `OFF` | Build dnbd3-server for usage with afl-fuzz. | | `DNBD3_SERVER_DEBUG_LOCKS` | OPTION | {`ON`, `OFF`} | `OFF` | Add lock debugging code to dnbd3-server. | | `DNBD3_SERVER_DEBUG_THREADS` | OPTION | {`ON`, `OFF`} | `OFF` | Add thread debugging code to dnbd3-server. | | `DNBD3_RELEASE_HARDEN` | OPTION | {`ON`, `OFF`} | `OFF` | Compile dnbd3 programs in Release build with code hardening options. | | `DNBD3_PACKAGE_DOCKER` | OPTION | {`ON`, `OFF`} | `OFF` | Enable packaging of Docker image. | A value from the range of appropriate values can be assigend to each configuration variable by executing CMake once with the following command pattern: ```shell cmake -D<VARIABLE>=<VALUE> [-D ...] ../. ``` > **Note that the default compiler on FreeBSD 12.x and 13.x is clang/llvm and should be changed to gcc by appending the set CMake compiler configuration variable -DCMAKE_C_COMPILER=gcc to the CMake configuration command.** ### Cross-Compiling With the help of CMake, it is also possible to cross-compile the dnbd3 components for a Linux target architecture other than the compiling Linux host architecture. This repository is shipped with two CMake toolchain files to cross-compile all components for the following two Linux target architectures if necessary. > **Note that all used header files (eg. Linux kernel headers) and libraries (eg. jansson, fuse) for the target architecture are installed and set up properly, so that the cross-compiler can find and use them.** #### Cross-Compiling for _powerpc_ Target If you want to cross-compile all dnbd3 components for the _powerpc_ Linux target architecture (eg. for a Mac G5), make sure that the `powerpc-linux-gnu-gcc`
评论
    相关推荐