View unanswered posts | View active topics It is currently Thu Dec 14, 2017 5:16 am



Reply to topic  [ 2 posts ] 
 SMART monitoring with ESXi 4.1 
Author Message

Joined: Sun Mar 14, 2010 10:52 am
Posts: 3
Reply with quote
Post SMART monitoring with ESXi 4.1
Hi,

After shuffling through several different controller cards trying to find some way to monitor the health status of disks in a RAID array under ESXi, I finally came up with this little hack. I've created an oem.tgz that includes smartd, smartctl, and mail binaries. This works for the disks behind my HP P400 controller, but not quite for the ones behind my 3ware 9650se. The problem with the 3ware controller appears to be due to differences between the way the device nodes are created in ESXi and the way smartctl/smartd expects to see them. I also found the latest smartmontools (5.39.1) is required for smartd to work correctly with the cciss devices. Compiling smartmontools was pretty straightforward, I just needed to compile without selinux. I'm attaching the spec file for the src rpm that I used to build it. Mailx, on the other hand was a little more complicated. Mailx doesn't build with standard automake, autoconf, etc. configs. The only way that I could get it to compile without linking against libselinux, libgssapi_krb5, etc. was to actually delete those libraries on the build host (which broke the build host altogether), so I don't have a src rpm for it, and I can't make any guarantees about it's behavior. If anyone can get a cleaner compile I'd be interested to hear how.

Anyway, I'm attaching an oem.tgz that includes the binaries as well as /etc/nail.rc for setting the mailx options for connecting to an ISP smtp server. You'll need to edit this file with the appropriate values. I'm not sure if this stripped down mailx will support various authentication options, but I can confirm that it does work with verizon. Also, smartd is configured to run daily, but this can be changed in /etc/init.d/smartd. Otherwise smartd is configured via /etc/smartd.conf as usual. Once you've dropped in the oem.tgz, the only other thing that needs to be done is to log into the ESXi host and run 'chkconfig --add smartd' (which does get preserved across reboots).

-brian


Attachments:
smartmontools-5.39.1.spec.tar [10 KiB]
Downloaded 246 times
oem.tgz [1.01 MiB]
Downloaded 293 times
Mon Aug 23, 2010 7:13 pm
Profile

Joined: Sun Apr 24, 2011 5:08 am
Posts: 2
Reply with quote
Post Re: SMART monitoring with ESXi 4.1
Greetings,

I've been looking for a way to monitor the local disk I have in my whitebox system and this looked to be the ticket. I have installed it all correctly, however no matter what I do I can't get smartctl to recognize the disk correctly:

/dev/disks # fdisk -l

Disk /dev/disks/t10.ATA_____WDC_WD5000AADS2D00L4B1________________________WD2DWCAUK1135167: 500.1 GB, 500107862016 bytes
64 heads, 32 sectors/track, 476940 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

smartctl reports it can't detect the drive type:

/dev/disks # smartctl --all /dev/disks/t10.ATA_____WDC_WD5000AADS2D00L4B1________________________WD2DWCAUK1135167
smartctl 5.39.1 2010-01-28 r3054 [x86_64-redhat-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

/dev/disks/t10.ATA_____WDC_WD5000AADS2D00L4B1________________________WD2DWCAUK1135167: Unable to detect device type
Smartctl: please specify device type with the -d option.

Use smartctl -h to get a usage summary

So I try to specify the type directly:

/dev/disks # smartctl --all /dev/disks/t10.ATA_____WDC_WD5000AADS2D00L4B1________________________WD2DWCAUK1135167 -d ata
smartctl 5.39.1 2010-01-28 r3054 [x86_64-redhat-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

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.

The drive is a Western Digital 500 GB SATA, and I will check the BIOS to make sure SMART is enabled but I'm fairly confident that it is.

I am using ESXi 4.1U1 on a TA790GX XE motherboard.

Any help would be greatly appreciated!

Thanks,
Steve


Sun Apr 24, 2011 10:54 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.