1*eda14cbcSMatt Macy.\" 2*eda14cbcSMatt Macy.\" CDDL HEADER START 3*eda14cbcSMatt Macy.\" 4*eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5*eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6*eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7*eda14cbcSMatt Macy.\" 8*eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10*eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11*eda14cbcSMatt Macy.\" and limitations under the License. 12*eda14cbcSMatt Macy.\" 13*eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14*eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16*eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17*eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18*eda14cbcSMatt Macy.\" 19*eda14cbcSMatt Macy.\" CDDL HEADER END 20*eda14cbcSMatt Macy.\" 21*eda14cbcSMatt Macy.\" 22*eda14cbcSMatt Macy.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. 23*eda14cbcSMatt Macy.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. 24*eda14cbcSMatt Macy.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. 25*eda14cbcSMatt Macy.\" Copyright (c) 2017 Datto Inc. 26*eda14cbcSMatt Macy.\" Copyright (c) 2018 George Melikov. All Rights Reserved. 27*eda14cbcSMatt Macy.\" Copyright 2017 Nexenta Systems, Inc. 28*eda14cbcSMatt Macy.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. 29*eda14cbcSMatt Macy.\" 30*eda14cbcSMatt Macy.Dd August 9, 2019 31*eda14cbcSMatt Macy.Dt ZPOOL-CREATE 8 32*eda14cbcSMatt Macy.Os 33*eda14cbcSMatt Macy.Sh NAME 34*eda14cbcSMatt Macy.Nm zpool Ns Pf - Cm create 35*eda14cbcSMatt Macy.Nd Creates a new ZFS storage pool 36*eda14cbcSMatt Macy.Sh SYNOPSIS 37*eda14cbcSMatt Macy.Nm 38*eda14cbcSMatt Macy.Cm create 39*eda14cbcSMatt Macy.Op Fl dfn 40*eda14cbcSMatt Macy.Op Fl m Ar mountpoint 41*eda14cbcSMatt Macy.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 42*eda14cbcSMatt Macy.Oo Fl o Ar feature@feature Ns = Ns Ar value Oc 43*eda14cbcSMatt Macy.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ... 44*eda14cbcSMatt Macy.Op Fl R Ar root 45*eda14cbcSMatt Macy.Ar pool vdev Ns ... 46*eda14cbcSMatt Macy.Sh DESCRIPTION 47*eda14cbcSMatt Macy.Bl -tag -width Ds 48*eda14cbcSMatt Macy.It Xo 49*eda14cbcSMatt Macy.Nm 50*eda14cbcSMatt Macy.Cm create 51*eda14cbcSMatt Macy.Op Fl dfn 52*eda14cbcSMatt Macy.Op Fl m Ar mountpoint 53*eda14cbcSMatt Macy.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 54*eda14cbcSMatt Macy.Oo Fl o Ar feature@feature Ns = Ns Ar value Oc Ns ... 55*eda14cbcSMatt Macy.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ... 56*eda14cbcSMatt Macy.Op Fl R Ar root 57*eda14cbcSMatt Macy.Op Fl t Ar tname 58*eda14cbcSMatt Macy.Ar pool vdev Ns ... 59*eda14cbcSMatt Macy.Xc 60*eda14cbcSMatt MacyCreates a new storage pool containing the virtual devices specified on the 61*eda14cbcSMatt Macycommand line. 62*eda14cbcSMatt MacyThe pool name must begin with a letter, and can only contain 63*eda14cbcSMatt Macyalphanumeric characters as well as underscore 64*eda14cbcSMatt Macy.Pq Qq Sy _ , 65*eda14cbcSMatt Macydash 66*eda14cbcSMatt Macy.Pq Qq Sy \&- , 67*eda14cbcSMatt Macycolon 68*eda14cbcSMatt Macy.Pq Qq Sy \&: , 69*eda14cbcSMatt Macyspace 70*eda14cbcSMatt Macy.Pq Qq Sy \&\ , 71*eda14cbcSMatt Macyand period 72*eda14cbcSMatt Macy.Pq Qq Sy \&. . 73*eda14cbcSMatt MacyThe pool names 74*eda14cbcSMatt Macy.Sy mirror , 75*eda14cbcSMatt Macy.Sy raidz , 76*eda14cbcSMatt Macy.Sy spare 77*eda14cbcSMatt Macyand 78*eda14cbcSMatt Macy.Sy log 79*eda14cbcSMatt Macyare reserved, as are names beginning with 80*eda14cbcSMatt Macy.Sy mirror , 81*eda14cbcSMatt Macy.Sy raidz , 82*eda14cbcSMatt Macy.Sy spare , 83*eda14cbcSMatt Macyand the pattern 84*eda14cbcSMatt Macy.Sy c[0-9] . 85*eda14cbcSMatt MacyThe 86*eda14cbcSMatt Macy.Ar vdev 87*eda14cbcSMatt Macyspecification is described in the 88*eda14cbcSMatt Macy.Em Virtual Devices 89*eda14cbcSMatt Macysection of 90*eda14cbcSMatt Macy.Xr zpoolconcepts. 91*eda14cbcSMatt Macy.Pp 92*eda14cbcSMatt MacyThe command attempts to verify that each device specified is accessible and not 93*eda14cbcSMatt Macycurrently in use by another subsystem. However this check is not robust enough 94*eda14cbcSMatt Macyto detect simultaneous attempts to use a new device in different pools, even if 95*eda14cbcSMatt Macy.Sy multihost 96*eda14cbcSMatt Macyis 97*eda14cbcSMatt Macy.Sy enabled. 98*eda14cbcSMatt MacyThe 99*eda14cbcSMatt Macyadministrator must ensure that simultaneous invocations of any combination of 100*eda14cbcSMatt Macy.Sy zpool replace , 101*eda14cbcSMatt Macy.Sy zpool create , 102*eda14cbcSMatt Macy.Sy zpool add , 103*eda14cbcSMatt Macyor 104*eda14cbcSMatt Macy.Sy zpool labelclear , 105*eda14cbcSMatt Macydo not refer to the same device. Using the same device in two pools will 106*eda14cbcSMatt Macyresult in pool corruption. 107*eda14cbcSMatt Macy.Pp 108*eda14cbcSMatt MacyThere are some uses, such as being currently mounted, or specified as the 109*eda14cbcSMatt Macydedicated dump device, that prevents a device from ever being used by ZFS. 110*eda14cbcSMatt MacyOther uses, such as having a preexisting UFS file system, can be overridden with 111*eda14cbcSMatt Macythe 112*eda14cbcSMatt Macy.Fl f 113*eda14cbcSMatt Macyoption. 114*eda14cbcSMatt Macy.Pp 115*eda14cbcSMatt MacyThe command also checks that the replication strategy for the pool is 116*eda14cbcSMatt Macyconsistent. 117*eda14cbcSMatt MacyAn attempt to combine redundant and non-redundant storage in a single pool, or 118*eda14cbcSMatt Macyto mix disks and files, results in an error unless 119*eda14cbcSMatt Macy.Fl f 120*eda14cbcSMatt Macyis specified. 121*eda14cbcSMatt MacyThe use of differently sized devices within a single raidz or mirror group is 122*eda14cbcSMatt Macyalso flagged as an error unless 123*eda14cbcSMatt Macy.Fl f 124*eda14cbcSMatt Macyis specified. 125*eda14cbcSMatt Macy.Pp 126*eda14cbcSMatt MacyUnless the 127*eda14cbcSMatt Macy.Fl R 128*eda14cbcSMatt Macyoption is specified, the default mount point is 129*eda14cbcSMatt Macy.Pa / Ns Ar pool . 130*eda14cbcSMatt MacyThe mount point must not exist or must be empty, or else the root dataset 131*eda14cbcSMatt Macycannot be mounted. 132*eda14cbcSMatt MacyThis can be overridden with the 133*eda14cbcSMatt Macy.Fl m 134*eda14cbcSMatt Macyoption. 135*eda14cbcSMatt Macy.Pp 136*eda14cbcSMatt MacyBy default all supported features are enabled on the new pool unless the 137*eda14cbcSMatt Macy.Fl d 138*eda14cbcSMatt Macyoption is specified. 139*eda14cbcSMatt Macy.Bl -tag -width Ds 140*eda14cbcSMatt Macy.It Fl d 141*eda14cbcSMatt MacyDo not enable any features on the new pool. 142*eda14cbcSMatt MacyIndividual features can be enabled by setting their corresponding properties to 143*eda14cbcSMatt Macy.Sy enabled 144*eda14cbcSMatt Macywith the 145*eda14cbcSMatt Macy.Fl o 146*eda14cbcSMatt Macyoption. 147*eda14cbcSMatt MacySee 148*eda14cbcSMatt Macy.Xr zpool-features 5 149*eda14cbcSMatt Macyfor details about feature properties. 150*eda14cbcSMatt Macy.It Fl f 151*eda14cbcSMatt MacyForces use of 152*eda14cbcSMatt Macy.Ar vdev Ns s , 153*eda14cbcSMatt Macyeven if they appear in use or specify a conflicting replication level. 154*eda14cbcSMatt MacyNot all devices can be overridden in this manner. 155*eda14cbcSMatt Macy.It Fl m Ar mountpoint 156*eda14cbcSMatt MacySets the mount point for the root dataset. 157*eda14cbcSMatt MacyThe default mount point is 158*eda14cbcSMatt Macy.Pa /pool 159*eda14cbcSMatt Macyor 160*eda14cbcSMatt Macy.Pa altroot/pool 161*eda14cbcSMatt Macyif 162*eda14cbcSMatt Macy.Ar altroot 163*eda14cbcSMatt Macyis specified. 164*eda14cbcSMatt MacyThe mount point must be an absolute path, 165*eda14cbcSMatt Macy.Sy legacy , 166*eda14cbcSMatt Macyor 167*eda14cbcSMatt Macy.Sy none . 168*eda14cbcSMatt MacyFor more information on dataset mount points, see 169*eda14cbcSMatt Macy.Xr zfs 8 . 170*eda14cbcSMatt Macy.It Fl n 171*eda14cbcSMatt MacyDisplays the configuration that would be used without actually creating the 172*eda14cbcSMatt Macypool. 173*eda14cbcSMatt MacyThe actual pool creation can still fail due to insufficient privileges or 174*eda14cbcSMatt Macydevice sharing. 175*eda14cbcSMatt Macy.It Fl o Ar property Ns = Ns Ar value 176*eda14cbcSMatt MacySets the given pool properties. 177*eda14cbcSMatt MacySee the 178*eda14cbcSMatt Macy.Xr zpoolprops 179*eda14cbcSMatt Macymanual page for a list of valid properties that can be set. 180*eda14cbcSMatt Macy.It Fl o Ar feature@feature Ns = Ns Ar value 181*eda14cbcSMatt MacySets the given pool feature. See the 182*eda14cbcSMatt Macy.Xr zpool-features 5 183*eda14cbcSMatt Macysection for a list of valid features that can be set. 184*eda14cbcSMatt MacyValue can be either disabled or enabled. 185*eda14cbcSMatt Macy.It Fl O Ar file-system-property Ns = Ns Ar value 186*eda14cbcSMatt MacySets the given file system properties in the root file system of the pool. 187*eda14cbcSMatt MacySee the 188*eda14cbcSMatt Macy.Xr zfsprops 8 189*eda14cbcSMatt Macymanual page for a list of valid properties that can be set. 190*eda14cbcSMatt Macy.It Fl R Ar root 191*eda14cbcSMatt MacyEquivalent to 192*eda14cbcSMatt Macy.Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root 193*eda14cbcSMatt Macy.It Fl t Ar tname 194*eda14cbcSMatt MacySets the in-core pool name to 195*eda14cbcSMatt Macy.Sy tname 196*eda14cbcSMatt Macywhile the on-disk name will be the name specified as the pool name 197*eda14cbcSMatt Macy.Sy pool . 198*eda14cbcSMatt MacyThis will set the default cachefile property to none. This is intended 199*eda14cbcSMatt Macyto handle name space collisions when creating pools for other systems, 200*eda14cbcSMatt Macysuch as virtual machines or physical machines whose pools live on network 201*eda14cbcSMatt Macyblock devices. 202*eda14cbcSMatt Macy.El 203*eda14cbcSMatt Macy.El 204*eda14cbcSMatt Macy.Sh SEE ALSO 205*eda14cbcSMatt Macy.Xr zpool-destroy 8 , 206*eda14cbcSMatt Macy.Xr zpool-export 8 , 207*eda14cbcSMatt Macy.Xr zpool-import 8 208