Managing Hitachi Array with CLI
Posted on February 2nd, 2010
We are going to configure disk devices using Hitachi Storage Navigator CLI. The following
examples are executed on Hitachi AMS500. The system has 2 disk trays with 15 disks each.
Our goal is to create 2 raid groups with raid6 parity and create number of luns for each
raid group.
First, we need to register our array, create local password and then login to the array
using array password.
bash-3.2$ ./auunitadd -unit AMS500 -LAN -ctl0 nir-amsctl0 -ctl1 nir-amsctl1 Unit AMS500 has been registered. bash-3.2$ bash-3.2$ ./aupasswd New password: Retype new password: bash-3.2$ ./aulogin -unit AMS500 Password: User ID for array unit : root Password for array unit :
Next, let’s take a look on what we have got.
bash-3.2$ ./aurgadd -unit AMS500 -type FC -availablelist Password: Available Drives Drive Type : FC Unit HDU Capacity 0 0 146GB 0 1 146GB 0 2 146GB 0 3 146GB 0 4 146GB 0 5 146GB 0 6 146GB 0 7 146GB 0 8 146GB 0 9 146GB 0 10 146GB 0 11 146GB 0 12 146GB 0 13 146GB 0 14 146GB 1 0 146GB 1 1 146GB 1 2 146GB 1 3 146GB 1 4 146GB 1 5 146GB 1 6 146GB 1 7 146GB 1 8 146GB 1 9 146GB 1 10 146GB 1 11 146GB 1 12 146GB 1 13 146GB 1 14 146GB
OK, 2 units, 15 drives each.
Next, let’s create array groups. Note, that the default stripe unit size is 64K. This is ok because we are going to create volumes using Veritas VxVM, where default stripe unit size 128 blocks (512 bytes blocks).
bash-3.2$ ./aurgadd -unit AMS500 -rg 0 -pnum 1 -drive 0.0-0.14 -RAID6 Password: Are you sure you want to set a RAID group? (y/n [n]): y The RAID Group has been set successfully. bash-3.2$ ./aurgadd -unit AMS500 -rg 1 -pnum 1 -drive 1.0-1.14 -RAID6 Password: Are you sure you want to set a RAID group? (y/n [n]): y The RAID Group has been set successfully.
Ok, now let’s check what we have done.
bash-3.2$ ./aurgref -unit AMS500 RAID RAID Parity Total Capacity Free Capacity Group Level Groups Type [block] [block] 0 6(13D+2P) 1 FC 3638622208 3638622208(100.0%) 1 6(13D+2P) 1 FC 3638622208 3638622208(100.0%)
Next, create a lun and format it.
bash-3.2$ ./auluadd -unit AMS500 -rg 0 -size 48g -ctl0 Password: Are you sure you want to set the logical unit? (y/n [n]): y The logical unit has been set successfully. bash-3.2$ ./auformat -unit AMS500 -lu 0 Password: Are you sure you want to format the logical unit(s)? (y/n [n]): y The format was started.
Finally, the following script helps to create/format many luns at once, because using
hitach cli for every lun annoys a lot: you need to supply password and letter “y”
each time you invoke the command. BTW, why don’t add -y option to these commands? As for me it is
obvious that admin hates to answer to stupid questions.
#!/bin/sh # # create 35 luns of 48G sequentaly, format immediately # note, that in this example lun number starting at 0 and ends with 35, # so formatting lun $i is ok. This is just an idea worked at my case at that # time and not generalized, you know how it happens, # quick and dirty, dont blame me :-) # i=0 while [ $i -ne 35 ] do expect <<EOF set timeout -1 spawn ./auluadd -unit AMS500 -rg 0 -size 48g -ctl0 expect "Password: " send "Jhzts92ik\n" expect -re "Are you sure you want to set the logical unit" send "y\n" expect -re "The logical unit has been set successfully" spawn ./auformat -unit AMS500 -lu $i expect "Password: " send "Jhzts92ik\n" expect -re "Are you sure you want to format the logical unit" send "y\n" expect "The format was started." EOF i=`expr $i + 1` done
To supress password asking, export the variable
export CMDF_NOASK=on
Filed under Storage |
2 Responses to “Managing Hitachi Array with CLI”
-
Patrick Says:
November 16th, 2010 at 2:31 amCheck out auaccountenv so you don’t have to type the password each time, e.g.
export STONAVM_HOME=/opt/hitachi/stonavm
export STONAVM_PASSWORD_FILE=”${STONAVM_HOME}/.snmact”
export STONAVM_ACT=”on”
export STONAVM_RSP_PASS=”on”[[ ! -f ${STONAVM_PASSWORD_FILE} ]] && bin/auaccountenv -set -uid root
-
Administration Hitachi modular array from command line | Unixpin Says:
February 11th, 2011 at 2:05 pm[...] 20100610 See more:Managing Hitachi Array with CLI Posted by ikorolev Filed in Uncategorized 1 Comment [...]