O'Reilly logo

OpenStack Cloud Computing Cookbook by Kevin Jackson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Detecting and replacing failed hard drives

OpenStack Storage won't be of much use if it can't access the hard drives where our data is stored; so being able to detect and replace failed hard drives is essential.

Getting ready

Log in to an OpenStack Storage node as well as the proxy server.

How to do it...

To detect a failing hard drive, carry out the following:

Storage node

  1. We first need to configure a cron job that monitors /var/log/kern.log for failed disk errors on our storage nodes. To do this, we create a configuration file named /etc/swift/swift-drive-audit.conf, as follows:
    [drive-audit]log_facility=LOG_LOCAL0log_level=INFOdevice_dir=/srv/nodeminutes=60error_limit=1
    
  2. We then add a cron job that executes swift-drive-audit hourly, as follows:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required