一、普通模式(该机硬盘没有做磁盘阵列)

1、fdisk -l 查看你的硬盘编号,如sda,sdb 等

2、smartctl --all /dev/sda

[html] view plain copy

 
  1. smartctl --all /dev/sda #该命令centos自带
[html] view plain copy

 
  1. [root@localhost ~]# smartctl --all /dev/sda
  2. smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-504.el6.x86_64] (local build)
  3. Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
  4. === START OF INFORMATION SECTION ===
  5. Device Model:     SanDisk SD6SB1M128G1022I
  6. Serial Number:    141218410909
  7. LU WWN Device Id: 5 001b44 becdaed9d
  8. Firmware Version: X231600
  9. User Capacity:    128,035,676,160 bytes [128 GB]
  10. Sector Size:      512 bytes logical/physical
  11. Device is:        Not in smartctl database [for details use: -P showall]
  12. ATA Version is:   8
  13. ATA Standard is:  ATA-8-ACS revision 6
  14. Local Time is:    Fri Jan 16 08:35:48 2015 CST
  15. SMART support is: Available - device has SMART capability.
  16. SMART support is: Enabled

从上面可以看出,硬盘型号为SanDisk SD6SB1M128G1022I,容量为128GB

二、磁盘阵列 RAID模式

如果该机有做磁盘阵列,那么运行上述命令会报错,得不到你要的磁盘信息。可以借助MegaCli命令

MegaCli命令系统不自带,需要额外下载,

下载地址:

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

下载之后解压,

unzip CSA1.5-MegaCli_REL80571.zip

cd MegaCLI/MegaCli_Linux

rpm -ivh MegaCli-8.05.71-1.noarch.rpm

安装完成

ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/

默认安装在/opt下面,建立软链到/usr/bin

[html] view plain copy

 
  1. [root@localhost bin]# /opt/MegaRAID/MegaCli/MegaCli64 -PDlist -aALL
  2. Adapter #0
  3. Enclosure Device ID: 32
  4. Slot Number: 0
  5. Drive's position: DiskGroup: 0, Span: 0, Arm: 0
  6. Enclosure position: 1
  7. Device Id: 0
  8. WWN: 50000C0F02E57BE9
  9. Sequence Number: 2
  10. Media Error Count: 0
  11. Other Error Count: 0
  12. Predictive Failure Count: 0
  13. Last Predictive Failure Event Seq Number: 0
  14. PD Type: SAS
  15. Raw Size: 279.396 GB [0x22ecb25c Sectors]
  16. Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
  17. Coerced Size: 278.875 GB [0x22dc0000 Sectors]
  18. Sector Size:  0
  19. Firmware state: Online, Spun Up
  20. Device Firmware Level: D1S6
  21. Shield Counter: 0
  22. Successful diagnostics completion on :  N/A
  23. SAS Address(0): 0x50000c0f02e57bea
  24. SAS Address(1): 0x0
  25. Connected Port Number: 0(path0)
  26. Inquiry Data: WD      WD3001BKHG      D1S6WX11E83NU249
  27. FDE Capable: Not Capable
  28. FDE Enable: Disable
  29. Secured: Unsecured
  30. Locked: Unlocked
  31. Needs EKM Attention: No
  32. Foreign State: None
  33. Device Speed: 6.0Gb/s
  34. Link Speed: 6.0Gb/s
  35. Media Type: Hard Disk Device
  36. Drive Temperature :31C (87.80 F)
  37. PI Eligibility:  No
  38. Drive is formatted for PI information:  No
  39. PI: No PI
  40. Port-0 :
  41. Port status: Active
  42. Port's Linkspeed: 6.0Gb/s
  43. Port-1 :
  44. Port status: Active
  45. Port's Linkspeed: Unknown
  46. Drive has flagged a S.M.A.R.T alert : No
  47. Enclosure Device ID: 32
  48. Slot Number: 1
  49. Drive's position: DiskGroup: 0, Span: 0, Arm: 1
  50. Enclosure position: 1
  51. Device Id: 1
  52. WWN: 50000C0F028F32ED
  53. Sequence Number: 2
  54. Media Error Count: 0
  55. Other Error Count: 0
  56. Predictive Failure Count: 0
  57. Last Predictive Failure Event Seq Number: 0
  58. PD Type: SAS
  59. Raw Size: 279.396 GB [0x22ecb25c Sectors]
  60. Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
  61. Coerced Size: 278.875 GB [0x22dc0000 Sectors]
  62. Sector Size:  0
  63. Firmware state: Online, Spun Up
  64. Device Firmware Level: D1S6
  65. Shield Counter: 0
  66. Successful diagnostics completion on :  N/A
  67. SAS Address(0): 0x50000c0f028f32ee
  68. SAS Address(1): 0x0
  69. Connected Port Number: 1(path0)
  70. Inquiry Data: WD      WD3001BKHG      D1S6WX11E83VD242
  71. FDE Capable: Not Capable
  72. FDE Enable: Disable
  73. Secured: Unsecured
  74. Locked: Unlocked
  75. Needs EKM Attention: No
  76. Foreign State: None
  77. Device Speed: 6.0Gb/s
  78. Link Speed: 6.0Gb/s
  79. Media Type: Hard Disk Device
  80. Drive Temperature :31C (87.80 F)
  81. PI Eligibility:  No
  82. Drive is formatted for PI information:  No
  83. PI: No PI
  84. Port-0 :
  85. Port status: Active
  86. Port's Linkspeed: 6.0Gb/s
  87. Port-1 :
  88. Port status: Active
  89. Port's Linkspeed: Unknown
  90. Drive has flagged a S.M.A.R.T alert : No
  91. Enclosure Device ID: 32
  92. Slot Number: 2
  93. Drive's position: DiskGroup: 0, Span: 0, Arm: 2
  94. Enclosure position: 1
  95. Device Id: 2
  96. WWN: 50000C0F02E5B8ED
  97. Sequence Number: 2
  98. Media Error Count: 0
  99. Other Error Count: 0
  100. Predictive Failure Count: 0
  101. Last Predictive Failure Event Seq Number: 0
  102. PD Type: SAS
  103. Raw Size: 279.396 GB [0x22ecb25c Sectors]
  104. Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
  105. Coerced Size: 278.875 GB [0x22dc0000 Sectors]
  106. Sector Size:  0
  107. Firmware state: Online, Spun Up
  108. Device Firmware Level: D1S6
  109. Shield Counter: 0
  110. Successful diagnostics completion on :  N/A
  111. SAS Address(0): 0x50000c0f02e5b8ee
  112. SAS Address(1): 0x0
  113. Connected Port Number: 2(path0)
  114. Inquiry Data: WD      WD3001BKHG      D1S6WX11E83NU081
  115. FDE Capable: Not Capable
  116. FDE Enable: Disable
  117. Secured: Unsecured
  118. Locked: Unlocked
  119. Needs EKM Attention: No
  120. Foreign State: None
  121. Device Speed: 6.0Gb/s
  122. Link Speed: 6.0Gb/s
  123. Media Type: Hard Disk Device
  124. Drive Temperature :28C (82.40 F)
  125. PI Eligibility:  No
  126. Drive is formatted for PI information:  No
  127. PI: No PI
  128. Port-0 :
  129. Port status: Active
  130. Port's Linkspeed: 6.0Gb/s
  131. Port-1 :
  132. Port status: Active
  133. Port's Linkspeed: Unknown
  134. Drive has flagged a S.M.A.R.T alert : No
  135. Exit Code: 0x00

从上面可以看出,该机有三块硬盘,型号为,

WD      WD3001BKHG      D1S6WX11E83NU249,容量为300GB。

MegaCli常用参数介绍 

MegaCli -adpCount 【显示适配器个数】

MegaCli -AdpGetTime –aALL 【显示适配器时间】

MegaCli -AdpAllInfo -aAll 【显示所有适配器信息】

MegaCli -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】

MegaCli -PDList -aAll 【显示所有的物理信息】

MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】

MegaCli -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】

MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】

MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】

MegaCli -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】

MegaCli -cfgdsply -aALL 【显示Raid卡型号,Raid设置,Disk相关信息】

磁带状态的变化,从拔盘,到插盘的过程中。 

Device |Normal|Damage|Rebuild|Normal

Virtual Drive |Optimal|Degraded|Degraded|Optimal

Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online

最新文章

  1. css如何实现水平居中呢?css实现水平居中的方法?
  2. U3D 动画帧事件问题
  3. 安装crab
  4. 【原】iOSCoreAnimation动画系列教程(一):CABasicAnimation【包会】
  5. IIS是如何处理ASP.NET请求的
  6. Html4与Html5的关键区别
  7. 本地存储(cookie&sessionStorage&localStorage)
  8. CentOS 6.4 安装 thrift-0.9.3
  9. Android设计模式(1)----单例模式
  10. [Effective C++ --022]将成员变量声明为private
  11. 学习笔记_第一个strut程序_之中文乱码,过滤器解决方案及过程总结
  12. Carthage&&cocopads 摘抄笔记
  13. OC基础16:复制对象
  14. hdu 4119 Isabella's Message
  15. java做单用户的多重并发会话数限制
  16. java HotSpot 内存管理白皮书
  17. JAVA之旅(十五)——多线程的生产者和消费者,停止线程,守护线程,线程的优先级,setPriority设置优先级,yield临时停止
  18. bzoj3693: 圆桌会议 二分图 hall定理
  19. 【tp5】tp5实现空模块、空控制器、空操作的页面404跳转
  20. 巧用CurrentThread.Name来统一标识日志记录(完结篇)

热门文章

  1. .NET 入门到高级路线
  2. 三种循环的区别-break语句
  3. thinkphp无法访问man.php/index/login
  4. MySQL 如何实现数据更新
  5. Linux三剑客日志处理系列
  6. ATM项目开发
  7. ARM启动顺序
  8. SpringCloud Stream消息驱动
  9. opencv::parallel_for_使用说明
  10. 2020.11.30【NOIP提高A组】模拟