答案1
如果是软件raid,看一下状态
# cat /proc/mdstat
Personalities : [raid10] [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4]
md0 : active raid10 sdb2[1] sdd2[3] sdc2[2] sda2[0]
419168112 blocks super 1.2 4K chunks 2 near-copies [4/4] [UUUU]
unused devices: <none>
获取驱动器状态和序列号:
# parallel -v smartctl -a ::: /dev/sd[abcd] | egrep '/dev/|Model:|Number:|^No Errors Logged'
smartctl -a /dev/sda
Device Model: ST500DM002-1BD142
Serial Number: Z6EDYYSG
No Errors Logged
smartctl -a /dev/sdb
Device Model: ST500DM002-1BD142
Serial Number: Z6EDYPX4
No Errors Logged
smartctl -a /dev/sdc
Device Model: ST500DM002-1BD142
Serial Number: Z6EDYY7V
No Errors Logged
smartctl -a /dev/sdd
Device Model: ST500DM002-1BD142
Serial Number: Z6EE03BR
No Errors Logged
显示内核 scsi 引导消息:
#journalctl -b-0 -tkernel | grep +A5 'scsi .* Direct-Access'
Mar 18 05:59:16 host-1 kernel: scsi 0:0:0:0: Direct-Access ATA ST500DM002-1BD14 HP74 PQ: 0 ANSI: 5
Mar 18 05:59:16 host-1 kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Mar 18 05:59:16 host-1 kernel: sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Mar 18 05:59:16 host-1 kernel: sd 0:0:0:0: [sda] 4096-byte physical blocks
Mar 18 05:59:16 host-1 kernel: sd 0:0:0:0: [sda] Write Protect is off
Mar 18 05:59:16 host-1 kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
Mar 18 05:59:16 host-1 kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 18 05:59:16 host-1 kernel: sda: sda1 sda2 sda3
--
Mar 18 05:59:16 host-1 kernel: scsi 1:0:0:0: Direct-Access ATA ST500DM002-1BD14 HP74 PQ: 0 ANSI: 5
Mar 18 05:59:16 host-1 kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
Mar 18 05:59:16 host-1 kernel: sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Mar 18 05:59:16 host-1 kernel: sd 1:0:0:0: [sdb] 4096-byte physical blocks
Mar 18 05:59:16 host-1 kernel: sd 1:0:0:0: [sdb] Write Protect is off
Mar 18 05:59:16 host-1 kernel: sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Mar 18 05:59:16 host-1 kernel: sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 18 05:59:16 host-1 kernel: sdb: sdb1 sdb2 sdb3
--
Mar 18 05:59:16 host-1 kernel: scsi 2:0:0:0: Direct-Access ATA ST500DM002-1BD14 HP74 PQ: 0 ANSI: 5
Mar 18 05:59:16 host-1 kernel: sd 2:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Mar 18 05:59:16 host-1 kernel: sd 2:0:0:0: [sdc] 4096-byte physical blocks
Mar 18 05:59:16 host-1 kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
Mar 18 05:59:16 host-1 kernel: sd 2:0:0:0: [sdc] Write Protect is off
Mar 18 05:59:16 host-1 kernel: sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
Mar 18 05:59:16 host-1 kernel: sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 18 05:59:16 host-1 kernel: sdc: sdc1 sdc2 sdc3
--
Mar 18 05:59:16 host-1 kernel: scsi 3:0:0:0: Direct-Access ATA ST500DM002-1BD14 HP74 PQ: 0 ANSI: 5
Mar 18 05:59:16 host-1 kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Mar 18 05:59:16 host-1 kernel: sd 3:0:0:0: [sdd] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Mar 18 05:59:16 host-1 kernel: sd 3:0:0:0: [sdd] 4096-byte physical blocks
Mar 18 05:59:16 host-1 kernel: sd 3:0:0:0: [sdd] Write Protect is off
Mar 18 05:59:16 host-1 kernel: sd 3:0:0:0: [sdd] Mode Sense: 00 3a 00 00
Mar 18 05:59:16 host-1 kernel: sd 3:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 18 05:59:16 host-1 kernel: sdd: sdd1 sdd2 sdd3
...或没有日记
grep +A5 'scsi .* Direct-Access' /var/log/{dmesg,kernel,boot}*