如何更换同时连接和分离的zfs池中的设备?

时间:2016-02-26 07:52:24

标签: linux ubuntu zfs

我有一个镜像zfs池,其中有一个需要更换的设备。我已将旧设备脱机:

$ 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

我尝试更换离线设备:

$ 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'

这表明它已经是游泳池的一部分,但当我尝试将其从游泳池中分离时:

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

看起来它实际上并不是游泳池的一部分。这似乎是设备同时是池的一部分和/不是池的一部分。任何想法我如何将设备添加到“坦克”#39;池?

0 个答案:

没有答案