Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
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?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda