Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2018 16:28:39 -0700
From:      Matthew Pounsett <matt@conundrum.com>
To:        freebsd-questions@freebsd.org
Subject:   Issues replacing a failed disk in a zfs pool
Message-ID:  <CAAiTEH9xxN145N33MjQBYsxe1=FgYrkGL2YiCK2V8V_MdoB2SA@mail.gmail.com>

Next in thread | Raw E-Mail | Index | Archive | Help
A disk in one of my zfs pools failed a few weeks ago.  I did a 'zpool
replace' to bring in one of the spares in its place.  After the resilvering
I did a zpool offline on the old drive.

This is my current zpool status (apologies for the wide paste):

  pool: pool5b
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using 'zpool online' or replace the device with
'zpool replace'.
  scan: resilvered 2.59T in 48h40m with 0 errors on Mon Aug  6 20:32:39 2018
config:

NAME                             STATE     READ WRITE CKSUM
pool5b                           DEGRADED     0     0     0
  raidz2-0                       ONLINE       0     0     0
    diskid/DISK-PK2331PAG6ZLMT   ONLINE       0     0     0  block size:
512B configured, 4096B native
    da10                         ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6ZVMT   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG728ET   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6YGXT   ONLINE       0     0     0  block size:
512B configured, 4096B native
  raidz2-1                       ONLINE       0     0     0
    diskid/DISK-WD-WMC1F0D2VV96  ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6ZV8T   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6Z3ST   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG70E0T   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6ZWUT   ONLINE       0     0     0  block size:
512B configured, 4096B native
  raidz2-2                       DEGRADED     0     0     0
    diskid/DISK-PN1334PBJPWU8S   ONLINE       0     0     0
    diskid/DISK-PK2331PAG6ZV2T   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6ZWHT   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG7280T   ONLINE       0     0     0  block size:
512B configured, 4096B native
    spare-4                      DEGRADED     0     0     0
      5996713305860302307        OFFLINE      0     0     0  was
/dev/diskid/DISK-PK2331PAG704VT
      da23                       ONLINE       0     0     0  block size:
512B configured, 4096B native
  raidz2-3                       ONLINE       0     0     0
    diskid/DISK-PK2331PAG704PT   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6ZWAT   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG6ZZ0T   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG704ST   ONLINE       0     0     0  block size:
512B configured, 4096B native
    diskid/DISK-PK2331PAG704WT   ONLINE       0     0     0  block size:
512B configured, 4096B native
spares
  12114494961187138794           INUSE     was /dev/da23
  da21                           AVAIL

I'm now at the data centre, and I expected here to do a 'zpool remove' on
the old drive so that I can swap it for a new one.  However, I'm being told
I can't do that.

% sudo zpool remove pool5b 5996713305860302307
cannot remove 5996713305860302307: only inactive hot spares, cache,
top-level, or log devices can be removed

I just tried bringing the disk back online, and zfs now says it's being
resilvered.  I assume it's going to take longer to complete than I'm going
to be here, so the replacement will now probably have to wait for my next
visit.

I must have missed a step somewhere, but I've no idea what it was. What am
I missing?

Thanks.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAAiTEH9xxN145N33MjQBYsxe1=FgYrkGL2YiCK2V8V_MdoB2SA>