partition

the custom types needed to manage partitions and partition tables.

Enterprise Modules

enterprisemodules

5,466 downloads

2,968 latest version

5.0 quality score

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
  • RedHat
    ,
    CentOS
    ,
    OracleLinux
    ,
    Scientific

Start using this module

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.