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

NAME

6       nvme-compare - Send an NVMe Compare command, provide results
7

SYNOPSIS

9       nvme-compare <device> [--start-block=<slba> | -s <slba>]
10                               [--block-count=<nlb> | -c <nlb>]
11                               [--data-size=<size> | -z <size>]
12                               [--metadata-size=<metasize> | -y <metasize>]
13                               [--ref-tag=<reftag> | -r <reftag>]
14                               [--data=<data-file> | -d <data-file>]
15                               [--metadata=<meta> | -M <meta>]
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

DESCRIPTION

32       The Compare command reads the logical blocks specified by the command
33       from the medium and compares the data read to a comparison data buffer
34       transferred as part of the command. If the data read from the
35       controller and the comparison data buffer are equivalent with no
36       miscompares, then the command completes successfully. If there is any
37       miscompare, the command completes with an error of Compare Failure. If
38       metadata is provided, then a comparison is also performed for the
39       metadata.
40

OPTIONS

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

EXAMPLES

156       No examples yet.
157

NVME

159       Part of the nvme-user suite
160
161
162
163NVMe                              09/29/2023                   NVME-COMPARE(1)
Impressum