顯示頁面舊版反向連結Fold/unfold all回到頁頂 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== PVE7 主機安裝 MegaRaid 卡命令工具(megacli, megaclisas-status) ====== 有幾台主機有安裝 LSI MegaRAID 卡 , 最近因為壞了 RAID 內其中一顆硬碟才來找如何看 RAID 內硬碟與整體 RAID 的狀態工具. ===== 安裝 megacli ===== * 加入 megaraid tools 的 apt repo <cli> vi /etc/apt/sources.list </cli><file> : # LSI MegaRaid Tools deb http://hwraid.le-vert.net/debian bullseye main </file> * 設定 megaraid tools 的 apt key <cli> wget https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key apt-key add hwraid.le-vert.net.gpg.key </cli> * 安裝 megaraid tools <cli> apt update apt install megacli apt install megaclisas-status </cli> ===== 使用查詢語法 ===== * 顯示 RAID 完整資訊 <cli> megacli -AdpAllInfo -aAll </cli> * ++顯示結果|<cli> root@pve-48:~# megacli -AdpAllInfo -aAll Adapter #0 ============================================================================== Versions ================ Product Name : AVAGO 3108 MegaRAID Serial No : FW Package Build: 24.15.0-0018 Mfg. Data ================ Mfg. Date : 00/00/00 Rework Date : 00/00/00 Revision No : Battery FRU : N/A Image Versions in Flash: ================ BIOS Version : 6.31.03.0_4.17.08.00_0x06140200 Ctrl-R Version : 5.16-0300 Preboot CLI Version: 01.07-05:#%0000 FW Version : 4.650.00-6223 NVDATA Version : 3.1602.00-0003 Boot Block Version : 3.07.00.00-0003 Pending Images in Flash ================ None : : Allow HDD/SSD Mix in VD : No Allow SATA in Cluster : No Max Chained Enclosures : 16 Disable Ctrl-R : No Enable Web BIOS : No Direct PD Mapping : No BIOS Enumerate VDs : Yes Restore Hot Spare on Insertion : No Expose Enclosure Devices : Yes Maintain PD Fail History : Yes Disable Puncturing : No Zero Based Enclosure Enumeration : No PreBoot CLI Enabled : No LED Show Drive Activity : Yes Cluster Disable : Yes SAS Disable : No Auto Detect BackPlane Enable : SGPIO/i2c SEP Use FDE Only : No Enable Led Header : Yes Delay during POST : 0 EnableCrashDump : Yes Disable Online Controller Reset : No EnableLDBBM : Yes Un-Certified Hard Disk Drives : Allow Treat Single span R1E as R10 : No Max LD per array : 16 Power Saving option : Don't Auto spin down Configured Drives Max power savings option is not allowed for LDs. Only T10 power conditions are to be used. Default spin down time in minutes: 30 Enable JBOD : No TTY Log In Flash : No Auto Enhanced Import : No BreakMirror RAID Support : Yes Disable Join Mirror : Yes Enable Shield State : Yes Time taken to detect CME : 60s Exit Code: 0x00 </cli>++ * 顯示 RAID 狀態 <cli> megaclisas-status </cli> * ++顯示結果|<cli> root@pve-48:~# megaclisas-status -- Controller information -- -- ID | H/W Model | RAM | Temp | BBU | Firmware c0 | AVAGO 3108 MegaRAID | 2048MB | 53C | Absent | FW: 24.15.0-0018 -- Array information -- -- ID | Type | Size | Strpsz | Flags | DskCache | Status | OS Path | CacheCade |InProgress c0u0 | RAID-5 | 3636G | 256 KB | RA,WT | Default | Optimal | /dev/sda | None |None c0u1 | RAID-0 | 931G | 256 KB | RA,WT | Default | Optimal | /dev/sdb | None |None -- Disk information -- -- ID | Type | Drive Model | Size | Status | Speed | Temp | Slot ID | LSI ID c0u0p0 | SSD | 2114FV455312 WDC WDS100T2B0A-00SM50 415020WD | 931.0 GB | Online, Spun Up | 6.0Gb/s | N/A | [252:0] | 0 c0u0p1 | SSD | 2114FV461701 WDC WDS100T2B0A-00SM50 415020WD | 931.0 GB | Online, Spun Up | 6.0Gb/s | N/A | [252:1] | 2 c0u0p2 | SSD | 2114FV461706 WDC WDS100T2B0A-00SM50 415020WD | 931.0 GB | Online, Spun Up | 6.0Gb/s | N/A | [252:2] | 3 c0u0p3 | SSD | 2114FV450001 WDC WDS100T2B0A-00SM50 415020WD | 931.0 GB | Online, Spun Up | 6.0Gb/s | N/A | [252:3] | 1 c0u0p4 | SSD | 2114FV459101 WDC WDS100T2B0A-00SM50 415020WD | 931.0 GB | Online, Spun Up | 6.0Gb/s | N/A | [252:4] | 5 c0u1p0 | SSD | 21116Q441114 WDC WDS100T2B0A-00SM50 401020WD | 931.0 GB | Online, Spun Up | 6.0Gb/s | N/A | [252:5] | 4 </cli>++ * 查詢 RAID 內單一硬碟的 smart 資訊 Exp. RAID 在 /dev/sdb 要看裡面的第一顆資訊<cli> smartctl -a -d megaraid,0 /dev/sdb </cli> * ++ 顯示結果|<cli> root@pve-48:~# smartctl -a -d megaraid,0 /dev/sdb smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.35-3-pve] (local build) Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: WD Blue / Red / Green SSDs Device Model: WDC WDS100T2B0A-00SM50 Serial Number: 2114FV455312 LU WWN Device Id: 5 001b44 4a702e696 Firmware Version: 415020WD User Capacity: 1,000,204,886,016 bytes [1.00 TB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: 2.5 inches : : 232 Available_Reservd_Space 0x0033 100 100 004 Pre-fail Always - 100 233 NAND_GB_Written_TLC 0x0032 100 100 --- Old_age Always - 411623 234 NAND_GB_Written_SLC 0x0032 100 100 --- Old_age Always - 435405 241 Host_Writes_GiB 0x0030 253 253 --- Old_age Offline - 93813 242 Host_Reads_GiB 0x0030 253 253 --- Old_age Offline - 152365 244 Temp_Throttle_Status 0x0032 000 100 --- Old_age Always - 0 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] Selective Self-tests/Logging not supported </cli>++ ===== 參考網址 ===== * https://www.sven-mette.com/install-lsi-megaraid-storage-manger-on-proxmox-6-2/ * http://www.ttlsa.com/tools/megacli-monitor-raid-status/ * https://www.mybluelinux.com/debian-linux-and-lsi-megaraid-sas/ * https://unix.stackexchange.com/questions/485463/smartctl-megaraid-n-how-to-find-the-right-value-for-n {{tag>pve megaraid}} tech/pve7_megaraid.txt 上一次變更: 2022/07/08 16:36由 jonathan