1NVME-WRITE(1)                     NVMe Manual                    NVME-WRITE(1)
2
3
4

NAME

6       nvme-write - Send an NVMe write command, provide results
7

SYNOPSIS

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-check<storage-tag-check> | -C <storage-tag-check>]
28                               [--force]
29

DESCRIPTION

31       The Write command writes the logical blocks specified by the command to
32       the medium from the data data buffer provided. Will use stdin by
33       default if you don’t provide a file.
34

OPTIONS

36       --start-block=<slba>, -s <slba>
37           Start block.
38
39       --block-count, -c
40           The number of blocks to transfer. This is a zeroes based value to
41           align with the kernel’s use of this field. (ie. 0 means transfer 1
42           block).
43
44       --data-size=<size>, -z <size>
45           Size of data, in bytes.
46
47       --metadata-size=<size>, -y <size>
48           Size of metadata in bytes.
49
50       --data=<data-file>, -d <data-file>
51           Data file. If none provided, contents are sent from STDIN.
52
53       --metadata=<metadata-file>, -M <metadata-file>
54           Metadata file, if necessary.
55
56       --prinfo=<prinfo>, -p <prinfo>
57           Protection Information field definition.
58
59           ┌────┬────────────────────────────┐
60           │Bit │ Description                │
61           ├────┼────────────────────────────┤
62           │3   │ PRACT: Protection          │
63           │    │ Information Action. When   │
64           │    │ set to 1, PI is            │
65           │    │ stripped/inserted on       │
66           │    │ read/write when the block  │
67           │    │ format’s metadata size is  │
68           │    │ 8. When set to 0, metadata │
69           │    │ is passes.                 │
70           ├────┼────────────────────────────┤
71           │2:0 │ PRCHK: Protection          │
72           │    │ Information Check:         │
73           ├────┼────────────────────────────┤
74           │2   │ Set to 1 enables checking  │
75           │    │ the guard tag              │
76           ├────┼────────────────────────────┤
77           │1   │ Set to 1 enables checking  │
78           │    │ the application tag        │
79           ├────┼────────────────────────────┤
80           │0   │ Set to 1 enables checking  │
81           │    │ the reference tag          │
82           └────┴────────────────────────────┘
83
84       --ref-tag=<reftag>, -r <reftag>
85           Optional reftag when used with protection information.
86
87       --app-tag-mask=<appmask>, -m <appmask>
88           Optional application tag mask when used with protection
89           information.
90
91       --app-tag=<apptag>, -a <apptag>
92           Optional application tag when used with protection information.
93
94       --limited-retry, -l
95           Sets the limited retry flag.
96
97       --force-unit-access, -f
98           Set the force-unit access flag.
99
100       -T <type>, --dir-type=<type>
101           Optional directive type. The nvme-cli only enforces the value be in
102           the defined range for the directive type, though the NVMe
103           specifcation (1.3a) defines only one directive, 01h, for write
104           stream idenfiers.
105
106       -S <spec>, --dir-spec=<spec>
107           Optional field for directive specifics. When used with write
108           streams, this value is defined to be the write stream identifier.
109           The nvme-cli will not validate the stream requested is within the
110           controller’s capabilities.
111
112       -D <dsm>, --dsm=<dsm>
113           The optional data set management attributes for this command. The
114           argument for this is the least significant 8 bits of the DSM field
115           in a write command; the most significant 16 bits of the field come
116           from the directive specific field, if used. This may be used to set
117           attributes for the LBAs being written, like access frequency, type,
118           latency, among other things, as well as yet to be defined types.
119           Please consult the NVMe specification for detailed breakdown of how
120           to use this field.
121
122       -v, --show-cmd
123           Print out the command to be sent.
124
125       -w, --dry-run
126           Do not actually send the command. If want to use --dry-run option,
127           --show-cmd option must be set. Otherwise --dry-run option will be
128           ignored.
129
130       -t, --latency
131           Print out the latency the IOCTL took (in us).
132
133       --storage-tag-check=<storage-tag-check>, -C <storage-tag-check>
134           This bit specifies the Storage Tag field shall be checked as part
135           of end-to-end data protection processing.
136
137       --force
138           Ignore namespace is currently busy and perfome the operation even
139           though.
140

EXAMPLES

142       No examples yet.
143

NVME

145       Part of the nvme-user suite
146
147
148
149NVMe                              04/11/2022                     NVME-WRITE(1)
Impressum