首页 > 系统相关 >CentOS下下查看硬盘型号、大小等信息(含Raid)

CentOS下下查看硬盘型号、大小等信息(含Raid)

时间:2023-01-04 16:46:10浏览次数:38  
标签:Raid CentOS MegaCli 下下 No Drive Number Device Port

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

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.   
  5. === START OF INFORMATION SECTION ===  
  6. Device Model:     SanDisk SD6SB1M128G1022I  
  7. Serial Number:    141218410909  
  8. LU WWN Device Id: 5 001b44 becdaed9d  
  9. Firmware Version: X231600  
  10. User Capacity:    128,035,676,160 bytes [128 GB]  
  11. Sector Size:      512 bytes logical/physical  
  12. Device is:        Not in smartctl database [for details use: -P showall]  
  13. ATA Version is:   8  
  14. ATA Standard is:  ATA-8-ACS revision 6  
  15. Local Time is:    Fri Jan 16 08:35:48 2015 CST  
  16. SMART support is: Available - device has SMART capability.  
  17. 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.   
  3. Adapter #0  
  4.   
  5. Enclosure Device ID: 32  
  6. Slot Number: 0  
  7. Drive's position: DiskGroup: 0, Span: 0, Arm: 0  
  8. Enclosure position: 1  
  9. Device Id: 0  
  10. WWN: 50000C0F02E57BE9  
  11. Sequence Number: 2  
  12. Media Error Count: 0  
  13. Other Error Count: 0  
  14. Predictive Failure Count: 0  
  15. Last Predictive Failure Event Seq Number: 0  
  16. PD Type: SAS  
  17.   
  18. Raw Size: 279.396 GB [0x22ecb25c Sectors]  
  19. Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]  
  20. Coerced Size: 278.875 GB [0x22dc0000 Sectors]  
  21. Sector Size:  0  
  22. Firmware state: Online, Spun Up  
  23. Device Firmware Level: D1S6  
  24. Shield Counter: 0  
  25. Successful diagnostics completion on :  N/A  
  26. SAS Address(0): 0x50000c0f02e57bea  
  27. SAS Address(1): 0x0  
  28. Connected Port Number: 0(path0)  
  29. Inquiry Data: WD      WD3001BKHG      D1S6WX11E83NU249  
  30. FDE Capable: Not Capable  
  31. FDE Enable: Disable  
  32. Secured: Unsecured  
  33. Locked: Unlocked  
  34. Needs EKM Attention: No  
  35. Foreign State: None  
  36. Device Speed: 6.0Gb/s  
  37. Link Speed: 6.0Gb/s  
  38. Media Type: Hard Disk Device  
  39. Drive Temperature :31C (87.80 F)  
  40. PI Eligibility:  No  
  41. Drive is formatted for PI information:  No  
  42. PI: No PI  
  43. Port-0 :  
  44. Port status: Active  
  45. Port's Linkspeed: 6.0Gb/s  
  46. Port-1 :  
  47. Port status: Active  
  48. Port's Linkspeed: Unknown  
  49. Drive has flagged a S.M.A.R.T alert : No  
  50.   
  51.   
  52.   
  53. Enclosure Device ID: 32  
  54. Slot Number: 1  
  55. Drive's position: DiskGroup: 0, Span: 0, Arm: 1  
  56. Enclosure position: 1  
  57. Device Id: 1  
  58. WWN: 50000C0F028F32ED  
  59. Sequence Number: 2  
  60. Media Error Count: 0  
  61. Other Error Count: 0  
  62. Predictive Failure Count: 0  
  63. Last Predictive Failure Event Seq Number: 0  
  64. PD Type: SAS  
  65.   
  66. Raw Size: 279.396 GB [0x22ecb25c Sectors]  
  67. Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]  
  68. Coerced Size: 278.875 GB [0x22dc0000 Sectors]  
  69. Sector Size:  0  
  70. Firmware state: Online, Spun Up  
  71. Device Firmware Level: D1S6  
  72. Shield Counter: 0  
  73. Successful diagnostics completion on :  N/A  
  74. SAS Address(0): 0x50000c0f028f32ee  
  75. SAS Address(1): 0x0  
  76. Connected Port Number: 1(path0)  
  77. Inquiry Data: WD      WD3001BKHG      D1S6WX11E83VD242  
  78. FDE Capable: Not Capable  
  79. FDE Enable: Disable  
  80. Secured: Unsecured  
  81. Locked: Unlocked  
  82. Needs EKM Attention: No  
  83. Foreign State: None  
  84. Device Speed: 6.0Gb/s  
  85. Link Speed: 6.0Gb/s  
  86. Media Type: Hard Disk Device  
  87. Drive Temperature :31C (87.80 F)  
  88. PI Eligibility:  No  
  89. Drive is formatted for PI information:  No  
  90. PI: No PI  
  91. Port-0 :  
  92. Port status: Active  
  93. Port's Linkspeed: 6.0Gb/s  
  94. Port-1 :  
  95. Port status: Active  
  96. Port's Linkspeed: Unknown  
  97. Drive has flagged a S.M.A.R.T alert : No  
  98.   
  99.   
  100.   
  101. Enclosure Device ID: 32  
  102. Slot Number: 2  
  103. Drive's position: DiskGroup: 0, Span: 0, Arm: 2  
  104. Enclosure position: 1  
  105. Device Id: 2  
  106. WWN: 50000C0F02E5B8ED  
  107. Sequence Number: 2  
  108. Media Error Count: 0  
  109. Other Error Count: 0  
  110. Predictive Failure Count: 0  
  111. Last Predictive Failure Event Seq Number: 0  
  112. PD Type: SAS  
  113.   
  114. Raw Size: 279.396 GB [0x22ecb25c Sectors]  
  115. Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]  
  116. Coerced Size: 278.875 GB [0x22dc0000 Sectors]  
  117. Sector Size:  0  
  118. Firmware state: Online, Spun Up  
  119. Device Firmware Level: D1S6  
  120. Shield Counter: 0  
  121. Successful diagnostics completion on :  N/A  
  122. SAS Address(0): 0x50000c0f02e5b8ee  
  123. SAS Address(1): 0x0  
  124. Connected Port Number: 2(path0)  
  125. Inquiry Data: WD      WD3001BKHG      D1S6WX11E83NU081  
  126. FDE Capable: Not Capable  
  127. FDE Enable: Disable  
  128. Secured: Unsecured  
  129. Locked: Unlocked  
  130. Needs EKM Attention: No  
  131. Foreign State: None  
  132. Device Speed: 6.0Gb/s  
  133. Link Speed: 6.0Gb/s  
  134. Media Type: Hard Disk Device  
  135. Drive Temperature :28C (82.40 F)  
  136. PI Eligibility:  No  
  137. Drive is formatted for PI information:  No  
  138. PI: No PI  
  139. Port-0 :  
  140. Port status: Active  
  141. Port's Linkspeed: 6.0Gb/s  
  142. Port-1 :  
  143. Port status: Active  
  144. Port's Linkspeed: Unknown  
  145. Drive has flagged a S.M.A.R.T alert : No  
  146.   
  147.   
  148.   
  149.   
  150. 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

标签:Raid,CentOS,MegaCli,下下,No,Drive,Number,Device,Port
From: https://www.cnblogs.com/augusite/p/17025296.html

相关文章

  • centos 7 Prometheus+Grafana 监控主机
    前言:本文介绍Prometheus对接Grafana对主机进行监控Prometheus部署参考https://www.cnblogs.com/windle/p/16932216.html一、前置环境说明1、关闭firewallsystemctl......
  • 【服务器数据恢复】机房断电导致服务器raid模块损坏,raid5磁盘阵列崩溃,服务器不可用的
    服务器数据恢复环境:某品牌服务器,12块硬盘组成raid5磁盘阵列,存储普通文件。服务器故障:机房供电不稳定导致服务器断电,管理员重启服务器后发现服务器无法正常使用。根据用......
  • centos.7.6.1810
    最近在玩国产化系统,采用华为国产服务器,但是系统依旧采用centos,费劲找了很多网址都没有想用的版本我这里是用centos7.6.1810版本,提供下载地址,可以参考下:https://archive.k......
  • CentOS7重启selinux
    1查看selinux状态[root@localhost~]#sestatusSELinuxstatus:disabled2关闭零时关闭[root@localhost~]#setenforcesetenforce:SELinuxisdisabled永久关闭......
  • Linux(centos7)开机命令行字符欢迎界面修改显示IP
    Linux有两个公告栏:1.登录前显示的“公告栏”配置文件/etc/issue ;2.登录后显示的“布告栏”文件 /etc/motd即messageoftoday(布告栏信息)这两个是普通文件,是程序,所......
  • 面对Centos7系统的openssl版本升级
    CentOS7的版本系统,默认的OpenSSL的版本为OpenSSL1.0.2k-fips26Jan2017。但是openssl需要的版本需要较高的版本。通过下载最新的openssl版本。对openssl进行升级。1.查......
  • go get / go install 配置系统代理(centos 7)
    在goget或者goinstall时,代理报错,比如proxyconnecttcp:dialtcp:lookup3128:nosuchhostdialtcp:lookup proxy.golang.com.cn on8.8.4.4:53:readudp192......
  • 硬盘RAID技术
    RAID的等级根据运用或组合运用这三种技术的策略和架构,可以把RAID分为不同的等级,以满足不同数据应用的需求。业界公认的标准是RAID0~RAID5。实际应用领域中使用最多......
  • Centos7离线安装Mysql8(rpm安装)
    1.下载:        官网下载: MySQL::DownloadMySQLCommunityServer2.解压将下载好的tar文件放到centos中,目录文件夹名称自定义,解压后得到:[root@localhost......
  • CentOS7源码安装redis6
    CentOS7源码安装redis61.下载源码包[root@localhost~]#wgethttps://download.redis.io/releases/redis-6.2.8.tar.gz2.安装依赖 redis6需要gcc高版本[root@lo......