Last Modified
2014-01-08 07:59:34 +0000
Requires
  • facter

Description

Fact: blockdevice_<devicename>_size

Purpose:

Return the size of a block device in bytes

Resolution:

Parse the contents of /sys/block/<device>/size to receive the size (multiplying by 512 to correct for blocks-to-bytes)

Caveats:

Only supports Linux 2.6+ at this time, due to the reliance on sysfs