xref: /freebsd/sys/contrib/openzfs/man/man8/zpool-initialize.8 (revision c0a83fe074a375c66ca669bfe1f128fe12b9f377)
1eda14cbcSMatt Macy.\"
2eda14cbcSMatt Macy.\" CDDL HEADER START
3eda14cbcSMatt Macy.\"
4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the
5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License").
6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License.
7eda14cbcSMatt Macy.\"
8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions
11eda14cbcSMatt Macy.\" and limitations under the License.
12eda14cbcSMatt Macy.\"
13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each
14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the
16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying
17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner]
18eda14cbcSMatt Macy.\"
19eda14cbcSMatt Macy.\" CDDL HEADER END
20eda14cbcSMatt Macy.\"
21eda14cbcSMatt Macy.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
22eda14cbcSMatt Macy.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
23eda14cbcSMatt Macy.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
24eda14cbcSMatt Macy.\" Copyright (c) 2017 Datto Inc.
25eda14cbcSMatt Macy.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
26eda14cbcSMatt Macy.\" Copyright 2017 Nexenta Systems, Inc.
27eda14cbcSMatt Macy.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
28eda14cbcSMatt Macy.\"
2916038816SMartin Matuska.Dd May 27, 2021
30eda14cbcSMatt Macy.Dt ZPOOL-INITIALIZE 8
31eda14cbcSMatt Macy.Os
3216038816SMartin Matuska.
33eda14cbcSMatt Macy.Sh NAME
347877fdebSMatt Macy.Nm zpool-initialize
3516038816SMartin Matuska.Nd write to unallocated regions of ZFS storage pool
36eda14cbcSMatt Macy.Sh SYNOPSIS
377877fdebSMatt Macy.Nm zpool
38eda14cbcSMatt Macy.Cm initialize
39*c0a83fe0SMartin Matuska.Op Fl c Ns | Ns Fl s | Ns Fl u
40eda14cbcSMatt Macy.Op Fl w
41eda14cbcSMatt Macy.Ar pool
4216038816SMartin Matuska.Oo Ar device Oc Ns …
4316038816SMartin Matuska.
44eda14cbcSMatt Macy.Sh DESCRIPTION
45eda14cbcSMatt MacyBegins initializing by writing to all unallocated regions on the specified
46eda14cbcSMatt Macydevices, or all eligible devices in the pool if no individual devices are
47eda14cbcSMatt Macyspecified.
48eda14cbcSMatt MacyOnly leaf data or log devices may be initialized.
49eda14cbcSMatt Macy.Bl -tag -width Ds
50eda14cbcSMatt Macy.It Fl c , -cancel
51eda14cbcSMatt MacyCancel initializing on the specified devices, or all eligible devices if none
52eda14cbcSMatt Macyare specified.
53eda14cbcSMatt MacyIf one or more target devices are invalid or are not currently being
54eda14cbcSMatt Macyinitialized, the command will fail and no cancellation will occur on any device.
5516038816SMartin Matuska.It Fl s , -suspend
56eda14cbcSMatt MacySuspend initializing on the specified devices, or all eligible devices if none
57eda14cbcSMatt Macyare specified.
58eda14cbcSMatt MacyIf one or more target devices are invalid or are not currently being
59eda14cbcSMatt Macyinitialized, the command will fail and no suspension will occur on any device.
60eda14cbcSMatt MacyInitializing can then be resumed by running
61eda14cbcSMatt Macy.Nm zpool Cm initialize
62eda14cbcSMatt Macywith no flags on the relevant target devices.
63*c0a83fe0SMartin Matuska.It Fl u , -uninit
64*c0a83fe0SMartin MatuskaClears the initialization state on the specified devices, or all eligible
65*c0a83fe0SMartin Matuskadevices if none are specified.
66*c0a83fe0SMartin MatuskaIf the devices are being actively initialized the command will fail.
67*c0a83fe0SMartin MatuskaAfter being cleared
68*c0a83fe0SMartin Matuska.Nm zpool Cm initialize
69*c0a83fe0SMartin Matuskawith no flags can be used to re-initialize all unallocoated regions on
70*c0a83fe0SMartin Matuskathe relevant target devices.
71eda14cbcSMatt Macy.It Fl w , -wait
72eda14cbcSMatt MacyWait until the devices have finished initializing before returning.
73eda14cbcSMatt Macy.El
7416038816SMartin Matuska.
75eda14cbcSMatt Macy.Sh SEE ALSO
76eda14cbcSMatt Macy.Xr zpool-add 8 ,
77eda14cbcSMatt Macy.Xr zpool-attach 8 ,
78eda14cbcSMatt Macy.Xr zpool-create 8 ,
79eda14cbcSMatt Macy.Xr zpool-online 8 ,
80eda14cbcSMatt Macy.Xr zpool-replace 8 ,
81eda14cbcSMatt Macy.Xr zpool-trim 8
82