Nathan Shearer

Introduction

BDBusy is a ship script which periodically reads a block of data from a random offset of a block device. The intent is to keep the device busy without affecting its performance. Some low-power hard drives are designed to spin down and park their heads after only 5 seconds of inactivity, and in a RAID configuration this can cause excessive parking and lead to an early failure.

Installation

Installation is a short and a simple download then extract procedure. First become root:
   # su
Change to /tmp and download the latest tarball:
   # cd /tmp
   # wget "http://www.nathanshearer.com/modules/core/home/1/BDBusy/bdbusy-1.0.0.0.tar.gz"
Extract the script into /usr/bin:
   # tar xvzf bdbusy-1.0.0.0.tar.gz -C /usr/bin
Remove the tarball:
   # rm bdbusy-*.tar.gz

Usage

BDBusy currently does not reference an external config file so to change the settings simply edit the script and change these 3 variables:
  PERIOD="5s"
  BLOCKSIZE="4096"
  BLOCKS="256" #1MB
Then to run the script, simply pass it the devices you wish to keep busy:
  # bdbusy /dev/sda
  Reading 256 blocks from '/dev/sda' starting at block 20615870... Done.
  Reading 256 blocks from '/dev/sda' starting at block 11515810... Done.
  Reading 256 blocks from '/dev/sda' starting at block 47087368... Done.
  ...
On my Gentoo systems, I typically create a very short script at /etc/local.d/bdbusy.start which launches an instance for each drive on startup:
  #!/bin/bash
  for DRIVE in /dev/sd[a-z]; do
    bdbusy $DRIVE >/dev/null &
  done

Download

The latest version of BDBusy can be downloaded here: bdbusy-1.0.0.0.tar.gz

% Powered by Modulus %
© 2017 Nathan Shearer