Okay, I took the Sun Unified Storage Simulator out for a light walk the other day. And I made sure to avoid the documentation. Now I want to see what I can do with the documentation!
Fun Fact #1: Did you know that the CLI supports tab completion? Way cool.
So, what do I need to do to see all of the network interfaces?
snarky:> configuration
snarky:configuration> net
snarky:configuration net> interfaces show
Interfaces:
INTERFACE STATE CLASS LINKS ADDRS LABEL
e1000g0 up ip e1000g0 192.168.111.128/24 Untitled Interface
e1000g1 up ip e1000g1 192.168.2.139/24 outbound
Too long, can we do better?
snarky:> configuration net interfaces show
Interfaces:
INTERFACE STATE CLASS LINKS ADDRS LABEL
e1000g0 up ip e1000g0 192.168.111.128/24 Untitled Interface
e1000g1 up ip e1000g1 192.168.2.139/24 outbound
I tried to do this with slashes first, like a path, but I should have known better because we use a 'show' command, not a 'dir' like in the LOM interfaces.
Now, we get to see some of the power of this CLI! First, we can add ssh keys.
snarky:> configuration preferences keys snarky:configuration preferences keys>
I was able to tab complete my way with each sub-context.
snarky:configuration preferences keys> create
snarky:configuration preferences key (uncommitted)> set type=DSA
type = DSA (uncommitted)
snarky:configuration preferences key (uncommitted)> set key="copy from your id_dsa.pub"
key = copy from your id_dsa.pub (uncommitted)
snarky:configuration preferences key (uncommitted)> set comment="thud-key1"
comment = thud-key1 (uncommitted)
snarky:configuration preferences key (uncommitted)> commit
error: An unanticipated system error occurred: Illegal character in key: ' '
This may be due to transient failure, or a software defect. If this problem
persists, contact your service provider.
snarky:configuration preferences key (uncommitted)> set key="copy-from-your-id_dsa.pub"
key = copy-from-your-id_dsa.pub (uncommitted)
snarky:configuration preferences key (uncommitted)> commit
The CLI will deny a command if it has invalid input. This feature really drove me to understand what was going on.
Anyway, the biggest stumbling block I had here was in what went into the 'key' property. Sometimes I am guilty of being too terse and connecting all of the dots in my head. I think the documentation here has done that as well. I really worked my way around the CLI and the BUI (Browser User Interface) trying to figure this one out. Along the way, I found that as I learned the CLI interface, the BUI interface started to make more sense. And that in turn made the CLI more natural. I liked the positive feedback loop here.
The BUI finally clued me in on what to do here:
I needed to be entering the contents of my 'id_dsa.pub' file, which I previously I had generated with 'ssh-keygen'. Once I figured that out, and that it was easier to enter with the CLI (using a browser to add a long key is normally error prone because of automatic insertion of spaces), I was good to go:
[thud@adept ~]> ssh root@snarky configuration net interfaces show
Interfaces:
INTERFACE STATE CLASS LINKS ADDRS LABEL
e1000g0 up ip e1000g0 192.168.111.128/24 Untitled Interface
e1000g1 up ip e1000g1 192.168.2.139/24 outbound
And now, can I do the shares?
[thud@adept ~]> ssh root@snarky shares select default select jaloppy get sharenfs
sharenfs = rw,anon=braves,root=pseries.internal.excfb.com:adept.internal.excfb.com
I struggled for a bit on how to chain the 'select', I wanted to do something like a shell script '(cd dir1; ..)', but I did find this shining example on how to automate ssh scripts to our boxes: Snapshots with PostgreSQL and Sun Storage 7000 Unified Storage Systems.
I'll save for another day creating a script to drill down and get all of the NFS shares from a Sun Storage 7000 Unified Storage Systems.
The CLI for the Sun Storage 7000 Unified Storage System actually blows away my experience with the NetApp CLI!