Dell recommends monthly consistency checks for arrays running on their PERC controllers. Running the consistency check isn't that difficult,
but I wanted a method to stagger the consistency checks, so I could run a check against one virtual disk per weekend, rather than doing all at the same time.
The vbscript below works for up to four separate virtual disks (arrays) on the same controller. You can tweak it to meet your needs if you have fewer or more vdisks.
To determine what your controller sees, run the omreport utility [omreport storage vdisk], or [omreport storage vdisk controller=x]
if you have more than one controller. This will return your virtual disks. In the configuration below, I have four virtual disks (four mirror sets)
and a single hot spare. I want to run a consistency check against each vdisk, once monthly, so I create a scheduled task to run the script every Sunday,
and the logic in the script runs the consistency check based on the week of the month.
' runs consistency check on raid virtual drives
' Controller 0
' Disk 0 Virtual Disk 0 (OS Pair)
' Disk 1 Virtual Disk 0 (OS Pair)
' Disk 2 Virtual Disk 1 (Virtual Disk 1)
' Disk 3 Virtual Disk 1 (Virtual Disk 1)
' Disk 4 Virtual Disk 2 (DataDisk2)
' Disk 5 Virtual Disk 2 (DataDisk2)
' Disk 6 Virtual Disk hot spare
' Disk 8 Virtual Disk 3 (DataDisk3)
' Disk 9 Virtual Disk 3 (DataDisk3)
On Error Resume Next
set objShell = wscript.CreateObject("Wscript.Shell")
strDate = Date
Call WofM (strDate) 'determine current week of the month, based on today's date
Select Case WofM
strCmdLine = "omconfig storage vdisk action=checkconsistency controller=0 vdisk=0"
'VIRTUAL DISK 1"
strCmdLine = "omconfig storage vdisk action=checkconsistency controller=0 vdisk=1"
strCmdLine = "omconfig storage vdisk action=checkconsistency controller=0 vdisk=2"
strCmdLine = "omconfig storage vdisk action=checkconsistency controller=0 vdisk=3"
set objShell = nothing
Function WofM ()
FirstDay = Weekday(Month(strDate) & "/1/" & Year(strDate))
strDate = DateAdd("d", FirstDay, strDate)
Remainder = Day(strDate) Mod 7
WofM = Day(strDate) \ 7
If Remainder > 0 Then WofM = WofM + 1
I *think* C:\program files (x86)\dell\oma\bin is in the path when you install OMSA, but if not, either modify your path
or include the full path when you call omconfig.
The above is provided as-is - use in your environment at your own risk, and only after testing on a non-production system!