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.\" 30*16038816SMartin Matuska.Dd June 2, 2021 31eda14cbcSMatt Macy.Dt ZPOOL-CREATE 8 32eda14cbcSMatt Macy.Os 33*16038816SMartin Matuska. 34eda14cbcSMatt Macy.Sh NAME 357877fdebSMatt Macy.Nm zpool-create 36*16038816SMartin 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 42*16038816SMartin Matuska.Oo Fl o Ar property Ns = Ns Ar value Oc Ns … 43*16038816SMartin Matuska.Oo Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value Oc 44*16038816SMartin 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 … 45*16038816SMartin 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 48*16038816SMartin Matuska.Ar pool 49*16038816SMartin Matuska.Ar vdev Ns … 50*16038816SMartin Matuska. 51*16038816SMartin 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 55*16038816SMartin 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 , 76*16038816SMartin Matuskaand 77*16038816SMartin Matuska.Sy spare . 78eda14cbcSMatt MacyThe 79eda14cbcSMatt Macy.Ar vdev 80eda14cbcSMatt Macyspecification is described in the 81*16038816SMartin Matuska.Sx Virtual Devices 82eda14cbcSMatt Macysection of 83*16038816SMartin Matuska.Xr zpoolconcepts 8 . 84eda14cbcSMatt Macy.Pp 85eda14cbcSMatt MacyThe command attempts to verify that each device specified is accessible and not 86*16038816SMartin Matuskacurrently in use by another subsystem. 87*16038816SMartin MatuskaHowever this check is not robust enough 88eda14cbcSMatt Macyto detect simultaneous attempts to use a new device in different pools, even if 89*16038816SMartin Matuska.Sy multihost Ns = Sy enabled . 90*16038816SMartin MatuskaThe administrator must ensure, that simultaneous invocations of any combination of 91*16038816SMartin Matuska.Nm zpool Cm replace , 92*16038816SMartin Matuska.Nm zpool Cm create , 93*16038816SMartin Matuska.Nm zpool Cm add , 94eda14cbcSMatt Macyor 95*16038816SMartin Matuska.Nm zpool Cm labelclear , 96*16038816SMartin Matuskado not refer to the same device. 97*16038816SMartin 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 102*16038816SMartin Matuska.Fl f . 103eda14cbcSMatt Macy.Pp 104eda14cbcSMatt MacyThe command also checks that the replication strategy for the pool is 105eda14cbcSMatt Macyconsistent. 106*16038816SMartin MatuskaAn attempt to combine redundant and non-redundant storage in a single pool, 107*16038816SMartin Matuskaor to mix disks and files, results in an error unless 108eda14cbcSMatt Macy.Fl f 109eda14cbcSMatt Macyis specified. 110*16038816SMartin 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 120*16038816SMartin Matuskawill not be able to be be mounted. 121eda14cbcSMatt MacyThis can be overridden with the 122eda14cbcSMatt Macy.Fl m 123eda14cbcSMatt Macyoption. 124eda14cbcSMatt Macy.Pp 125*16038816SMartin MatuskaBy default all supported features are enabled on the new pool. 126*16038816SMartin MatuskaThe 127eda14cbcSMatt Macy.Fl d 128*16038816SMartin Matuskaoption and the 129ee36e25aSMartin Matuska.Fl o Ar compatibility 130*16038816SMartin Matuskaproperty 131*16038816SMartin Matuska.Pq e.g Fl o Sy compatibility Ns = Ns Ar 2020 132*16038816SMartin Matuskacan be used to restrict the features that are enabled, so that the 133*16038816SMartin Matuskapool can be imported on other releases of ZFS. 134*16038816SMartin 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 139*16038816SMartin Matuskawith 140*16038816SMartin Matuska.Fl o . 141eda14cbcSMatt MacySee 142eda14cbcSMatt Macy.Xr zpool-features 5 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 156*16038816SMartin 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*16038816SMartin Matuska.Xr zfsprops 8 . 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. 171*16038816SMartin MatuskaSee 172*16038816SMartin Matuska.Xr zpoolprops 8 173*16038816SMartin Matuskafor a list of valid properties that can be set. 174*16038816SMartin 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 … 175*16038816SMartin MatuskaSpecifies compatibility feature sets. 176*16038816SMartin MatuskaSee 177ee36e25aSMartin Matuska.Xr zpool-features 5 178ee36e25aSMartin Matuskafor more information about compatibility feature sets. 179*16038816SMartin Matuska.It Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value 180*16038816SMartin MatuskaSets the given pool feature. 181*16038816SMartin MatuskaSee the 182eda14cbcSMatt Macy.Xr zpool-features 5 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. 187*16038816SMartin MatuskaSee 188eda14cbcSMatt Macy.Xr zfsprops 8 189*16038816SMartin 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 195*16038816SMartin Matuska.Ar tname 196*16038816SMartin Matuskawhile the on-disk name will be the name specified as 197*16038816SMartin Matuska.Ar pool . 198*16038816SMartin MatuskaThis will set the default of the 199*16038816SMartin Matuska.Sy cachefile 200*16038816SMartin Matuskaproperty to 201*16038816SMartin Matuska.Sy none . 202*16038816SMartin 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 207*16038816SMartin 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