1NVME-WRITE(1) NVMe Manual NVME-WRITE(1)
2
3
4
6 nvme-write - Send an NVMe write command, provide results
7
9 nvme-write <device> [--start-block=<slba> | -s <slba>]
10 [--block-count=<nlb> | -c <nlb>]
11 [--data-size=<size> | -z <size>]
12 [--metadata-size=<size> | -y <size>]
13 [--ref-tag=<reftag> | -r <reftag>]
14 [--data=<data-file> | -d <data-file>]
15 [--metadata=<metadata-file> | -M <metadata-file>]
16 [--prinfo=<prinfo> | -p <prinfo>]
17 [--app-tag-mask=<appmask> | -m <appmask>]
18 [--app-tag=<apptag> | -a <apptag>]
19 [--limited-retry | -l]
20 [--force-unit-access | -f]
21 [--dir-type=<type> | -T <type>]
22 [--dir-spec=<spec> | -S <spec>]
23 [--dsm=<dsm> | -D <dsm>]
24 [--show-command | -v]
25 [--dry-run | -w]
26 [--latency | -t]
27 [--storage-tag<storage-tag> | -g <storage-tag>]
28 [--storage-tag-check | -C]
29 [--force]
30
32 The Write command writes the logical blocks specified by the command to
33 the medium from the data data buffer provided. Will use stdin by
34 default if you don’t provide a file.
35
37 --start-block=<slba>, -s <slba>
38 Start block.
39
40 --block-count, -c
41 The number of blocks to transfer. This is a zeroes based value to
42 align with the kernel’s use of this field. (ie. 0 means transfer 1
43 block).
44
45 --data-size=<size>, -z <size>
46 Size of data, in bytes.
47
48 --metadata-size=<size>, -y <size>
49 Size of metadata in bytes.
50
51 --data=<data-file>, -d <data-file>
52 Data file. If none provided, contents are sent from STDIN.
53
54 --metadata=<metadata-file>, -M <metadata-file>
55 Metadata file, if necessary.
56
57 --prinfo=<prinfo>, -p <prinfo>
58 Protection Information field definition.
59
60 ┌────┬────────────────────────────┐
61 │Bit │ Description │
62 ├────┼────────────────────────────┤
63 │3 │ PRACT: Protection │
64 │ │ Information Action. When │
65 │ │ set to 1, PI is │
66 │ │ stripped/inserted on │
67 │ │ read/write when the block │
68 │ │ format’s metadata size is │
69 │ │ 8. When set to 0, metadata │
70 │ │ is passes. │
71 ├────┼────────────────────────────┤
72 │2:0 │ PRCHK: Protection │
73 │ │ Information Check: │
74 ├────┼────────────────────────────┤
75 │2 │ Set to 1 enables checking │
76 │ │ the guard tag │
77 ├────┼────────────────────────────┤
78 │1 │ Set to 1 enables checking │
79 │ │ the application tag │
80 ├────┼────────────────────────────┤
81 │0 │ Set to 1 enables checking │
82 │ │ the reference tag │
83 └────┴────────────────────────────┘
84
85 --ref-tag=<reftag>, -r <reftag>
86 Optional reftag when used with protection information.
87
88 --app-tag-mask=<appmask>, -m <appmask>
89 Optional application tag mask when used with protection
90 information.
91
92 --app-tag=<apptag>, -a <apptag>
93 Optional application tag when used with protection information.
94
95 --limited-retry, -l
96 Sets the limited retry flag.
97
98 --force-unit-access, -f
99 Set the force-unit access flag.
100
101 -T <type>, --dir-type=<type>
102 Optional directive type. The nvme-cli only enforces the value be in
103 the defined range for the directive type, though the NVMe
104 specification (1.3a) defines only one directive, 01h, for write
105 stream identifiers.
106
107 -S <spec>, --dir-spec=<spec>
108 Optional field for directive specifics. When used with write
109 streams, this value is defined to be the write stream identifier.
110 The nvme-cli will not validate the stream requested is within the
111 controller’s capabilities.
112
113 -D <dsm>, --dsm=<dsm>
114 The optional data set management attributes for this command. The
115 argument for this is the least significant 8 bits of the DSM field
116 in a write command; the most significant 16 bits of the field come
117 from the directive specific field, if used. This may be used to set
118 attributes for the LBAs being written, like access frequency, type,
119 latency, among other things, as well as yet to be defined types.
120 Please consult the NVMe specification for detailed breakdown of how
121 to use this field.
122
123 -v, --show-cmd
124 Print out the command to be sent.
125
126 -w, --dry-run
127 Do not actually send the command. If want to use --dry-run option,
128 --show-cmd option must be set. Otherwise --dry-run option will be
129 ignored.
130
131 -t, --latency
132 Print out the latency the IOCTL took (in us).
133
134 -g <storage-tag>, --storage-tag=<storage-tag>
135 Variable Sized Expected Logical Block Storage Tag(ELBST).
136
137 -C, --storage-tag-check
138 This flag enables Storage Tag field checking as part of end-to-end
139 data protection processing.
140
141 --force
142 Ignore namespace is currently busy and performed the operation even
143 though.
144
146 No examples yet.
147
149 Part of the nvme-user suite
150
151
152
153NVMe 09/29/2023 NVME-WRITE(1)