[zfs-discuss] Accidentally imported zpool missing 1 drive from 3-way mirror - how to recover?
fmyhr at fhmtech.com
Wed Dec 21 18:15:57 EST 2016
I accidentally booted my Ubuntu 16.04 machine with only 2 of the 3 drives in a
3-way mirror attached. Although it wasn't my intention to import the pool on
these drives, the Ubuntu zfs-import-scan.service and zfs-mount.service did their
zpool import -d /dev/disk/by-id -aN
zfs mount -a
and there I was with the degraded pool imported and its datasets auto-mounted. I
didn't write anything to these datasets, and powered down the machine about a
half hour later.
I wrote a custom /etc/systemd/system/zfs-import-scan.service that imports only
the pools I want at boot (which does NOT include the 3-drive mirror). That
should prevent this problem from happening again. But I still have the question
of how to recover from it happening this time...?
Now with all 3 drives in the mirror attached, zpool import shows the pool status
as ONLINE; there's no indication of any trouble. But I worry that the drive that
was temporarily missing from the mirror is no longer perfectly in sync with the
I'm thinking the safest course of action is to zpool detach the
temporarily-absent drive from the mirror, then zpool attach it again so that the
whole drive is resilvered. Is that overkill? Is there a better way to recover?
More information about the zfs-discuss