logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

zpool-add.8 (4443B)


  1. .\" CDDL HEADER START
  2. .\"
  3. .\" The contents of this file are subject to the terms of the
  4. .\" Common Development and Distribution License (the "License").
  5. .\" You may not use this file except in compliance with the License.
  6. .\"
  7. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  8. .\" or https://opensource.org/licenses/CDDL-1.0.
  9. .\" See the License for the specific language governing permissions
  10. .\" and limitations under the License.
  11. .\"
  12. .\" When distributing Covered Code, include this CDDL HEADER in each
  13. .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14. .\" If applicable, add the following below this CDDL HEADER, with the
  15. .\" fields enclosed by brackets "[]" replaced with your own identifying
  16. .\" information: Portions Copyright [yyyy] [name of copyright owner]
  17. .\"
  18. .\" CDDL HEADER END
  19. .\"
  20. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
  21. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
  22. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
  23. .\" Copyright (c) 2017 Datto Inc.
  24. .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
  25. .\" Copyright 2017 Nexenta Systems, Inc.
  26. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
  27. .\" Copyright (c) 2024 by Delphix. All Rights Reserved.
  28. .\"
  29. .Dd March 8, 2024
  30. .Dt ZPOOL-ADD 8
  31. .Os
  32. .
  33. .Sh NAME
  34. .Nm zpool-add
  35. .Nd add vdevs to ZFS storage pool
  36. .Sh SYNOPSIS
  37. .Nm zpool
  38. .Cm add
  39. .Op Fl fgLnP
  40. .Op Fl -allow-in-use -allow-replication-mismatch -allow-ashift-mismatch
  41. .Oo Fl o Ar property Ns = Ns Ar value Oc
  42. .Ar pool vdev Ns …
  43. .
  44. .Sh DESCRIPTION
  45. Adds the specified virtual devices to the given pool.
  46. The
  47. .Ar vdev
  48. specification is described in the
  49. .Em Virtual Devices
  50. section of
  51. .Xr zpoolconcepts 7 .
  52. The behavior of the
  53. .Fl f
  54. option, and the device checks performed are described in the
  55. .Nm zpool Cm create
  56. subcommand.
  57. .Bl -tag -width Ds
  58. .It Fl f
  59. Forces use of
  60. .Ar vdev Ns s ,
  61. even if they appear in use, have conflicting ashift values, or specify
  62. a conflicting replication level.
  63. Not all devices can be overridden in this manner.
  64. .It Fl g
  65. Display
  66. .Ar vdev ,
  67. GUIDs instead of the normal device names.
  68. These GUIDs can be used in place of
  69. device names for the zpool detach/offline/remove/replace commands.
  70. .It Fl L
  71. Display real paths for
  72. .Ar vdev Ns s
  73. resolving all symbolic links.
  74. This can be used to look up the current block
  75. device name regardless of the
  76. .Pa /dev/disk
  77. path used to open it.
  78. .It Fl n
  79. Displays the configuration that would be used without actually adding the
  80. .Ar vdev Ns s .
  81. The actual pool creation can still fail due to insufficient privileges or
  82. device sharing.
  83. .It Fl P
  84. Display real paths for
  85. .Ar vdev Ns s
  86. instead of only the last component of the path.
  87. This can be used in conjunction with the
  88. .Fl L
  89. flag.
  90. .It Fl o Ar property Ns = Ns Ar value
  91. Sets the given pool properties.
  92. See the
  93. .Xr zpoolprops 7
  94. manual page for a list of valid properties that can be set.
  95. The only property supported at the moment is
  96. .Sy ashift .
  97. .It Fl -allow-ashift-mismatch
  98. Disable the ashift validation which allows mismatched ashift values in the
  99. pool.
  100. Adding top-level
  101. .Ar vdev Ns s
  102. with different sector sizes will prohibit future device removal operations, see
  103. .Xr zpool-remove 8 .
  104. .It Fl -allow-in-use
  105. Allow vdevs to be added even if they might be in use in another pool.
  106. .It Fl -allow-replication-mismatch
  107. Allow vdevs with conflicting replication levels to be added to the pool.
  108. .El
  109. .
  110. .Sh EXAMPLES
  111. .\" These are, respectively, examples 5, 13 from zpool.8
  112. .\" Make sure to update them bidirectionally
  113. .Ss Example 1 : No Adding a Mirror to a ZFS Storage Pool
  114. The following command adds two mirrored disks to the pool
  115. .Ar tank ,
  116. assuming the pool is already made up of two-way mirrors.
  117. The additional space is immediately available to any datasets within the pool.
  118. .Dl # Nm zpool Cm add Ar tank Sy mirror Pa sda sdb
  119. .
  120. .Ss Example 2 : No Adding Cache Devices to a ZFS Pool
  121. The following command adds two disks for use as cache devices to a ZFS storage
  122. pool:
  123. .Dl # Nm zpool Cm add Ar pool Sy cache Pa sdc sdd
  124. .Pp
  125. Once added, the cache devices gradually fill with content from main memory.
  126. Depending on the size of your cache devices, it could take over an hour for
  127. them to fill.
  128. Capacity and reads can be monitored using the
  129. .Cm iostat
  130. subcommand as follows:
  131. .Dl # Nm zpool Cm iostat Fl v Ar pool 5
  132. .
  133. .Sh SEE ALSO
  134. .Xr zpool-attach 8 ,
  135. .Xr zpool-import 8 ,
  136. .Xr zpool-initialize 8 ,
  137. .Xr zpool-online 8 ,
  138. .Xr zpool-remove 8