![]() This commmit introduces a new bdev type backed up by DAOS DFS. Design wise this bdev is a file named as the bdev itself in the DAOS POSIX container that uses daos event queue per io channel. Having an event queue per io channel is showing the best IO throughput. The implementation uses the independent pool and container connections per device's channel for the best IO throughput. The semantic of usage is the same as any other bdev type. To build SPDK with daos support, daos-devel package has to be installed. The current supported DAOS version is v2.X, please see the installatoin and setup guide here: https://docs.daos.io/v2.0/ $ ./configure --with-daos To run it, the target machine should have daos_agent up and running, as well as the pool and POSIX container ready to use, please see the detailed requirements here: https://docs.daos.io/v2.0/admin/hardware/. To export bdev over tcp: $ ./nvmf_tgt & $ ./scripts/rpc.py nvmf_create_transport -t TCP -u 2097152 -i 2097152 $ ./scripts/rpc.py bdev_daos_create daosdev0 <pool-label> <cont-label> 1048576 4096 $ ./scripts/rpc.py nvmf_create_subsystem nqn.2016-06.io.spdk1:cnode1 -a -s SPDK00000000000001 -d SPDK_Virtual_Controller_1 $ ./scripts/rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk1:cnode1 daosdev0 $ ./scripts/rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk1:cnode1 -t tcp -a <IP> -s 4420 On the initiator side, make sure that `nvme-tcp` module is loaded then connect drives, for instance: $ nvme connect-all -t tcp -a 172.31.91.61 -s 4420 $ nvme list Signed-off-by: Denis Barakhtanov <denis.barahtanov@croit.io> Change-Id: I51945465122e0fb96de4326db742169419966806 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12260 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
pkgdep | ||
README.md | ||
vm_setup.conf | ||
vm_setup.sh |
Virtual Test Configuration
This readme and the associated bash script, vm_setup.sh, are intended to assist developers in quickly preparing a virtual test environment on which to run the SPDK validation tests rooted at autorun.sh. This file contains basic information about SPDK environment requirements, an introduction to the autorun-spdk.conf files used to moderate which tests are run by autorun.sh, and step-by-step instructions for spinning up a VM capable of running the SPDK test suite. There is no need for external hardware to run these tests. The linux kernel comes with the drivers necessary to emulate an RDMA enabled NIC. NVMe controllers can also be virtualized in emulators such as QEMU.
VM Environment Requirements (Host)
- 8 GiB of RAM (for DPDK)
- Enable intel_kvm on the host machine from the bios.
- Enable nesting for VMs in kernel command line (for vhost tests).
- In
/etc/default/grub
append the following to the GRUB_CMDLINE_LINUX line: intel_iommu=on kvm-intel.nested=1.
- In
VM Specs
When creating the user during the fedora installation, it is best to use the name sys_sgci. Efforts are being made to remove all references to this user, or files specific to this user from the codebase, but there are still some trailing references to it.
Autorun-spdk.conf
Every machine that runs the autotest scripts should include a file titled autorun-spdk.conf in the home directory
of the user that will run them. This file consists of several lines of the form 'variable_name=0/1'. autorun.sh sources
this file each time it is run, and determines which tests to attempt based on which variables are defined in the
configuration file. For a full list of the variable declarations available for autorun-spdk.conf, please see
test/common/autotest_common.sh
starting at line 13.
Steps for Configuring the VM
- Download a fresh Fedora 33 image.
- Perform the installation of Fedora 33 server.
- Create an admin user sys_sgci (enabling passwordless sudo for this account will make life easier during the tests).
- Run the vm_setup.sh script which will install all proper dependencies.
- Modify the autorun-spdk.conf file in the home directory.
- Reboot the VM.
- Run autorun.sh for SPDK. Any output files will be placed in
~/spdk_repo/output/
.
Additional Steps for Preparing the Vhost Tests
The Vhost tests require the creation of a virtual guest machine to be run in the host system. Please follow the directions below to complete that installation. Note that host refers to the Fedora VM created above and guest or VM refer to the Fedora VM created in this section, which are meant to be used in Vhost tests.
To create the VM image manually use following steps:
- Create an image file for the VM. It does not have to be large, about 3.5G should suffice.
- Create an ssh keypair for host-guest communications (performed on the host):
- Generate an ssh keypair with the name spdk_vhost_id_rsa and save it in
/root/.ssh
. - Make sure that only root has read access to the private key.
- Install the OS in the VM image (performed on guest):
- Use the latest Fedora Cloud (Currently Fedora 32).
- When partitioning the disk, make one partition that consumes the whole disk mounted at /. Do not encrypt the disk or enable LVM.
- Choose the OpenSSH server packages during install.
- Post installation configuration (performed on guest):
- Run the following commands to enable all necessary dependencies:
sudo dnf update sudo dnf upgrade sudo dnf -y install git sg3_utils bc wget libubsan libasan xfsprogs btrfs-progs ntfsprogs ntfs-3g git clone https://github.com/spdk/spdk.git ./spdk/scripts/pkgdep.sh -p -f -r -u
- Enable the root user: "sudo passwd root -> root".
- Enable root login over ssh: vim
/etc/ssh/sshd_config
-> PermitRootLogin=yes. - Change the grub boot options for the guest as follows:
- Add "console=ttyS0 earlyprintk=ttyS0" to the boot options in
/etc/default/grub
(for serial output redirect). - Add "scsi_mod.use_blk_mq=1" to boot options in/etc/default/grub
. ~~~{.sh} sudo grub2-mkconfig -o /boot/grub2/grub.cfg ~~~ - Reboot the VM.
- Remove any unnecessary packages (this is to make booting the VM faster):
sudo dnf clean all
- Install fio:
./spdk/test/common/config/vm_setup.sh -t 'fio'
- Place the guest VM in the host at the following location:
$DEPENDENCY_DIR/spdk_test_image.qcow2
. - On the host, edit the
~/autorun-spdk.conf
file to include the following line: SPDK_TEST_VHOST=1.