我订购了一些备用硬盘来替换我的 zfs 池中发生故障的硬盘(raidz2,在运行 Ubuntu 的超微服务器上有 12 个 10TB 硬盘)。我确保订购的硬盘型号与池中已有的硬盘完全相同(HUH721010AL5200)。但是,我收到的新硬盘似乎是戴尔 OEM 的,而原装硬盘是 Western Digital 的。
当我尝试用新的硬盘(Dell)替换故障的硬盘(WD)时,zfs replace 命令失败并显示以下错误消息:“设备太小”。
经过仔细检查,发现两个驱动器的扇区数量不同。
以下是我的新驱动器的 gdisk 结果:
gdisk -l /dev/sdi GPT fdisk (gdisk) 版本 1.0.3
分区表扫描:MBR:保护 BSD:不存在 APM:不存在 GPT:存在
找到具有保护性 MBR 的有效 GPT;使用 GPT。磁盘 /dev/sdi:19134414848 个扇区,8.9 TiB 型号:HUH721010AL5200 扇区大小(逻辑/物理):512/4096 字节磁盘标识符 (GUID):ED5CF966-DA38-2D4B-8F8E-3C3867C25E07 分区表最多可容纳 128 个条目主分区表从扇区 2 开始到扇区 33 结束第一个可用扇区是 34,最后一个可用扇区是 19134414814 分区将在 2048 扇区边界上对齐总可用空间为 4029 个扇区(2.0 MiB)
编号 起始(扇区) 结束(扇区) 大小 代码 名称 1
2048 19134396415 8.9 TiB BF01 zfs-57963ba0e4d1284c 9
19134396416 19134412799 8.0 MiB BF07
对于其中一个旧驱动器,也存在同样的情况:
gdisk -l /dev/sdh GPT fdisk (gdisk) 版本 1.0.3
分区表扫描:MBR:保护 BSD:不存在 APM:不存在 GPT:存在
找到具有保护性 MBR 的有效 GPT;使用 GPT。磁盘 /dev/sdh:19532873728 个扇区,9.1 TiB 型号:HUH721010AL5200 扇区大小(逻辑/物理):512/4096 字节磁盘标识符 (GUID):6EEE7537-C089-544B-A500-EE19A147CA99 分区表最多可容纳 128 个条目主分区表从扇区 2 开始到扇区 33 结束第一个可用扇区是 34,最后一个可用扇区是 19532873694 分区将在 2048 扇区边界上对齐总可用空间为 4029 个扇区(2.0 MiB)
编号 起始(扇区) 结束(扇区) 大小 代码 名称 1
2048 19532855295 9.1 TiB BF01 zfs-2363298e7ec25d90 9
19532855296 19532871679 8.0 MiB BF07
如您所见,新驱动器的扇区更少 --> 容量更小 --> zfs 拒绝使用它。
有人告诉我要更新硬盘的固件,但我不确定如何进行,而且我要非常小心,不要丢失任何数据。
除了退回这些驱动器并找到/购买 WD 制造的版本之外,有人有什么想法吗?
谢谢你,
杰夫
smartctl
编辑:添加响应@shodanshok 评论的结果
对于新驱动器(太小):
smartctl --all /dev/sdi
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.18.0-21-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Vendor: HGST
Product: HUH721010AL5200
Revision: LS17
Compliance: SPC-4
User Capacity: 9,796,820,402,176 bytes [9.79 TB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
Formatted with type 2 protection
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Logical Unit id: 0x5000cca27349c848
Serial number: 2YH9KX5D
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Wed May 12 11:15:06 2021 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Enabled
=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature: 31 C
Drive Trip Temperature: 50 C
Manufactured in week 36 of year 2018
Specified cycle count over device lifetime: 50000
Accumulated start-stop cycles: 3
Specified load-unload count over device lifetime: 600000
Accumulated load-unload cycles: 5
Elements in grown defect list: 0
Vendor (Seagate) cache information
Blocks sent to initiator = 17381195776
Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 0 0 0 0 95 0.044 0
write: 0 0 0 0 4 0.011 0
verify: 0 0 0 0 271 0.000 0
Non-medium error count: 0
SMART Self-test log
Num Test Status segment LifeTime LBA_first_err [SK ASC ASQ]
Description number (hours)
# 1 Background short Completed - 12484 - [- - -]
# 2 Background short Completed - 12413 - [- - -]
Long (extended) Self Test duration: 63514 seconds [1058.6 minutes]
为了进行比较,以下是较旧的驱动器之一:
smartctl --all /dev/sdh
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.18.0-21-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Vendor: HGST
Product: HUH721010AL5200
Revision: A384
Compliance: SPC-4
User Capacity: 10,000,831,348,736 bytes [10.0 TB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
LU is fully provisioned
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Logical Unit id: 0x5000cca2732326c0
Serial number: 2YGMA92D
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Wed May 12 11:19:35 2021 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Enabled
=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature: 32 C
Drive Trip Temperature: 85 C
Manufactured in week 23 of year 2018
Specified cycle count over device lifetime: 50000
Accumulated start-stop cycles: 41
Specified load-unload count over device lifetime: 600000
Accumulated load-unload cycles: 2669
Elements in grown defect list: 0
Vendor (Seagate) cache information
Blocks sent to initiator = 53115368926871552
Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 0 41 0 41 3717572 74439.685 0
write: 0 0 0 0 605524 58839.145 0
verify: 0 0 0 0 49259 0.000 0
Non-medium error count: 0
No self-tests have been logged
再次感谢您的帮助。
杰夫
答案1
这两个驱动程序可能使用了不同的主机保护区 (HPA) 设置。请使用以下方法检查hdparm -N /dev/yourdisk
编辑:根据您的smartctl
输出,第一个(较小的)磁盘被格式化为附加的行业诚信数据 - 例如,具有 520 字节物理扇区。这自然意味着可用原始存储容量的较小部分可以专用于用户数据。
您应该能够使用以下命令重新格式化磁盘sg_format
- 例如:发布类似sg_format --format --size=512 --fmtpinfo=0 /dev/yourdisk