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 9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 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. 28ee36e25aSMartin Matuska.\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org> 29eda14cbcSMatt Macy.\" 3016038816SMartin Matuska.Dd June 2, 2021 31eda14cbcSMatt Macy.Dt ZPOOL-CREATE 8 32eda14cbcSMatt Macy.Os 3316038816SMartin Matuska. 34eda14cbcSMatt Macy.Sh NAME 357877fdebSMatt Macy.Nm zpool-create 3616038816SMartin Matuska.Nd create ZFS storage pool 37eda14cbcSMatt Macy.Sh SYNOPSIS 387877fdebSMatt Macy.Nm zpool 39eda14cbcSMatt Macy.Cm create 40eda14cbcSMatt Macy.Op Fl dfn 41eda14cbcSMatt Macy.Op Fl m Ar mountpoint 4216038816SMartin Matuska.Oo Fl o Ar property Ns = Ns Ar value Oc Ns … 4316038816SMartin Matuska.Oo Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value Oc 4416038816SMartin Matuska.Op Fl o Ar compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns … 4516038816SMartin Matuska.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns … 46eda14cbcSMatt Macy.Op Fl R Ar root 47eda14cbcSMatt Macy.Op Fl t Ar tname 4816038816SMartin Matuska.Ar pool 4916038816SMartin Matuska.Ar vdev Ns … 5016038816SMartin Matuska. 5116038816SMartin Matuska.Sh DESCRIPTION 52eda14cbcSMatt MacyCreates a new storage pool containing the virtual devices specified on the 53eda14cbcSMatt Macycommand line. 54eda14cbcSMatt MacyThe pool name must begin with a letter, and can only contain 5516038816SMartin Matuskaalphanumeric characters as well as the underscore 56eda14cbcSMatt Macy.Pq Qq Sy _ , 57eda14cbcSMatt Macydash 58eda14cbcSMatt Macy.Pq Qq Sy \&- , 59eda14cbcSMatt Macycolon 60eda14cbcSMatt Macy.Pq Qq Sy \&: , 61eda14cbcSMatt Macyspace 62eda14cbcSMatt Macy.Pq Qq Sy \&\ , 63eda14cbcSMatt Macyand period 64eda14cbcSMatt Macy.Pq Qq Sy \&. . 65eda14cbcSMatt MacyThe pool names 66eda14cbcSMatt Macy.Sy mirror , 67eda14cbcSMatt Macy.Sy raidz , 687877fdebSMatt Macy.Sy draid , 69eda14cbcSMatt Macy.Sy spare 70eda14cbcSMatt Macyand 71eda14cbcSMatt Macy.Sy log 72eda14cbcSMatt Macyare reserved, as are names beginning with 73eda14cbcSMatt Macy.Sy mirror , 74eda14cbcSMatt Macy.Sy raidz , 757877fdebSMatt Macy.Sy draid , 7616038816SMartin Matuskaand 7716038816SMartin Matuska.Sy spare . 78eda14cbcSMatt MacyThe 79eda14cbcSMatt Macy.Ar vdev 80eda14cbcSMatt Macyspecification is described in the 8116038816SMartin Matuska.Sx Virtual Devices 82eda14cbcSMatt Macysection of 83*3ff01b23SMartin Matuska.Xr zpoolconcepts 7 . 84eda14cbcSMatt Macy.Pp 85eda14cbcSMatt MacyThe command attempts to verify that each device specified is accessible and not 8616038816SMartin Matuskacurrently in use by another subsystem. 8716038816SMartin MatuskaHowever this check is not robust enough 88eda14cbcSMatt Macyto detect simultaneous attempts to use a new device in different pools, even if 8916038816SMartin Matuska.Sy multihost Ns = Sy enabled . 9016038816SMartin MatuskaThe administrator must ensure, that simultaneous invocations of any combination of 9116038816SMartin Matuska.Nm zpool Cm replace , 9216038816SMartin Matuska.Nm zpool Cm create , 9316038816SMartin Matuska.Nm zpool Cm add , 94eda14cbcSMatt Macyor 9516038816SMartin Matuska.Nm zpool Cm labelclear , 9616038816SMartin Matuskado not refer to the same device. 9716038816SMartin MatuskaUsing the same device in two pools will result in pool corruption. 98eda14cbcSMatt Macy.Pp 99eda14cbcSMatt MacyThere are some uses, such as being currently mounted, or specified as the 100eda14cbcSMatt Macydedicated dump device, that prevents a device from ever being used by ZFS. 101eda14cbcSMatt MacyOther uses, such as having a preexisting UFS file system, can be overridden with 10216038816SMartin Matuska.Fl f . 103eda14cbcSMatt Macy.Pp 104eda14cbcSMatt MacyThe command also checks that the replication strategy for the pool is 105eda14cbcSMatt Macyconsistent. 10616038816SMartin MatuskaAn attempt to combine redundant and non-redundant storage in a single pool, 10716038816SMartin Matuskaor to mix disks and files, results in an error unless 108eda14cbcSMatt Macy.Fl f 109eda14cbcSMatt Macyis specified. 11016038816SMartin MatuskaThe use of differently-sized devices within a single raidz or mirror group is 111eda14cbcSMatt Macyalso flagged as an error unless 112eda14cbcSMatt Macy.Fl f 113eda14cbcSMatt Macyis specified. 114eda14cbcSMatt Macy.Pp 115eda14cbcSMatt MacyUnless the 116eda14cbcSMatt Macy.Fl R 117eda14cbcSMatt Macyoption is specified, the default mount point is 118eda14cbcSMatt Macy.Pa / Ns Ar pool . 119eda14cbcSMatt MacyThe mount point must not exist or must be empty, or else the root dataset 12016038816SMartin Matuskawill not be able to be be mounted. 121eda14cbcSMatt MacyThis can be overridden with the 122eda14cbcSMatt Macy.Fl m 123eda14cbcSMatt Macyoption. 124eda14cbcSMatt Macy.Pp 12516038816SMartin MatuskaBy default all supported features are enabled on the new pool. 12616038816SMartin MatuskaThe 127eda14cbcSMatt Macy.Fl d 12816038816SMartin Matuskaoption and the 129ee36e25aSMartin Matuska.Fl o Ar compatibility 13016038816SMartin Matuskaproperty 13116038816SMartin Matuska.Pq e.g Fl o Sy compatibility Ns = Ns Ar 2020 13216038816SMartin Matuskacan be used to restrict the features that are enabled, so that the 13316038816SMartin Matuskapool can be imported on other releases of ZFS. 13416038816SMartin Matuska.Bl -tag -width "-t tname" 135eda14cbcSMatt Macy.It Fl d 136eda14cbcSMatt MacyDo not enable any features on the new pool. 137eda14cbcSMatt MacyIndividual features can be enabled by setting their corresponding properties to 138eda14cbcSMatt Macy.Sy enabled 13916038816SMartin Matuskawith 14016038816SMartin Matuska.Fl o . 141eda14cbcSMatt MacySee 142*3ff01b23SMartin Matuska.Xr zpool-features 7 143eda14cbcSMatt Macyfor details about feature properties. 144eda14cbcSMatt Macy.It Fl f 145eda14cbcSMatt MacyForces use of 146eda14cbcSMatt Macy.Ar vdev Ns s , 147eda14cbcSMatt Macyeven if they appear in use or specify a conflicting replication level. 148eda14cbcSMatt MacyNot all devices can be overridden in this manner. 149eda14cbcSMatt Macy.It Fl m Ar mountpoint 150eda14cbcSMatt MacySets the mount point for the root dataset. 151eda14cbcSMatt MacyThe default mount point is 152eda14cbcSMatt Macy.Pa /pool 153eda14cbcSMatt Macyor 154eda14cbcSMatt Macy.Pa altroot/pool 155eda14cbcSMatt Macyif 15616038816SMartin Matuska.Sy altroot 157eda14cbcSMatt Macyis specified. 158eda14cbcSMatt MacyThe mount point must be an absolute path, 159eda14cbcSMatt Macy.Sy legacy , 160eda14cbcSMatt Macyor 161eda14cbcSMatt Macy.Sy none . 162eda14cbcSMatt MacyFor more information on dataset mount points, see 163*3ff01b23SMartin Matuska.Xr zfsprops 7 . 164eda14cbcSMatt Macy.It Fl n 165eda14cbcSMatt MacyDisplays the configuration that would be used without actually creating the 166eda14cbcSMatt Macypool. 167eda14cbcSMatt MacyThe actual pool creation can still fail due to insufficient privileges or 168eda14cbcSMatt Macydevice sharing. 169eda14cbcSMatt Macy.It Fl o Ar property Ns = Ns Ar value 170eda14cbcSMatt MacySets the given pool properties. 17116038816SMartin MatuskaSee 172*3ff01b23SMartin Matuska.Xr zpoolprops 7 17316038816SMartin Matuskafor a list of valid properties that can be set. 17416038816SMartin Matuska.It Fl o Ar compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns … 17516038816SMartin MatuskaSpecifies compatibility feature sets. 17616038816SMartin MatuskaSee 177*3ff01b23SMartin Matuska.Xr zpool-features 7 178ee36e25aSMartin Matuskafor more information about compatibility feature sets. 17916038816SMartin Matuska.It Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value 18016038816SMartin MatuskaSets the given pool feature. 18116038816SMartin MatuskaSee the 182*3ff01b23SMartin Matuska.Xr zpool-features 7 183eda14cbcSMatt Macysection for a list of valid features that can be set. 184eda14cbcSMatt MacyValue can be either disabled or enabled. 185eda14cbcSMatt Macy.It Fl O Ar file-system-property Ns = Ns Ar value 186eda14cbcSMatt MacySets the given file system properties in the root file system of the pool. 18716038816SMartin MatuskaSee 188*3ff01b23SMartin Matuska.Xr zfsprops 7 18916038816SMartin Matuskafor a list of valid properties that can be set. 190eda14cbcSMatt Macy.It Fl R Ar root 191eda14cbcSMatt MacyEquivalent to 192eda14cbcSMatt Macy.Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root 193eda14cbcSMatt Macy.It Fl t Ar tname 194eda14cbcSMatt MacySets the in-core pool name to 19516038816SMartin Matuska.Ar tname 19616038816SMartin Matuskawhile the on-disk name will be the name specified as 19716038816SMartin Matuska.Ar pool . 19816038816SMartin MatuskaThis will set the default of the 19916038816SMartin Matuska.Sy cachefile 20016038816SMartin Matuskaproperty to 20116038816SMartin Matuska.Sy none . 20216038816SMartin MatuskaThis is intended 203eda14cbcSMatt Macyto handle name space collisions when creating pools for other systems, 204eda14cbcSMatt Macysuch as virtual machines or physical machines whose pools live on network 205eda14cbcSMatt Macyblock devices. 206eda14cbcSMatt Macy.El 20716038816SMartin Matuska. 208eda14cbcSMatt Macy.Sh SEE ALSO 209eda14cbcSMatt Macy.Xr zpool-destroy 8 , 210eda14cbcSMatt Macy.Xr zpool-export 8 , 211eda14cbcSMatt Macy.Xr zpool-import 8 212