===========================================================
RAID
===========================================================
安装软件
#rpm -ivh http://192.168.97.250/rpms/storcli-1.04.07-1.noarch.rpm
查看
#/opt/MegaRAID/storcli/storcli64 /c0 /vall show
#/opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show
更改RAID写策略为 always write back,c0 = control 0, v0 = vd0,vall = all the vd
#/opt/MegaRAID/storcli/storcli64 /c0 /vall set wrcache=awb
#/opt/MegaRAID/storcli/storcli64 /c0 /v0 set wrcache=wt
更改RAID IO策略为direct
#/opt/MegaRAID/storcli/storcli64 /c0 /vall set iopolicy=cached
#/opt/MegaRAID/storcli/storcli64 /c0 /v1 set iopolicy=direct
[root@yhj02node156236 storcli]# /opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show
Controller = 0
Status = Success
Description = Show Drive Information Succeeded.
Drive Information :
=================
----------------------------------------------------------------------------
EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp
----------------------------------------------------------------------------
20:0 17 Onln 0 558.406 GB SAS HDD N N 512B AL14SEB060N U
20:1 18 Onln 0 558.406 GB SAS HDD N N 512B AL14SEB060N U
20:2 16 Onln 0 558.406 GB SAS HDD N N 512B AL14SEB060N U
20:3 19 Onln 0 558.406 GB SAS HDD N N 512B AL14SEB060N U
20:4 21 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:5 25 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:6 27 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:7 26 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:8 23 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:9 24 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:10 22 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 U
20:11 28 Onln 1 446.625 GB SATA SSD N N 512B INTEL SSDSC2BB480G6 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|T-Transition|F-Foreign
UGUnsp-Unsupported
[root@yhj02node156236 storcli]# /opt/MegaRAID/storcli/storcli64 /c0 /vall show
Controller = 0
Status = Success
Description = None
Virtual Drives :
==============
----------------------------------------------------------
DG/VD TYPE State Access Consist Cache sCC Size Name
----------------------------------------------------------
0/0 RAID5 Optl RW Yes RWTC - 49.999 GB
1/1 RAID5 Optl RW Yes RAWBD - 3.052 TB
0/2 RAID5 Optl RW Yes RWTC - 1.586 TB
----------------------------------------------------------
Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|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
===================================================================
IO scheduler
===================================================================
查看
#grep -H ^ /sys/block/{s,v}d*/queue/scheduler 2>/dev/null
更改为deadline
#ls /sys/block/sd*/queue/scheduler |while read i;do echo deadline > $i;done
写入到开机自启动里
#ls /sys/block/sd*/queue/scheduler |while read i;do echo "echo deadline > $i">>/etc/rc.d/rc.local;done
#echo "deadline" > /sys/block/sdb/queue/scheduler
#echo "echo deadline > /sys/block/sdb/queue/scheduler" >> /etc/rc.d/rc.local
原文地址:http://dannyswallow.blog.51cto.com/5062777/1870813