您好,登錄后才能下訂單哦!
storcli64 help
storcli64 show ctrlcount
[root@SZ×××-2 ~]# storcli64 show ctrlcount
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Status Code = 0
Status = Success
Description = None
Controller Count = 1
Note:
說明只有?個(gè)控制器,也就對(duì)應(yīng)為/c0
?般每臺(tái)服務(wù)器?到兩個(gè)控制器
storcli64 /c0/eall/sall show
[root@SZ×××-2 ~]# storcli64 show ctrlcount
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Status Code = 0
Status = Success
Description = None
Controller Count = 1
[root@SZ×××-2 ~]# storcli64 /c0/eall/sall show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
=================
------------------------------------------------------------------------------
EID:Slt DID State DG??? Size Intf Med SED PI SeSz Model????? Sp Type
------------------------------------------------------------------------------
252:0? 14 Onln? 0 278.464 GB SAS HDD N? N 512B ST9300603SS?? U -?
252:1? 21 Onln? 0 278.464 GB SAS HDD N? N 512B MK3001GRRB??? U -?
252:2? 20 Onln? 1 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
252:3? 17 Onln? 1 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
252:4? 18 Onln? 1 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
252:5? 22 Onln? 1 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
252:6? 23 Onln? 1 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
252:7? 24 UGood - 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
------------------------------------------------------------------------------
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down/PowerSave|T-Transition|F-Foreign
UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded
CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded
Note:
此時(shí)硬盤252:7 也就是插槽號(hào)為7的硬盤是剛插上沒有raid狀態(tài)的硬盤,此時(shí)對(duì)該硬盤做raid0.
?
storcli64 /c0 add vd r0 size=all drives=252:7 wb direct strip=128
Note:
r0 是raid0的意思,默認(rèn)ceph?我們選?單盤做raid0,還有r1 r5 等raid的level.
size=all 所有的空間都?來做該vd;.
drives=252:7 對(duì)應(yīng)新盤的eid/slt,如果是多個(gè)盤作為?個(gè)VD,可以寫252:7,8,9的格式對(duì)應(yīng)
slt.
wb 代表write_back模式,wt代表write_through模式.
direct 代表DirectIO 讀操作不緩存到raid卡cache ,相對(duì)應(yīng)的是CacheIO會(huì)把讀操作熱數(shù)據(jù)
緩存到raid卡的cache.
strip=128 代表?xiàng)l帶??128kb,單盤?區(qū)別,多盤做raid0需要考慮,此處只要跟其他盤保持?
致即可, storcli64 /c0/vall show all 能看到其他vd的strip size.
完成vd添加后,可以看到vd已經(jīng)存在 storcli64 /c0/vall show
[root@SZ×××-2 ~]# storcli64 /c0/vall show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC??? Size Name
---------------------------------------------------------------
0/0? RAID1 Optl RW?? No?? RWBD -? ON 278.464 GB??
1/1? RAID5 Optl RW?? Yes?? RWBD -? ON? 2.178 TB??
2/2? RAID0 Optl RW?? Yes?? RWBD -? ON 557.861 GB??
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|B=Blocked|
Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
Note:
DG/VD 2/2即是新添加的VD
系統(tǒng)?lsblk可以看到已經(jīng)存在:
[root@SZ×××-2 ~]# lsblk
NAME??? MAJ:MIN RM? SIZE RO TYPE MOUNTPOINT
sda????? 8:0? 0 278.5G 0 disk
├─sda1??? 8:1? 0?? 1G 0 part /boot
└─sda2??? 8:2? 0 277.5G 0 part
├─cl-root 253:0? 0? 50G 0 lvm /
├─cl-swap 253:1? 0?? 4G 0 lvm [SWAP]
└─cl-home 253:2? 0 223.5G 0 lvm /home
sdb????? 8:16? 0? 2.2T 0 disk
└─sdb1??? 8:17? 0? 2.2T 0 part /data
sdc????? 8:32? 0 557.9G 0 disknote: sdc即為新盤.
通過命令 storcli64 /c0/vall show 獲取到所有VD信息
[root@SZ×××-2 ~]# storcli64 /c0/vall show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = None
xiang
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC??? Size Name
---------------------------------------------------------------
0/0? RAID1 Optl RW?? No?? RWBD -? ON 278.464 GB??
1/1? RAID5 Optl RW?? Yes?? RWBD -? ON? 2.178 TB??
2/2? RAID0 Optl RW?? Yes?? RWBD -? ON 557.861 GB??
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|B=Blocked|
Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
?
此時(shí)如果要?jiǎng)h除VD2,要確認(rèn)VD2的對(duì)應(yīng)的系統(tǒng)分區(qū),此處為sdc及該設(shè)備的分區(qū)sdc1...沒有被掛載使?,
刪除VD命令:? storcli64 /c0/v2 del force
刪除后VD即不見了.
[root@SZ×××-2 ~]# storcli64 /c0/vall show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC??? Size Name
---------------------------------------------------------------
0/0? RAID1 Optl RW?? No?? RWBD -? ON 278.464 GB??
1/1? RAID5 Optl RW?? Yes?? RWBD -? ON? 2.178 TB??
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|B=Blocked|
Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
[root@SZ×××-2 ~]# storcli64 /c0/vall show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC??? Size Name
---------------------------------------------------------------
0/0? RAID1 Optl RW?? No?? RWBD -? ON 278.464 GB??
1/1? RAID5 Optl RW?? Yes?? RWBD -? ON? 2.178 TB??
2/2? RAID0 Optl RW?? Yes?? RWBD -? ON 557.861 GB??
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|B=Blocked|
Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
VD2的Cache屬性是 RWBD ,分別是輸出下?的注釋即: Read Ahead, WriteBack,Direct IO.
1. 將VD2的cache策略修改為WriteThrough模式:?
storcli64 /c0/v2 set wrcache=wt
此時(shí)再看v2的狀態(tài) Cache?欄將會(huì)是RWTD
Note:
set的幫助
storcli64 /c0/v2 set help
Status = Success
Description = None
Virtual Drives :
==============
---------------------------------------------------------------
DG/VD TYPE State Access Consist Cache Cac sCC??? Size Name
---------------------------------------------------------------
0/0? RAID1 Optl RW?? No?? RWBD -? ON 278.464 GB??
1/1? RAID5 Optl RW?? Yes?? RWBD -? ON? 2.178 TB??
2/2? RAID0 Optl RW?? Yes?? RWBD -? ON 557.861 GB??
---------------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|B=Blocked|
Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency
[root@SZ×××-2 ~]# storcli64 /c0/v2 set help
Storage Command Line Tool Ver 007.0415.0000.0000 Feb 13, 2018
(c)Copyright 2018, AVAGO Technologies, All Rights Reserved.
storcli /cx/vx set ssdcaching=on|off
storcli /cx/vx set hidden=on|off
storcli /cx/vx set fshinting=<value>
storcli /cx/vx set emulationType=0|1|2
storcli /cx/vx set cbsize=0|1|2 cbmode=0|1|2|3|4|7
storcli /cx/vx set wrcache=WT|WB|AWB
storcli /cx/vx set rdcache=RA|NoRA
storcli /cx/vx set iopolicy=Cached|Direct
storcli /cx/vx set accesspolicy=RW|RO|Blocked|RmvBlkd
storcli /cx/vx set pdcache=On|Off|Default
storcli /cx/vx set name=<NameString>
storcli /cx/vx set HostAccess=ExclusiveAccess|SharedAccess
storcli /cx/vx set ds=Default|Auto|None|Max|MaxNoCache
storcli /cx/vx set autobgi=On|Off
storcli /cx/vx set pi=Off
storcli /cx/vx set bootdrive=<on|off>
可以設(shè)置各種配置項(xiàng)
2. 將VD2的cache預(yù)讀策略=修改為NR模式:
storcli64 /c0/v2 set rdcache=NoRA
此時(shí)再看v2的狀態(tài) Cache?欄將會(huì)是NRWTD
1.確認(rèn)raid卡?持jbod模式并開啟jbod模式:
storcli64 /c0 show all |grep -i jbod
[root@SZ×××-2 ~]# storcli64 /c0 show all|grep -i jbod
Support JBOD = Yes
Support SecurityonJBOD = No
Support JBOD Write cache = No
Enable JBOD = No
Note:
可以看到support JBOD = Yes , 也就是說raid卡?持jbod模式
但是 Enable JBOD = No , 說明當(dāng)前raid卡沒有開啟jbod模式,此時(shí)需要??開啟
[root@SZ×××-2 ~]# storcli64 /c0 set jbod=on
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = None
Controller Properties :
=====================
----------------
Ctrl_Prop Value
----------------
JBOD?? ON?
----------------
[root@SZ×××-2 ~]# storcli64 /c0 show all |grep -i jbod
Support JBOD = Yes
Support SecurityonJBOD = No
Support JBOD Write cache = No
Enable JBOD = Yes
enable JBOD = Yes ,已經(jīng)開啟了jbod模式
2. 把指定設(shè)備設(shè)置成jbod模式:
storcli64 /c0/e252/s7 set jbod
[root@SZ×××-2 ~]# storcli64 /c0/e252/s7 set jbod
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = Set Drive JBOD Succeeded.
[root@SZ×××-2 ~]# storcli64 /c0/e252/s7 show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
=================
------------------------------------------------------------------------------
EID:Slt DID State DG??? Size Intf Med SED PI SeSz Model????? Sp Type
------------------------------------------------------------------------------
252:7? 24 JBOD - 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
------------------------------------------------------------------------------
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down/PowerSave|T-Transition|F-Foreign
UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded
CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded
Note:
此時(shí)該設(shè)備已經(jīng)是jbod模式了.
3. 修改jbod模式為UG模式:
如果要將該設(shè)備的jbod模式撤銷掉 storcli64 /c0/e252/s7 set good force
[root@SZ×××-2 ~]# storcli64 /c0/e252/s7 set good force
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Controller = 0
Status = Success
Description = Set Drive Good Succeeded.
[root@SZ×××-2 ~]# storcli64 /c0/e252/s7 show
CLI Version = 007.0415.0000.0000 Feb 13, 2018
Operating system = Linux 3.10.0-862.11.6.el7.x86_64
Note:
設(shè)備變回UGood狀態(tài),可以重新配置raid卷組了.
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
=================
------------------------------------------------------------------------------
EID:Slt DID State DG??? Size Intf Med SED PI SeSz Model????? Sp Type
------------------------------------------------------------------------------
252:7? 24 UGood - 557.861 GB SAS HDD N? N 512B MBF2600RC??? U -?
------------------------------------------------------------------------------
EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down/PowerSave|T-Transition|F-Foreign
UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded
CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded
Note:
設(shè)備變回UGood狀態(tài),可以重新配置raid卷組了.
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。