This shows you the differences between two versions of the page.
|
raid_controller_utils [2013/01/25 13:50] root created |
raid_controller_utils [2014/10/22 10:05] (current) root |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== HP Raid Utils ====== | ====== HP Raid Utils ====== | ||
| + | |||
| + | HP has replaced command tool hpacucli with hpssacli for later versions of HP Raid Controllers. This is really stupid done by HP. The genius changing a command name should be punished by whip. | ||
| + | |||
| + | In order to get my existing scripts to work, I have created a soft link from hpacucli -> hpssacli in /usr/sbin. | ||
| # hpacucli ctrl all show config | # hpacucli ctrl all show config | ||
| Line 14: | Line 18: | ||
| | | ||
| /tmp/test is output file for result | /tmp/test is output file for result | ||
| + | |||
| + | ===== Spare drives ===== | ||
| + | |||
| + | ==== Remove spare drives ==== | ||
| + | |||
| + | Remove spare drive from Array I | ||
| + | |||
| + | # hpacucli ctrl slot=1 array I remove spares=4E:1:17 | ||
| + | | ||
| + | ==== Adding spare drives ==== | ||
| + | |||
| + | Add two global hot spares | ||
| + | |||
| + | # hpacucli ctrl slot=1 array all add spares=2E:1:18,4E:1:17 | ||
| ===== Smartctl hints for HP smart array (CCISS driver) ===== | ===== Smartctl hints for HP smart array (CCISS driver) ===== | ||
| Line 85: | Line 103: | ||
| ===== Find disk device for logical driver under LSI raid controller ===== | ===== Find disk device for logical driver under LSI raid controller ===== | ||
| - | |||
| First list the Logical Drives (LD's) | First list the Logical Drives (LD's) | ||
| Line 91: | Line 108: | ||
| # /opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -Lall -aall | # /opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -Lall -aall | ||
| Adapter 0 -- Virtual Drive Information: | Adapter 0 -- Virtual Drive Information: | ||
| - | Virtual Drive: 0 (Target Id: 0) | + | Virtual Drive: 0 (Target Id: 0) <<---- Target Id is 0 for VD 0 |
| Name : | Name : | ||
| RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 | RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
| Line 107: | Line 124: | ||
| Encryption Type : None | Encryption Type : None | ||
| PI type: Proprietary type | PI type: Proprietary type | ||
| - | + | Virtual Drive: 1 (Target Id: 1) <<---- Target Id is 1 for VD 1 | |
| - | Is VD Cached: No | + | |
| - | + | ||
| - | Virtual Drive: 1 (Target Id: 1) | + | |
| Name : | Name : | ||
| RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 | RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
| Line 147: | Line 161: | ||
| lsscsi command can be found in lsscsi.x86_64 package | lsscsi command can be found in lsscsi.x86_64 package | ||
| + | |||
| + | ===== List logical disks (LD) ===== | ||
| + | |||
| + | # /opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -Lall -aall | ||
| + | |||
| + | ===== List physical disks (PD) ===== | ||
| + | |||
| + | # /opt/MegaRAID/MegaCli/MegaCli64 -PDlist -aALL | ||
| + | |||
| + | ===== List thorough information indcluding LD & PD ===== | ||
| + | |||
| + | # /opt/MegaRAID/MegaCli/MegaCli64 -CfgDsply -aALL | ||
| + | |||
| + | ===== List smartctl information including disk S/N ===== | ||
| + | |||
| + | First get the Disk Id from Physical disk list | ||
| + | # /opt/MegaRAID/MegaCli/MegaCli64 -PDlist -aALL | ||
| + | Enclosure Device ID: 36 | ||
| + | Slot Number: 15 | ||
| + | Drive's postion: DiskGroup: 3, Span: 0, Arm: 7 | ||
| + | Enclosure position: 1 | ||
| + | Device Id: 27 <-------- This is the Device Id | ||
| + | WWN: 5000C50042600CC8 | ||
| + | Sequence Number: 2 | ||
| + | Media Error Count: 0 | ||
| + | Other Error Count: 0 | ||
| + | Predictive Failure Count: 0 | ||
| + | Last Predictive Failure Event Seq Number: 0 | ||
| + | PD Type: SAS | ||
| + | Raw Size: 931.512 GB [0x74706db0 Sectors] | ||
| + | Non Coerced Size: 931.012 GB [0x74606db0 Sectors] | ||
| + | Coerced Size: 930.390 GB [0x744c8000 Sectors] | ||
| + | Firmware state: Online, Spun Up | ||
| + | Commissioned Spare : No | ||
| + | Emergency Spare : No | ||
| + | Device Firmware Level: BD29 | ||
| + | Shield Counter: 0 | ||
| + | Successful diagnostics completion on : N/A | ||
| + | SAS Address(0): 0x5000c50042600cc9 | ||
| + | SAS Address(1): 0x0 | ||
| + | Connected Port Number: 1(path0) | ||
| + | Inquiry Data: IBM-ESXSST91000640SS BD299XG2NNN80221BD29 | ||
| + | IBM FRU/CRU: 81Y9691 | ||
| + | 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: Hard Disk Device | ||
| + | Drive Temperature :24C (75.20 F) | ||
| + | PI Eligibility: Yes | ||
| + | Number of bytes of user data in LBA: 512 | ||
| + | Drive is formatted for PI information: Yes | ||
| + | PI: PI with type 2 | ||
| + | Port-0 : | ||
| + | Port status: Active | ||
| + | Port's Linkspeed: 6.0Gb/s | ||
| + | Port-1 : | ||
| + | Port status: Active | ||
| + | Port's Linkspeed: 6.0Gb/s | ||
| + | Drive has flagged a S.M.A.R.T alert : No | ||
| + | |||
| + | Now run smartctl | ||
| + | |||
| + | # smartctl -a -d megaraid,<Device Id> /dev/sda | ||
| + | |||
| + | Eventhough disk with Disk Id 27 is not present in device /dev/sda it will show the correct disk information | ||
| + | |||
| + | # smartctl -a -d megaraid,27 /dev/sda | ||
| + | smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.32-279.14.1.el6.x86_64] (local build) | ||
| + | Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net | ||
| + | Vendor: IBM-ESXS | ||
| + | Product: ST91000640SS | ||
| + | Revision: BD29 | ||
| + | User Capacity: 1,000,204,886,016 bytes [1.00 TB] | ||
| + | Logical block size: 512 bytes | ||
| + | Logical Unit id: 0x5000c50042600ccb | ||
| + | Serial number: 9XG2NNN800009301VW77 | ||
| + | Device type: disk | ||
| + | Transport protocol: SAS | ||
| + | Local Time is: Fri Jan 25 15:26:14 2013 CET | ||
| + | Device supports SMART and is Enabled | ||
| + | Temperature Warning Enabled | ||
| + | SMART Health Status: OK | ||
| + | Current Drive Temperature: 24 C | ||
| + | Drive Trip Temperature: 65 C | ||
| + | Elements in grown defect list: 0 | ||
| + | Vendor (Seagate) cache information | ||
| + | Blocks sent to initiator = 0 | ||
| + | Vendor (Seagate/Hitachi) factory information | ||
| + | number of hours powered up = 1638.90 | ||
| + | number of minutes until next internal SMART test = 17 | ||
| + | |||
| + | Error counter log: | ||
| + | Errors Corrected by Total Correction Gigabytes Total | ||
| + | ECC rereads/ errors algorithm processed uncorrected | ||
| + | fast | delayed rewrites corrected invocations [10^9 bytes] errors | ||
| + | read: 373041640 0 0 373041640 0 3163.907 0 | ||
| + | write: 0 0 0 0 0 737.264 0 | ||
| + | verify: 2767709692 0 0 2767709692 0 4610.773 0 | ||
| + | Non-medium error count: 1 | ||
| + | No self-tests have been logged | ||
| + | Long (extended) Self Test duration: 13596 seconds [226.6 minutes] | ||
| + | |||
| + | ===== List LSI adaptor information ===== | ||
| + | |||
| + | # /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll | ||
| + | |||
| + | ===== Battery check ===== | ||
| + | # /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll | ||
| + | | ||
| + | |||