Linux – Shell script provisioning of luns on EMC Clariion

emclinuxshell

Is there a robust way of scripting (Unix shell) lun provisioning for an EMC Clariion? Navicli doesn't look very reliable, its output is not easy to parse (and just plain weird), and it does not look like it returns useful error codes.

I want something I could use like LVM, if that exists, e.g.:

if ! lvcreate -n $lunname -L $size $volumegroup 
then
    echo "Failed" >&2
    exit 1
fi

A consultant told me that EMC writes terrible software on purpose so that they can sell very expensive add-ons, but I can not believe it's true.

Best Answer

In this case, an interactive command automation tool like expect, expect-list, or pexpect might be the way to go. They can tame even the worst command line tools, including ones that require interactive input.

Alternately, you can use the old run but verify method - Run the command, then run a followup to verify creation of the LUN.