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

NAME

6       nvme-sanitize - Send NVMe Sanitize Command, return result
7

SYNOPSIS

9       nvme sanitize <device> [--no-dealloc | -d]
10                     [--oipbp | -i]
11                     [--owpass=<overwrite-pass-count> | -n <overwrite-pass-count>]
12                     [--ause | -u]
13                     [--sanact=<action> | -a <action>]
14                     [--ovrpat=<overwrite-pattern> | -p <overwrite-pattern>]
15                     [--force]
16

DESCRIPTION

18       For the NVMe device given, sends a Sanitize command and provides the
19       result.
20
21       The <device> parameter is mandatory NVMe character device (ex:
22       /dev/nvme0).
23
24       On success it returns 0, error code otherwise.
25

OPTIONS

27       -d, --no-dealloc
28           No Deallocate After Sanitize: If set, then the controller shall not
29           deallocate any logical blocks as a result of successfully
30           completing the sanitize operation. If cleared, then the controller
31           should deallocate logical blocks as a result of successfully
32           completing the sanitize operation. This bit shall be ignored if the
33           Sanitize Action field is set to 001b (i.e., Exit Failure Mode).
34
35       -i, --oipbp
36           Overwrite Invert Pattern Between Passes: If set, then the Overwrite
37           Pattern shall be inverted between passes. If cleared, then the
38           overwrite pattern shall not be inverted between passes. This bit
39           shall be ignored unless the Sanitize Action field is set to 011b
40           (i.e., Overwrite).
41
42       -n <overwrite-pass-count>, --owpass=<overwrite-pass-count>
43           Overwrite Pass Count: This field specifies the number of overwrite
44           passes (i.e., how many times the media is to be overwritten) using
45           the data from the Overwrite Pattern field of this command. A value
46           of 0 specifies 16 overwrite passes. This field shall be ignored
47           unless the Sanitize Action field is set to 011b (i.e., Overwrite).
48
49       -u, --ause
50           Allow Unrestricted Sanitize Exit: If set, then the sanitize
51           operation is performed in unrestricted completion mode. If cleared
52           then the sanitize operation is performed in restricted completion
53           mode. This bit shall be ignored if the Sanitize Action field is set
54           to 001b (i.e., Exit Failure Mode).
55
56       -a <action>, --sanact=<action>
57           Sanitize Action:
58
59           ┌──────┬──────────────────────┐
60           │Value │ Definition           │
61           ├──────┼──────────────────────┤
62           │0x00  │ Reserved             │
63           ├──────┼──────────────────────┤
64           │0x01  │ Exit Failure Mode    │
65           ├──────┼──────────────────────┤
66           │0x02  │ Start a Block Erase  │
67           │      │ sanitize operation   │
68           ├──────┼──────────────────────┤
69           │0x03  │ Start an Overwrite   │
70           │      │ sanitize operation   │
71           ├──────┼──────────────────────┤
72           │0x04  │ Start a Crypto Erase │
73           │      │ sanitize operation   │
74           └──────┴──────────────────────┘
75
76       -p <overwrite-pattern>, --ovrpat=<overwrite-pattern>
77           Overwrite Pattern: This field is ignored unless the Sanitize Action
78           field in Command Dword 10 is set to 011b (i.e., Overwrite). This
79           field specifies a 32-bit pattern that is used for the Overwrite
80           sanitize operation.
81
82       --force
83           Ignore namespace is currently busy and performed the operation even
84           though.
85

EXAMPLES

87       •   Has the program issue Sanitize Command :
88
89               # nvme sanitize /dev/nvme0n1 -a 0x02
90               # nvme sanitize /dev/nvme0n1 --sanact=0x01
91

NVME

93       Part of the nvme-user suite.
94
95
96
97NVMe                              11/04/2022                  NVME-SANITIZE(1)
Impressum