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

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

CentOS下下查看硬盘型号、大小等信息(含Raid)的更多相关文章

  1. centos linux查看硬盘型号

    [root@]# smartctl --all /dev/sdasmartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.1.3.el7.x86_6 ...

  2. centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息

    centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息 rose_willow rose_willow 发布于 2016/06/16 11:32 字数 902 阅读 405 收藏 0 点赞 0 ...

  3. ]# dmesg | grep ATAcentos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息

    centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息 osc_4o5tc4xq 2019/10/11 15:03 阅读数 253 centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信 ...

  4. Linux查看硬盘型号

    Linux查看硬盘型号 -- :: 分类: 服务器与存储 请先确定服务器是否有配 RAID. 如果有RAID,请通过对应的RAID管理(监控)工具查看,例如LSI的MegaCli: # /opt/Me ...

  5. CentOS下查看最后登录的用户信息以及LOG记录

    CentOS下查看最后登录的用户信息tail /var/log/messagestail /var/log/secure 我们知道,在redhat下可以用lastlog查看各用户最后登录的信息,用la ...

  6. CentOS 7 查看硬盘情况

    用命令: lsblk                                  查看分区和磁盘 df -h                                        查看整 ...

  7. linux(centos)如何查看文件夹大小

    参考http://zhidao.baidu.com/link?url=OrfDgdHvyA1pSDAy6ql-IgPBWtvcS5AR9bc543zTr1hLIDfCd42nYtNBplAl2pHvM ...

  8. CentOS如何查看硬盘品牌型号等具体信息

    首先使用smartctl --all /dev/sda 指令来检查硬盘信息,该指令CentOS自带,得到的结果可能如下: smartctl 5.43 2012-06-30 r3573 [x86_64- ...

  9. centos查看磁盘扇区大小等信息

    fdisk -l 说明一下: “Disk /dev/sda: 53.7 GB, 53687091200 bytes” 表示第一块磁盘的大小为53.7GB. "255 heads"表 ...

  10. CentOS查看主板型号、CPU、显卡、硬盘等信息

    系统 uname -a # 查看内核/操作系统/CPU信息 head -n 1 /etc/issue # 查看操作系统版本 cat /proc/cpuinfo # 查看CPU信息 hostname # ...

随机推荐

  1. 移动 WEB 开发布局方式 ---- flex 布局

    一.flex布局体验 1.1 传统布局 flex 布局 1. 2 初体验 1. 搭建 HTML 结构 <div> <span>1</span> <span&g ...

  2. (Crack)SQL转Linq工具的使用——Linqer

    官方下载网站:http://www.sqltolinq.com/ 这是干什么用的         就是Sql语句转Linq  给不熟悉的小白用 再用Linq 转 Lambda      (用到Linq ...

  3. myatbis的一个好的封装

    package com.pj.project4sp; import org.springframework.beans.factory.annotation.Autowired; import org ...

  4. windows10环境下的RabbitMQ安装步骤

    RabbitMQ是一个在AMQP协议标准基础上完整的,可复用的企业消息系统.它遵循Mozilla Public License开源协议,采用 Erlang 实现的工业级的消息队列(MQ)服务器,Rab ...

  5. Python接口自动化测试(1)

    接口自动化测试三部曲:1.构造请求  2.判断结果  3.数据库查询 1.Python的第三方包:requests 简介:requests可以用来做接口测试.接口自动化测试.爬虫等 requests的 ...

  6. UBUNTU16.04卸载安装protobuf

    1.卸载 sudo apt-get remove libprotobuf-dev which protoc 然后删除路径即可 2.安装 sudo apt-get install autoconf au ...

  7. 调用后台接口实现Excel导出功能以及导出乱码问题解决

    实现效果 在导出表格数据的时候,通常分为两种情况 页面列表数据导出 接口返回数据导出 这里主要介绍接口返回数据导出,关于页面的列表数据导出,请看另一篇:vue3+element表格数据导出 接口返回数 ...

  8. (原创)【B4A】一步一步入门04:编译模式、打包为APK、私钥签名

    一.前言 上篇 (原创)[B4A]一步一步入门03:APP名称.图标等信息修改 中我们将APP做成了标准的样子. 本篇文章会讲解如何将程序打包成APK文件以分发,同时讲解如何制作私钥并签名APP,以用 ...

  9. K8s 网络新手教程(Kubernetes Networking Guide for Beginners)

    K8s 网络新手教程(Kubernetes Networking Guide for Beginners) 原文链接: Kubernetes Networking Guide for Beginner ...

  10. 0x05_My-OS显示字符串和任意参数

    先看看效果: 要解决两个问题,第一个如何显示字符串,printf?我之前已经说了所有的头文件都要自己写,printf是stdio里的可是我们没有stdio 我们要通过画像素点的方式显示字符串,有点像我 ...