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