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-replace.8 (3006B)


  1. .\"
  2. .\" CDDL HEADER START
  3. .\"
  4. .\" The contents of this file are subject to the terms of the
  5. .\" Common Development and Distribution License (the "License").
  6. .\" You may not use this file except in compliance with the License.
  7. .\"
  8. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  9. .\" or https://opensource.org/licenses/CDDL-1.0.
  10. .\" See the License for the specific language governing permissions
  11. .\" and limitations under the License.
  12. .\"
  13. .\" When distributing Covered Code, include this CDDL HEADER in each
  14. .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15. .\" If applicable, add the following below this CDDL HEADER, with the
  16. .\" fields enclosed by brackets "[]" replaced with your own identifying
  17. .\" information: Portions Copyright [yyyy] [name of copyright owner]
  18. .\"
  19. .\" CDDL HEADER END
  20. .\"
  21. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
  22. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
  23. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
  24. .\" Copyright (c) 2017 Datto Inc.
  25. .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
  26. .\" Copyright 2017 Nexenta Systems, Inc.
  27. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
  28. .\"
  29. .Dd May 29, 2021
  30. .Dt ZPOOL-REPLACE 8
  31. .Os
  32. .
  33. .Sh NAME
  34. .Nm zpool-replace
  35. .Nd replace one device with another in ZFS storage pool
  36. .Sh SYNOPSIS
  37. .Nm zpool
  38. .Cm replace
  39. .Op Fl fsw
  40. .Oo Fl o Ar property Ns = Ns Ar value Oc
  41. .Ar pool Ar device Op Ar new-device
  42. .
  43. .Sh DESCRIPTION
  44. Replaces
  45. .Ar device
  46. with
  47. .Ar new-device .
  48. This is equivalent to attaching
  49. .Ar new-device ,
  50. waiting for it to resilver, and then detaching
  51. .Ar device .
  52. Any in progress scrub will be cancelled.
  53. .Pp
  54. The size of
  55. .Ar new-device
  56. must be greater than or equal to the minimum size of all the devices in a mirror
  57. or raidz configuration.
  58. .Pp
  59. .Ar new-device
  60. is required if the pool is not redundant.
  61. If
  62. .Ar new-device
  63. is not specified, it defaults to
  64. .Ar device .
  65. This form of replacement is useful after an existing disk has failed and has
  66. been physically replaced.
  67. In this case, the new disk may have the same
  68. .Pa /dev
  69. path as the old device, even though it is actually a different disk.
  70. ZFS recognizes this.
  71. .Bl -tag -width Ds
  72. .It Fl f
  73. Forces use of
  74. .Ar new-device ,
  75. even if it appears to be in use.
  76. Not all devices can be overridden in this manner.
  77. .It Fl o Ar property Ns = Ns Ar value
  78. Sets the given pool properties.
  79. See the
  80. .Xr zpoolprops 7
  81. manual page for a list of valid properties that can be set.
  82. The only property supported at the moment is
  83. .Sy ashift .
  84. .It Fl s
  85. The
  86. .Ar new-device
  87. is reconstructed sequentially to restore redundancy as quickly as possible.
  88. Checksums are not verified during sequential reconstruction so a scrub is
  89. started when the resilver completes.
  90. Sequential reconstruction is not supported for raidz configurations.
  91. .It Fl w
  92. Waits until the replacement has completed before returning.
  93. .El
  94. .
  95. .Sh SEE ALSO
  96. .Xr zpool-detach 8 ,
  97. .Xr zpool-initialize 8 ,
  98. .Xr zpool-online 8 ,
  99. .Xr zpool-resilver 8