Copyright © 2010 Caringo, Inc.
All rights reserved 67
Appendix E. Drive Identification API
As of the 4.0 release, DX Storage supports a drive identification function that allows an administrator
to select a volume from the admin console and have the LED associated with the volume flash
for a selectable period of time. By default, when the Identify function is enabled, DX Storage
will continuously read blocks from the drive to force i/o activity and thereby flash the drive LED.
However, integrators or hardware vendors with knowledge of manufacturer-specific mechanisms for
flashing drive lights may substitute an alternate mechanism using the plug-in API described below.
The Identify function is implemented as a Linux shell script daemon. The daemon monitors a set of
control files generated by DX Storage that tell the daemon when to turn a drive light on or off. DX
Storage signals device identification 'on' by creating a control file with its name matching the name
of the device. DX Storage removes the control file to signal identification off. The default Identify
script is provided in the DX Storage distribution (caringo/samples/genericDrivePlugin.sh) and can
be modified and/or replaced. The resulting custom script can then be downloaded to DX Storage
(see 'volPluginURL' below). For most applications, the customization steps will entail modifying the
default script to provide an alternate implementation and then configuring DX Storage to download
that custom script. The functions that typically will need to be modified in the default script are:
• identifyOn() - primary function to turn identification on
• identifyOff() - primary function to turn identification off
E.2. Customization Steps
The following steps must be taken to substitute an alternate drive light script:
1. Copy the default drive light script from the samples directory of the DX Storage software
distribution (caringo/samples/genericDrivePlugin.sh) to a new script with a unique name. The
script name must not contain any periods or special characters.
2. Modify identifyOn() and identifyOff() as required to implement an alternate drive light identification
3. Tar and gzip this script and any other required custom files.
4. Deploy by placing the tar file on an HTTP server or DX Storage USB stick and updating the
'volPluginURL' configuration parameter to point to the location of the tar file.
When customizing the plug-in, the following other functions may be helpful:
• _monitorAndInitiate() - This function polls for a drive status file and initiates identification by
• _identifyOn() - This function is spawned as a process when identification is turned on by DX
Storage for a volume (e.g. 1 process per volume). It calls identifyOn() then waits for identify to get
turned back off by DX Storage so that it can call identifyOff().