|
From: Martin v. d. N. <ma...@ra...> - 2011-10-21 02:19:27
|
Hi everyone, Recently I found a locally available CF card from Swissbit that supports S.M.A.R.T. I tried it out in an x86 machine running OpenBSD that also has an on-board CF slot. Using the OpenBSD tool atactl I accessed the SMART features without problem. Neat. That proved to me the CF supports SMART. One project I'm working on involves Eurotech Viper industrial single board computers running Linux. They also have an on-board CF slot that under Linux is recognised as /dev/hda. I was keen to try out smartmontools to see if the SMART was supported under Linux on these machines. The processor on this SBC is ARM-based; a PXA255 for which I have x86 cross-compilers. I compiled smartmontools 5.41 on my desktop PC using the arm cross compiler. I put it onto the Viper, but alas it gives me some grief when I try to read SMART info: root@viper root# ./smartctl -a /dev/hda smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-2.4.26-vrs1-pxa1-arcom3-1-viper] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Device Model: SFCF2048H3BK2SA-I-D0-513-STD Serial Number: 000060041373A300000F Firmware Version: 080905 User Capacity: 2,048,901,120 bytes [2.04 GB] Sector Size: 512 bytes logical/physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 5 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Fri Oct 21 14:24:30 2011 NZDT SMART support is: Unavailable - Packet Interface Devices [this device: Write-once (optical disk)] don't support ATA SMART A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. root@viper root# Hmm, this is not an optical disk! I tried adding -T permissive, and things started to look better: root@viper root# ./smartctl -a -T permissive /dev/hda smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-2.4.26-vrs1-pxa1-arcom3-1-viper] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Device Model: SFCF2048H3BK2SA-I-D0-513-STD Serial Number: 000060041373A300000F Firmware Version: 080905 User Capacity: 2,048,901,120 bytes [2.04 GB] Sector Size: 512 bytes logical/physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 5 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Fri Oct 21 14:27:11 2011 NZDT SMART support is: Unavailable - Packet Interface Devices [this device: Write-once (optical disk)] don't support ATA SMART SMART Disabled. Use option -s with argument 'on' to enable it. root@viper root# At this point I thought oh good, let's enable it: root@viper root# ./smartctl -s on -T permissive /dev/hda smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-2.4.26-vrs1-pxa1-arcom3-1-viper] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net SMART support is: Unavailable - Packet Interface Devices [this device: Write-once (optical disk)] don't support ATA SMART === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enabled. root@viper root# Oh, that's not looking very promising. So I played around some more: root@viper root# ./smartctl -a -s on -T permissive /dev/hda smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-2.4.26-vrs1-pxa1-arcom3-1-viper] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Device Model: SFCF2048H3BK2SA-I-D0-513-STD Serial Number: 000060041373A300000F Firmware Version: 080905 User Capacity: 2,048,901,120 bytes [2.04 GB] Sector Size: 512 bytes logical/physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 5 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Fri Oct 21 14:30:04 2011 NZDT SMART support is: Unavailable - Packet Interface Devices [this device: Write-once (optical disk)] don't support ATA SMART === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enabled. === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Total time to complete Offline data collection: ( 0) seconds. Offline data collection capabilities: (0x00) Offline data collection not supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x00) Error logging NOT supported. No General Purpose Logging support. SMART Attributes Data Structure revision number: 4 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 196 Reallocated_Event_Count 0x0003 100 164 000 Pre-fail Always - 41984 (41984, 41984) 229 Unknown_Attribute 0x0003 000 153 000 Pre-fail Always - 110 203 Run_Out_Cancel 0x0002 100 001 000 Old_age Always - 0 204 Soft_ECC_Correction 0x0002 100 001 000 Old_age Always - 0 199 UDMA_CRC_Error_Count 0x0002 100 000 000 Old_age Always - 0 232 Available_Reservd_Space 0x0002 100 142 000 Old_age Always - 81601 SMART Error Log not supported SMART Self-test Log not supported Device does not support Selective Self Tests/Logging root@viper root# Erm, that looks kind of positive, but then if I check the device health: root@viper root# ./smartctl -H -T permissive /dev/hda smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-2.4.26-vrs1-pxa1-arcom3-1-viper] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net SMART support is: Unavailable - Packet Interface Devices [this device: Write-once (optical disk)] don't support ATA SMART SMART Disabled. Use option -s with argument 'on' to enable it. root@viper root# Then it tells me that SMART is disabled. Hmm. I read somewhere about producing debugging output, that may prove useful: root@viper root# ./smartctl -r ioctl,2 -T permissive -a /dev/hda smartctl 5.41 2011-06-09 r3365 [armv5tel-linux-2.4.26-vrs1-pxa1-arcom3-1-viper] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net REPORT-IOCTL: Device=/dev/hda Command=IDENTIFY DEVICE Input: FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xec IN REPORT-IOCTL: Device=/dev/hda Command=IDENTIFY DEVICE returned -1 errno=5 [Input/output error] ===== [IDENTIFY DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| ===== [IDENTIFY DEVICE] DATA END (512 Bytes) ===== REPORT-IOCTL: Device=/dev/hda Command=IDENTIFY PACKET DEVICE Input: FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xa1 IN REPORT-IOCTL: Device=/dev/hda Command=IDENTIFY PACKET DEVICE returned 0 ===== [IDENTIFY PACKET DEVICE] DATA START (BASE-16) ===== 000-015: 8a 84 82 0f 00 00 10 00 00 00 00 02 3f 00 3d 00 |............?.=.| 016-031: e0 0f 00 00 30 30 30 30 30 36 34 30 33 31 33 37 |....000006403137| 032-047: 33 41 30 30 30 30 46 30 02 00 02 00 04 00 38 30 |3A0000F0......80| 048-063: 39 30 35 30 20 20 46 53 46 43 30 32 38 34 33 48 |9050 FSFC02843H| 064-079: 4b 42 53 32 2d 41 2d 49 30 44 35 2d 33 31 53 2d |KBS2-A-I0D5-31S-| 080-095: 44 54 20 20 20 20 20 20 20 20 20 20 20 20 02 80 |DT ..| 096-111: 00 00 00 0e 00 00 00 02 00 00 07 00 82 0f 10 00 |................| 112-127: 3f 00 e0 0f 3d 00 02 01 e0 0f 3d 00 00 00 00 00 |?...=.....=.....| 128-143: 03 00 00 00 00 00 78 00 78 00 00 00 00 00 00 00 |......x.x.......| 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 160-175: 20 00 00 00 08 74 04 50 00 40 09 74 04 10 00 40 | ....t.P.@.t...@| 176-191: 00 00 00 00 00 00 00 00 00 00 00 60 00 00 00 00 |...........`....| 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 256-271: 00 00 00 00 38 30 39 30 35 30 35 62 8a 84 5a 04 |....8090505b..Z.| 272-287: 39 73 31 66 62 2e 00 35 00 00 00 00 39 73 31 70 |9s1fb..5....9s1p| 288-303: 62 2e 00 35 00 00 00 00 39 61 31 69 62 2e 00 35 |b..5....9a1ib..5| 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 320-335: 64 a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |d...............| 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 14 |................| ===== [IDENTIFY PACKET DEVICE] DATA END (512 Bytes) ===== === START OF INFORMATION SECTION === Device Model: SFCF2048H3BK2SA-I-D0-513-STD Serial Number: 000060041373A300000F Firmware Version: 080905 User Capacity: 2,048,901,120 bytes [2.04 GB] Sector Size: 512 bytes logical/physical Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 5 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Fri Oct 21 14:42:54 2011 NZDT SMART support is: Unavailable - Packet Interface Devices [this device: Write-once (optical disk)] don't support ATA SMART SMART Disabled. Use option -s with argument 'on' to enable it. root@viper root# SMART support for the CF on these computers would be extremely useful and I'm very interested in getting this working. Any help would be greatly appreciated! -Martin -- R A Ward Ltd. | We take the privacy of our customers seriously. Christchurch | All sensitive E-Mail attachments MUST be encrypted. New Zealand |