You are not logged in.

#1 2017-10-08 21:58:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

[solved] Interpreting wiki/documentation for an NVMe disk

I'm trying to set up Arch on a machine with an NVMe disk, but I'm having trouble converting  instructions designed for other disk interfaces appropriately. In the case of a 'normal' disk, I know that /dev/sda, say, is the disk, and /dev/sda1 etc. are partitions on the disk. In the case of my NVMe disk, I have

/dev/nvme0  /dev/nvme0n1  /dev/nvme0n1p1  /dev/nvme0n1p2

for a drive with two partitions (EFI and Luks).

What confuses me is that I'm not sure when I should say /dev/nvme0 and when /dev/nvme0n1. I assume that /dev/nvme0n1p1 is equivalent to /dev/sda1 i.e. a partition.

I've done this by trial-and-error so far, but I'm now trying to configure a line for smartd.conf and I'm lost as the file does not include any example for this kind of disk and neither upstream's nor Arch's wiki pages for NVMe/smartctl give an example either. Worse still, I can't  even find an example of a complete command line, which would at least give me the device syntax. Moreover, I get the same results whether I ask smartctl to look at nvme0 nvme0n1 or nvme0n1p1, which isn't making sense to me at all.

That is, any of

smartctl -x /dev/nvme0
smartctl -x /dev/nvme0n1
smartctl -x /dev/nvme0n1p1

produce

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.13.4-1-ARCH] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       INTEL SSDPEKKF512G7L
Serial Number:                      XXX
Firmware Version:                   121P
PCI Vendor/Subsystem ID:            0x8086
IEEE OUI Identifier:                0x5cd2e4
Controller ID:                      1
Number of Namespaces:               1
Namespace 1 Size/Capacity:          512,110,190,592 [512 GB]
Namespace 1 Formatted LBA Size:     512
Local Time is:                      Sun Oct  8 22:48:20 2017 BST
Firmware Updates (0x12):            1 Slot, no Reset required
Optional Admin Commands (0x0007):   Security Format Frmw_DL
Optional NVM Commands (0x001e):     Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat
Maximum Data Transfer Size:         32 Pages
Warning  Comp. Temp. Threshold:     70 Celsius
Critical Comp. Temp. Threshold:     80 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     9.00W       -        -    0  0  0  0        5       5
 1 +     4.60W       -        -    1  1  1  1       30      30
 2 +     3.80W       -        -    2  2  2  2       30      30
 3 -   0.0700W       -        -    3  3  3  3    10000     300
 4 -   0.0050W       -        -    4  4  4  4     2000   10000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        22 Celsius
Available Spare:                    97%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    2,159,656 [1.10 TB]
Data Units Written:                 1,360,228 [696 GB]
Host Read Commands:                 131,137,230
Host Write Commands:                9,065,871
Controller Busy Time:               255
Power Cycles:                       85
Power On Hours:                     124
Unsafe Shutdowns:                   55
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0

Error Information (NVMe Log 0x01, max 64 entries)
No Errors Logged

What would a suitable line for smartd.conf look like? I know self-tests aren't supported by smartctl yet, but it is supposed to be possible to monitor health, errors and temperature, for example. (I suspect that this disk's firmware may not support self-tests, either, which would be worrying, if currently irrelevant.)

[EDIT to remove query re. shut downs, as I think it probably should be a new thread.]

Last edited by cfr (2017-10-09 01:29:23)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Online

#2 2017-10-08 22:25:32

dockland
Member
From: Sweden
Registered: 2015-06-06
Posts: 861

Re: [solved] Interpreting wiki/documentation for an NVMe disk

It's simple.
All instances of /dev/sda (for example) is equivalent to /dev/nvme0n1.
And /dev/nvme0n1p1 is equivalent to /dev/sda1 and so on.


I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.
I use it to look at funny pictures of cats and to argue with strangers.

Offline

#3 2017-10-08 23:19:54

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

Re: [solved] Interpreting wiki/documentation for an NVMe disk

dockland wrote:

It's simple.
All instances of /dev/sda (for example) is equivalent to /dev/nvme0n1.
And /dev/nvme0n1p1 is equivalent to /dev/sda1 and so on.

Ah, thank you! So what is /dev/nvme0?

Do you have any ideas about the unsafe shut downs? It sounds very dangerous to have had 55 of them already.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Online

#4 2017-10-08 23:49:45

loqs
Member
Registered: 2014-03-06
Posts: 17,483

Re: [solved] Interpreting wiki/documentation for an NVMe disk

/dev/nvme0 is the device itself /dev/nvme0n1 is the first namespace on that device.
see https://itpeernetwork.intel.com/an-intr … -nvme-ssd/ for multiple namespace example
see http://www.seagate.com/files/www-conten … 1605us.pdf details that namespace management is option on nvme devices
No idea on the unsafe shutdowns.

Offline

#5 2017-10-09 00:08:34

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

Re: [solved] Interpreting wiki/documentation for an NVMe disk

loqs wrote:

/dev/nvme0 is the device itself /dev/nvme0n1 is the first namespace on that device.
see https://itpeernetwork.intel.com/an-intr … -nvme-ssd/ for multiple namespace example
see http://www.seagate.com/files/www-conten … 1605us.pdf details that namespace management is option on nvme devices
No idea on the unsafe shutdowns.

Thanks. Bit over my head, to be honest. My fault for asking the question tongue. If I could have, I would have stuck to SATA, which I more-or-less understand! Well, I at least know what the bits in /dev mean and how to set up SMART monitoring ....


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Online

#6 2017-10-09 00:13:45

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,140

Re: [solved] Interpreting wiki/documentation for an NVMe disk

I think I'd better ask a new question about the shut downs.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Online

Board footer

Powered by FluxBB