原文地址https://www.dell.com/support/article/cn/zh/cnbsd1/sln312382/nvme-on-rhel7?lang=en

Posted on behalf of Lakshmi Narayanan Durairajan (Lakshmi_Narayanan_Du@dell.com)

What is NVMe?

NVM Express [NVMe] or Non-Volatile Memory Host Controller Interface Specification (NVMHCI), is a specification for accessing solid-state drives (SSDs) attached through the PCI Express (PCIe) bus. NVM is an acronym for non-volatile memory, as used in SSDs.

NVMe defines optimized register interface, command set and feature set for PCIe SSD’s. NVMe focuses to standardize the PCIe SSD’s and improve the performance

PCIe SSD devices designed based on the NVMe specification are NVMe based PCIeSSD’s

For more details on the NVMe please refer the link http://www.nvmexpress.org/ .The NVMe devices used currently are NVMe 1.0c compliant

In this blog we will be looking into RHEL 7 support for the NVMe devices.

Currently DELL support the NVMe devices with RHEL 7 out of box [vendor based] driver

Following are the list of the things that we will look into:

  • NVMe - Features Supported
  • NVMe Device : Listing the device and its Capabilities
  • Checking MaxPayLoad
  • NVMe Driver : List the driver information
  • NVMe Device Node and Naming conventions
  • Formatting with xfs and mounting the device
  • Using ledmon utility to manage backplane LEDs for NVMe device

NVMe- Features Supported

NVMe driver exposes the following features

  • Basic IO operations
  • Hot Plug
  • Boot Support [UEFI and Legacy]

The following table lists the RHEL 7 [Out of box] driver supported features for NVMe on 12G and 13 G machines

Generation Basic IO Hot Plug UEFI Boot Legacy Boot
13 G Yes Yes Yes No
12 G Yes Yes No No

Table 1: RHEL 7 Driver Support

NVMe Device: Listing the device and its Capabilities

1) List the RHEL 7 OS information

[root@localhost ~]# uname -a

Linux localhost.localdomain 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux 

2) Get the device details by using the lspci utility

a) We support Samsung based NVMe drives. First get the pci slot id by using the following command

[root@localhost ~]# lspci | grep -i Samsung

45:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 171X (rev 03)

47:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 171X (rev 03)

b) The slot id will be listed as shown in the below [ Fig 1]. Here ‘’45:00.0"and "47:00.0"are the slots on which the drives are connected.


Figure 1: lspci listing the slot id

a) Use the slot id and use the following lspci options to get the device details ,capabilities and the corresponding driver

[root@localhost ~]# lspci -s 45:00.0 -v

45:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 171X (rev 03) (prog-if 02)

Subsystem: Dell Express Flash NVMe XS1715 SSD 800GB

Physical Slot: 25

Flags: bus master, fast devsel, latency 0, IRQ 76

Memory at d47fc000 (64-bit, non-prefetchable) [size=16K]

Capabilities: [c0] Power Management version 3

Capabilities: [c8] MSI: Enable- Count=1/32 Maskable+ 64bit+

Capabilities: [e0] MSI-X: Enable+ Count=129 Masked-

Capabilities: [70] Express Endpoint, MSI 00

Capabilities: [40] Vendor Specific Information: Len=24 <?>

Capabilities: [100] Advanced Error Reporting

Capabilities: [180] #19

Capabilities: [150] Vendor Specific Information: ID=0001 Rev=1 Len=02c <?>

Kernel driver in use: nvme

The below [Fig 2] shows the Samsung NVMe device and the device details listed. It also shows name of the driver ‘nvme’ in this case for this device


Figure 2: lspci listing NVMe device details

Checking MaxPayLoad

Check the MaxPayload value by executing the following commands. It should set it to 256 bytes [Fig.3]

[root@localhost home]# lspci | grep -i Samsung

45:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller 171X (rev 03)

[root@localhost home]# lspci -vvv -s 45:00.0


Figure 3: MaxPayload set to 256 bytes

NVMe Driver: List the driver information

1) Use modinfo command to list the diver details

[root@localhost ~]# modinfo nvme

filename: /lib/modules/3.10.0-123.el7.x86_64/extra/nvme/nvme.ko

version: 0.8-dell1.17

license: GPL

author: Samsung Electronics Corporation

srcversion: AB81DD9D63DD5DADDED9253

alias: pci:v0000144Dd0000A820sv*sd*bc*sc*i*

depends:

vermagic: 3.10.0-123.el7.x86_64 SMP mod_unload modversions

parm: nvme_major:int

parm: use_threaded_interrupts:int 

The below [Fig 4] shows details of the NVMe driver nvme.ko


Figure 4: Modinfo listing driver information

NVMe Device Node and Naming conventions

1) cat /proc/partitions displays the device node of nvme.

a) Following command run lists the nvme device as nvme0n1 and nvme1n1

[root@localhost ~]# cat /proc/partitions

major minor #blocks name

259 0 781412184 nvme0n1

8 0 1952448512 sda

8 1 512000 sda1

8 2 1951935488 sda2

11 0 1048575 sr0

253 0 52428800 dm-0

253 1 16523264 dm-1

253 2 1882980352 dm-2

259 3 390711384 nvme1n1 

Partition the device using the any partitioning tools (fdisk,parted)

b) Executing the following command again, lists nvme device along with partitions

[root@localhost ~]# cat /proc/partitions

major minor #blocks name

259 0 781412184 nvme0n1

259 1 390705068 nvme0n1p1

259 2 390706008 nvme0n1p2

8 0 1952448512 sda

8 1 512000 sda1

8 2 1951935488 sda2

11 0 1048575 sr0

253 0 52428800 dm-0

253 1 16523264 dm-1

253 2 1882980352 dm-2

259 3 390711384 nvme1n1

259 4 195354668 nvme1n1p1

259 5 195354712 nvme1n1p2 

Naming conventions:

The below [Fig 5] explains the naming convention of the device nodes

The number immediately after the string "nvme" is the device number

Example:

nvme0n1 – Here the device number is 0

Partitions are appended after the device name with the prefix ‘p’

Example:

nvme0n1p1 – partition 1

nvme1n1p2 – partition 2

Example:

nvme0n1p1 – partition 1 of device 0

nvme0n1p2 – partition 2 of device 0

nvme1n1p1 – partition 1 of device 1

nvme1n1p2 – partition 2 of device 1


Figure 5: Device node naming conventions

Formatting with xfs and mounting the device

1) The following command formats the nvme partition 1 on device 1 to xfs

[root@localhost ~]# mkfs.xfs /dev/nvme1n1p1

meta-data=/dev/nvme1n1p1 isize=256 agcount=4, agsize=12209667 blks

= sectsz=512 attr=2, projid32bit=1

= crc=0

data = bsize=4096 blocks=48838667, imaxpct=25

= sunit=0 swidth=0 blks

naming =version 2 bsize=4096 ascii-ci=0 ftype=0

log =internal log bsize=4096 blocks=23847, version=2

= sectsz=512 sunit=0 blks, lazy-count=1

realtime =none extsz=4096 blocks=0, rtextents=0 

2) Mount the device to a mount point and list the same

[root@localhost ~]# mount /dev/nvme1n1p1 /mnt/

[root@localhost ~]# mount | grep -i nvme

/dev/nvme1n1p1 on /mnt type xfs (rw,relatime,seclabel,attr2,inode64,noquota) 

Using ledmon utility to manage backplane LEDs for NVMe device

Ledmon and ledctl are two utilities for Linux that can be used to control LED status on drive backplanes. Normally drive backplane LEDs are controlled by a hardware RAID controller (PERC), but when using Software RAID on Linux (mdadm) for NVMe PCIE SSD, the ledmon daemon will monitor the status of the drive array and update the status of drive LEDs.

For extra reading check the link

https://www.dell.com/support/article/SLN310523/

Following are the steps to install and use the ledmon/ledctl utility

1) Installing OpenIPMI and ledmon/ledctl utilities:

Execute the following commands to install OpenIPMI and ledmon

[root@localhost ~]# yum install OpenIPMI

[root@localhost ~]# yum install ledmon-0.79-3.el7.x86_64.rpm 

2) Use ledmod/ledctl utilities 

Running ledctl and ledmon concurrently, ledmon will eventually override the ledctl settings

a) Start and check the status of ipmi as shown in the [Fig.6] using the following command

[root@localhost ~]# systemctl start ipmi


Figure 6: 
IPMI start and status

a) Start the ledmod

[root@localhost ~]# ledmon

b) [Fig 7] shows LED status after executing ledmon for the working state of the device


Figure 7: 
LED status after ledmon run for working state of the device (green)

a) The below command will blink drive LED [on the device node /dev/nvme0n1 ]

[root@localhost ~]# ledctl locate=/dev/nvme0n1

Below command will blink both the drive LEDs [on the device node /dev/nvme0n1 and /dev/nvme1n1]

[root@localhost ~]# ledctl locate={ /dev/nvme0n1 /dev/nvme1n1 }

And the following command will turn off the locate LED

[root@localhost ~]# ledctl locate_off=/dev/nvme0n1
​​​​​​​

NVMe on RHEL7的更多相关文章

  1. Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7

    SOLUTION VERIFIED September 13 2016 KB1248793 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  2. Create a Team in RHEL7

    SOLUTION VERIFIED September 13 2016 KB2620131 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  3. rhel7 单用户修改root密码

    rhel7密码忘记的时候,可以通过单用户模式修改密码 1.修改 引导文件,添加rw init=/sysroot/bin/sh ,ctrl+x启动 2.切换根chroot /sysroot3.使用pas ...

  4. RHEL6和RHEL7恢复root用户密码

    一.RHEL6恢复root密码 将系统重启,出现如下界面按上下键选择会停住,并输入e键 选中下图红框选项,再输入e键 再输入1,进入单用户模式 输入b进行启动   修改密码,然后重启 二.RHEL7恢 ...

  5. Linux(RHEL7.0)下安装nginx-1.10.2

    查看当前系统版本是否支持 当前,nginx发布包支持以下Linux操作系统版本: RHEL/CentOS: Version Supported Platforms 5.x x86_64, i386 6 ...

  6. RHEL7.2和RHEL6.5的配置网络yum源和本地yum源

    RHEL7.2配置本地yum源 [root@localhost ~]#monut /dev/sr0 /mnt      #挂载光盘 [root@localhost ~]# rm -rf /etc/yu ...

  7. RHEL7 CentOS7 检查查看精简指令

    RHEL7 CentOS7 检查查看精简指令: //////////////////////////检查查看精简指令://///////////////////////////// ///////// ...

  8. Thinkstation center M8600t装RHEL7不能联网,网卡驱动没装问题

    Thinkstation center M8600t装RHEL7时不能联网,配置ip也不可以,后来发现网卡驱动没有安装.可以通过装网卡驱动的方式解决问题,解决方法如下: root登录 lspci |  ...

  9. 红帽RHEL7版本RHCE认证学习及考试经历

    RHCE是红帽公司推出的Linux系统的中级认证,考试全部采取上机形式,在考察考生的基础理论知识的同时还能考察实践动手操作能力,在Linux领域的价值是不可否认的,所以对于期望从事相关行业的同学们在上 ...

随机推荐

  1. 51Nod:完美字符串

    约翰认为字符串的完美度等于它里面所有字母的完美度之和.每个字母的完美度可以由你来分配,不同字母的完美度不同,分别对应一个1-26之间的整数. 约翰不在乎字母大小写.(也就是说字母F和f)的完美度相同. ...

  2. hdu2602 DP (01背包)

    题意:有一个容量 volume 的背包,有一个个给定体积和价值的骨头,问最多能装价值多少. 经典的 01 背包问题不谈,再不会我就要面壁了. 终于有一道题可以说水过了 ……心好累 #include&l ...

  3. hbase基于solr配置二级索引

    一.概述 Hbase适用于大表的存储,通过单一的RowKey查询虽然能快速查询,但是对于复杂查询,尤其分页.查询总数等,实现方案浪费计算资源,所以可以针对hbase数据创建二级索引(Hbase Sec ...

  4. PHP com组件的使用 (环境搭建 以及测试)

    COM 组件在实际当前的软件开发中依然是比较重要,包括对于串口开发的人员,软件插件使用的人员,PHP 已经为我们添加了对于 COM的支持,可以很好的解决我们在开发中可能碰到的一些问题.一下是开发环境的 ...

  5. WebApi_使用技巧

    1.自动生成帮助文档  http://www.shaoqun.com/a/234059.aspx 2.Json序列化循环引用的问题http://www.mamicode.com/info-detail ...

  6. 用cmd加密文件夹

    随着电脑的广泛应用,个人电脑的私人空间越来越大,很多人喜欢把个人的一些私隐的文件存放在电脑上,私隐文件当然是不想别人看到的,为了防止别人看不见自己的文件,可以有很多的方法,今天在网上看了一些文档,学会 ...

  7. NOSQL之MEMCACHE

    Memcached是一个自由开源的,高性能,分布式内存对象缓存系统.Memcached是一个自由开源的,高性能,分布式内存对象缓存系统.Memcached是一种基于内存的key-value存储,用来存 ...

  8. Source Insight 4 中文乱码的解决办法(source insight 3.5 及以下版本就到其他地方看看吧)

    干货:Source Insight 4 中文乱码的解决办法(source insight 3.5 及以下版本就到其他地方看看吧) [解决办法]: 菜单栏中[File]->[Reload As E ...

  9. 【转】每天一个linux命令(39):grep 命令

    原文网址:http://www.cnblogs.com/peida/archive/2012/12/17/2821195.html Linux系统中grep命令是一种强大的文本搜索工具,它能使用正则表 ...

  10. VS2010程序调试

    http://blog.csdn.net/kingzone_2008/article/details/8133048 调试初识及实例.