日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

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

發(fā)布時間:2023/12/16 linux 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux下查看硬盘型号、大小等信息(含Raid) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?

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命令系統(tǒng)不自帶,需要額外下載,?

下載地址:?

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常用參數(shù)介紹?
MegaCli -adpCount 【顯示適配器個數(shù)】
MegaCli -AdpGetTime –aALL 【顯示適配器時間】
MegaCli -AdpAllInfo -aAll 【顯示所有適配器信息】
MegaCli -LDInfo -LALL -aAll 【顯示所有邏輯磁盤組信息】
MegaCli -PDList -aAll 【顯示所有的物理信息】
MegaCli -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充電狀態(tài)】
MegaCli -AdpBbuCmd -GetBbuStatus -aALL【顯示BBU狀態(tài)信息】
MegaCli -AdpBbuCmd -GetBbuCapacityInfo -aALL【顯示BBU容量信息】
MegaCli -AdpBbuCmd -GetBbuDesignInfo -aALL 【顯示BBU設(shè)計參數(shù)】
MegaCli -AdpBbuCmd -GetBbuProperties -aALL 【顯示當前BBU屬性】
MegaCli -cfgdsply -aALL 【顯示Raid卡型號,Raid設(shè)置,Disk相關(guān)信息】?

磁帶狀態(tài)的變化,從拔盤,到插盤的過程中。?
Device |Normal|Damage|Rebuild|Normal
Virtual Drive |Optimal|Degraded|Degraded|Optimal
Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online

總結(jié)

以上是生活随笔為你收集整理的linux下查看硬盘型号、大小等信息(含Raid)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。