It is easy to install smartmontools on Citrix XenServer (see this article for instructions), but that smartmontools release is somewhat dated and does not support recent RAID controllers such as the LSI/3ware 9750 family of RAID controllers. When executed, the following error message is returned:
# smartctl -a -d 3ware,1 /dev/twl0
So I have created a new smartmontools package which can be installed on Citrix XenServer and which is based on the latest smartmontools release 5.42. The RPM package has been compiled under CentOS 5.7 and it installs in CentOS 5, Citrix XenServer (which is based on CentOS 5), RedHat and probably many other distributions similar to CentOS and RedHat.
smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
WARNING - NO DEVICE FOUND ON 3WARE CONTROLLER (disk 1)
Note: /dev/sdX many need to be replaced with /dev/tweN or /dev/twaN
Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Download the smartmontools 5.42 RPM package
Download the corresponding smartmontools 5.42 source package
Installation
Run the commands below on the Citrix XenServer console:
wget http://www.schirmacher.de/download/attachments/36012250/smartmontools-5.42-1.i386.rpm
wget http://vault.centos.org/5.4/os/i386/CentOS/mailx-8.1.1-44.2.2.i386.rpm
rpm -hiv smartmontools-5.42-1.i386.rpm mailx-8.1.1-44.2.2.i386.rpm
Preparing... ########################################### [100%]
1:mailx ########################################### [ 50%]
2:smartmontools ########################################### [100%]
To update smartmontools, run rpm -U smartmontools-5.42-1.i386.rpm
only.
Checking the RAID controller status
When issuing a standard status command such as smartctl -a /dev/sda
, smartctl returns the status of the LSI 9750 RAID controller:
# smartctl -a /dev/sda
smartctl 5.42 2011-10-20 r3458 [i686-linux-2.6.32.12-0.7.1.xs6.0.0.529.170661xen] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Vendor: LSI
Product: 9750-4i DISK
Revision: 5.12
User Capacity: 249,988,907,008 bytes [249 GB]
Logical block size: 512 bytes
Logical Unit id: 0x600050e0f9f62a006aa60000379c0000
Serial number: R011DA355F4CA
Device type: disk
Local Time is: Thu Dec 29 11:32:04 2011 CET
Device supports SMART and is Disabled
Temperature Warning Disabled or Not Supported
SMART Health Status: OK
Error Counter logging not supported
Device does not support Self Test logging
Checking the status of disks in the RAID array
To retrieve the status of one of the disks in the RAID array, we have to specify the RAID controller and the device number of the disk, for example smartctl -a -d 3ware,1 /dev/twl0
. This will return the status of disk #1 connected to the controller #0 .
The devices /dev/twl*
will be created by smartctl if they do not exist.
# smartctl -a -d 3ware,0 /dev/twl0
smartctl 5.42 2011-10-20 r3458 [i686-linux-2.6.32.12-0.7.1.xs6.0.0.529.170661xen] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Western Digital RE4 Serial ATA
Device Model: WDC WD2503ABYX-01WERA0
Serial Number: WD-WMAYR324822324
LU WWN Device Id: 5 0014ee 0ad6f4641
Firmware Version: 01.01S01
User Capacity: 251,059,544,064 bytes [251 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Dec 29 11:43:20 2011 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 4080) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 46) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 17
3 Spin_Up_Time 0x0027 143 143 021 Pre-fail Always - 3808
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 10
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 96
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 9
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 8
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 1
194 Temperature_Celsius 0x0022 120 108 000 Old_age Always - 23
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 9
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 74 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Additional configuration
For additional information on how to configure smartmontools on XenServer, see Install smartmontools on Citrix XenServer.
4 Comments
Anonymous
This is what I'm receiving
smartctl -a -d 3ware,1 /dev/twl0
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-408.el5.lve0.8.58] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Smartctl: Device Read Identity Failed: Input/output error
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
Anonymous
smartctl 5.42 2011-10-20 r3458 [i686-linux-2.6.18-308.13.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
No major number for /dev/twl listed in /proc/devices. Is the 3w-sas driver loaded?
Smartctl open device: /dev/twl [3ware_disk_00] failed: setup_3ware_nodes("twl", "3w-sas") failed
Anonymous
smartctl 5.42 2011-10-20 r3458 [i686-linux-2.6.18-308.13.1.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
No major number for /dev/twl listed in /proc/devices. Is the 3w-sas driver loaded?
Smartctl open device: /dev/twl [3ware_disk_00] failed: setup_3ware_nodes("twl", "3w-sas") failed
i am getting can i help to fix it.......
my mail id is motoskia@gmail.com
Administrator
Please try to install and use the linux command line tools on the driver CD which came with your RAID controller card. This should take care of installing the required device drivers, creating files under /dev/... etc.