centos7.x安装服务器查看硬件信息命令(如:硬盘、raid)
# ls MegaCli8.07.10.tar.gz
MegaCli8.07.10.tar.gz
# tar -zxf MegaCli8.07.10.tar.gz
# cd MegaCli8.07.10
# ls
Linux WINDOWS
# cd Linux/
# ls
Lib_Utils-1.00-09.noarch.rpm MegaCli-8.02.21-1.noarch.rpm readme.txt Run-Linux-PERC.sh
# rpm -ivh *.rpm
# ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/bin/
# MegaCli64 -PDList -aALL |egrep "PD Type|Size|Media Type"
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Media Type: Solid State Device
# MegaCli64 -PDList -aALL |egrep "PD Type|Size|Device" #查看硬盘的类型
Enclosure Device ID: 32
Device Id: 0
PD Type: SAS #SAS硬盘
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 1
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 2
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 3
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 4
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 5
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 6
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 7
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 8
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
Enclosure Device ID: 32
Device Id: 9
PD Type: SAS
Raw Size: 1.455 TB [0xba4d4ab0 Sectors]
Non Coerced Size: 1.454 TB [0xba3d4ab0 Sectors]
Coerced Size: 1.454 TB [0xba3c0000 Sectors]
Device Firmware Level: B01C
Device Speed: 12.0Gb/s
Media Type: Solid State Device
1).查看一共几块物理硬盘:
# MegaCli64 -LdPdInfo -a0 -Nolog | grep -E "Virtual Drive:|Slot Number:" | xargs | sed -r 's/(Slot Number:)(\s[0-9]+)/\2,/g' | sed 's/(Target Id: .)/Physical Drives ids:/g' | sed 's/Virtual Drive:/\nVirtual Drive:/g'
Virtual Drive: 0 Physical Drives ids: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
2).查看raid级别、磁盘单块容量和总容量:
# MegaCli64 -LDInfo -Lall -aALL
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3
Size : 13.093 TB #做成raid后的总磁盘容量
Parity Size : 1.454 TB #单块物理磁盘容量
State : Optimal
Strip Size : 64 KB
Number Of Drives : 10
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: No
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No
Exit Code: 0x00
Linux服务器硬盘种类:
Linux中常用的硬盘类型及其特点简介 (linux 硬盘类型)-数据库运维技术服务
Linux服务器硬盘种类:
1). SATA硬盘
SATA(Serial Advanced Technology Attachment)硬盘是一种串行接口硬盘,它代替了以前的Idea接口硬盘。SATA硬盘的更大特点是传输速度快,数据传输速度可以达到6GB/s。同时,SATA硬盘的安装和拆卸也非常方便,只需要通过SATA数据线和SATA电源线连接即可。
2). SCSI硬盘
SCSI(Small Computer System Interface)硬盘是一种高端硬盘,适用于需要大量数据传输的场合,如服务器和工作站。SCSI硬盘的传输速度快,同时支持多个设备的并联。此外,SCSI硬盘还有着较高的运行稳定性和可靠性。
3). SAS硬盘
SAS(Serial Attachted SCSI)硬盘是一种高性能的硬盘,它将SCSI接口与SATA接口相结合。SAS硬盘的传输速度快,同时还可支持多个设备的并联。此外,SAS硬盘还有着较高的安全性和容错性,可以保证数据的安全性和完整性。
4). IDE硬盘
IDE(Integrated Drive Electronics)硬盘是一种传输速度较慢的硬盘,通常用于家庭和办公环境中。与SATA硬盘不同,IDE硬盘需要通过IDE数据线和IDE电源线进行连接。虽然IDE硬盘的传输速度较慢,但其价格相对较便宜,适合一般用户使用。
5). SSD硬盘
SSD(Solid State Drive)硬盘是一种采用闪存芯片作为存储介质的硬盘,与机械硬盘相比,SSD硬盘的传输速度更快,能够提供更高的读写性能。此外,SSD硬盘还有着较高的耐用性和可靠性,可以支持较长时间的使用。