Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 
    echo "Failed" >&2
    exit 1

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.

share|improve this question

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.

share|improve this answer
That's not necessary, the tool naviseccli can be used directly, even though it sucks. – niXar Mar 28 '11 at 10:57
I thought you needed to parse output, hence the suggestion. Yes, that is an ugly command line! Good work :) – Paul Doom Mar 29 '11 at 3:23
up vote 0 down vote accepted

I finally managed to naviseccli to kind of do what I wanted:

/opt/Navisphere/bin/naviseccli -User "$user" -Password "$password" -Scope 0 \
    -Address "" \
    lun -create -capacity 50 -sq gb -poolName "$storagePoolName" -sp a \
    -name "$lunname"

... to create a 50 GB lun.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.