2022年2月11日 星期五

用storcli加入Global Hotspare Drive

對於hardware RAID, 用storcli加入的hotspare硬碟有幾個參數可以設定:

  • dgs:指定加入的hotspare硬碟要加入的drive group
    一般而言,這個選項不會使用,讓hotspare給所有的drive group使用
  • enclaffinity:指定加入的hotspare要用的enclosure
    一般而言,這個選項不會使用
  • norevertible:加入的hotspare不會使用revertible功能
    一般而言,這個選項不會使用(預設是開啟revertible功能)

所謂的revertible,指的是hotspare disk在啟用的時候會是faulty disk的一份複製。更換faulty disk成new disk後,陣列卡的控制器會將hotspare上面的資料倒回去new disk;完成後hotspare disk就恢復成hot spare status繼續當hardspare disk。這樣的好處是,當hardware RAID重建完成後,組成的硬碟位置不會跑掉。

實際使用storcli指令時,首先做alias減少打指令的長度

sudo -i
alias storcli=/opt/MegaRAID/storcli/storcli64
alias listdrive="/opt/MegaRAID/storcli/storcli64 /c0/eALL/sALL show all"
alias listdrivesn="/opt/MegaRAID/storcli/storcli64 /c0/eALL/sALL show all | egrep 'Device attributes|SN = '"

然後透過序號確認要加入的硬碟,確認enclosure number與disk number

listdrivesn
...
Drive /c0/e11/s16 Device attributes :
SN =             ZXXXXXL6
Drive /c0/e11/s17 Device attributes :
SN =             ZXXXXX22
...

確認完成用下面指令加入hotspare disk

storcli /c0/e11/s16,17 add hotsparedrive

最後用指令確認hotspare disk的參數是否正確

storcli /c0/e11/s16 show all
...
Drive /c0/e11/s17 :
=================

---------------------------------------------------------------------------------
EID:Slt DID State DG      Size Intf Med SED PI SeSz Model                Sp Type
---------------------------------------------------------------------------------
11:17    42 GHS   -  14.551 TB SATA HDD N   N  512B ST16000NM001G-2KK103 U  -
---------------------------------------------------------------------------------
...
Drive /c0/e11/s17 Hot Spare Information :
=======================================
Type = Global Hot Spare
Enclosure Affinity = No
Revertible = Yes


參考資料

_EOF_

A lone boat in a lake. A person lies inside the boat, seemingly enjoying the cool breezes. The moon is in the sky. The atmosphere is dark and blue. It's misty. Silhouetted palm trees with large leaves. It is quiet. Super high resolution.

Steps: 36, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 95103646, Size: 512x256, Model hash: fc2511737a, Model: chilloutmix_NiPrunedFp32Fix, Version: v1.6.1

Time taken: 2 min. 24.6 sec.
A: 1.70 GB, R: 2.26 GB, Sys: 2.0/2 GB (100.0%)

沒有留言:

張貼留言