首先ssh到idrac去,直接会进入racadm的界面
我们以2022年最新的dell机器为例,老的机器显示的东西不一致
1ssh 10.18.30.104
2Password:
3racadm>>
注意,shell命令有自动补全功能,按两下tab键会自动补
做raid的全部命令都在storage的子命令下
一、首先拿到raid卡的名称:
1racadm>>storage get controllers
2RAID.Slot.1-1
3AHCI.Embedded.2-1
4AHCI.Embedded.1-1
RAID.Slot.1-1 是Raid卡控制器名称,下面两个是主板内置的,忽略。
二、然后拿到所有物理盘的名称:
1racadm>>storage get pdisks
2Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1
3Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
4Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1
5Disk.Bay.3:Enclosure.Internal.0-1:RAID.Slot.1-1
三、看看有没有已经做好的虚拟磁盘
1racadm>>storage get vdisks
显示为空,那我们就可以放心大胆的去做了
四、划分RAID 根据级别不同,精简过的名令如下:
1racadm storage createvd:<控制器> -rl {r0|r1|r5|r6|r10|r50|r60} -pdkey:<磁盘组,用逗号分割>
2
3-rl — Sets the storage level.
4 r0 — storage 0-Striping
5 r1 — storage 1-Mirroring
6 r5 — storage 5-Striping with Parity
7 r6 — storage 6-Striping with Extra Parity
8 r10 — storage 10-Spanned Striping with Mirroring
9 r50 — storage 50-Spanned Striping with Parity
10 r60 — storage 60-Spanned Striping with Extra Parity
给出例子:
1#raid0
2racadm storage createvd:RAID.Slot.1-1 -rl r0 -pdkey:Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1
3
4#raid1
5racadm 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
6
7#raid10
8racadm 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:
1racadm>>jobqueue create RAID.Slot.1-1 --realtime
如果不行,就建立重启的
1racadm>>jobqueue create RAID.Slot.1-1
2racadm jobqueue create RAID.Slot.1-1
3RAC1024: Successfully scheduled a job.
4Verify the job status using "racadm jobqueue view -i JID_xxxxx" command.
5Commit JID = JID_222873363294
六、如果要重启,就重启。能在线建的就不需要重启
1racadm>>serveraction powercycle
2racadm serveraction powercycle
3Server power operation successful
补充:
如果要清理掉Raid卡之前的配置完全重建,命令如下:
1storage resetconfig:RAID.Slot.1-1
2jobqueue create RAID.Slot.1-1 -r pwrcycle -s TIME_NOW -e TIME_NA