User Tools

Site Tools


computing:storage:zfs_replace_drive

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computing:storage:zfs_replace_drive [2021/08/04 12:18]
gcooper
computing:storage:zfs_replace_drive [2023/07/05 11:39] (current)
gcooper
Line 1: Line 1:
 ====== ZFS Failed Disk Replacement ====== ====== ZFS Failed Disk Replacement ======
 +
 +**Hot Spares**: https://docs.oracle.com/cd/E19120-01/open.solaris/817-2271/gcvcw/index.html
 +
 +**Hot Spares**: https://docs.oracle.com/cd/E53394_01/html/E54801/gpegp.html
  
 https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement https://docs.joyent.com/private-cloud/troubleshooting/disk-replacement
Line 31: Line 35:
 https://www.thegeekdiary.com/solaris-zfs-how-to-offline-online-detach-replace-device-in-a-storage-pool/ https://www.thegeekdiary.com/solaris-zfs-how-to-offline-online-detach-replace-device-in-a-storage-pool/
  
-<note tip>Use ''zpool replace'' to replace a failed drive.  It is safest to replace a failed drive with another existent drive in another slot.</note>+<note tip>Use ''zpool replace'' to replace a failed drive.  It is safest to replace a failed drive with another existent drive **in another slot**.</note>
  
 <file> <file>
Line 37: Line 41:
 </file> </file>
  
-<note tip>To replace a failed drive by replacing it in-place, it is best to shut down the server, remove and replace the failed drive, the use ''zpool replace'' specifying only the drive being replaced.</note>+<note tip>To replace a failed drive by replacing it **in-place**, it is best to shut down the server, remove and replace the failed drive, then use ''zpool replace'' specifying only the drive being replaced.</note>
  
 <file> <file>
 zpool replace <poolname> <disk> zpool replace <poolname> <disk>
 +</file>
 +
 +<note tip>After initializing a new replacement drive in-place using Napp-IT on OmniOS, this is the command that Napp-IT uses when replacing a drive.
 +</note>
 +
 +<file>
 +zpool replace -f "poolname" c0t5000C500418A83B3d0 c0t5000C500836A90C7d0
 </file> </file>
  
Line 53: Line 64:
 <file> <file>
 zpool attach <poolname> <existingvdevmember> <newdrive> zpool attach <poolname> <existingvdevmember> <newdrive>
-# Wait for it to resilver, which adds redundancy+# Wait for it to resilver, which adds redundancy, then
 zpool detach <poolname> <drivebeingreplaced> zpool detach <poolname> <drivebeingreplaced>
 </file> </file>
Line 59: Line 70:
 ==== Spares ==== ==== Spares ====
  
-Usually a spare can replace a faulted disk but remains a spare.  The idea behind this is that you replace the faulted disk, then replace the spare with the new and the spare remains a spare.+Usually a spare can replace a faulted disk but **remains a spare**.  The idea behind this is that you replace the faulted disk, then replace the spare with the new and the spare remains a spare.
  
 If you want to remove the spare property, first remove then replace. If you want to remove the spare property, first remove then replace.
computing/storage/zfs_replace_drive.1628101133.txt.gz · Last modified: 2021/08/04 12:18 by gcooper