Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 2020 11:10:53 -0700
From:      Chuck Tuffli <chuck@tuffli.net>
To:        Krishnamraju Eraparaju <ekraju@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: how to set up a nvme target over RAMDISK backend
Message-ID:  <CAM0tzX36K6t=bDbG%2BwHjqNPQG556%2BwZy6pFDWzRi8=51kpOEew@mail.gmail.com>
In-Reply-To: <CAC-Y4SRDUOTGcE1qMftmC4qQ4PMeE73EOfb=0ifzSiNba2Z%2Bcg@mail.gmail.com>
References:  <CAC-Y4SRDUOTGcE1qMftmC4qQ4PMeE73EOfb=0ifzSiNba2Z%2Bcg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 25, 2020 at 9:01 PM Krishnamraju Eraparaju <ekraju@gmail.com>
wrote:

> Hi All,
>
>
> Could someone please help me in setting up a nvme target over RAMDISK
> backend(or any pseudo disk).
>
> Equivalent in Linux would be as below:
>
> modprobe null_blk
> modprobe nvmet
> modprobe nvmet_rdma
>
>
> mkdir /sys/kernel/config/nvmet/subsystems/nvme-ram0
> mkdir /sys/kernel/config/nvmet/subsystems/nvme-ram0/namespaces/1
>
> echo -n /dev/ram1
> >/sys/kernel/config/nvmet/subsystems/nvme-ram0/namespaces/1/device_path
> echo 1 > /sys/kernel/config/nvmet/subsystems/nvme-ram0/attr_allow_any_host
> echo 1 > /sys/kernel/config/nvmet/subsystems/nvme-ram0/namespaces/1/enable
>

FreeBSD doesn't have a direct equivalent of this. It does support NVMe
device emulation in bhyve, but based on loading RDMA drivers above, I'm
guessing this won't meet your needs. Another option would be to use the
nvmf_tgt provided in SPDK (https://spdk.io/). This would give you the
similar functionality to the Linux NVMe target and supports multiple
transports including RoCE.

--chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM0tzX36K6t=bDbG%2BwHjqNPQG556%2BwZy6pFDWzRi8=51kpOEew>