If the server has a disk array, run Fdisk-l or SMARTCTL–ALL/DEV/SDA and not get the disk information you want.
[Root@localhost/]# fdisk-l warning:gpt (GUID Partition Table) detected on '/DEV/SDA '! The util Fdisk doesn ' t support GPT.
Use GNU Parted. disk/dev/sda:599.6 GB, 599584145408 bytes 255 heads, MB sectors/track, 72895 cylinders = Units of 16065 * 512
= 8225280 bytes Sector size (logical/physical): bytes/4096 bytes I/o size (minimum/optimal): 4096 bytes/4096 Disk identifier:0x000aadb9 Device Boot Start End Blocks Id system/dev/sda1 1
72896 585531391+ ee GPT Partition 1 does not start on physical sector. Warning:gpt (GUID Partition Table) detected on '/DEV/SDB '! The util Fdisk doesn ' t support GPT.
Use GNU Parted. disk/dev/sdb:1999.3 GB, 1999307276288 bytes 255 heads, MB sectors/track, 243068 cylinders = Units of 16065 * 5 Bytes sector size (logical/physical): 8225280 bytes/4096 bytes I/o size (minimum/optimal): 4096 bytes/4096 by TES Disk identifier:0x00000000 Device BooT Start end Blocks Id system/dev/sdb1 1 243069 1952448511+ ee GPT Partition 1
Does not start on physical sector boundary. [Root@localhost/]# smartctl--all/dev/sda smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-358.el6.x86_64] (local bu ILD) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net vendor:lsi Product: mr9260-8i revision:2.13 User capacity:599,584,145,408 bytes [599 GB] Logical block size:512 Bytes Logical Unit id:0x600605b00585ee301e70629e1af12036 serial number:003620f11a9e62701e30ee8505b00506 Dev Ice Type:disk local time Is:thu could 5 05:26:19 2016 EDT Device does not support SMART Error Counter Lo Gging not supported Device does not support Self Test logging
can use the MEGACLI command, MEGACLI command system does not carry, need additional download
Download the address, search MEGACLI can find:
Http://www.avagotech.com/support/download-search
I download it to the/root/usr/local directory
[root@localhost local]# ls
8-07-10_megacli_linux.zip etc include lib64 sbin src
bin Games Lib libexec share
and unzip it.
[Root@localhost local]# unzip 8-07-10_megacli_linux.zip
Archive: 8-07-10_megacli_linux.zip
Inflating:8.07.10_megacli_linux/linux megacli 8.07.10.txt
creating:8.07.10_megacli_linux/linux MegaCLI 8.07.10/
Find installation Package
[root@localhost local]# ls
8.07.10_megacli_linux bin Games Lib
libexec share 8-07-10 _megacli_linux.zip etc include lib64 sbin src
[root@localhost local]# CD 8.07.10_ megacli_linux/
[root@localhost 8.07.10_megacli_linux]# ls-l total
drwxr-xr-x. 2 root root 4096 June 6 2013 Linux megacli 8.07.10
-rw-r--r--. 1 root root 47364 June 7 2013 Linux MEGACLI 8.07 .10.txt
[root@localhost 8.07.10_megacli_linux]# cd linux\ megacli\ 8.07.10
Linux megacli 8.07.10/ Linux megacli 8.07.10.txt
[root@localhost 8.07.10_megacli_linux]# cd linux\ megacli\ 8.07.10
[ Root@localhost Linux megacli 8.07.10]# ls-l total
1512
-rw-r--r--. 1 root root 1546999 may 2013 MEGACLI -8.07.10-1.noarch.rpm
Install MEGACLI, default install under/OPT, build soft link to/usr/bin
[Root@localhost Linux megacli 8.07.10]# RPM-IVH megacli-8.07.10-1.noarch.rpm
preparing ... ########################################### [100%]
1:megacli ########################################## # [100%]
[root@localhost Linux megacli 8.07.10]# ln-s /opt/megaraid/megacli/Install.log libstorelibir-2.so.14.07-0
libstorelibir-2.so MegaCli64
[root@localhost Linux megacli 8.07.10]# ln-s/ opt/megaraid/megacli/megacli64/usr/bin/
Installation complete, command to view hard drive information
[Root@localhost Linux megacli 8.07.10]# cd/usr/bin [root@localhost bin]#/opt/megaraid/megacli/megacli64-pdlist-aall A
Dapter #0 Enclosure Device id:252 Slot number:0 Drive ' s position:diskgroup:0, span:0, arm:0 enclosure position:n/a Device id:23 wwn:5000c5007e156790 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:558.911 GB [0x45dd2fb0 sectors] Non coerced Size: 558.411 GB [0x45cd2fb0 sectors] coerced size:558.406 GB [0x45cd0000 sectors] Sector size:0 Logical sector size:0 Phys ical sector size:0 firmware State:online, spun up commissioned Spare:no emergency spare:no Device firmware level:0 00B Shield counter:0 Successful Diagnostics completion on:n/a SAS address (0): 0x5000c5007e156791 SAS Address (1): 0x0 C onnected Port number:1 (path0) Inquiry data:seagate st3600057ss 000b6sl9aqg9 FDE capable:not capable FD E enable:disable Secured:unsecured locked:unlocked Needs EKM attention:no Foreign state:none Device speed:6.0gb/s Link speed:6.0gb/s Med IA type:hard Disk Device drive:not certified Drive temperature:47c (116.60 F) PI eligibility:no Drive is formatted For pi information:no pi:no pi Port-0: Port status:active Port ' linkspeed:6.0gb/s Port-1: Port status:active Por T ' s Linkspeed:unknown Drive has flagged a s.m.a.r.t alert:no enclosure Device id:252 Slot number:1 Drive ' s Positi on:diskgroup:0, span:0, Arm:1 enclosure position:n/a Device id:22 wwn:5000c5007e1f08a0 Sequence number:2 Media ERR or count:0 other Error count:0 predictive failure count:0 last predictive failure Event Seq number:0 PD type:sas Raw size:558.911 GB [0x45dd2fb0 sectors] Non coerced size:558.411 GB [0x45cd2fb0 sectors] coerced size:558.406 GB [0x45cd0 Sectors] Sector size:0 Logical sector size:0 Physical Sector size:0 firmware State:online, spun up Commissioned Spare:no Emergency SpAre:no Device firmware level:000b Shield counter:0 Successful Diagnostics completion on:n/a SAS address (0): 0x5000c
5007E1F08A1 SAS Address (1): 0x0 Connected Port number:0 (path0) Inquiry data:seagate-St3600057ss 000B6SL9BEFK FDE Capable:not capable FDE enable:disable secured:unsecured locked:unlocked Needs EKM attention:no Foreign Sta Te:none Device speed:6.0gb/s Link speed:6.0gb/s Media type:hard Disk Device drive:not Certified Drive : 48C (118.40 F) Pi Eligibility:no Drive is formatted for pi Information:no pi:no PI Port-0: Port status:active Po
RT ' s linkspeed:6.0gb/s Port-1: Port status:active Port ' s Linkspeed:unknown, Drive has flagged a s.m.a.r.t alert:no Enclosure Device id:252 Slot number:4 Drive ' s position:diskgroup:1, span:0, arm:0, enclosure position:n/a Device Id:4 Wwn:5000c5003cbcbbaf Sequence number:2 Media Error count:0 Other Error count:0 predictive failure count:0 Predictive Failure Event Seq number:0 PD type:sata Raw size:931.512 GB [0x74706db0 sectors] Non coerced size:931.012 GB [0x74606db0 Sectors] Coerced size:931.0 GB [0x74600000 sectors] Sector size:0 Logical sector size:0 Physical sector size:0 Firmware Stat E:online, spun up commissioned Spare:no emergency spare:no Device firmware level:sn03 Shield counter:0 D Iagnostics Completion on:n/a SAS address (0): 0x4433221104000000 Connected Port number:2 (path0) Inquiry Data: z1n2enh2st1000nm0011 SN03 FDE capable:not capable FDE enable:disable secured:unsecur Ed locked:unlocked Needs EKM attention:no Foreign state:none Device speed:6.0gb/s Link speed:6.0gb/s Media type:h ARD Disk Device drive:not certified Drive temperature:35c (95.00 F) Pi Eligibility:no Drive is formatted for PI info
Rmation:no pi:no PI Port-0: Port status:active Port ' s linkspeed:6.0gb/s Drive-has flagged a s.m.a.r.t alert:no Enclosure Device id:252 Slot number:5 Drive ' s position:diskgroup:1, span:0, Arm:1 enclosure position:n/a Device id:5 wwn:5000c5003cbe2f1 7 Sequence number:2 Media Error count:0 Other Error count:0 predictive failure count:0 last predictive failure Event S EQ number:0 PD type:sata Raw size:931.512 GB [0x74706db0 sectors] Non coerced size:931.012 GB [0x74606db0 Sectors] Co erced size:931.0 GB [0x74600000 sectors] Sector size:0 Logical sector size:0 Physical Sector size:0 State: Online, spun up commissioned Spare:no emergency spare:no Device firmware level:sn03 Shield counter:0 successful Dia Gnostics completion on:n/a SAS address (0): 0x4433221105000000 Connected Port number:5 (path0) Inquiry Data:
z1n0zaswst1000nm0011 SN03 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:har D Disk Device Drive:noT certified Drive temperature:32c (89.60 F) Pi Eligibility:no Drive is formatted for pi information:no pi:no pi Por
t-0: Port status:active Port ' s linkspeed:6.0gb/s Drive has flagged a s.m.a.r.t alert:no enclosure Device id:252
Slot number:6 Drive ' s position:diskgroup:1, Span:1, arm:0 enclosure position:n/a Device id:25 wwn:5000c5003cbe2fb5 Sequence number:2 Media Error count:0 Other Error count:0 predictive failure count:0 last predictive failure Event Se Q number:0 PD type:sata Raw size:931.512 GB [0x74706db0 sectors] Non coerced size:931.012 GB [0x74606db0 Sectors] Coe rced size:931.0 GB [0x74600000 sectors] Sector size:0 Logical sector size:0 Physical Sector size:0 State: Online spun up commissioned Spare:no emergency spare:no Device firmware level:sn03 Shield counter:0 successful Diag Nostics Completion on:n/a SAS address (0): 0x4433221106000000 Connected Port number:3 (path0) Inquiry Data: z1n22zgsst1000nm0011 SN03 FDE capable:not capable FDE enable:disable secured:unsecured locked:unlocked Needs E KM attention:no Foreign state:none Device speed:6.0gb/s Link speed:6.0gb/s Media type:hard Disk Device drive:not Certified Drive temperature:33c (91.40 F) Pi Eligibility:no Drive is formatted for pi information:no pi:no pi Port -0:port status:active Port ' s linkspeed:6.0gb/s Drive has flagged a s.m.a.r.t alert:no enclosure Device id:252 s
Lot Number:7 Drive ' s position:diskgroup:1, Span:1, Arm:1 enclosure position:n/a Device id:24 wwn:5000c5003cbe29c3 Sequence number:2 Media Error count:0 Other Error count:0 predictive failure count:0 last predictive failure Event Seq number:0 PD type:sata Raw size:931.512 GB [0x74706db0 sectors] Non coerced size:931.012 GB [0x74606db0 Sectors] Coer CED size:931.0 GB [0x74600000 sectors] Sector size:0 Logical sector size:0 Physical sector size:0 firmware State:o Nline, spun up CommissioNed Spare:no emergency spare:no Device firmware level:sn03 Shield counter:0 successful on: N/a SAS address (0): 0x4433221107000000 Connected Port number:4 (path0) Inquiry data:z1n070ntst1000nm0011 SN03 FDE capable:not capable FDE enable:disable secured:unsecured locked:unlocked Needs EK M attention:no Foreign state:none Device speed:6.0gb/s Link speed:6.0gb/s Media type:hard Disk Device drive:not Certified Drive temperature:32c (89.60 F) Pi Eligibility:no Drive is formatted for pi information:no pi:no pi 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
From the above you can see that the server has six hard drives:
2 Block SEAGATE st3600057ss 600GB hard disk 4 z1n070ntst1000nm0011 1TB hard Drive
Introduction of common parameters of MEGACLI
Megacli-adpcount "Number of display adapters"
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 "Display BBU capacity Information"
Megacli-adpbbucmd-getbbudesigninfo-aall "Show Bbu Design Parameters"
Megacli-adpbbucmd-getbbuproperties-aall "Show current BBU Properties"
Megacli-cfgdsply-aall "Display RAID card model, RAID settings, disk related information"