From ff5d362e725f657493d730f5d4a0abb64839aa44 Mon Sep 17 00:00:00 2001 From: yidong0635 Date: Mon, 1 Apr 2019 15:03:39 -0400 Subject: [PATCH] etc/spdk: add raid bdev related configurations in conf files. Now we need to add configurations in these files to run cases. Add some settings in conf files for user to choose freely. Raid bdev can be comprised of AIO/Nvme/Malloc. Change-Id: Ifdab8539c89d2cf4fcd88ca7f26e8563e12dd585 Signed-off-by: yidong0635 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449772 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- etc/spdk/iscsi.conf.in | 20 +++++++++++++++++++- etc/spdk/nvmf.conf.in | 6 +++++- etc/spdk/vhost.conf.in | 23 +++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/etc/spdk/iscsi.conf.in b/etc/spdk/iscsi.conf.in index a2ba24886..34b60cdbf 100644 --- a/etc/spdk/iscsi.conf.in +++ b/etc/spdk/iscsi.conf.in @@ -139,7 +139,7 @@ # Offload is disabled by default even it is available. [Malloc] # Number of Malloc targets - NumberOfLuns 3 + NumberOfLuns 5 # Malloc targets are 128M LunSizeInMB 128 # Block size. Default is 512 bytes. @@ -184,6 +184,23 @@ # leaving the rest of the device inaccessible Split Malloc2 8 1 +# The RAID virtual block device based on pre-configured block device. +[RAID1] + # Unique name of this RAID device. + Name Raid0 + # RAID level, only raid level 0 is supported. + RaidLevel 0 + # Strip size in KB. + StripSize 64 + # Number of pre-configured bdevs. + NumDevices 2 + # Pre-configured bdevs name with Nvme. + #Devices Nvme0n1 Nvme1n1 + # Pre-configured bdevs name with Malloc. + Devices Malloc3 Malloc4 + # Pre-configured bdevs name with AIO. + #Devices AIO0 AIO1 + # Users should change the TargetNode section(s) below to match the # desired iSCSI target node configuration. # TargetName, Mapping, LUN0 are minimum required @@ -214,4 +231,5 @@ AuthGroup AuthGroup1 UseDigest Auto LUN0 Nvme0n1 + LUN1 Raid0 QueueDepth 32 diff --git a/etc/spdk/nvmf.conf.in b/etc/spdk/nvmf.conf.in index 1b0a720ad..52558525e 100644 --- a/etc/spdk/nvmf.conf.in +++ b/etc/spdk/nvmf.conf.in @@ -193,8 +193,12 @@ StripSize 64 # Number of pre-configured bdevs. NumDevices 2 - # Pre-configured bdevs name. + # Pre-configured bdevs name with Nvme. Devices Nvme2n1 Nvme3n1 + # Pre-configured bdevs name with Malloc. + #Devices Malloc0 Malloc1 + # Pre-configured bdevs name with AIO. + #Devices AIO0 AIO1 # Define an NVMf Subsystem. # - NQN is required and must be unique. diff --git a/etc/spdk/vhost.conf.in b/etc/spdk/vhost.conf.in index a05c0054e..2b18a3dfb 100644 --- a/etc/spdk/vhost.conf.in +++ b/etc/spdk/vhost.conf.in @@ -110,6 +110,23 @@ # leaving the rest of the device inaccessible #Split Malloc2 8 1 +# The RAID virtual block device based on pre-configured block device. +[RAID1] + # Unique name of this RAID device. + Name Raid0 + # RAID level, only raid level 0 is supported. + RaidLevel 0 + # Strip size in KB. + StripSize 64 + # Number of pre-configured bdevs. + NumDevices 2 + # Pre-configured bdevs name with Nvme. + #Devices Nvme0n1 Nvme1n1 + # Pre-configured bdevs name with Malloc. + Devices Malloc1 Malloc2 + # Pre-configured bdevs name with AIO. + #Devices AIO0 AIO1 + # Vhost scsi controller configuration # Users should change the VhostScsi section(s) below to match the desired # vhost configuration. @@ -149,6 +166,12 @@ # SPDK process. #Cpumask 0x1 +#[VhostBlk1] + # Define name for controller + #Name vhost.2 + # Use device which named Raid0 + #Dev Raid0 + #[VhostNvme0] # Define name for controller #Name vhost.0