CentOS下下查看硬盘型号、大小等信息(含Raid)
一、普通模式(该机硬盘没有做磁盘阵列)
1、fdisk -l 查看你的硬盘编号,如sda,sdb 等
2、smartctl --all /dev/sda
- smartctl --all /dev/sda #该命令centos自带
- [root@localhost ~]# smartctl --all /dev/sda
- smartctl 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 INFORMATION SECTION ===
- Device Model: SanDisk SD6SB1M128G1022I
- Serial Number: 141218410909
- LU WWN Device Id: 5 001b44 becdaed9d
- Firmware Version: X231600
- User Capacity: 128,035,676,160 bytes [128 GB]
- Sector Size: 512 bytes logical/physical
- Device is: Not in smartctl database [for details use: -P showall]
- ATA Version is: 8
- ATA Standard is: ATA-8-ACS revision 6
- Local Time is: Fri Jan 16 08:35:48 2015 CST
- SMART support is: Available - device has SMART capability.
- 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
- [root@localhost bin]# /opt/MegaRAID/MegaCli/MegaCli64 -PDlist -aALL
- Adapter #0
- Enclosure Device ID: 32
- Slot Number: 0
- Drive's position: DiskGroup: 0, Span: 0, Arm: 0
- Enclosure position: 1
- Device Id: 0
- WWN: 50000C0F02E57BE9
- 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: 279.396 GB [0x22ecb25c Sectors]
- Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
- Coerced Size: 278.875 GB [0x22dc0000 Sectors]
- Sector Size: 0
- Firmware state: Online, Spun Up
- Device Firmware Level: D1S6
- Shield Counter: 0
- Successful diagnostics completion on : N/A
- SAS Address(0): 0x50000c0f02e57bea
- SAS Address(1): 0x0
- Connected Port Number: 0(path0)
- Inquiry Data: WD WD3001BKHG D1S6WX11E83NU249
- 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: Hard Disk Device
- Drive Temperature :31C (87.80 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
- Port-1 :
- Port status: Active
- Port's Linkspeed: Unknown
- Drive has flagged a S.M.A.R.T alert : No
- Enclosure Device ID: 32
- Slot Number: 1
- Drive's position: DiskGroup: 0, Span: 0, Arm: 1
- Enclosure position: 1
- Device Id: 1
- WWN: 50000C0F028F32ED
- 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: 279.396 GB [0x22ecb25c Sectors]
- Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
- Coerced Size: 278.875 GB [0x22dc0000 Sectors]
- Sector Size: 0
- Firmware state: Online, Spun Up
- Device Firmware Level: D1S6
- Shield Counter: 0
- Successful diagnostics completion on : N/A
- SAS Address(0): 0x50000c0f028f32ee
- SAS Address(1): 0x0
- Connected Port Number: 1(path0)
- Inquiry Data: WD WD3001BKHG D1S6WX11E83VD242
- 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: Hard Disk Device
- Drive Temperature :31C (87.80 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
- Port-1 :
- Port status: Active
- Port's Linkspeed: Unknown
- Drive has flagged a S.M.A.R.T alert : No
- Enclosure Device ID: 32
- Slot Number: 2
- Drive's position: DiskGroup: 0, Span: 0, Arm: 2
- Enclosure position: 1
- Device Id: 2
- WWN: 50000C0F02E5B8ED
- 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: 279.396 GB [0x22ecb25c Sectors]
- Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
- Coerced Size: 278.875 GB [0x22dc0000 Sectors]
- Sector Size: 0
- Firmware state: Online, Spun Up
- Device Firmware Level: D1S6
- Shield Counter: 0
- Successful diagnostics completion on : N/A
- SAS Address(0): 0x50000c0f02e5b8ee
- SAS Address(1): 0x0
- Connected Port Number: 2(path0)
- Inquiry Data: WD WD3001BKHG D1S6WX11E83NU081
- 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: Hard Disk Device
- Drive Temperature :28C (82.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
- Port-1 :
- Port status: Active
- Port's Linkspeed: Unknown
- Drive has flagged a S.M.A.R.T alert : No
- 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)的更多相关文章
- 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 ...
- centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息
centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息 rose_willow rose_willow 发布于 2016/06/16 11:32 字数 902 阅读 405 收藏 0 点赞 0 ...
- ]# dmesg | grep ATAcentos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息
centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息 osc_4o5tc4xq 2019/10/11 15:03 阅读数 253 centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信 ...
- Linux查看硬盘型号
Linux查看硬盘型号 -- :: 分类: 服务器与存储 请先确定服务器是否有配 RAID. 如果有RAID,请通过对应的RAID管理(监控)工具查看,例如LSI的MegaCli: # /opt/Me ...
- CentOS下查看最后登录的用户信息以及LOG记录
CentOS下查看最后登录的用户信息tail /var/log/messagestail /var/log/secure 我们知道,在redhat下可以用lastlog查看各用户最后登录的信息,用la ...
- CentOS 7 查看硬盘情况
用命令: lsblk 查看分区和磁盘 df -h 查看整 ...
- linux(centos)如何查看文件夹大小
参考http://zhidao.baidu.com/link?url=OrfDgdHvyA1pSDAy6ql-IgPBWtvcS5AR9bc543zTr1hLIDfCd42nYtNBplAl2pHvM ...
- CentOS如何查看硬盘品牌型号等具体信息
首先使用smartctl --all /dev/sda 指令来检查硬盘信息,该指令CentOS自带,得到的结果可能如下: smartctl 5.43 2012-06-30 r3573 [x86_64- ...
- centos查看磁盘扇区大小等信息
fdisk -l 说明一下: “Disk /dev/sda: 53.7 GB, 53687091200 bytes” 表示第一块磁盘的大小为53.7GB. "255 heads"表 ...
- CentOS查看主板型号、CPU、显卡、硬盘等信息
系统 uname -a # 查看内核/操作系统/CPU信息 head -n 1 /etc/issue # 查看操作系统版本 cat /proc/cpuinfo # 查看CPU信息 hostname # ...
随机推荐
- Java语言的跨平台性-JDK,JRE和JVM
Java语言的跨平台性 1 Java虚拟机--JVM JVM(Java Virtual Machine ):Java虚拟机,简称JVM,是运行所有Java程序的假想计算机,是Java程序的 运行环境, ...
- 我为什么要放弃RESTful,选择拥抱GraphQL
背景 REST作为一种现代网络应用非常流行的软件架构风格,自从Roy Fielding博士在2000年他的博士论文中提出来到现在已经有了20年的历史.它的简单易用性,可扩展性,伸缩性受到广大Web开发 ...
- 05安装一个Hadoop分布式集群
安装一个Hadoop分布式集群 最小化的Hadoop已经可以满足学习过程中大部分需求,但是为了研究Hadoop集群运行机制,部署一个类生产的环境还是有必要的.因为集群机器比较少,笔者没有配置ssh,所 ...
- 《Terraform 101 从入门到实践》 第二章 Providers插件管理
<Terraform 101 从入门到实践>这本小册在南瓜慢说官方网站和GitHub两个地方同步更新,书中的示例代码也是放在GitHub上,方便大家参考查看. 不怕出身低,行行出状元. 插 ...
- c++ stl 详解 csp备考
最近在准备csp认证考试,打算使用c++语言,以下是关于c++ stl库的内容: algorithm概览(作者:当格子衫爱上Helloworld) stl库详解(作者:c语言中文网) https:// ...
- Spring 01 统一资源加载策略 Resource和ResourceLoader
转:https://www.cnblogs.com/loveLands/articles/10797772.html 1 Resource统一资源 1.1 简介 处理外部资源是很繁琐的事情,我们可能需 ...
- 使用花生壳进行内网穿透实验SQLserver
在一次编写软件的过程中,想让远在河南的同学对试一试,但是他的电脑上没有与之对应的SQL数据库不能便不能够运行软件.于是我想到了远程连接.在使用花生壳的时候,遇到了一些问题,然而网络上并没有与之对应的解 ...
- 基于NPOI封装导出Excel方法
背景: 在工作中我们有一个很常见的业务场景:导出列表的数据,生成Excel,而使用NPOI生成Excel我们也会遇到一个问题,每遇到一个不同的类导出时都要生成不同的表头,行,列,但其实里面大部分代码都 ...
- 来了!来了!国内使用chatGPT的方式总结
大家好,最近ChatGPT大火呀. 最近几天OpenAI发布的ChatGPT聊天机器人火出天际了,连着上了各个平台的热搜榜. 这个聊天机器人最大的特点是不仅可以模仿人类说话风格同时回答大量问题,能和你 ...
- CF1250C Trip to Saint Petersburg
题目传送门 思路 线段树入门题. 不妨固定一个右端点 \(r\),把所有右端点小于 \(r\) 的区间都在 \(1\) 至此区间的左端点处 update 一个 \(p\),然后每次都给区间 \(1\) ...