首页 > 其他分享 >nvmecli介绍和使用

nvmecli介绍和使用

时间:2024-10-10 10:20:22浏览次数:3  
标签:commands sudo CLI NVMe nvmecli 介绍 version 使用 nvme

NVM Express® (NVMe®) technology has enabled a robust set of industry-standard software, drivers, and management tools that have been developed for storage. The tool to manage NVMe SSDs in Linux is called NVMe Command Line Interface (NVMe-CLI).

Overview of features

Data centers require many management functions to monitor the health of the SSD, monitor endurance, update firmware, securely erase storage and read various logs. NVMe-CLI is an open-source, powerful feature set that follows the NVMe specification and is supported by all major distributions. It supports NVMe SSDs as well as NVMe over Fabrics (NVMe-oF™) architecture and offers optional vendor plugins for supplemental information above and beyond the specification.

You can search the Linux man page for help, but it won’t be enough to understand the capabilities of NVMe-CLI. The good news is all the commands in NVMe-CLI directly match the spec! All you need to do is download a copy of the latest NVMe spec to be able to interpret the abbreviations for the various commands.

All the abbreviations in the output of the NVMe commands can be found in the specification. For instance, for the Identify Controller data structure, you can send the command nvme-id-ctrl in NVMe-CLI. The output will have abbreviations for the various fields

Example: Model Number (MN) is displayed in NVMe-CLI as mn

NVMe-CLI can is obtained as a package for all the Linux distributions. The Github page has instructions for all the distributions, example for Ubuntu / Debian is below.

sudo apt install nvme-cli

You can also head over to the releases page and get the most stable build, while you will have to follow the instructions on the GitHub to compile and install for your distribution. On Ubuntu 22.04, the compiling would look like this.

wget https://github.com/linux-nvme/nvme-cli/archive/refs/tags/v2.3.tar.gz

tar -xvf v2.3.tar.gz

cd nvme-cli-2.3

sudo apt update

sudo apt install meson

sudo apt install ninja-build

sudo meson .build

sudo ninja -C .build

sudo meson install -C .build

Here is the cheat sheet of the most commonly used commands. Remember NVMe-CLI is powerful and can do almost anything that the NVMe specification calls out if used correctly. We will go into all these commands in detail.

Cheat Sheet

nvme version

Display the current version

nvme list

Lists all the NVMe SSDs attached: name, serial number, size, LBA format, and serial

nvme id-ctrl

Discover information about NVMe controller and features it supports

nvme id-ns

Discover optimal namespace size, protection information, LBA size

nvme format

Secure erase the data on an SSD, format an LBA size or protection information for end-to-end data protection

nvme sanitize

Securely eliminate all data on device, cannot be stopped. Supports block, crypto, and overwrite

nvme smart-log

Health of the SSD (critical warning info), temperature, endurance, power on hours and error summary

nvme error-log

A log that contains information about errors encountered

nvme reset

Resets the NVMe controller

nvme create-ns

Create a namespace, can be used for overproviosning an SSD

nvme delete-ns

Remove a namespace

nvme device-self-test

Simple test for health of a drive, pass/fail

nvme fw-download, fw-commit

Download firmware to the drive, update the firmware on the drive

nvme help

Lists all the available commands

Basics – Version, List, and Learning About the Capabilities of Attached NVMe Controllers / SSDs

NVMe Version

nvme version

nvme version 2.3 (git 2.3)

libnvme version 1.3 (git 1.3)

NVMe List

sudo nvme list

Identify Controller

The identify controller command is used to learn about the capabilities of the NVMe controllers (in most cases, this is the capabilities of an NVMe SSD). Instead of guessing which features a vendor supports, they are all neatly laid out in the capabilities field. Other useful information includes drive model, vendor, firmware version,

标签:commands,sudo,CLI,NVMe,nvmecli,介绍,version,使用,nvme
From: https://blog.csdn.net/lwexin/article/details/142779205

相关文章

  • 2024你必须要掌握的Idea使用技巧和快捷键
    Hello,大家好,我是Feri,一枚十多年的程序员,同时也是一名在读研究生,关注我,且看一个平凡的程序员如何在自我成长,CodingSir是我想打造一个编程社区,只为各位小伙伴提供编程相关干货知识,希望在自我蜕变的路上,我们一起努力,努力什么时候开始都不晚,我,从现在开始做起!一、前言Hello,大家......
  • 稀疏促进动态模态分解(SPDMD)详细介绍以及应用
    在数据驱动分析领域,从复杂流体流动中提取有意义的模式一直是一个重大挑战。稀疏促进动态模态分解(SparsityPromotingDynamicModeDecomposition,SPDMD)提供了一种有效方法,能够揭示最主要的特征,同时去除冗余信息,从而实现更高效和更具洞察力的分解。这种方法将动态模态分解(Dynamic......
  • 使用C#和WCF创建并托管简单服务的指南
    在C#中,实现WindowsCommunicationFoundation(WCF)功能通常涉及几个关键步骤,包括定义服务契约、实现服务、配置服务以及托管服务。下面是一个简单的示例,展示如何使用C#和WCF来创建一个简单的服务。步骤1:创建服务契约首先,我们需要定义一个服务契约,这通常是通过接口来......
  • 网页设计模板怎么使用-如何去修改呢?
    使用和修改网页设计模板通常涉及以下几个步骤:选择合适的模板:根据你的网站需求选择一个适合的设计模板。下载或安装模板:从模板提供商处下载模板文件,并按照说明将其安装到你的网站系统中。了解模板结构:通过查看模板的HTML、CSS和JavaScript文件来理解其基本结构和样式设置。修......
  • 基于Arduino的超声波和舵机模块集成使用
    一.超声波模块和舵机模块集成使用超声波模块:HC-SR04舵机模块:SG90目的:通过ArduinoUNO核心板控制舵机旋转到不同位置,同时获取不同位置超声波模块和障碍物间的距离,配合控制算法,进行基于超声波智能避障小车的制作。二.源代码#include<Servo.h>#definetrigPin2#define......
  • 异步场景: promise、async函数与await命令介绍
    如果你也对鸿蒙开发感兴趣,加入“Harmony自习室”吧!扫描下方名片,关注公众号,公众号更新更快,同时也有更多学习资料和技术讨论群。在鸿蒙的开发中,我们时常会遇到promise异步场景,有同学反馈说希望提一下。异步开发这部分的内容比较多,我不确定这位朋友具体想讨论是哪些方面,那我从......
  • ara::core::Future::then()的概念和使用方法
    1.概念在ara::core::Future的上下文中,then()是一种用于处理异步操作结果的机制。一个Future代表一个尚未完成的异步计算,它最终会产生一个结果或者一个错误。then()方法允许你在Future完成时注册一个回调函数(或者说后续操作),这个回调函数会在Future成功完成(即产生了结果)时被调......
  • Arduino UNO R3自学笔记23 之 Arduino如何使用4511控制数码管?
    注意:学习和写作过程中,部分资料搜集于互联网,如有侵权请联系删除。前言:因为7段数码管控制需要用到7个IO,这会严重占用Arduino的IO口,因此我们采用现有IC来节省Arduino的IO口。1.CD4511介绍        CD4511是一款用于驱动共阴极LED(数码管)显示器的BCD码-七段码译码器。它具......
  • docker详解介绍+基础操作 (三)
    1.docker存储引擎Overlay:一种UnionFS文件系统,Linux内核3.18后支持Overlay2:Overlay的升级版,docker的默认存储引擎,需要磁盘分区支持d-type功能,因此需要系统磁盘的额外支持。关于d-type传送门 docker详解介绍+基础操作(二)-CSDN博客由于centos8及ubuntu1604版本均支持,其......
  • pb_ds 的若干使用方法
    pb_ds提供的数据结构都需要使用命名空间__gnu_pbds,以下介绍几种常用的数据结构。可并堆:__gnu_pbds::priority_queue头文件<ext/pb_ds/priority_queue.hpp>,声明方式与std::priority_queue类似,大部分用法也与一致。关键的合并操作是x.join(y),其中x和y为两个__gnu_pbds......