Solved Can not add vdev to zfs pool, zfs can not find the zpool but it exists

I added a PCIe card with 2 SSDs on it to extend my storage.
This seems to work /dev/nvme0 and /dev/nvme1 showed up.

But adding them as a mirrored vdev to my existing zpool does not work.

Code:
ll /dev/nvme*
crw-------  1 root  wheel   0x40 Jan 18 16:17 /dev/nvme0
crw-------  1 root  wheel   0x55 Jan 18 16:17 /dev/nvme0ns1
crw-------  1 root  wheel   0x41 Jan 18 16:17 /dev/nvme1
crw-------  1 root  wheel   0x5c Jan 18 16:17 /dev/nvme1ns1

Code:
root@freebsd ~  # zpool add znas mirror /dev/nvme0 /dev/nvme1
cannot add to 'znas': no such pool or dataset

Code:
root@freebsd ~  # zpool list
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
znas   6.34T  4.43T  1.92T        -         -     5%    69%  1.00x  ONLINE  -
zroot   107G  19.2G  87.8G        -         -     5%    17%  1.00x  ONLINE  -

Code:
root@freebsd ~  # zpool status znas
  pool: znas
 state: ONLINE
  scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    znas        ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada1    ONLINE       0     0     0
        ada2    ONLINE       0     0     0
      mirror-1  ONLINE       0     0     0
        ada3    ONLINE       0     0     0
        ada4    ONLINE       0     0     0

Not sure why it can list the pool but then not find it
 
Ok, I figured it out. I had to use /dev/nvd0 and /dev/nvd1 instead

Ok, the error message could have been a bit more... in the right direction I guess.
Can someone explain what's the difference and why this caused the error?
 
nvd is the useable disk (nvme disk) exposed through the nvme PCI device. How you would know is... experience... and maybe parsing kernel messages. :( I thought there was a command you could poke at devices and get some information from them but I can't find it.
 
Code:
Most users will also want to enable nvd(4) or nda(4) to expose NVM
     Express namespaces as disk devices which can be partitioned.  Note that
     in NVM Express terms, a namespace is roughly equivalent to a SCSI LUN.
From nvme(4). Short version, nvme(4) is the driver/controller, nvd(4) is the "disk". Much like ata(4) is the driver/controller and ada(4) the disk that's attached to the controller. Or ahci(4) and da(4)
 
And nvmecontrol(8) lets you "poke" at nvme devices. Like so:
Code:
root@kg-core2# nvmecontrol devlist
 nvme0: INTEL SSDPEKNW010T8
    nvme0ns1 (976762MB)
 nvme1: ADATA SX8200PNP
    nvme1ns1 (976762MB)
 
Back
Top