Unix tip: Monitor disk arrays with sccli commands
Clearly one of the best features of disk arrays is that they can continue working even when a disk has failed. One of the problems, however, is that you might not notice when a disk fails, and thus, fail to replace it in a timely manner. Let's take a look at what you can do to facilitate monitoring your storage (StorEdge) arrays so that a bad disk doesn't escape your notice.
First, there are two ways to determine that a disk in a StorEdge array has failed. You might notice that an amber LED on the front of the particular drive has lit up or you can use the sccli commands to view the disks contained in your array and their status.
To start sccli, log into the server to which the array is attached and type "sccli". You should connect to the device and find yourself sitting at the sccli> prompt. To view the state of the disks on your array, type "show disks". In the display below, one of the disks is reported to be "BAD". The particular system was still running and still had one disk in "STAND-BY" mode, so the failure was not an emergency. Still, it's a good idea to ensure that all disks in the array are working properly to steer clear of failures from which your array would not be able to recover without intervention.
|
In this array, we can see that all the disks are 72 GB Fujitsu drives. Drives in the same chassis can be different sizes, but should all be running at the same speed.
Depending on the nature of a disk failure, your disk array could be working at reduced speed in order to compensate for the missing data.
Essential JavaFX
Get started building rich Web apps quickly with an introduction to the power of JavaFX key features -- scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers.Enter now!
The Nomadic Developer
Consulting can be hugely rewarding, but it's easy to fail if you are unprepared. To succeed, you need a mentor who knows the lay of the land. Aaron Erickson is your mentor, and this is your guidebook. Enter now!













Bug?
It would seem that you have a bug in your script:sccli < /tmp/$$
show disks
show ld
exit
EOF
I suppose that "/tmp/$$" should contain
show disks
show ld
exit
Otherwise, the script will fail because "/tmp/$$" doesn't exist beforehand.
May I also suggest to refrain from using bash? bash is full of bugs and usually not found on traditional UNIX systems, making it a poor choice for scripts (programs) which are meant to be, or should be portable across systems. /bin/ksh is likely to be a good choice between usability and portability.
Also, may I suggest you trap SIGINT, so that if your script is ever ^Ced during execution/debugging, the self-defined Cleanup() function will clean up "/tmp/$$" automatically.
EXAMPLE
#!/sbin/sh
Rm="/bin/rm"
Self="`basename $0`"
TmpDir="/tmp"
TmpFile0="$TmpDir/${Self}.$$"
trap Cleanup 2
Cleanup()
{
$Rm -f "$TmpFile0"
}