Forge Home

disk_facter

Additional facts about disks/block devices.

30,728 downloads

7,576 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.3.2 (latest)
  • 0.3.1
  • 0.3.0
  • 0.2.1 (deleted)
  • 0.2.0 (deleted)
  • 0.1.0
released Mar 18th 2015
This version is compatible with:
  • Puppet Enterprise 3.x
  • Puppet >=2.7.20 <4.0.0
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'cygnus-disk_facter', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add cygnus-disk_facter
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install cygnus-disk_facter --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

cygnus/disk_facter — version 0.1.0 Mar 18th 2015

puppet-disk_facter

This facter plugin only works on Linux with smartmontools installed. Some RAID controllers need the vendor RAID utilities installed to gather additional information (for example tw-cli for 3Ware RAID controllers).

You need to take care to install the raid utilities yourself.

You might consider using jhoblitt modules. See:

#Installation

puppet module install cygnus-disk_facter

#Usage

After installing the disk-facter, you will get the following variables:

  • block_devices: A comma separated list of block device names with the leading /dev/ removed.
  • twcli_path: The name of the tw-cli or tw_cli binary if present on the system, otherwise empty.
  • For each element in block_devices there are further variables.
    • block_vendor_$DEV: Contains some kind of vendor representation. The usefulness of this variable is limited.
    • block_driver_$DEV: The Linux kernel driver name used to support this device.
    • block_is_raid_$DEV: true or false depending on whether the block device is backed by multiple disks. If tools needed for identification are missing, it may wrongly contain the value false.
    • block_disks_$DEV: A comma separated list of identifiers enumerating the actual disks backing this device. For regular disks this list has just one element. For raid devices this list driver specific identifiers if the required detection utilities are installed.
  • For each element of block_disks_$DEV there are further variables.
    • disk_vendor_$DISK: A usually upper case string representing the vendor of the disk. Usually correct.
    • disk_model_$DISK: A vendor specific representation of the model of the disk.
    • disk_serial_$DISK: A vendor specific representation of the serial number of the disk.

To effectively use the disk facts it makes sense to either install twcli on every machine or install it based on the listed block_driver_$DEV contents. Drivers starting with "3w-" require twcli.