Designating Hot Spares in a Storage Pool
Devices can be designated as hot spares in the following ways:
-
When the pool is created.
$ zpool create pool keyword devices spare devices
-
After the pool is created.
$ zpool add pool spare devices
To remove a hot spare, use the following command:
$ zpool remove pool spare-device
Note:
You cannot remove a hot spare that is currently being used by the pool.A hot spare device must be equal to or larger than the size of the largest disk in the pool. Otherwise, the smaller spare device can still be designated as a hot spare. However, when that device is activated to replace a failed device, the operation fails with the following error message:
cannot replace disk3 with disk4: device is too small
Do not share a spare across multiple pools or multiple systems even if the device is visible for access by these systems. You can configure a disk to be shared among several pools provided that only a single system must control all of these pools. However, this practice is risky. For example, if pool A that is using the shared spare is exported, pool B could unknowingly use the spare while pool A is exported. When pool A is imported, data corruption could occur because both pools are using the same disk.