2011-10-31 02:33 AM
just need help on the syntax of the command line for adding disks to an aggregare. If I need to add 7 disks such as 4a.16 to 4a.23, whats the syntax I would use with aggr add command. I know you can use the -d switch and then list the disks, but is there a quicker way, such as there is a ndisks command. How would I use the ndisk command in this scenario in adding 7 disks. WOuld be ndisks[4a.16 - 4a.23].
2011-10-31 08:29 AM
not in 7-Mode that I know of... you have to use the explicit listing of each disk space delmited "-d 4a.16 4a.17 4a.18 4a.19 4a.20 4a.21 4a.22 4a.23" with the aggr add command. With C-Mode we can specify multiples with pipe as a delimiter "stor aggr" with "4a.16 | 4a.17" and also can specify ranges with ".." with "4a.16..4a.23" but this is 7-mode so if you want those specific 7 drives you use a space delimited list.
If all disks are the same size then using the aggr add aggrname 7 works easiest like Thomas mentioned...but if you have different sized disks it can be risky... For example, if a system has 20x 450GB drives and 2x 300GB drives... and I specify a quantity of 7... people get surprised when ONTAP grabs 2x 300 and 5x 450GB drives... a bit of an annoyance and one that can't be undone without destorying the aggregate. So, if all the same drives use the ndisk count...if different sizes you can still use ndisk@size to tell ONTAP only to use a 300 or 450 for example. In your case you listed you want those specific 7 drives and not others (if there are other spares) so the space delmited disk list may be what you need.