服务器槽位为空,新上盘
1、安装制作raid的软件
目前使用的是storcli,把软件传至需要换盘做raid的服务器
2、安装
rpm -ivh storcli-007.0813.0000.0000-1.noarch.rpm
3、默认目录
/opt/MegaRAID/storcli
可以创建软连接
ln –s /opt/MegaRAID/storcli/storcli64 /bin/storcli
4、raid制作
查看控制id
cd /opt/MegaRAID/storcli
./storcli64 show
查看新插盘的状态
./storcli64 /c0 show
如果盘的状态不是good,得先设置成此状态
./storcli64 /c0/e24/s7 set good
./storcli64 /c0/e24/s7 show
做raid
./storcli64 /c0 add vd r0 drives=24:7
#24代表eid,7代表slot号
如果制作不成功,可以关闭jbod或者完全初始化此磁盘(slot号一定不要搞错)
./storcli64 /c0/e24/s7 set jbod=off
./storcli64 /c0/e24/s7 start initialization
./storcli64 /c0/e24/s7 show initialization
5、校验
lsblk #查看有没有新盘出现
槽位不为空,更换新盘
1、先确定需要更换的盘对应的target id lsscsi [root@node-6 storcli]# lsscsi
[0:0:24:0\] enclosu LSI Cobra 0a00 -
[0:2:0:0\] disk AVAGO MR9361-8i 4.65 /dev/sda
[0:2:1:0\] disk AVAGO MR9361-8i 4.65 /dev/sdb
[0:2:2:0\] disk AVAGO MR9361-8i 4.65 /dev/sdc
[0:2:3:0\] disk AVAGO MR9361-8i 4.65 /dev/sdd
[0:2:4:0\] disk AVAGO MR9361-8i 4.65 /dev/sde
[0:2:5:0\] disk AVAGO MR9361-8i 4.65 /dev/sdf
[0:2:6:0\] disk AVAGO MR9361-8i 4.65 /dev/sdg
[0:2:7:0\] disk AVAGO MR9361-8i 4.65 /dev/sdh
[0:2:8:0\] disk AVAGO MR9361-8i 4.65 /dev/sdi
上面命令看所有,下面命令看指定磁盘
udevadm info -q path -n /dev/sdd1
/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:3/0:2:3:0/block/sdd/sdd1
2、确定槽位
./storcli64 show #确定ctrl id
./storcli64 /c0 show #target id与VD一一映射,通过VD定DG,通过DG定slot号
3、点灯
./storcli64 /c0/e24/s7 start locate #磁盘会多闪一个灯,颜色跟厂家有关系了
./storcli64 /c0/e24/s7 stop locate
4、下线
./storcli64 /c0/e24/s7 set offline
5、拔盘
换成新的硬盘,换盘之后的上线操作跟前面一样