After install MLNX_OFED with '--with-nvmf', can't issue SCSI command to NVMe

To support NVMe over Fabrics, I re-install MLNX_OFED with ‘–with-nvmf’ option.

After reboot the node, I find I can’t issue SCSI command to the NVMe device.

For example,

sg_modes /dev/nvme1n1

inquiry: pass through os error: Inappropriate ioctl for device

/dev/nvme1n1 doesn’t respond to a SCSI INQUIRY

sdparm /dev/nvme1n1

unable to access /dev/nvme1n1, ATA disk?

Before re-install MLNX_OFED with ‘–with-nvmf’ option, sg_modes and sdparm can get proper informatioin for /dev/nvme1n1.

What about your OS , and OFED version ?

My os is RHEL7.8. The OFED version is 5.0-2.1.8.0.

cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.8 (Maipo)

uname -an

Linux xxxx 3.10.0-1127.el7.x86_64 #1 SMP Tue Feb 18 16:39:12 EST 2020 x86_64 x86_64 x86_64 GNU/Linux

ofed_info -s

MLNX_OFED_LINUX-5.0-2.1.8.0:

You can check the nvmet target kernel module by “lsmod | grep -i nvme”, if these module loaded may effect SCSI query command you used.

lsmod | grep -i nvme

nvme_rdma 32367 0

nvme_fabrics 20212 1 nvme_rdma

nvmet_rdma 43302 1

nvmet 68331 23 nvmet_rdma

rdma_cm 64252 3 nvme_rdma,nvmet_rdma,rdma_ucm

ib_core 379728 12 rdma_cm,ib_cm,iw_cm,mlx4_ib,mlx5_ib,ib_ucm,nvme_rdma,nvmet_rdma,ib_umad,ib_uverbs,rdma_ucm,ib_ipoib

nvme 42067 5 nvmet,nvmet_rdma

nvme_core 70013 5 nvme,nvme_fabrics,nvme_rdma

nvmet is loaded.

you can unload taht then try, any more issue please open ticket for us by mail support@mellanox.com. We can continue help you.