Иногда возникает необходимость получить доступ к RAID контроллеру из
коммандной строки.
Для контроллеров LSI существует урилита megacli
Добавляем репозиторий:
echo 'deb http://hwraid.le-vert.net/debian bullseye main' > /etc/apt/sources.list.d/megacli.list
wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
Ставим урилиту:
apt update
apt install megacli
Выводим справку:
megacli -h
MegaCLI SAS RAID Management Tool Ver 8.07.14 Dec 16, 2013
(c)Copyright 2013, LSI Corporation, All Rights Reserved.
NOTE: The following options may be given at the end of any command below:
[-Silent] [-AppLogFile filename] [-NoLog] [-page[N]]
[-] is optional.
N - Number of lines per page.
....
Пользуемся
Ссылка на базу знаний
Пример исрользования:
Смотрим физические диски в рейде
megacli -PDList -a0
Adapter #0
Enclosure Device ID: 252
Slot Number: 0
........................
Enclosure Device ID: 252
Slot Number: 7
Enclosure position: N/A
Device Id: 9
WWN: 4154412020202020
Sequence Number: 1
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 447.130 GB [0x37e436b0 Sectors]
Non Coerced Size: 446.630 GB [0x37d436b0 Sectors]
Coerced Size: 446.625 GB [0x37d40000 Sectors]
Sector Size: 0
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: J2.3
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x4433221104000000
Connected Port Number: 5(path0)
Inquiry Data: 50026B728225174F KINGSTON SEDC500R480G SCEKJ2.3
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Solid State Device
Drive: Not Certified
Drive Temperature : N/A
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00
Диск из 7й луны добавляем как одиночный (RAID0)
# megacli -CfgLdAdd -r0[252:7] -a0
Adapter 0: Created VD 3
Adapter 0: Configured the Adapter!!
Exit Code: 0x00
root@pve5:~# megacli -LDInfo -L3 -a0
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 3 (Target Id: 3)
Name :
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0
Size : 446.625 GB
Sector Size : 512
Parity Size : 0
State : Optimal
Strip Size : 64 KB
Number Of Drives : 1
Span Depth : 1
Default Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disabled
Encryption Type : None
Bad Blocks Exist: No
Is VD Cached: No
Exit Code: 0x00
Просмотр информации о созданном VD3
# megacli -LDInfo -L3 -a0
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 3 (Target Id: 3)
Name :
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0
Size : 446.625 GB
Sector Size : 512
Parity Size : 0
State : Optimal
Strip Size : 64 KB
Number Of Drives : 1
Span Depth : 1
Default Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disabled
Encryption Type : None
Bad Blocks Exist: No
Is VD Cached: No
Exit Code: 0x00
Комментариев нет:
Отправить комментарий