查看磁盘是否可以正常访问

[root@node-2 ~]# smartctl --scan-open
/dev/sda -d sat # /dev/sda [SAT], ATA device
/dev/sdb -d sat # /dev/sdb [SAT], ATA device
/dev/sdc -d sat # /dev/sdc [SAT], ATA device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/sde -d scsi # /dev/sde, SCSI device
/dev/bus/0 -d sat+megaraid,8 # /dev/bus/0 [megaraid_disk_08] [SAT], ATA device
/dev/bus/0 -d sat+megaraid,9 # /dev/bus/0 [megaraid_disk_09] [SAT], ATA device
/dev/bus/0 -d sat+megaraid,10 # /dev/bus/0 [megaraid_disk_10] [SAT], ATA device
/dev/bus/0 -d sat+megaraid,11 # /dev/bus/0 [megaraid_disk_11] [SAT], ATA device
/dev/bus/0 -d sat+megaraid,12 # /dev/bus/0 [megaraid_disk_12] [SAT], ATA device
/dev/bus/0 -d sat+megaraid,13 # /dev/bus/0 [megaraid_disk_13] [SAT], ATA device
# /dev/bus/0 -d megaraid,14 # /dev/bus/0 [megaraid_disk_14], SCSI device open failed: INQUIRY failed

通过smartctl --scan-open,可以查看是否有磁盘设备处于不正常状态,比如如下就是一个打开异常设备.

# /dev/bus/0 -d megaraid,14 # /dev/bus/0 [megaraid_disk_14], SCSI device open failed: INQUIRY failed

可以通过如下命令,检测改设备的异常情况

[root@node-2 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -a0
                                     
Adapter #0

Number of Virtual Disks: 2
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 446.625 GB
Is VD emulated      : Yes
Mirror Data         : 446.625 GB
State               : Degraded
Strip Size          : 256 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, 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
Bad Blocks Exist: No
PI type: No PI

Is VD Cached: No
Number of Spans: 1
Span: 0 - Number of PDs: 2

PD: 0 Information
Enclosure Device ID: 252
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 13
WWN: 55cd2e414f2139b4
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA

如上所示,缓存盘处于降级状态,可能是缓存盘插拔后出现的问题

你可能感兴趣的:(查看磁盘是否可以正常访问)