AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1165865
Accepted
Scandinave
Scandinave
Asked: 2024-09-28 21:26:04 +0800 CST2024-09-28 21:26:04 +0800 CST 2024-09-28 21:26:04 +0800 CST

更换尚未发生故障的驱动器的最佳方法

  • 772

我有一个 4 驱动器 Raid 5 阵列。其中一个驱动器 (sdb) 显示大量错误,并且我的阵列在访问期间显示高延迟。

我目前有一个新磁盘,另一个磁盘已被命令。

作为替换的一部分,我还想将 raid 级别从 raid 5 提升到 raid 6。我确定要实现这一点:

首先成长到 6 级

mdadm --manage /dev/md0 --add /dev/sdf1 
mdadm --grow /dev/md0 --raid-devices 5 --level 6 --backup-file /<path>/mdadm-backup
mdadm --manage /dev/md0 --replace /dev/sdb1 # Set faulty but keep it for replacement until a spare drive is available
# After my second drive arrived
mdadm --manage /dev/md0 --add /dev/sdg1

首先更换故障驱动器,然后升级到 raid 级别 6

mdadm --manage /dev/md0 --add /dev/sdf1 
mdadm --manage /dev/md0 --replace /dev/sdb1 --with /dev/sdf1
# after second drive is arrived
mdadm --manage /dev/md0 --add /dev/sdg1
mdadm --grow /dev/md0 --raid-devices 5 --level 6 --backup-file /path/mdadm-backup

这两种解决方案之间有区别吗?通过在阵列中对磁盘施加较少的操作,一种解决方案是否比另一种更安全?

[编辑] 添加智能结果:

Sdb(几乎有故障)

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   082   072   006    Pre-fail  Always       -       22562487
  3 Spin_Up_Time            0x0003   093   093   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       124
  5 Reallocated_Sector_Ct   0x0033   077   077   010    Pre-fail  Always       -       29352
  7 Seek_Error_Rate         0x000f   087   060   030    Pre-fail  Always       -       4963671931
  9 Power_On_Hours          0x0032   026   026   000    Old_age   Always       -       65627
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       124
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       -       4793
188 Command_Timeout         0x0032   100   072   000    Old_age   Always       -       137445703785
189 High_Fly_Writes         0x003a   001   001   000    Old_age   Always       -       107
190 Airflow_Temperature_Cel 0x0022   073   056   045    Old_age   Always       -       27 (Min/Max 25/28)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       82
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       296
194 Temperature_Celsius     0x0022   027   044   000    Old_age   Always       -       27 (0 14 0 0 0)
197 Current_Pending_Sector  0x0012   001   001   000    Old_age   Always       -       35384
198 Offline_Uncorrectable   0x0010   001   001   000    Old_age   Offline      -       35384
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

安邦

  1 Raw_Read_Error_Rate     0x000f   118   099   006    Pre-fail  Always       -       194860592
  3 Spin_Up_Time            0x0003   093   093   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       124
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       24
  7 Seek_Error_Rate         0x000f   087   060   030    Pre-fail  Always       -       654004767
  9 Power_On_Hours          0x0032   026   026   000    Old_age   Always       -       65631
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       124
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   094   094   000    Old_age   Always       -       6
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       2
189 High_Fly_Writes         0x003a   062   062   000    Old_age   Always       -       38
190 Airflow_Temperature_Cel 0x0022   073   059   045    Old_age   Always       -       27 (Min/Max 24/27)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       82
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       295
194 Temperature_Celsius     0x0022   027   041   000    Old_age   Always       -       27 (0 14 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

安全数据表

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   113   094   006    Pre-fail  Always       -       51447952
  3 Spin_Up_Time            0x0003   093   093   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       124
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   087   060   030    Pre-fail  Always       -       665278320
  9 Power_On_Hours          0x0032   026   026   000    Old_age   Always       -       65630
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       124
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       -       173
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       1
189 High_Fly_Writes         0x003a   001   001   000    Old_age   Always       -       188
190 Airflow_Temperature_Cel 0x0022   073   055   045    Old_age   Always       -       27 (Min/Max 25/27)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       82
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       296
194 Temperature_Celsius     0x0022   027   045   000    Old_age   Always       -       27 (0 14 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       16
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       16
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
raid
  • 1 1 个回答
  • 168 Views

1 个回答

  • Voted
  1. Best Answer
    Halfgaar
    2024-09-28T22:34:04+08:002024-09-28T22:34:04+08:00

    是的,有区别,但我不确定哪个更好。

    当您更换 RAID5 中的磁盘时,您需要确保所有其他磁盘均无读取错误,以便重建新磁盘。对于现代驱动器而言,这并非易事。大型现代驱动器的读取错误几率几乎是必然的,您肯定会遇到错误。这就是为什么不再推荐使用 RAID5 的原因。您可以在互联网上找到大量相关信息。

    通过迁移到 RAID6,您还将在旧磁盘上产生写入负载。这甚至可能是有利的:驱动器可以有“当前待处理扇区”(参见 SMART)。这意味着它认为已损坏的扇区。它会在它们收到新的写入后立即重新分配它们。如果扇区仍然不足以接收写入,则“重新分配扇区”的计数器将上升。然后,该扇区将透明地驻留在磁盘上的其他地方。

    我的第一步是查看驱动器的 SMART 状态,并查看上述两个参数。

    但是,如果您的驱动器确实有待处理的扇区,我不太愿意推荐其中一种方法。我认为如果没有,我会先更换 RAID5 中的磁盘,因为这会对其他磁盘产生非破坏性操作。

    并进行备份...

    • 3

相关问题

  • Windows 文件服务器性能调优

  • SSD TRIM 的硬件 RAID 控制器支持

  • 了解磁盘队列长度

  • 使用混合磁盘突袭 0?

  • Windows Server 2008 Hyper-V 虚拟化服务器的最佳 RAID 配置?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve