1NVME-SET-FEATURE(1) NVMe Manual NVME-SET-FEATURE(1)
2
3
4
6 nvme-set-feature - Sets an NVMe feature, returns applicable results
7
9 nvme set-feature <device> [--namespace-id=<nsid> | -n <nsid>]
10 [--feature-id=<fid> | -f <fid>] [--value=<value> | -v <value>]
11 [--uuid-index=<uuid-index> | -U <uuid_index>]
12 [--data-len=<data-len> | -l <data-len>]
13 [--data=<data-file> | -d <data-file>]
14 [--save | -s]
15
17 Submits an NVMe Set Feature admin command and returns the applicable
18 results. This may be the feature’s value, or may also include a feature
19 structure if the feature requires it (ex: LBA Range Type).
20
21 The <device> parameter is mandatory and may be either the NVMe
22 character device (ex: /dev/nvme0), or a namespace block device (ex:
23 /dev/nvme0n1).
24
25 On success, the value sent to the device is displayed
26
28 -n <nsid>, --namespace-id=<nsid>
29 Sets the feature for the given nsid. This is optional and most
30 features do not use this value.
31
32 -f <fid>, --feature-id=<fid>
33 The feature id to send with the command. Value provided should be
34 in hex.
35
36 -l <data-len>, --data-len=<data-len>
37 The data length for the buffer submitted for this feature. Most
38 known features do not use this value. The exceptions are LBA Range
39 Type and host identifier.
40
41 -d <data-file>, --data=<data-file>
42 The data file for the buffer submitted for this feature. Most known
43 features do not use this value. The exceptions is LBA Range Type
44 and host identifier. This defaults to STDIN so files and echo can
45 be piped.
46
47 -v <value>, --value=<value>
48 The value for command dword 11, the value you want to set the
49 feature to.
50
51 -s, --save
52 Save the attribute so that it persists through all power states and
53 resets.
54
55 -U <uuid-index>, --uuid-index=<uuid-index>
56 UUID Index of the feature
57
59 • Sets the Power State (PS) to 1 in feature id 2:
60
61 # nvme set-feature /dev/nvme0 -f 2 /dev/nvme0n1 -v 0x1
62
63 • Sets the host id to the ascii string.
64
65 # echo "abcdefgh" | nvme set-feature /dev/nvme0 -f 0x81 -l 8
66
67 nvme set-feature /dev/nvme0 -f 0x81 -l 8 -U 0x1
68
70 Part of the nvme-user suite
71
72
73
74NVMe 09/29/2023 NVME-SET-FEATURE(1)