赞
踩
为保证服务器异常掉电后,存在于缓存的数据不出现丢失,raid卡通常会配置锂电池或超级电容用于保存缓存数据
早期raid卡普遍使用锂电池,当异常掉电后,使用锂电池直接给板载DRAM持续供电,进入DRAM自刷新模式,因此锂电池容量需要足够大,一般被设计为足够支撑板载DRAM持续自刷新72小时,即只要异常掉电后72小时能够再次恢复供电,就不会出现缓存丢失问题
此外,锂电池还有以下两个缺点,使得目前已淘汰锂电池使用方式:
目前raid卡普遍使用超级电容+Flash子板,当异常掉电后,不需要持续刷新DRAM,只需要掉电之后由超级电容提供数十秒供电时间,将非正常掉电脏数据下刷到Flash中永久保存
与锂电池相对较,有以下优点:
用于配置RAID读策略,支持以下策略配置
Read Ahead
性能更优No Read Ahead
性能更优用于配置RAID写策略,支持以下策略配置
Always Write Back
模式下,当服务器出现异常下电时,如果电容不在位或者在充电状态下,RAID控制卡中DDR(即Cache)的写数据将会丢失。不推荐使用该模式Write Back
性能更优Write Though
性能更优用于配置RAID I/O策略,支持以下策略配置
用于配置物理硬盘Cache策略,此操作仅对有Cache的硬盘有效,支持以下策略配置:
storcli /cx/vx set rdcache=ra|nora
注:ra
表示为Read Ahead
,nora
表示为No Read Ahead
storcli /cx/vx set wrcache=wt|wb|awb
注:wt
表示为Write Through
、wb
表示为Write Back
、awb
表示为Always Write Back
storcli /cx/vx set iopolicy=direct|cached
storcli /cx/vx set pdcache=on|off
磁盘类型 | RAID组类型 | 业务类型 | Read Policy | Write Policy | IO Policy | Disk Cache |
---|---|---|---|---|---|---|
HDD | / | / | Read Ahead | Write Back | Direct | Enable |
SSD | 不带校验 | / | No Read Ahead | Write Through | Direct | Unchanged(不可更改) |
SSD | 带校验 | 小数据块随机读写 | No Read Ahead | Write Through | Direct | Unchanged(不可更改) |
SSD | 带校验 | 大数据块顺序读写 | No Read Ahead | Write Back | Direct | Unchanged(不可更改) |
注:RAID组类型补充说明
磁盘类型 | RAID组类型 | 业务类型 | Read Policy | Write Policy | IO Policy | Disk Cache |
---|---|---|---|---|---|---|
HDD | / | / | Read Ahead | Write Back | Direct | Disable |
SSD | 不带校验 | / | No Read Ahead | Write Through | Direct | Unchanged(不可更改) |
SSD | 带校验 | 小数据块随机读写 | No Read Ahead | Write Through | Direct | Unchanged(不可更改) |
SSD | 带校验 | 大数据块顺序读写 | No Read Ahead | Write Back | Direct | Unchanged(不可更改) |
不配置超级电容情况下,默认不考虑RAID卡数据安全,选择性能最优方案
磁盘类型 | RAID组类型 | 业务类型 | Read Policy | Write Policy | IO Policy | Disk Cache |
---|---|---|---|---|---|---|
HDD | / | / | Read Ahead | Always Write Back | Direct | Enable |
SSD | 不带校验 | / | No Read Ahead | Write Through | Direct | Unchanged(不可更改) |
SSD | 带校验 | 小数据块随机读写 | No Read Ahead | Write Through | Direct | Unchanged(不可更改) |
SSD | 带校验 | 大数据块顺序读写 | No Read Ahead | Write Back | Direct | Unchanged(不可更改) |
[root@test3 ~]# storcli /c0/v0 show all CLI Version = 007.1912.0000.0000 Nov 23, 2021 Operating system = Linux 3.10.0-1160.49.1.el7_lustre.x86_64 Controller = 0 Status = Success Description = None /c0/v0 : ====== --------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name --------------------------------------------------------------- 0/0 RAID6 Optl RW Yes RWTD - ON 116.417 TB vd1 --------------------------------------------------------------- VD=Virtual Drive| DG=Drive Group|Rec=Recovery Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|dflt=Default|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 PDs for VD 0 : ============ ----------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type ----------------------------------------------------------------------------- 0:0 41 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:1 64 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:2 30 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:3 71 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:4 68 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:5 12 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:6 11 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:7 38 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:8 21 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J U - 0:9 39 Onln 0 14.551 TB SAS HDD N N 512B ST16000NM004J 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|Sntze=Sanitize|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|T=Transition|F=Foreign UGUnsp=UGood Unsupported|UGShld=UGood shielded|HSPShld=Hotspare shielded CFShld=Configured shielded|Cpybck=CopyBack|CBShld=Copyback Shielded UBUnsp=UBad Unsupported|Rbld=Rebuild VD0 Properties : ============== Strip Size = 256 KB Number of Blocks = 250005684224 VD has Emulated PD = Yes Span Depth = 1 Number of Drives Per Span = 10 Write Cache(initial setting) = WriteBack Disk Cache Policy = Disk's Default Encryption = None Data Protection = Disabled Active Operations = None Exposed to OS = Yes OS Drive Name = /dev/sda Creation Date = 23-03-2023 Creation Time = 10:04:40 AM Emulation type = default Cachebypass size = Cachebypass-64k Cachebypass Mode = Cachebypass Intelligent Is LD Ready for OS Requests = Yes SCSI NAA Id = 600605b01d36fa262baee0b873d25b0f Unmap Enabled = N/A
由服务器硬盘组成的RAID阵列读写IO性能差,需要开启cache缓存提升性能,通常为保证数据安全性,建议配置超级电容用于掉电保护
可通过storcli /c0/cv show all
查询超级电容的名称及TFM Flash卡缓存容量的大小等信息
注:如查询信息为Cachevault is absent
,则表示无超级电容
[root@test-lustre2 ~]# storcli /c0/cv show all CLI Version = 007.1912.0000.0000 Nov 23, 2021 Operating system = Linux 3.10.0-1160.49.1.el7_lustre.x86_64 Controller = 0 Status = Failure Description = None Detailed Status : =============== ------------------------------------------------- Ctrl Status Property ErrMsg ErrCd ------------------------------------------------- 0 Failed - Cachevault is absent! 34 -------------------------------------------------
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。