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

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

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

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

2、smartctl --all /dev/sda

smartctl --all /dev/sda #该命令redhat自带

[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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DELL 服务器 RAID 配置详解 "磁盘阵列可以在安装系统之前或之后产生,系统会视之为一个(大型)硬" "盘,而它具有容错及冗余的功能。磁盘阵列不单只可以加入一个现成的系" "统,它更可以支持容量扩展,方法也很简单,只需要加入一个新的硬盘并" "执行一些简单的指令,系统便可以实时利用这新加的容量。 " "·RAID 的种类及应用 " "IDE和SCSI是计算机的两种不同的接口,前者普遍用于PC机,后者一般用 " "于服务器。基于这两种接口,RAID分为两种类型:基于IDE接口的RAID应 " "用,称为IDE RAID;而基于SCSI接口的RAID应用则相应称为SCSI RAID。 " " 基于不同的架构,RAID 又可以分为: " " 软件RAID (软件 RAID) " " 硬件RAID (硬件 RAID) " " 外置RAID (External RAID) " " ·软件RAID很多情况下已经包在系统之中,并成为其中一个功 " "能,如Windows、Netware及Linux。软件RAID中的所有操作皆由中央处理 " "器负责,所以系统资源的利用率会很高,从而使系统性能降低。软件RAID" "是不需要另外添加任何硬件设备,因为它是靠你的系统——主要是中央处理" "器的功能——提供所有现成的资源。 " " " " ·硬件RAID通常是一张PCI卡,你会看到在这卡上会有处理器及内存。 " "因为这卡上的处理器已经可以提供一切RAID所需要的资源,所以不会占用" "系统资源,从而令系统的表现可以大大提升。硬件RAID可以连接内置硬盘" "、热插拔背板或外置存储设备。无论连接何种硬盘,控制权都是在RAID卡" "上,亦即是由系统所操控。在系统里,硬件RAID " "PCI卡通常都需要安驱动程序,否则系统会拒绝支持。 " " ·外置式RAID也是属于硬件RAID的一种,区别在于RAID卡不会安 " "装在系统里,而是安装在外置的存储设备内。而这个外置的储存设备则会" "连接到系统的SCSI卡上。系统没有任何的RAID功能,因为它只有一张SCSI" "卡;所有的RAID功能将会移到这个外置存储里。好处是外置的存储往往可" "以连接更多的硬盘,不会受系统机箱的大小所影响。而一些高级的技术," "如双机容错,是需要多个服务器外连到一个外置储存上,以提供容错能力" "。 " "·配置RAID磁盘阵列 " "一、 为什么要创建逻辑磁盘? " "当硬盘连接到阵列卡(RAID)上时,操作系统将不能直接看到物理的硬盘" ",因此需要创建成一个一个的被设置为RAID0,1和5等的逻辑磁盘(也叫容" "器),这样系统才能够正确识别它。 " "逻辑磁盘(Logic Drive)、容器(Container)或虚拟磁盘(Virtual " "Drive)均表示一个意思,他们只是不同阵列卡产商的不同叫法。 " "二、 创建逻辑磁盘的方式 " "使用阵列卡本身的配置工具,即阵列卡的BIOS。(一般用于重装系统或没" "有安装操作系统的情况下去创建容器(Adaptec阵列卡)/逻辑驱动器(AM" "I/LSI阵列卡)。 " "使用第三方提供的配置工具软件去实现对阵列卡的管理。如Dell Array " "Manager。(这些软件用于服务器上已经安装有操作系统) " "三、 正确识别您的阵列卡的型号(本文以Dell为例,其实都大同小异) " "识别您的磁盘阵列控制器(磁盘阵列控制器为可选项, " "如果没有购买磁盘阵列控制器的话以该步骤可以省去) " "如果您有一块Adaptec磁盘阵列控制器(PERC " "2,PERC2/SI,PERC3/SI,PERC3/DI),在系统开机自检的时候您将看到以下 " "信息: " "Dell PowerEdge Expandable RAID Controller 3/Di, BIOS V2.7-x " "[Build xxxx](c) 1998-2002 Adaptec, Inc. All Rights Reserved. " "<<< Press CTRL+A for Configuration Utility! >>> " "如果您有一块 " "AMI/LSI磁盘阵列控制器(PERC2/SC,PERC2/DC,PERC3/SC,PERC3/DC, " "PERC4/DI, PERC4/DC), 在系统开机自检的时候您将看到以下信息: " "Dell PowerEdge Expandable RAID Controller BIOS X.XX Jun 26.2001 " "Copyright (C) AMERICAN MEGATRENDS INC. " "Press CTRL+M to Run Configu

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值