更新时间 2019-06-16
我已经尝试 sudo zpool replace tank /dev/disk/by-id/ata-ST8000AS0002-1NA17Z_Z840GFH2
过
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/ata-ST8000AS0002-1NA17Z_Z840GFH2-part1 is part of active pool 'tank'
我应该使用 -f 吗,或者我可能会破坏某些东西?
完整文章
好的,我的家庭文件服务器上有 3 个 ZFS 池。它们都不是 root。
我今天从 Ubuntu 16.04 升级到 18.04,并进行了 zpool 状态检查并得到了以下结果:
pool: mediatank
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(5) for details.
scan: resilvered 1.62T in 14h25m with 0 errors on Mon Mar 14 01:51:38 2016
config:
NAME STATE READ WRITE CKSUM
mediatank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-TOSHIBA_DT01ACA300_14TRRNVGS ONLINE 0 0 0
ata-TOSHIBA_DT01ACA300_X4IPL2SGS ONLINE 0 0 0
errors: No known data errors
pool: slowtank
state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption. Applications may be affected.
action: Restore the file in question if possible. Otherwise restore the
entire pool from backup.
see: http://zfsonlinux.org/msg/ZFS-8000-8A
scan: resilvered 436M in 0h0m with 0 errors on Tue Dec 29 20:45:13 2015
config:
NAME STATE READ WRITE CKSUM
slowtank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-Hitachi_HDS722020ALA330_JK11B1B9HXPYSF ONLINE 0 0 0
ata-Hitachi_HDS722020ALA330_JK1101B9HXP2ZT ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ata-Hitachi_HDS722020ALA330_JK2171B9HYRASL ONLINE 0 0 0
ata-ST2000DM001-1CH164_Z240TLE8 ONLINE 0 0 0
errors: 2 data errors, use '-v' for a list
pool: tank
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: resilvered 116M in 0h0m with 0 errors on Fri Jun 14 02:00:54 2019
config:
NAME STATE READ WRITE CKSUM
tank DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
ata-ST8000AS0002-1NA17Z_Z840GECZ ONLINE 0 0 0
18019629936018899145 UNAVAIL 0 0 0 was /dev/sdm1
errors: No known data errors
忽略“slowtank”上的数据错误。那是去年磁盘短暂断电事件造成的。损坏的文件已恢复,但我一直不知道如何清除错误。
问题如下:
“tank”池中列为“不可用”的磁盘似乎运行正常。池指示它是 sdm1,但 sdm 是我的系统磁盘的名称,那么 ??? 怎么会这样。根据 ,它实际上是 sdk blkid
。
我不确定这是怎么发生的,因为我没有对机器的硬件进行任何更改。
在升级的第一阶段,zfs 被删除了,我不得不重新安装它。这可能是问题的根源。
我想我可以导出和导入池,但是当我尝试导出“tank”时,我得到了:
umount: /tank/hrududu: target is busy.
cannot unmount '/tank/hrududu': umount failed
任何帮助都非常感谢。
(是的,我应该更频繁地清理我的池。我以前有安排,但几年前我禁用了它,因为我失眠了,磁盘整晚发出的砰砰声让我很烦。我现在好多了,我会再次开始清理它们,我保证。)
评论者要求:
ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK1101B9HXP2ZT -> ../../sdf
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK1101B9HXP2ZT-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK1101B9HXP2ZT-part9 -> ../../sdf9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK11B1B9HXPYSF -> ../../sde
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK11B1B9HXPYSF-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK11B1B9HXPYSF-part9 -> ../../sde9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK2171B9HYRASL -> ../../sdh
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK2171B9HYRASL-part1 -> ../../sdh1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-Hitachi_HDS722020ALA330_JK2171B9HYRASL-part9 -> ../../sdh9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-HITACHI_HTS542525K9SA00_080724BB6F02WDJWHR1G -> ../../sdm
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-HITACHI_HTS542525K9SA00_080724BB6F02WDJWHR1G-part1 -> ../../sdm1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-HITACHI_HTS542525K9SA00_080724BB6F02WDJWHR1G-part2 -> ../../sdm2
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-HITACHI_HTS542525K9SA00_080724BB6F02WDJWHR1G-part5 -> ../../sdm5
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-ST2000DM001-1CH164_Z240TLE8 -> ../../sdg
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-ST2000DM001-1CH164_Z240TLE8-part1 -> ../../sdg1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-ST2000DM001-1CH164_Z240TLE8-part9 -> ../../sdg9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-ST8000AS0002-1NA17Z_Z840GECZ -> ../../sdl
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-ST8000AS0002-1NA17Z_Z840GECZ-part1 -> ../../sdl1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-ST8000AS0002-1NA17Z_Z840GECZ-part9 -> ../../sdl9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-ST8000AS0002-1NA17Z_Z840GFH2 -> ../../sdk
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-ST8000AS0002-1NA17Z_Z840GFH2-part1 -> ../../sdk1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-ST8000AS0002-1NA17Z_Z840GFH2-part9 -> ../../sdk9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-TOSHIBA_DT01ACA300_14TRRNVGS -> ../../sdj
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-TOSHIBA_DT01ACA300_14TRRNVGS-part1 -> ../../sdj1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-TOSHIBA_DT01ACA300_14TRRNVGS-part9 -> ../../sdj9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 ata-TOSHIBA_DT01ACA300_X4IPL2SGS -> ../../sdi
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-TOSHIBA_DT01ACA300_X4IPL2SGS-part1 -> ../../sdi1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 ata-TOSHIBA_DT01ACA300_X4IPL2SGS-part9 -> ../../sdi9
lrwxrwxrwx 1 root root 9 Jun 15 20:48 usb-Generic-_Compact_Flash_20060413092100000-0:0 -> ../../sda
lrwxrwxrwx 1 root root 9 Jun 15 20:48 usb-Generic-_MS_MS-Pro_20060413092100000-0:3 -> ../../sdd
lrwxrwxrwx 1 root root 9 Jun 15 20:48 usb-Generic-_SD_MMC_20060413092100000-0:2 -> ../../sdc
lrwxrwxrwx 1 root root 9 Jun 15 20:48 usb-Generic-_SM_xD-Picture_20060413092100000-0:1 -> ../../sdb
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000039ff4d86cc7 -> ../../sdj
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000039ff4d86cc7-part1 -> ../../sdj1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000039ff4d86cc7-part9 -> ../../sdj9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000039ff4e5feb4 -> ../../sdi
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000039ff4e5feb4-part1 -> ../../sdi1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000039ff4e5feb4-part9 -> ../../sdi9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000c50050b9ca36 -> ../../sdg
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000c50050b9ca36-part1 -> ../../sdg1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000c50050b9ca36-part9 -> ../../sdg9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000c50090dfe188 -> ../../sdk
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000c50090dfe188-part1 -> ../../sdk1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000c50090dfe188-part9 -> ../../sdk9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000c50090e04df8 -> ../../sdl
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000c50090e04df8-part1 -> ../../sdl1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000c50090e04df8-part9 -> ../../sdl9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000cca222db2116 -> ../../sdf
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca222db2116-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca222db2116-part9 -> ../../sdf9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000cca222db2454 -> ../../sde
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca222db2454-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca222db2454-part9 -> ../../sde9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000cca222db9a27 -> ../../sdh
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca222db9a27-part1 -> ../../sdh1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca222db9a27-part9 -> ../../sdh9
lrwxrwxrwx 1 root root 9 Jun 15 21:30 wwn-0x5000cca533e8b001 -> ../../sdm
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca533e8b001-part1 -> ../../sdm1
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca533e8b001-part2 -> ../../sdm2
lrwxrwxrwx 1 root root 10 Jun 15 21:30 wwn-0x5000cca533e8b001-part5 -> ../../sdm5
输出sudo zpool status -P
pool: mediatank
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(5) for details.
scan: resilvered 1.62T in 14h25m with 0 errors on Mon Mar 14 01:51:38 2016
config:
NAME STATE READ WRITE CKSUM
mediatank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA300_14TRRNVGS-part1 ONLINE 0 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA300_X4IPL2SGS-part1 ONLINE 0 0 0
errors: No known data errors
pool: slowtank
state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption. Applications may be affected.
action: Restore the file in question if possible. Otherwise restore the
entire pool from backup.
see: http://zfsonlinux.org/msg/ZFS-8000-8A
scan: resilvered 436M in 0h0m with 0 errors on Tue Dec 29 20:45:13 2015
config:
NAME STATE READ WRITE CKSUM
slowtank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/dev/disk/by-id/ata-Hitachi_HDS722020ALA330_JK11B1B9HXPYSF-part1 ONLINE 0 0 0
/dev/disk/by-id/ata-Hitachi_HDS722020ALA330_JK1101B9HXP2ZT-part1 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
/dev/disk/by-id/ata-Hitachi_HDS722020ALA330_JK2171B9HYRASL-part1 ONLINE 0 0 0
/dev/disk/by-id/ata-ST2000DM001-1CH164_Z240TLE8-part1 ONLINE 0 0 0
errors: 2 data errors, use '-v' for a list
pool: tank
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: resilvered 116M in 0h0m with 0 errors on Fri Jun 14 02:00:54 2019
config:
NAME STATE READ WRITE CKSUM
tank DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
/dev/disk/by-id/ata-ST8000AS0002-1NA17Z_Z840GECZ-part1 ONLINE 0 0 0
18019629936018899145 UNAVAIL 0 0 0 was /dev/sdm1
errors: No known data errors