查看逻辑盘详细信息
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL
RAID型号对应表信息如下:
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0" #代表Raid 1
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0" #代表Raid 0
RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3" #代表Raid 5
RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0" #代表Raid10
RAID10 需要结合Number Of Drives per span和Span Depth一起来看
Number Of Drives:2 #代表包含2块设备
查看raid卡信息
Product Name:SAS3408 #表示raid卡型号
这一块显示RAID卡支持的型号
查看物理盘详细信息
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
重点关注信息
Adapter #0 阵列卡号,适配器编号
Enclosure Device ID: 64 raid卡的ID号
Slot Number: 0 物理磁盘的slot号,磁盘位置
Firmware state:状态信息
Foreign State:外来配置信息
临时
for i in `echo /mnt/sd{b,c,d,e,f,g,h,i,j,k,l,m}`;do umount $i; done
永久:注释/etc/fstab 中的挂载信息
sed -i ‘12,23s/^/#/g‘ /etc/fstab
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -a0
a0:表示raid卡信息中的Adapter #0适配器编号
L1:表示Virtual Drive 1虚拟设备编号
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L2 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L3 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L4 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L5 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L6 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L7 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L8 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L9 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L10 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L11 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L12 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgSpanAdd -r10 -Array0 [64:0,64:1] -Array1 [64:2,64:3] -Array2 [64:4,64:5] -Array3 [64:6,64:7] -Array4 [64:8,64:9] -Array5 [64:10,64:11] -a0
-r10:指定为raid10
raid10为两个raid1组成一个raid0。-Array0 [64:0,64:1] -Array1 [64:2,64:3] -Array2 [64:4,64:5] -Array3 [64:6,64:7] -Array4 [64:8,64:9] -Array5 [64:10,64:11]含义为:将64:0,64:1做raid1组成Array0;64:2,64:3]做raid1组成Array1,…. 最后由Array0到Array5组成raid0。
-a0:为指定适配器编号
其他可选参数:
/opt/MegaRAID/MegaCli/MegaCli64 -h
/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ShowProg -LALL -aALL
/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ShowProg -LALL -aALL
[root@yd3-m151c247 ~]# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type ‘help‘ to view a list of commands.
(parted) p
Model: AVAGO HW-SAS3408 (scsi)
Disk /dev/sdb: 12.0TB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 12.0TB 12.0TB ext2
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to
continue?
Yes/No? yes
(parted) mkpart
Partition name? []? galaxy
File system type? [ext2]? xfs
Start? 0%
End? 100%
(parted) quit
Information: You may need to update /etc/fstab.
临时
mount /dev/sdb1 /mnt/sdb
永久
查看uuid
修改/etc/fstab
UUID=1f952d92-ed28-42ac-ab45-007ab910cf57 /mnt/sdb xfs defaults 1 1
df -Th
Number Of Drives per span:2 #表示两块物理盘组成一个RAID1
Span Depth :6 #表示六个RAID1组成RAID10
参考文档:https://www.cnblogs.com/xingxiz/p/10411248.html
原文:https://blog.51cto.com/jiayimeng/2650619