Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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 "yoursan.example.com" \
    lun -create -capacity 50 -sq gb -poolName "$storagePoolName" -sp a \
    -name "$lunname"

... to create a 50 GB lun.

share|improve this answer

Your Answer

 
discard

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.