1NDCTL-CLEAR-ERRORS(1)                                    NDCTL-CLEAR-ERRORS(1)
2
3
4

NAME

6       ndctl-clear-errors - clear all errors (badblocks) on the given
7       namespace
8

SYNOPSIS

10       ndctl clear-errors <namespace> [<options>]
11

DESCRIPTION

13       A namespace may have one or more media errors, either known to the
14       kernel or in a latent state. These error locations, or badblocks can
15       cause poison consumption events if read in an unsafe manner.
16
17       Moreover, these badblocks also indicate that due to media corruption,
18       any data that may have been in these locations has been unrecoverably
19       lost.
20
21       Normally, in the presence of such errors, the administrator is expected
22       to recover the data from out of band means (such as backups), destroy
23       the namespace, recreate it, and then restore the data. When the data is
24       re-written, the writes will allow any errors to be cleared as they are
25       encountered. In such a workflow, one should never need to use the
26       clear-errors command.
27
28       However, there may be special use cases, where the data currently on
29       the namespace does not matter - for example, if a devdax mode namespace
30       is being prepared for use as system-ram. In such cases, it may be
31       desirable to clear any errors on the namespace prior to switching its
32       mode to prevent disruptive machine checks due to poison consumption.
33
34           Note
35           Only use this command when the data on the namespace is immaterial.
36           For any blocks that are cleared via this command, any data on the
37           blocks in question will be lost, and replaced with content that is
38           implementation (platform) defined, and unpredictable.
39
40           Warning
41           This is a DANGEROUS command, and should only be used after fully
42           understanding its implications and consequences. This WILL erase
43           your data.
44
45       For namespaces in one of fsdax or devdax modes, this command will only
46       consider the data area for error clearing. Namespace metadata, such as
47       info-blocks, will not be touched. For namespaces in raw mode, the full
48       available capacity of the namespace is considered for error clearing.
49       Namespaces that are in sector mode are not supported, and will be
50       skipped.
51
52           Note
53           It is expected that the command is run with the namespace enabled.
54           A namespace in the disabled state will appear as, and will be
55           treated as a raw namespace, and error clearing will be performed
56           for the full available capacity of the namespace, including any
57           potential metadata areas. If there happen to be errors in the
58           metadata area, clearing them may result in unpredictable outcomes.
59           You have been warned!
60
61       Known errors are ones that the kernel has encountered before, either
62       via a previous scrub, or by an attempted read from those locations.
63       These can be listed by running ndctl list --media-errors for a given
64       namespace. Latent errors, as the name indicates, are unknown to the
65       kernel. These can be found by running a scrub operation on the NVDIMMs
66       in question. By default, the ndctl-clear-errors command only clears
67       known errors. This can be overridden using the --scrub option to clear
68       all errors.
69
70           Note
71           If a scrub is in progress when the command is called, it will
72           unconditionally wait for it to complete.
73

EXAMPLES

75       Clear errors on namespace 0.0
76
77           ndctl clear-errors namespace0.0
78
79       Clear errors on all namespaces belonging to region1, including
80       scrubbing for latent errors
81
82           ndctl clear-errors --scrub --region=region1 all
83

OPTIONS

85       -s, --scrub
86           Perform a scrub on the bus prior to clearing errors. This allows
87           for the clearing of any latent media errors in addition to errors
88           the kernel already knows about.
89
90           Note
91           This will cause the command to start and wait for a full scrub, and
92           this can potentially be a very long-running operation.
93
94       -v, --verbose
95           Emit debug messages.
96
97       -r, --region=
98           A regionX device name, or a region id number. Restrict the
99           operation to the specified region(s). The keyword all can be
100           specified to indicate the lack of any restriction, however this is
101           the same as not supplying a --region option at all.
102
103       -b, --bus=
104           A bus id number, or a provider string (e.g. "ACPI.NFIT"). Restrict
105           the operation to the specified bus(es). The keyword all can be
106           specified to indicate the lack of any restriction, however this is
107           the same as not supplying a --bus option at all.
108
110       Copyright © 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL
111       version 2 http://gnu.org/licenses/gpl.html. This is free software: you
112       are free to change and redistribute it. There is NO WARRANTY, to the
113       extent permitted by law.
114

SEE ALSO

116       linkndctl:ndctl-start-scrub[1], linkndctl:ndctl-list[1]
117
118
119
120                                  01/13/2023             NDCTL-CLEAR-ERRORS(1)
Impressum