指令 #smartctl – https://benjr.tw/95984 是透過硬碟本身所提供的 S.M.A.R.T. (Self-Monitoring Analysis and Reporting Technology )技術 ,他可以根據檢測屬性的結果來決定該顆硬碟的使用是否快故障.
我們可以透過 #smartctl 提供的參數 -t 來進行測試 https://benjr.tw/96015 . 測試環境為 Ubuntu16.04 .
但是遇到在 RAID 卡底下的硬碟無法透過 smartctl 去偵測,查了官方網站 https://www.smartmontools.org/wiki/Supported_RAID-Controllers 需要透過參數 -d 是指定 RAID 的種類.
-d 有效參數
- ata
- scsi
- sat[,auto][,N][+TYPE]
- usbcypress[,X]
- usbjmicron[,p][,x][,N]
- usbsunplus
- marvell
- RAID
- areca,N/E – Areca SATA[/SAS] RAID controller
- 3ware,N – LSI 3ware SATA RAID controller
- hpt,L/M/N – HighPoint RocketRAID SATA RAID controller
- megaraid,N – LSI MegaRAID SAS RAID controller ,Dell PERC 5/i,6/i controller
- aacraid,H,L,ID – Adaptec SAS RAID controller
- cciss,N – CCISS (HP/Compaq Smart Array Controller)
- auto
- test
不過 我的 LSI RAID 使用上還是有問題,透過 auto , test 一樣不行正確讀到硬碟的資訊.
root@ubuntu:~# smartctl -a -d megaraid,0 /dev/sdb smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-59-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org Smartctl open device: /dev/sdb [megaraid_disk_00] failed: cannot open /dev/megaraid_sas_ioctl_node or /dev/megadev0
root@ubuntu:~# smartctl -a -d auto /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: LSILOGIC Product: Logical Volume Revision: 3000 User Capacity: 145,999,527,936 bytes [145 GB] Logical block size: 512 bytes Logical Unit id: 0x600508e0000000005412da21f6329200 Device type: disk Local Time is: Tue Jan 17 16:29:19 2017 CST SMART support is: Unavailable - device lacks SMART capability. === START OF READ SMART DATA SECTION === Error Counter logging not supported Device does not support Self Test logging
root@ubuntu:~# smartctl -a -d test /dev/sdb smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org /dev/sdb: Device of type 'scsi' [SCSI] detected /dev/sdb: Device of type 'scsi' [SCSI] opened
沒有解決問題,試試搜尋本站其他內容