ZPOOL-CREATE(8)
π zpool-create(8) π
System Manager's Manual β¨ welcome to the page where we make a whole entire pool out of nothing, bestie π«Ά
π NAME π
zpool-create β create ZFS storage pool π
π SYNOPSIS π
zpool create [-dfn] [-m mountpoint] [-o property=value]β¦ [-o
feature@feature=value] [-o compatibility=off|legacy|file[,file]β¦]
[-O file-system-property=value]β¦ [-R root] [-t tname] pool vdevβ¦
π¦ DESCRIPTION π¦
okay so. This command creates a brand new storage pool out of the virtual devices you list on the command line. That's the whole vibe. β¨
Now, the pool name rules, and yes there are rules:
- it must begin with a letter π
- after that first letter it can only have alphanumeric characters plus the underscore (
"_"), the dash ("-"), the colon (":"), the space (" "), and the period (".") π
Also, some names are reserved and you cannot use them, no cap:
mirrorraidzdraidsparelog
...and on top of that, any name beginning with mirror, raidz, draid, or spare is reserved too. Sorry bestie π
The vdev specification itself lives in the βVirtual Devicesβ section of zpoolconcepts(7), so go read that if you need the deets π§
So here's the thing the command does: it attempts to verify that every device you named is accessible and not already in use by another subsystem. BUT β and this is the important part β this check is not robust enough to detect simultaneous attempts to use a new device in different pools, even if multihost= is enabled. π The administrator has to make sure that simultaneous invocations of any combination of zpool replace, zpool create, zpool add, or zpool labelclear do not refer to the same device. Using the same device in two pools will result in pool corruption. periodt.
Some uses of a device will stop it from ever being usable by ZFS β like being currently mounted, or being specified as the dedicated dump device. Other uses, like having a preexisting UFS file system, can be overridden with -f. πΈ
The command also checks that the replication strategy for the pool is consistent. So if you try to combine redundant and non-redundant storage in a single pool, or mix disks and files, that's an error unless you pass -f. Same energy for using differently-sized devices inside a single raidz or mirror group β also flagged as an error unless -f is specified. β
Unless you specify the -R option, the default mount point is /pool. The mount point must not exist or must be empty, or else the root dataset will not be able to be be mounted. This can be overridden with the -m option. π
By default all supported features are enabled on the new pool. The -d option and the -o compatibility property (e.g -o compatibility=2020) can be used to restrict the features that are enabled, so that the pool can be imported on other releases of ZFS. π
Now the flags, and I'm listing every single one because I love you π«Ά
-dβ Do not enable any features on the new pool. Individual features can be enabled by setting their corresponding properties toenabledwith-o. Seezpool-features(7)for details about feature properties. β¨-fβ Forces use of vdevs, even if they appear in use or specify a conflicting replication level. Not all devices can be overridden in this manner. π-mmountpoint β Sets the mount point for the root dataset. The default mount point is/pooloraltroot/poolifaltrootis specified. The mount point must be an absolute path,legacy, ornone. For more information on dataset mount points, seezfsprops(7). π-nβ Displays the configuration that would be used without actually creating the pool. The actual pool creation can still fail due to insufficient privileges or device sharing. π-oproperty=value β Sets the given pool properties. Seezpoolprops(7)for a list of valid properties that can be set. πΈ-ocompatibility=off|legacy|file[,file]β¦ β Specifies compatibility feature sets. Seezpool-features(7)for more information about compatibility feature sets. π¦-ofeature@feature=value β Sets the given pool feature. See thezpool-features(7)section for a list of valid features that can be set. Value can be eitherdisabledorenabled. β-Ofile-system-property=value β Sets the given file system properties in the root file system of the pool. Seezfsprops(7)for a list of valid properties that can be set. π-Rroot β Equivalent to-o cachefile=none -o altroot=rootπ₯-ttname β Sets the in-core pool name to tname while the on-disk name will be the name specified as pool. This will set the default of thecachefileproperty tonone. This is intended to handle name space collisions when creating pools for other systems, such as virtual machines or physical machines whose pools live on network block devices. π
π EXAMPLES π
πΈ Example 1: Creating a RAID-Z Storage Pool πΈ
The following command creates a pool with a single raidz root vdev that consists of six disks:
# zpool create tank raidz sda sdb sdc sdd sde sdf
π Example 2: Creating a Mirrored Storage Pool π
The following command creates a pool with two mirrors, where each mirror contains two disks:
# zpool create tank mirror sda sdb mirror sdc sdd
π¦ Example 3: Creating a ZFS Storage Pool by Using Partitions π¦
The following command creates a non-redundant pool using two disk partitions:
# zpool create tank sda1 sdb2
β¨ Example 4: Creating a ZFS Storage Pool by Using Files β¨
The following command creates a non-redundant pool using files. While not recommended, a pool based on files can be useful for experimental purposes.
# zpool create tank /path/to/file/a /path/to/file/b
π Example 5: Managing Hot Spares π
The following command creates a new pool with an available hot spare:
# zpool create tank mirror sda sdb spare sdc
π Example 6: Creating a ZFS Pool with Mirrored Separate Intent Logs π
The following command creates a ZFS storage pool consisting of two, two-way mirrors and mirrored log devices:
# zpool create pool mirror sda sdb mirror sdc sdd log mirror sde
sdf
π SEE ALSO π
zpool-destroy(8), zpool-export(8), zpool-import(8)
okay that's the whole page, you ate it, go make a pool bestie π«Ά
This one came straight from the OpenZFS girlies, dated July 11, 2022, and it's the ZPOOL-CREATE(8) page β mwah π
π¦ where this page comes from
- alpine 3.23: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- alpine 3.24: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- nixos 26.05: zfs-user 2.4.4
- nixpkgs unstable: zfs-user 2.4.4
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5 Β· CDDL-1.0
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5.1 Β· CDDL-1.0
- ubuntu stonking: zfsutils-linux 2.4.4-1ubuntu4 Β· CDDL-1.0
- π the page's license: CDDL-1.0
- Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
- Copyright (c) 2012, 2018 by Delphix. All rights reserved
- Copyright (c) 2012 Cyril Plisko. All Rights Reserved
- Copyright (c) 2017 Datto Inc
- Copyright (c) 2018 George Melikov. All Rights Reserved
- Copyright 2017 Nexenta Systems, Inc
- Copyright (c) 2017 Open-E, Inc. All Rights Reserved
- Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms