我正在使用本机ZFS运行64位Ubuntu Server 13.04。我有一个zpool,它由4个硬盘驱动器组成,其中一个硬盘昨天就死掉了,现在不再被OS或BIOS识别。
不幸的是我只能在下次重新启动后才看到问题,所以现在驱动器标签丢失了,我无法根据这里和这里的官方说明更换磁盘。
zpool status hermes -x
版画
root@zeus:~# zpool status hermes -x
pool: hermes
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://zfsonlinux.org/msg/ZFS-8000-4J
scan: scrub repaired 0 in 2h4m with 0 errors on Sun Jun 9 00:28:24 2013
config:
NAME STATE READ WRITE CKSUM
hermes DEGRADED 0 0 0
raidz1-0 DEGRADED 0 0 0
ata-ST3300620A_5QF0MJFP ONLINE 0 0 0
ata-ST3300831A_5NF0552X UNAVAIL 0 0 0
ata-ST3200822A_5LJ1CHMS ONLINE 0 0 0
ata-ST3200822A_3LJ0189C ONLINE 0 0 0
errors: No known data errors
我已经用新的驱动器(标有/dev/disk/by-id/ata-ST3500320AS_9QM03ATQ
)替换了驱动器
任一命令
zpool replace hermes /dev/disk/by-id/ata-ST3300831A_5NF0552X /dev/disk/by-id/ata-ST3500320AS_9QM03ATQ
zpool offline hermes /dev/disk/by-id/ata-ST3300831A_5NF0552X
zpool detatch hermes /dev/disk/by-id/ata-ST3300831A_5NF0552X
失败于
root@zeus:~# zpool offline hermes /dev/disk/by-id/ata-ST3300831A_5NF0552X
cannot offline /dev/disk/by-id/ata-ST3300831A_5NF0552X: no such device in pool
因为死掉的驱动器的标签不再存在于系统中。我还尝试了上述命令,省略了驱动器标签的路径,但没有用。
如何更换“ ghost”磁盘?
-n
switch 添加,而且-g
switch也将以这种方式捕获uuid。