首先ssh到idrac去,直接会进入racadm的界面

我们以2022年最新的dell机器为例,老的机器显示的东西不一致

ssh 10.18.30.104
Password: 
racadm>>

注意,shell命令有自动补全功能,按两下tab键会自动补

做raid的全部命令都在storage的子命令下

一、首先拿到raid卡的名称:

racadm>>storage get controllers
RAID.Slot.1-1
AHCI.Embedded.2-1
AHCI.Embedded.1-1

RAID.Slot.1-1 是Raid卡控制器名称,下面两个是主板内置的,忽略。

二、然后拿到所有物理盘的名称:

racadm>>storage get pdisks
Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1
Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1
Disk.Bay.3:Enclosure.Internal.0-1:RAID.Slot.1-1

三、看看有没有已经做好的虚拟磁盘

racadm>>storage get vdisks

显示为空,那我们就可以放心大胆的去做了

四、划分RAID 根据级别不同,精简过的名令如下:

racadm storage createvd:<控制器> -rl {r0|r1|r5|r6|r10|r50|r60} -pdkey:<磁盘组,用逗号分割> 

-rl — Sets the storage level.
    r0 — storage 0-Striping
    r1 — storage 1-Mirroring
    r5 — storage 5-Striping with Parity
    r6 — storage 6-Striping with Extra Parity
    r10 — storage 10-Spanned Striping with Mirroring
    r50 — storage 50-Spanned Striping with Parity
    r60 — storage 60-Spanned Striping with Extra Parity

给出例子:

#raid0
racadm storage createvd:RAID.Slot.1-1 -rl r0 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1

#raid1
racadm storage createvd:RAID.Slot.1-1 -rl r0 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1,Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1

#raid10
racadm storage createvd:RAID.Slot.1-1 -rl r0 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1,Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1,Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1,Disk.Bay.3:Enclosure.Internal.0-1:RAID.Slot.1-1

五、建立job 首先尝试不重启在线建Raid:

racadm>>jobqueue create RAID.Slot.1-1 --realtime

如果不行,就建立重启的

racadm>>jobqueue create RAID.Slot.1-1
racadm jobqueue create RAID.Slot.1-1
RAC1024: Successfully scheduled a job.
Verify the job status using "racadm jobqueue view -i JID_xxxxx" command.
Commit JID = JID_222873363294

六、如果要重启,就重启。能在线建的就不需要重启

racadm>>serveraction powercycle
racadm serveraction powercycle
Server power operation successful

补充:

如果要清理掉Raid卡之前的配置完全重建,命令如下:

storage resetconfig:RAID.Slot.1-1
jobqueue create RAID.Slot.1-1 -r pwrcycle -s TIME_NOW -e TIME_NA