监控SAS硬盘无法正确识别与格式化解决
记录下2021年在挖XCH币的时候本地收了20个4T希捷SAS存储盘, 但是都无法正确识别与格式化的问题解决方法。
这里感谢阿夜帮忙排查问题和折腾成功㊗️
https://www.seagate.com/jp/ja/support/software/seachest/
下载 SeaChest Lite,和准备好直通卡。
提取你所在系统的文件
如:SeaChest_Format_x86_64-linux-gnu
放入Linux下 chmod +x SeaChest_Format_x86_64-linux-gnu
./SeaChest_Format_x86_64-linux-gnu --scan
Vendor Handle Model Number Serial Number FwRev
ATA /dev/sg0 ST1000DM003-1CH162 Z1D9KP97 CC49
ATA /dev/sg1 KINGSTON SA400S37120G 50026B7782C1ED47 03090004
SEAGATE /dev/sg2 ST4000NM0023 Z1Z35SL5 MS0B
SEAGATE /dev/sg3 ST4000NM0023 Z1Z3493L MS0B
SEAGATE /dev/sg4 ST4000NM0023 Z1Z348ME MS0B
SEAGATE /dev/sg5 ST4000NM0023 Z1Z3H3W3 MS0B
SEAGATE /dev/sg6 ST4000NM0023 Z1Z3CMM7 MS0B
SEAGATE /dev/sg7 ST4000NM0023 Z1Z3G2K4 MS0B
SEAGATE /dev/sg8 ST4000NM0023 Z1Z35SHB MS0B
SEAGATE /dev/sg9 ST4000NM0023 Z1Z35SH8 MS0B
从sg2-sg9都是无法识别的硬盘
./SeaChest_Format_x86_64-linux-gnu -d /dev/sg2 -i
/dev/sg2 - ST4000NM0023 - Z1Z35SL50000C4253UN7 - SCSI
Vendor ID: SEAGATE
Model Number: ST4000NM0023
Serial Number: Z1Z35SL5
PCBA Serial Number: 0000C4253UN7
Firmware Revision: MS0B
World Wide Name: 5000C50058054B57
Copyright: Copyright (c) 2013 Seagate All rights reserved
Drive Capacity (B/B): 0.00/0.00
Temperature Data:
Current Temperature (C): Not Reported
Highest Temperature (C): Not Reported
Lowest Temperature (C): Not Reported
Power On Time: Not Reported
Power On Hours: Not Reported
MaxLBA: 0
Native MaxLBA: Not Reported
Logical Sector Size (B): 0
Physical Sector Size (B): 0
Sector Alignment: 0
Rotation Rate (RPM): 7200
Form Factor: 3.5"
Last DST information:
Not supported
Long Drive Self Test Time: 9 hours 5 minutes
Interface speed:
Not Reported
Annualized Workload Rate (TB/yr): Not Reported
Total Bytes Read (B): Not Reported
Total Bytes Written (B): Not Reported
Encryption Support: Not Supported
Cache Size (MiB): Not Reported
Read Look-Ahead: Not Supported
Write Cache: Not Supported
SMART Status: Unknown or Not Supported
ATA Security Information: Not Supported
Firmware Download Support: Full, Deferred
Number of Logical Units: 1
Specifications Supported:
SPC-3
Features Supported:
Protection Type 1
Protection Type 2
Adapter Information:
Vendor ID: 1000h
Product ID: 0087h
Revision: 0005h
我们查看期中一个硬盘的信息 ,可以看到这个磁盘
Logical Sector Size (B): 0
Physical Sector Size (B): 0
SMART Status: Unknown or Not Supported
这里用了垃圾山寨虚标电源 !供电不足会导致磁盘使用不了,换电源!
./SeaChest_Format_x86_64-linux-gnu -d /dev/sg5 -i
/dev/sg5 - ST4000NM0023 - Z1Z3H3W300009432XAUA - SCSI
Vendor ID: SEAGATE
Model Number: ST4000NM0023
Serial Number: Z1Z3H3W3
PCBA Serial Number: 00009432XAUA
Firmware Revision: MS0B
World Wide Name: 5000C50058547F23
Copyright: Copyright (c) 2013 Seagate All rights reserved
Drive Capacity (TB/TiB): 3.98/3.62
Temperature Data:
Current Temperature (C): 34
Highest Temperature (C): Not Reported
Lowest Temperature (C): Not Reported
Power On Time: 2 years 15 days 19 hours 9 minutes
Power On Hours: 17899.15
MaxLBA: 7648717975
Native MaxLBA: Not Reported
Logical Sector Size (B): 520
Physical Sector Size (B): 520
Sector Alignment: 0
Rotation Rate (RPM): 7200
Form Factor: 3.5"
Last DST information:
DST has never been run
Long Drive Self Test Time: 9 hours 5 minutes
Interface speed:
Port 0 (Current Port)
Max Speed (GB/s): 6.0
Negotiated Speed (Gb/s): 6.0
Port 1
Max Speed (GB/s): 6.0
Negotiated Speed (Gb/s): Not Reported
Annualized Workload Rate (TB/yr): 178.54
Total Bytes Read (TB): 198.82
Total Bytes Written (TB): 166.00
Encryption Support: Not Supported
Cache Size (MiB): Not Reported
Read Look-Ahead: Not Supported
Write Cache: Disabled
SMART Status: Good
ATA Security Information: Not Supported
Firmware Download Support: Full, Segmented, Deferred
Number of Logical Units: 1
Specifications Supported:
SPC-3
Features Supported:
Protection Type 1
Protection Type 2
Application Client Logging
Self Test
EPC
Informational Exceptions [Mode 2]
Translate Address
Format Unit
Adapter Information:
Vendor ID: 1000h
Product ID: 0087h
Revision: 0005h
换过电源后 依次使用-i检查8个硬盘是否通电正常,如果有不正常再次检查硬件上哪里有问题。可以看到正确识别出磁盘分区是520
如果没有问题就可以把 520 扇区大小转化成512 ,操作如下。
./SeaChest_Format_x86_64-linux-gnu -d /dev/sg2 --formatUnit 512 --fastFormat 2 --confirm this-will-erase-data
--formatUnit 512 (格式化512分区
--fastFormat 2 (快速格式化不保留数据
--confirm this-will-erase-data (擦除所有数据确认
出现
/dev/sg9 - ST4000NM0023 - Z1Z35SHB0000C424A81Y - SCSI
Format Unit
Performing SCSI drive format.
Depending on the format request, this could take minutes to hours or days.
Do not remove power or attempt other access as interrupting it may make
the drive unusable or require performing this command again!!
代表正在格式化中 ,结束后一次停止硬盘 换下一批继续如上操作
./SeaChest_PowerControl_x86_64-linux-gnu -d /dev/sg9 --spinDown
我的4T SAS硬盘 20个硬盘测试大概需要14小时,其中有一块硬盘格式化了3天,八成没戏翻车了。