Find drives for RAID volumes when indicators don't work

article #333, updated 4592 days ago

If you work with RAID a lot, you have seen this. You need to know which drives are involved with a particular RAID volume, even though the RAID-dedicated indicators (software/hardware mix usually) aren’t set up, working, existing, and/or reliably visible. Well, this way works in Windows if you have drive lights on every drive. This is a CMD script:

REM This script 'runs' a drive or RAID volume,
REM write then read then write then read...,
REM two megabytes at a time, 2000 times.

REM You'll also need a 'dd.exe' placed in
REM %SYSTEMDRIVE%\WINDOWS.  I use
REM the excellent one available here:  
REM http://www.chrysocome.net/dd

REM Drop this script as a .CMD file on the root 
REM of a drive/volume for which you want to verify 
REM drives, then run it.  The drive lights will all
REM flicker fairly regularly, unless you have some 
REM super-duper buffering/caching in place.

SETLOCAL ENABLEEXTENSIONS

FOR /L %%I IN (1,1,2000) DO (
	dd if=/dev/random of=test.dd bs=2048000 count=1
	dd if=test.dd of=NUL
)

del test.dd

The idea is, while it’s running, whatever drives are being read/written, will have lights on. You’ll want to Ctrl-Break after you learn what you need, although this ‘dd’ appears to be very gentle with the machines. Please note that it does need a ‘dd.exe’; I have tested it only with the particular ‘dd.exe’ from this excellent source, I place it in %SYSTEMDRIVE%\WINDOWS.

Categories: