Temporarily disconnect drive from mirrored vdev?

I just resilvered a drive in one of my mirrors. The old drive has now been removed. Can I disconnect the new drive in the vdev while the system is running and connect it to a different port or will this screw up the mirror?

ZFS does not care about ports and locations.

If the drive is in a valid mirror and a disconnect will “only” degrade the pool rather than offling it, you may do the change.
Generally, however, it is safer to move drives when power is off.


I used this procedure on my running system without powering down and everything went as planned. The drive got the same port ID as the old drive and the pool came back online with no issues.

    1. offline the disk in the pool: zpool offline pool disk
    2. spin down the drive (if it is to be physically pulled): hdparm -Y /dev/thedisk
    3. leave the pool in a degraded state with the drive offlined
    4. to add the disk back to the pool: zpool online pool disk