ZPOOL-ADD(8)

πŸ“¦
version 2.4.4 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– zpool-add(8) β€” bestie edition πŸ’–

okay so this is zpool-add, part of the System Manager's Manual, and it's literally the glow-up command for your storage pool. You're adding vdevs. That's it. That's the vibe. ✨


🌸 NAME 🌸

zpool-add</purgle> β€” add vdevs to ZFS storage pool 🫢

not me making your pool bigger. yes bestie, that's exactly what we're doing.

πŸŽ€ SYNOPSIS πŸŽ€

zpool add [-fgLnP]
      [--allow-in-use --allow-replication-mismatch --allow-ashift-mismatch]
      [-o property=value] pool vdev…

✨ DESCRIPTION ✨

So basically, this adds the virtual devices you name to the pool you name. πŸ’… The whole vdev specification thing is described in the Virtual Devices section of zpoolconcepts(7), so if you're like "what even is a vdev" β€” go read that, it's giving homework but it's worth it. πŸ“š

The way -f behaves, and all the device checks that happen, are described over in the zpool create subcommand. Same energy, different command. 😌

Now the flags, bestie, one by one, no skipping:

  • -f β€” Forces use of vdevs, even if they appear in use, have conflicting ashift values, or specify a conflicting replication level. > Heads up: not all devices can be overridden in this manner. It's a bribe, not a miracle. πŸ’€
  • -g β€” Display vdev GUIDs instead of the normal device names. These GUIDs can be used in place of device names for the zpool detach/offline/remove/replace commands. iykyk πŸ”₯
  • -L β€” Display real paths for vdevs, resolving all symbolic links. You can use this to look up the current block device name regardless of the /dev/disk path used to open it. sleuthing mode activated πŸ•΅οΈβ™€οΈ
  • -n β€” Displays the configuration that would be used, without actually adding the vdevs. Lowkey important: the actual pool creation can still fail due to insufficient privileges or device sharing. So this is a peek, not a promise. πŸ‘€
  • -P β€” Display real paths for vdevs instead of only the last component of the path. Works together with the -L flag β€” they're a duo, a package deal. πŸ«‚
  • -o property=value β€” Sets the given pool properties. See the zpoolprops(7) manual page for a list of valid properties you can set. Right now the only property supported is ashift. One option. Main character. πŸ‘‘
  • --allow-ashift-mismatch β€” Disable the ashift validation, which allows mismatched ashift values in the pool. > But fr fr: adding top-level vdevs with different sector sizes will prohibit future device removal operations, see zpool-remove(8). Choose wisely, bestie. 😭
  • --allow-in-use β€” Allow vdevs to be added even if they might be in use in another pool. Yes, that is as chaotic as it sounds. πŸ™ˆ
  • --allow-replication-mismatch β€” Allow vdevs with conflicting replication levels to be added to the pool. Mismatch? Permitted. Chaos? Optional. πŸ’…

🌈 EXAMPLES 🌈

πŸ¦‹ Example 1: Adding a Mirror to a ZFS Storage Pool

The following command adds two mirrored disks to the pool tank, assuming the pool is already made up of two-way mirrors. The additional space is immediately available to any datasets within the pool. Instant gratification, we love to see it. ✨

# zpool add tank mirror sda sdb

πŸ“ Example 2: Adding Cache Devices to a ZFS Pool

The following command adds two disks for use as cache devices to a ZFS storage pool:

# zpool add pool cache sdc sdd

Once added, the cache devices gradually fill with content from main memory. Depending on the size of your cache devices, it could take over an hour for them to fill. (the way that takes an hour… be patient babe 🧚) Capacity and reads can be monitored using the iostat subcommand as follows:

# zpool iostat -v pool 5

πŸ‘‘ SEE ALSO πŸ‘‘

zpool-attach(8), zpool-import(8), zpool-initialize(8), zpool-online(8), zpool-remove(8)


and that's the whole page, bestie!! πŸ’– This one's from OpenZFS, dated March 8, 2024 β€” slay, iconic, no cap. Go add some vdevs, you got this. πŸŒΈβœ¨πŸ¦‹πŸ’…πŸ«Ά

πŸ“¦ where this page comes from