Какая правильная команда для создания тома определенного размера с помощью утилиты storcli?

2587
Ярослав Рахматуллин

На контроллере LSI (avago tech) как создать том размером 10 гигабайт с помощью утилиты командной строки storcli?

В справке говорится, что есть параметр size, но он не может распознать размер в байтах.

 $ storcli /c0 vd help Storage Command Line Tool Ver 1.17.08 September 10, 2015 (c)Copyright 2015, AVAGO Corporation, All Rights Reserved.   storcli /cx add vd r[0|1|5|6|00|10|50|60] [Size=<VD1_Sz>,<VD2_Sz>,..|all] [name=<VDNAME1>,..] drives=e:s|e:s-x|e:s-x,y,e:s-x,y,z [PDperArray=x][SED] [pdcache=on|off|default][pi][DimmerSwitch(ds)=default|automatic(auto)| none|maximum(max)|MaximumWithoutCaching(maxnocache)][WT|WB|AWB][nora|ra] [direct|cached] [cachevd] [Strip=<8|16|32|64|128|256|512|1024>] [AfterVd=X] [EmulationType=0|1|2] [Spares = [e:]s|[e:]s-x|[e:]s-x,y] [force][ExclusiveAccess] [Cbsize=0|1|2 Cbmode=0|1|2|3|4|7] 

Утилита командной строки выдает неправильное или сбивающее с толку сообщение об ошибке, когда параметр размера указан с суффиксом (например, 10g) или в байтах:

$ storcli /c0 add vd r6 size=10737418240 name=test drives=3,16:12-19 syntax error, unexpected TOKEN_UNKNOWN, expecting TOKEN_DRIVES  Storage Command Line Tool Ver 1.17.08 September 10, 2015 (c)Copyright 2015, AVAGO Corporation, All Rights Reserved. 
2

2 ответа на вопрос

3
Stephen Ferguson

Я должен был использовать гб вместо г. Первоначально я также поместил параметр размера в другое место и получил ту же ошибку, что и вы.

Storage Command Line Tool Ver 1.20.15 July 29 2016 [root@vmware:/opt/lsi/storcli] ./storcli /c0 add vd raid1 size=100gb name=RAID1-D drives=252:0-1 Controller = 0 Status = Success Description = Add VD Succeeded 
Порядок аргументов имеет значение с этой утилитой! Ярослав Рахматуллин 7 лет назад 2
0
Ярослав Рахматуллин

To create a volume with a custom size, specify the size in megabytes:

$ storcli /c0 add vd r6 Size=100 name=test drives=3,16:12-19 $ storcli /c0/v0 show DG/VD TYPE State Access Consist Cache Cac sCC Size Name 0/0 RAID6 Optl RW Yes RWTD - ON 99.75 MB test 

Submitting an issue does not work at Avagotech (see picture), so I'm going to do it here and hope that someone over there notices.

Regarding the storcli utility.

I am trying to add a virtual drive on a configuration consisting of megaraid 9271-i8, an entel expander board and the cachecade module. My intention is to create a virtual device with type=raid6 allocating only 10gb. According to the manual (see link), this is acheived with for example:

storcli /c0 add vd r6 size=10737418240 name=test drives=3,16:12-19

this would exit with a confusing message: "syntax error, unexpected TOKEN_UNKNOWN, expecting TOKEN_DRIVES" . Piror to that I tried with size=10g and that failed with the same message. While writing this, I though perhaps size was expecting a percentage so I specified size=10 and ended up creating a 10 megabyte volume.

Please consider my suggestions to improve the user-friendliness of the cli tool:

  • add support for specifying the volume size with suffixes such as "10g", "10000m" with capital and lowercase letters.
  • add suppport for specifying the size or a volume with a percentage
  • update the argument parser and give a meaningfull message when a large value is passed such as "volume size out of range, please sepecify the size in megabytes"

Aditionally, I find the command-was-sucessful messages to be superfluous. Please consider making the output more terse and avoid noise like:

$ storcli /c0/v0 show Controller = 0 Status = Success Description = None (...) $ storcli /c0 add vd r6 Size=10 name=test drives=3,16:12-19 Controller = 0 Status = Success Description = Add VD Succeeded (...) 

Thank you!

manual: http://www.sp-it.net/drivers/lsi/lsi_9271i/tools/1.02.08_storcli_phase3/storcli_phase3_refmanual.pdf


form submission fails