This post is more than 5 years old
1 Rookie
•
41 Posts
0
2770
April 29th, 2009 04:00
how to add multiple devices to device group
How do i add a large list of multiple devices to a device group via cli? the devices are non-consecutive.
apologies for this simple question - solutions enabler only describes how to add a single device...
apologies for this simple question - solutions enabler only describes how to add a single device...
No Events found!


xe2sdc
6 Operator
•
2.8K Posts
0
April 30th, 2009 01:00
1) create a file (list.txt) with devices you want to add to dg
2) create a batch file (add.bat) with the following content
3) run add.bat and enjoy both the long output and the expanded DG
In case you want less output you can put another line (at the beginning of add.bat)
StorageAdmin2
124 Posts
0
April 29th, 2009 04:00
Here is what I do :
Get the list of the devices that you need to add to the DG in a file for e.g :
/tmp/test1
1234
1456
Then run an awk command on it with following flags, for e.g : cat /tmp/test1 |awk '{print "symld -g dgname add dev DEV"$1 " " $1}'
you will get an output like :
symld -g dgname add dev DEV1234 1234
symld -g dgname add dev DEV1456 1456
put this output in a file and run it as sh.. you would save some time
xe2sdc
6 Operator
•
2.8K Posts
1
April 29th, 2009 05:00
cat /tmp/test1 | while read dev
do
symld -g dgname add dev $dev
done
BHORAN1
1 Rookie
•
41 Posts
0
April 29th, 2009 06:00
KD8EWE
2 Intern
•
155 Posts
0
April 29th, 2009 13:00
you are adding the device names on /tmp/test1,
and looping it with the symld command
this is the easiest way.. put it on a file and run. that will do the job. Please assign points tot he right answer always..
Thanks
StorageAdmin2
124 Posts
0
April 29th, 2009 21:00
this is the easiest way out .. no real scrippting in it , just get the list of devices using symdev noport command and put the it in a file ,then do the above steps...
BHORAN1
1 Rookie
•
41 Posts
0
April 30th, 2009 01:00
batch files are about as techy as I get!
xe2sdc
6 Operator
•
2.8K Posts
0
April 30th, 2009 01:00
The issue here is that Bhoran doesn't feel comfortable with CLI and symcli ...
Probably he is a fellow Windows user...
xe2sdc
6 Operator
•
2.8K Posts
0
April 30th, 2009 01:00
Hold your breath and we'll be back ASAP
BHORAN1
1 Rookie
•
41 Posts
0
April 30th, 2009 03:00
Note: I had to change %%dev to %%a. I was getting the error message "%dev was unexpected at this time.". When in changed to %%a it worked fine.
xe2sdc
6 Operator
•
2.8K Posts
0
April 30th, 2009 04:00
Shame on me (and on the DOS shell)