#查看机器型号
dmidecode -t 1
##查看磁盘分区情况
lsblk
##查看raid状态,可定位故障的Slot Number
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0|egrep ‘Slot Number|Firmware state’
##查看raid信息,判断是做raid x
##/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll | grep RAID
##确认Enclosure Device ID
/opt/MegaRAID/MegaCli/MegaCli64 -PDlist -a0|grep “Enclosure Device”|head -1
##处于JBOD状态的硬盘,变更为unconfigured good状态
/opt/MegaRAID/MegaCli/MegaCli64 -pdmakegood -physdrv [
E
n
c
l
o
s
u
r
e
D
e
v
i
c
e
I
D
:
Enclosure Device ID:
EnclosureDeviceID:Slot Number] -force -a0
/opt/MegaRAID/MegaCli/MegaCli64 -pdmakegood -physdrv [32:4] -force -a0
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0|egrep ‘Slot Number|Firmware state’
##处于unconfigured good状态做raid 0
/opt/MegaRAID/MegaCli/MegaCli64 -Cfgldadd -r0[
E
n
c
l
o
s
u
r
e
D
e
v
i
c
e
I
D
:
Enclosure Device ID:
EnclosureDeviceID:Slot Number] -wb -a0
/opt/MegaRAID/MegaCli/MegaCli64 -Cfgldadd -r0[32:4] -wb -a0
##查看raid状态是否为Online
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0|egrep ‘Slot Number|Firmware state’
#格式化磁盘
parted -s /dev/盘符 mklabel gpt
parted -s /dev/盘符 mkpart primary 1 100%
mkfs.ext4 -q -T largefile /dev/盘符 【mkfs.ext4 -F /dev/盘符 -N inode值】
blkid /dev/$sd
vim /etc/fstab
#systemctl daemon-reload
mount /data2
MegaCli64工具磁盘修复处理
于 2022-06-20 20:56:36 首次发布