View hard drive model, size, and other information (including RAID) under Linux

Source: Internet
Author: User

Linux under View hard disk model, size and other information, the machine does not have a raid relationship

One, Normal mode (the drive does not do disk array)

1, fdisk-l view your hard drive number, such as SDA,SDB, etc.

2, Smartctl--ALL/DEV/SDA

Smartctl--ALL/DEV/SDA #该命令centos自带

[Email protected] ~]# smartctl--all/dev/sdasmartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (Local Build) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net=== START of the information section ===devic E Model:     SanDisk sd6sb1m128g1022iserial Number:    141218410909LU WWN Device id:5 001b44 becdaed9dfirmware Version : X231600user Capacity:    128,035,676,160 bytes [Gb]sector] Size:      bytes Logical/physicaldevice is: not        In Smartctl database [for details use:-P showall]ata Version is: 8ATA standard is   :  ata-8-acs revision 6Local time is:    Fri Jan 08:35:48 cstsmart support Is:available-device have SMART capability. SMART Support is:enabled

As can be seen from the above, the hard drive model is SanDisk sd6sb1m128g1022i with a capacity of 128GB

Second, disk array raid mode

If the machine has a disk array, then running the above command will error, not get the disk information you want. You can use the MEGACLI command

MEGACLI command system does not own, need additional download,

Http://www.lsi.com/downloads/Public/RAID%20Controllers/RAID%20Controllers%20Common%20Files/8.07.14_MegaCLI.zip

Unzip after download,

Unzip Csa1.5-megacli_rel80571.zip

CD Megacli/megacli_linux

RPM-IVH megacli-8.05.71-1.noarch.rpm


Installation Complete

Ln-s/opt/megaraid/megacli/megacli64/usr/bin/

Installed by default under/OPT, set up a soft link to/usr/bin

[[email protected] bin]#/opt/megaraid/megacli/megacli64-pdlist-aalladapter #0Enclosure Device id:32slot number : 0Drive ' s position:diskgroup:0, span:0, arm:0enclosure position:1device id:0wwn:50000c0f02e57be9sequence number:2 Media Error Count:0other error count:0predictive Failure count:0last predictive Failure Event Seq number:0pd Type:sas Raw size:279.396 GB [0x22ecb25c Sectors]non coerced size:278.896 GB [0x22dcb25c sectors]coerced size:278.875 GB [0X22DC 0000 Sectors]sector Size:0firmware State:online, spun updevice Firmware Level:d1s6shield counter:0successful diagnost ICS Completion On:n/asas Address (0): 0x50000c0f02e57beasas address (1): 0x0connected Port number:0 (path0) Inquiry Data:  WD wd3001bkhg d1s6wx11e83nu249fde capable:not capablefde Enable:DisableSecured:UnsecuredLocked:UnlockedNeeds  EKM attention:noforeign state:nonedevice speed:6.0gb/slink speed:6.0gb/smedia type:hard Disk DeviceDrive Temperature : 31C (87.80 F) PI EligibiliTy:nodrive is formatted for PI information:NoPI:No PIPort-0:P ort status:activeport ' s linkspeed:6.0gb/sport-1:P ort Status:activeport ' s linkspeed:unknowndrive has flagged a s.m.a.r.t alert:noenclosure Device id:32slot number:1drive ' s position:diskgroup:0, span:0, arm:1enclosure position:1device id:1wwn:50000c0f028f32edsequence number:2media Er Ror count:0other Error count:0predictive Failure count:0last predictive Failure Event Seq number:0pd type:sasraw Size : 279.396 GB [0x22ecb25c Sectors]non coerced size:278.896 GB [0x22dcb25c sectors]coerced size:278.875 GB [0x22dc0000 SEC Tors]sector Size:0firmware State:online, spun Updevice Firmware Level:d1s6shield counter:0successful Diagnostics Comp      Letion On:n/asas Address (0): 0x50000c0f028f32eesas address (1): 0x0connected Port number:1 (path0) Inquiry data:wd WD3001BKHG d1s6wx11e83vd242fde capable:not capablefde Enable:DisableSecured:UnsecuredLocked:UnlockedNeeds EKM Att Ention:noforeign State: Nonedevice speed:6.0gb/slink speed:6.0gb/smedia type:hard Disk devicedrive temperature:31c (87.80 F) PI Eligibility: Nodrive is formatted for PI information:NoPI:No PIPort-0:P ort status:activeport ' s linkspeed:6.0gb/sport-1:P ort stat Us:activeport ' s linkspeed:unknowndrive has flagged a s.m.a.r.t alert:noenclosure Device id:32slot number:2drive ' s PO sition:diskgroup:0, span:0, arm:2enclosure position:1device id:2wwn:50000c0f02e5b8edsequence number:2media Error C Ount:0other Error count:0predictive Failure count:0last predictive Failure Event Seq number:0pd type:sasraw size:279 .396 GB [0x22ecb25c Sectors]non coerced size:278.896 GB [0x22dcb25c sectors]coerced size:278.875 GB [0x22dc0000 Sectors] Sector Size:0firmware State:online, spun Updevice Firmware Level:d1s6shield counter:0successful Diagnostics Completio N On:n/asas Address (0): 0x50000c0f02e5b8eesas address (1): 0x0connected Port number:2 (path0) Inquiry data:wd WD300 1BKHG D1s6wx11e83nu081FDE capable:not capablefde Enable:DisableSecured:UnsecuredLocked:UnlockedNeeds EKM attention:noforeign state:none Device speed:6.0gb/slink speed:6.0gb/smedia type:hard Disk devicedrive temperature:28c (82.40 F) PI Eligibility:nodri ve is formatted for PI information:NoPI:No PIPort-0:P ort status:activeport ' s linkspeed:6.0gb/sport-1:P ort status:a Ctiveport ' s linkspeed:unknowndrive has flagged a s.m.a.r.t alert:noexit code:0x00


As can be seen from the above, the machine has three hard drives, the model is,

WD WD3001BKHG d1s6wx11e83nu249 with a capacity of 300GB.

MEGACLI Common Parameters Introduction
Megacli-adpcount "Display adapter Count"
Megacli-adpgettime–aall "Show Adapter Time"
Megacli-adpallinfo-aall "Show All Adapter Information"
Megacli-ldinfo-lall-aall "Show all Logical disk group information"
Megacli-pdlist-aall "Show All Physical Information"
Megacli-adpbbucmd-getbbustatus-aall |grep ' Charger status ' "View charging status"
Megacli-adpbbucmd-getbbustatus-aall "Show Bbu status information"
Megacli-adpbbucmd-getbbucapacityinfo-aall "Show Bbu Capacity Information"
Megacli-adpbbucmd-getbbudesigninfo-aall "Show Bbu Design Parameters"
Megacli-adpbbucmd-getbbuproperties-aall "Show current BBU Properties"
Megacli-cfgdsply-aall "Show RAID card model, RAID settings, disk related information"

Changes in the status of the tape, from the drawing to the disk.
Device | normal| damage| rebuild| Normal
Virtual Drive | optimal| degraded| degraded| Optimal
Physical Drive | online| Failed–> unconfigured| rebuild| Online

View hard drive model, size, and other information (including RAID) under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.