mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-05-10 18:58:27 +03:00
zed: prevent automatic replacement of offline vdevs
When an OFFLINE device is physically removed, a spare is automatically activated. However, this behavior differs in FreeBSD, where we do not transition from OFFLINE state to REMOVED. Our support team has encountered cases where customers experienced unexpected behavior during drive replacements, with multiple spares activating for the same VDEV due to a single disk replacement. This patch ensures that a drive in an OFFLINE state remains in that state, preventing it from transitioning to REMOVED and being automatically replaced by a spare. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ameer Hamza <ahamza@ixsystems.com> Closes #16751
This commit is contained in:
parent
fd6e8c1d2a
commit
ff3df1211c
@ -445,8 +445,8 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
|
|||||||
* its a loopback event from spa_async_remove(). Just
|
* its a loopback event from spa_async_remove(). Just
|
||||||
* ignore it.
|
* ignore it.
|
||||||
*/
|
*/
|
||||||
if (vs->vs_state == VDEV_STATE_REMOVED &&
|
if ((vs->vs_state == VDEV_STATE_REMOVED && state ==
|
||||||
state == VDEV_STATE_REMOVED)
|
VDEV_STATE_REMOVED) || vs->vs_state == VDEV_STATE_OFFLINE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Remove the vdev since device is unplugged */
|
/* Remove the vdev since device is unplugged */
|
||||||
|
Loading…
Reference in New Issue
Block a user