• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

179
Vistas
How do I replace a device in a zfs pool that is simultaneously attached and detached?

I've got a mirrored zfs pool that has a device that needs to be replaced. I've taken the old device offline:

$ sudo zpool status
  pool: tank
 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: scrub repaired 0 in 7h20m with 0 errors on Mon Feb 15 23:41:23 2016
config:

        NAME                                   STATE     READ WRITE CKSUM
        tank                                   DEGRADED     0     0     0
          mirror-0                             DEGRADED     0     0     0
            16381379971886761370               OFFLINE      0     0     0  was /dev/disk/by-id/scsi-35000cca250cedea5
            ST4000DM000-1F2168_Z303WH86-part1  ONLINE       0     0     0

I try to replace the offlined device:

$ sudo zpool replace tank 16381379971886761370 /dev/mapper/HGST_HDN724040ALE640_PK1334PEH1R1JS
invalid vdev specification
use '-f' to override the following errors:
/dev/mapper/HGST_HDN724040ALE640_PK1334PEH1R1JS is part of active pool 'tank'

Which suggests that it's already part of a pool, but when I try to detach it from the pool:

$ sudo zpool detach tank /dev/mapper/HGST_HDN724040ALE640_PK1334PEH1R1JS
cannot detach /dev/mapper/HGST_HDN724040ALE640_PK1334PEH1R1JS: no such device in pool

It looks like it's not actually part of the pool. This seems like the device is part of the pool and /not/ part of the pool at the same time. Any ideas how I might add the device to the 'tank' pool?

about 3 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda