# How do you enable an Optane SSD NVMe?



## Norm (May 28, 2022)

I cannot find anything, anywhere on how to enable this ssd device.
Does anyone know what the command would be or where I can read up on it?


----------



## Phishfry (May 28, 2022)

The Intel Optane drives are basically just PCI-e NVMe SSDs.

`ls /dev/nvme*` will show the namespace.

nvd(4) driver is the original nvme driver.

nda(4) driver is newer and supported by cam subsystem.

Depending on FreeBSD version in use you will see either /dev/nvd* or /dev/nda* device nodes.


----------



## Phishfry (May 28, 2022)

Norm said:


> I'm trying to enable a PCI adapter with an NVME SSD installed to use as a log file but cannot find anything on how to enable this device.



Please lets keep this in one thread.

If no device nodes are showing then elaborate on your PCI Card and cabling. Make and Model. Motherboard info too.

Can I assume you want to use this drive for ZIL slog?


----------



## _al (May 28, 2022)

Details matter.
For example, I have M.2 device Intel SSD Optane attached to NGFF1 slot.
FreeBSD was installed after the device had been attached.
In my case:

```
[lanin@freebsd ~]$ dmesg |grep SSD
nvd0: <INTEL SSDPEL1K100GA> NVMe namespace
```


```
[lanin@freebsd ~]$ pciconf -vl | grep -B2  NVMe
nvme0@pci0:7:0:0:    class=0x010802 rev=0x00 hdr=0x00 vendor=0x8086 device=0x2701 subvendor=0x8086 subdevice=0x3907
    vendor     = 'Intel Corporation'
    device     = 'NVMe Datacenter SSD [Optane]'
```


```
[lanin@freebsd ~]$ ls /dev/nvme*
/dev/nvme0    /dev/nvme0ns1
```


```
[lanin@freebsd ~]$ gpart list nvd0
Geom name: nvd0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 195371534
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: nvd0p1
   Mediasize: 49999249408 (47G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 1048576
   Mode: r0w0e0
   efimedia: HD(1,GPT,267c5d90-e450-41d9-8f04-9ec934a1ac63,0x800,0x5d21800)
   rawuuid: 267c5d90-e450-41d9-8f04-9ec934a1ac63
   rawtype: 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
   label: (null)
   length: 49999249408
   offset: 1048576
   type: linux-swap
   index: 1
   end: 97656831
   start: 2048
Consumers:
1. Name: nvd0
   Mediasize: 100030242816 (93G)
   Sectorsize: 512
   Mode: r0w0e0
```


----------



## msplsh (May 28, 2022)

Blank disks don't show up in `gpart`, I think.  Use `geom -t` to list them out before `gpart create -s GPT DISK_IDENTIFIER`


----------



## Bobi B. (May 29, 2022)

nvmecontrol(8) for NVMe, as is camcontrol(8) for CAM.


----------



## _al (May 29, 2022)

Oh..My post above is a mistake. I did not realize that discussion was started in another thread (at link pointed by *Phishfry) *and is about storage in big systems.
In that context my post looks stupid. Sorry about that.
My post above is more related to https://forums.freebsd.org/threads/paddle-card.85333/


----------



## grahamperrin@ (May 29, 2022)

Norm which version of FreeBSD, exactly?


----------



## Phishfry (May 29, 2022)

Andrey Lanin said:


> In that context my post looks stupid. Sorry about that.


No I don't think that at all. We have showed the original poster just about every factoid about NVMe we can muster.
I did drag that other post over here. The op in that post said:



Dave-D said:


> NVME is not an option at this point.



And then Norm mis-understood his post to mean something else;


Norm said:


> Do you mean nvme devices are not supported on freebsd?



I don't like spreading help among several posts. I felt it was best to use one thread.


----------



## Phishfry (May 31, 2022)

msplsh said:


> Use `geom -t` to list them out before


Mind blown.
Another command i never knew existed.
Are you from another universe?

I was aware geom(8) is the parent of the disk classes but I didn't realize it was a command too.


----------



## Norm (Jun 1, 2022)

Phishfry said:


> The Intel Optane drives are basically just PCI-e NVMe SSDs.
> 
> `ls /dev/nvme*` will show the namespace.
> 
> ...


Hi, sorry for not getting back to this. I didn't get any notifications of replies.
It's a fully updated FreeBSD 13.

So I checked as suggested

```
# ls /dev/nvme*
ls: /dev/nvme*: No such file or directory

# ls /dev/nd*
ls: /dev/nd*: No such file or directory
```
I actually want to use this as a cache drive for mysql. Just a test really as it may end up being used for something else like a log file.

Yes, same as yours I think.

The PCI adapter is one of these;








						M.2 NGFF to Desktop PCIe x4 x8 x16 NVMe SATA Dual SSD PCI Express Adapter Card  | eBay
					

Find many great new & used options and get the best deals for M.2 NGFF to Desktop PCIe x4 x8 x16 NVMe SATA Dual SSD PCI Express Adapter Card at the best online prices at eBay! Free shipping for many products!



					www.ebay.com
				




The Optane is one of these;








						Intel Optane 16GB,Internal,M.2 80mm (MEMPEK1W016GA) Solid State Drive for sale online | eBay
					

Find many great new & used options and get the best deals for Intel Optane 16GB,Internal,M.2 80mm (MEMPEK1W016GA) Solid State Drive at the best online prices at eBay! Free shipping for many products!



					www.ebay.com
				




There is no cabling for the card.

I use these on my TrueNas boxes and they work well as a SLOG device.

```
# dmesg |grep SSD
#

# pciconf -vl | grep -B2  NVMe
#

# gpart list nvd0
gpart: Class 'PART' does not have an instance named 'nvd0'.

# geom -t
Geom               Class      Provider
da0                DISK       da0
  da0              DEV
  da0              PART       da0p1
    da0p1          DEV
    da0p1          LABEL      gpt/gptboot0
      gpt/gptboot0 DEV
  da0              PART       da0p2
    da0p2          DEV
    swap           SWAP
  da0              PART       da0p3
    da0p3          DEV
    zfs::vdev      ZFS::VDEV
da1                DISK       da1
  da1              DEV
  da1              PART       da1p1
    da1p1          DEV
    da1p1          LABEL      gpt/gptboot1
      gpt/gptboot1 DEV
  da1              PART       da1p2
    da1p2          DEV
    swap           SWAP
  da1              PART       da1p3
    da1p3          DEV
    zfs::vdev      ZFS::VDEV
```
`#  pciconf -lv`
Nothing for nvme or ssd etc. I'm using a couple of SAS drives in this server.
Maybe I have to enable something in the BIOS?


----------



## grahamperrin@ (Jun 1, 2022)

Phishfry said:


> … I didn't realize it was a command too.



FreeBSD bug 264387 – geom(4) should mention geom(8)


----------



## msplsh (Jun 1, 2022)

`man geom` pulls up 8 by default on 12


----------



## msplsh (Jun 1, 2022)

Maybe try swapping the slot on the PCIe adapter.

Also consider that if you ordered the Optane card from China, it may be a complete fake.  Perhaps swap out for a known-working one.


----------



## Phishfry (Jun 1, 2022)

Try the NVMe in the other slot.
Unless your motherboard supports bifurcation only one slot on your adapter will work.
It needs support in the BIOS for both slots to work.

I ask again. What is your motherboard?


----------



## Norm (Jun 1, 2022)

Sorry, didn't notice that question but I tried to answer everything posted to me .
Server is an HP sl230S so the mainboard would be similar to this;






						>HPE 650048-B21 ProLiant SL230S G8 Right Half Tray Node CTO Chassis at ServerSupply.com
					

Buy Hpe 650048-b21 Proliant Sl230s G8- Cto Chassis With No Cpu, No Ram, Hp Nc361i Ethernet Controller, Ilo-4, 2-way 1u Right Half Width Server Tray. Refurbished..Great customer service.



					www.serversupply.com
				




I'll try swapping the slot right now.


----------



## Norm (Jun 1, 2022)

Sure enough, all it needed was a slot swap.

# pciconf -vl | grep -B2  NVMe
nvme0@pci0:8:0:0:       class=0x010802 rev=0x00 hdr=0x00 vendor=0x8086 device=0x2522 subvendor=0x8086 subdevice=0x3810
    vendor     = 'Intel Corporation'
    device     = 'NVMe Optane Memory Series'

# ls /dev/nv*
/dev/nvd0       /dev/nvme0      /dev/nvme0ns1

Thanks very much for the help.


----------



## grahamperrin@ (Jun 4, 2022)

Norm said:


> … all it needed was a slot swap. …



Thanks, you can add the _Solved_ prefix.



msplsh said:


> `man geom` pulls up 8 by default …



True, 8 precedes 4 for man(1) search purposes.


----------

