]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zpool-create.8
Move properties, parameters, events, and concepts around manual sections
[mirror_zfs.git] / man / man8 / zpool-create.8
CommitLineData
c5ebfbbe
RW
1.\"
2.\" CDDL HEADER START
3.\"
4.\" The contents of this file are subject to the terms of the
5.\" Common Development and Distribution License (the "License").
6.\" You may not use this file except in compliance with the License.
7.\"
8.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9.\" or http://www.opensolaris.org/os/licensing.
10.\" See the License for the specific language governing permissions
11.\" and limitations under the License.
12.\"
13.\" When distributing Covered Code, include this CDDL HEADER in each
14.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15.\" If applicable, add the following below this CDDL HEADER, with the
16.\" fields enclosed by brackets "[]" replaced with your own identifying
17.\" information: Portions Copyright [yyyy] [name of copyright owner]
18.\"
19.\" CDDL HEADER END
20.\"
c5ebfbbe
RW
21.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
22.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
23.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
24.\" Copyright (c) 2017 Datto Inc.
25.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
26.\" Copyright 2017 Nexenta Systems, Inc.
27.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
658fb802 28.\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
c5ebfbbe 29.\"
f84fe3fc 30.Dd June 2, 2021
c5ebfbbe 31.Dt ZPOOL-CREATE 8
6706552e 32.Os
f84fe3fc 33.
c5ebfbbe 34.Sh NAME
1e36af8c 35.Nm zpool-create
f84fe3fc 36.Nd create ZFS storage pool
c5ebfbbe 37.Sh SYNOPSIS
1e36af8c 38.Nm zpool
c5ebfbbe
RW
39.Cm create
40.Op Fl dfn
41.Op Fl m Ar mountpoint
f84fe3fc
AZ
42.Oo Fl o Ar property Ns = Ns Ar value Oc Ns …
43.Oo Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value Oc
44.Op Fl o Ar compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns …
45.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns …
c5ebfbbe
RW
46.Op Fl R Ar root
47.Op Fl t Ar tname
f84fe3fc
AZ
48.Ar pool
49.Ar vdev Ns …
50.
51.Sh DESCRIPTION
c5ebfbbe
RW
52Creates a new storage pool containing the virtual devices specified on the
53command line.
54The pool name must begin with a letter, and can only contain
f84fe3fc 55alphanumeric characters as well as the underscore
c5ebfbbe
RW
56.Pq Qq Sy _ ,
57dash
58.Pq Qq Sy \&- ,
59colon
60.Pq Qq Sy \&: ,
61space
62.Pq Qq Sy \&\ ,
63and period
64.Pq Qq Sy \&. .
65The pool names
66.Sy mirror ,
67.Sy raidz ,
b2255edc 68.Sy draid ,
c5ebfbbe
RW
69.Sy spare
70and
71.Sy log
72are reserved, as are names beginning with
73.Sy mirror ,
74.Sy raidz ,
b2255edc 75.Sy draid ,
f84fe3fc
AZ
76and
77.Sy spare .
c5ebfbbe
RW
78The
79.Ar vdev
80specification is described in the
f84fe3fc 81.Sx Virtual Devices
c5ebfbbe 82section of
2badb345 83.Xr zpoolconcepts 7 .
c5ebfbbe
RW
84.Pp
85The command attempts to verify that each device specified is accessible and not
f84fe3fc
AZ
86currently in use by another subsystem.
87However this check is not robust enough
c5ebfbbe 88to detect simultaneous attempts to use a new device in different pools, even if
f84fe3fc
AZ
89.Sy multihost Ns = Sy enabled .
90The administrator must ensure, that simultaneous invocations of any combination of
91.Nm zpool Cm replace ,
92.Nm zpool Cm create ,
93.Nm zpool Cm add ,
c5ebfbbe 94or
f84fe3fc
AZ
95.Nm zpool Cm labelclear ,
96do not refer to the same device.
97Using the same device in two pools will result in pool corruption.
c5ebfbbe
RW
98.Pp
99There are some uses, such as being currently mounted, or specified as the
100dedicated dump device, that prevents a device from ever being used by ZFS.
101Other uses, such as having a preexisting UFS file system, can be overridden with
f84fe3fc 102.Fl f .
c5ebfbbe
RW
103.Pp
104The command also checks that the replication strategy for the pool is
105consistent.
f84fe3fc
AZ
106An attempt to combine redundant and non-redundant storage in a single pool,
107or to mix disks and files, results in an error unless
c5ebfbbe
RW
108.Fl f
109is specified.
f84fe3fc 110The use of differently-sized devices within a single raidz or mirror group is
c5ebfbbe
RW
111also flagged as an error unless
112.Fl f
113is specified.
114.Pp
115Unless the
116.Fl R
117option is specified, the default mount point is
118.Pa / Ns Ar pool .
119The mount point must not exist or must be empty, or else the root dataset
f84fe3fc 120will not be able to be be mounted.
c5ebfbbe
RW
121This can be overridden with the
122.Fl m
123option.
124.Pp
f84fe3fc
AZ
125By default all supported features are enabled on the new pool.
126The
c5ebfbbe 127.Fl d
f84fe3fc 128option and the
658fb802 129.Fl o Ar compatibility
f84fe3fc
AZ
130property
131.Pq e.g Fl o Sy compatibility Ns = Ns Ar 2020
132can be used to restrict the features that are enabled, so that the
133pool can be imported on other releases of ZFS.
134.Bl -tag -width "-t tname"
c5ebfbbe
RW
135.It Fl d
136Do not enable any features on the new pool.
137Individual features can be enabled by setting their corresponding properties to
138.Sy enabled
f84fe3fc
AZ
139with
140.Fl o .
c5ebfbbe 141See
2badb345 142.Xr zpool-features 7
c5ebfbbe
RW
143for details about feature properties.
144.It Fl f
145Forces use of
146.Ar vdev Ns s ,
147even if they appear in use or specify a conflicting replication level.
148Not all devices can be overridden in this manner.
149.It Fl m Ar mountpoint
150Sets the mount point for the root dataset.
151The default mount point is
152.Pa /pool
153or
154.Pa altroot/pool
155if
f84fe3fc 156.Sy altroot
c5ebfbbe
RW
157is specified.
158The mount point must be an absolute path,
159.Sy legacy ,
160or
161.Sy none .
162For more information on dataset mount points, see
2badb345 163.Xr zfsprops 7 .
c5ebfbbe
RW
164.It Fl n
165Displays the configuration that would be used without actually creating the
166pool.
167The actual pool creation can still fail due to insufficient privileges or
168device sharing.
169.It Fl o Ar property Ns = Ns Ar value
170Sets the given pool properties.
f84fe3fc 171See
2badb345 172.Xr zpoolprops 7
f84fe3fc
AZ
173for a list of valid properties that can be set.
174.It Fl o Ar compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns …
175Specifies compatibility feature sets.
176See
2badb345 177.Xr zpool-features 7
658fb802 178for more information about compatibility feature sets.
f84fe3fc
AZ
179.It Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value
180Sets the given pool feature.
181See the
2badb345 182.Xr zpool-features 7
c5ebfbbe
RW
183section for a list of valid features that can be set.
184Value can be either disabled or enabled.
185.It Fl O Ar file-system-property Ns = Ns Ar value
186Sets the given file system properties in the root file system of the pool.
f84fe3fc 187See
2badb345 188.Xr zfsprops 7
f84fe3fc 189for a list of valid properties that can be set.
c5ebfbbe
RW
190.It Fl R Ar root
191Equivalent to
192.Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root
193.It Fl t Ar tname
194Sets the in-core pool name to
f84fe3fc
AZ
195.Ar tname
196while the on-disk name will be the name specified as
197.Ar pool .
198This will set the default of the
199.Sy cachefile
200property to
201.Sy none .
202This is intended
c5ebfbbe
RW
203to handle name space collisions when creating pools for other systems,
204such as virtual machines or physical machines whose pools live on network
205block devices.
206.El
f84fe3fc 207.
c5ebfbbe
RW
208.Sh SEE ALSO
209.Xr zpool-destroy 8 ,
210.Xr zpool-export 8 ,
211.Xr zpool-import 8