Feature #9575

Add fact that exposes disks and partitions available on Linux

Added by Krzysztof Wilczynski 8 months ago. Updated 2 months ago.

Status:Tests Insufficient Start date:09/17/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:library
Target version:-
Keywords:partitions Affected Facter version:
Branch:
Votes: 0

Description

I needed to know what disks and partitions a particular system has to automate monitoring deployment with Puppet, etc …

Example of the output:

root@yemen:~# facter -p | egrep -i 'disks|partitions'
disks => c0d0,c0d1
partitions_c0d0 => c0d0p1,c0d0p2,c0d0p5
partitions_c0d1 => c0d1p1

The code can be reviewed here: partitions.rb; or available in the repository: facter-facts.

I need to write tests for it :–)

KW

History

Updated by James Turnbull 8 months ago

  • Status changed from Unreviewed to Accepted

Updated by Ken Barber 8 months ago

  • Category set to library
  • Target version set to 2.0.0
  • Keywords set to partitions

Updated by Ken Barber 6 months ago

  • Status changed from Accepted to Tests Insufficient
  • Target version changed from 2.0.0 to 186

Updated by Dennis Hoppe 6 months ago

Hello Krzysztof,

it would be great, if your facter could also recognise “lvm” partitions. Maybe you could remove the exclude for “dm” and get the label from “/dev/mapper”? Unfortunately i have no ruby skills, otherwise i would have sent you a patch. ;)

Kindly Regards, Dennis

Updated by Krzysztof Wilczynski 6 months ago

Dennis Hoppe wrote:

Hello Krzysztof,

it would be great, if your facter could also recognise “lvm” partitions. Maybe you could remove the exclude for “dm” and get the label from “/dev/mapper”? Unfortunately i have no ruby skills, otherwise i would have sent you a patch. ;)

Hey Dennis,

Sure, no problem :–) I will look into this.

Perhaps, we could have separate fact form Device Mapper anyway, there might be some additional information that may be of interest.

KW

Updated by Krzysztof Wilczynski 4 months ago

  • Assignee deleted (Krzysztof Wilczynski)

Updated by Daniel Pittman 2 months ago

  • Target version deleted (186)

Also available in: Atom PDF