Forge Home

partition

the custom types needed to manage partitions and partition tables.

9,657 downloads

6,974 latest version

5.0 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.6.0 (latest)
  • 0.5.0
  • 0.4.0
released Dec 2nd 2019
This version is compatible with:
  • Puppet Enterprise >=2.7.20
  • Puppet >=2.7.20
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'enterprisemodules-partition', '0.6.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add enterprisemodules-partition
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install enterprisemodules-partition --version 0.6.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

enterprisemodules/partition — version 0.6.0 Dec 2nd 2019

Build Status

####Table of Contents

Powered By EasyType

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with partition
  4. Usage - Configuration options and additional functionality
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

##Overview

This module contains the custom types to manage partitions and partition tables. It implemements most of the linux parted functionality.

##Module Description

This module contains custom types that can help you manage DBA objects in an Oracle database. It runs after the database is installed. IT DOESN'T INSTALL the Oracle database software. With this module, you can setup a database to receive an application. You can:

##Setup

###What partition affects

The types in this module will change disks. Most of the functionality is destructive. Just like adding or changing partitions normaly is. So be careful. Be sure to have a goof backup of the devices you want these types to manage.

###Setup Requirements

This module is based on easy_type. So you need to install easy_type, and this module.

puppet module install hajee/easy_type
puppet module install hajee/partition

##Usage

The module contains the following types:

partition and partition_table

Here are a couple of examples on how to use them.

###partition_table

partition_table {'/dev/sda':
  ensure  => 'msdos',
}

This puppet statement create's a msdos partition table on device /dev/sda. Any partitions available on the disk before this statement, are wipped. You can use the following partition types:

  • bsd
  • loop (raw disk access)
  • gpt
  • mac
  • msdos
  • pc98
  • sun

###partition

partition { '/dev/hda:1':
  ensure    => 'present',
  boot      => 'true',
  end       => '107MB',
  fs_type   => 'ext3',
  lvm       => 'false',
  part_type => 'primary',
  start     => '32.3kB',
}

When you add a gpt partition, you have to set the partition name. If you specify a partition_type, it is simply ignored.

partition { '/dev/hda:1':
  ensure    => 'present',
  boot      => 'true',
  end       => '107MB',
  part_name => 'my_part',
  start     => '32.3kB',
}

This pupet code manages the first partition on /dev/hda. To check what all properties mean, checkout the documentation.

##Limitations

This module is developed on a CentOS 5 system. It uses parted to do the actual work. Because parted uses it's own units for start and end parameters, you have to be careful to match the unit's it returns when using a parted -l versus what's in your manifest. I intend to improve on tis, but it's not there yet.

##Development

This is an open projects, and contributions are welcome.

###OS support

Currently we have tested:

  • CentOS 5.8
  • CentOS 6.5

It would be great if we could get it working and tested on:

  • Debian
  • Ubuntu
  • ....

###Testing

Sorry, not tests yet.