lvm
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.6.1 < 7.0.0
- RedHat, CentOS, OracleLinux, Scientific, Debian, Ubuntu, AIX, Archlinux
Tasks:
- ensure_fs
- ensure_lv
- ensure_pv
- ensure_vg
- extend_lv
- extend_vg
- mount_lv
Plans:
- expand
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-lvm', '1.4.0'
Learn more about managing modules with a PuppetfileDocumentation
Puppet LVM Module
Provides Logical Resource Management (LVM) features for Puppet.
Usage Examples
This module provides four resource types (and associated providers):
volume_group
, logical_volume
, physical_volume
, and filesystem
.
The basic dependency graph needed to define a working logical volume looks something like:
filesystem -> logical_volume -> volume_group -> physical_volume(s)
Here's a simple working example:
physical_volume { '/dev/hdc':
ensure => present,
}
volume_group { 'myvg':
ensure => present,
physical_volumes => '/dev/hdc',
}
logical_volume { 'mylv':
ensure => present,
volume_group => 'myvg',
size => '20G',
}
filesystem { '/dev/myvg/mylv':
ensure => present,
fs_type => 'ext3',
options => '-b 4096 -E stride=32,stripe-width=64',
}
This simple 1 physical volume, 1 volume group, 1 logical volume case
is provided as a simple volume
definition, as well. The above could
be shortened to be:
lvm::volume { 'mylv':
ensure => present,
vg => 'myvg',
pv => '/dev/hdc',
fstype => 'ext3',
size => '20G',
}
You can also describe your Volume Group like this:
class { 'lvm':
volume_groups => {
'myvg' => {
physical_volumes => [ '/dev/sda2', '/dev/sda3', ],
logical_volumes => {
'opt' => {'size' => '20G'},
'tmp' => {'size' => '1G' },
'usr' => {'size' => '3G' },
'var' => {'size' => '15G'},
'home' => {'size' => '5G' },
'backup' => {
'size' => '5G',
'mountpath' => '/var/backups',
'mountpath_require' => true,
},
},
},
},
}
This could be really convenient when used with hiera:
include ::lvm
and
---
lvm::volume_groups:
myvg:
physical_volumes:
- /dev/sda2
- /dev/sda3
logical_volumes:
opt:
size: 20G
tmp:
size: 1G
usr:
size: 3G
var:
size: 15G
home:
size: 5G
backup:
size: 5G
mountpath: /var/backups
mountpath_require: true
or to just build the VG if it does not exist
---
lvm::volume_groups:
myvg:
createonly: true
physical_volumes:
/dev/sda2:
unless_vg: 'myvg'
/dev/sda3:
unless_vg: 'myvg'
logical_volumes:
opt:
size: 20G
tmp:
size: 1G
usr:
size: 3G
var:
size: 15G
home:
size: 5G
backup:
size: 5G
mountpath: /var/backups
mountpath_require: true
Except that in the latter case you cannot specify create options. If you want to omit the file system type, but still specify the size of the logical volume, i.e. in the case if you are planning on using this logical volume as a swap partition or a block device for a virtual machine image, you need to use a hash to pass the parameters to the definition.
If you need a more complex configuration, you'll need to build the resources out yourself.
Optional Values
The unless_vg
(physical_volume) and createonly
(volume_group) will check
to see if "myvg" exists. If "myvg" does exist then they will not modify
the physical volume or volume_group. This is useful if your environment
is built with certain disks but they change while the server grows, shrinks
or moves.
Example:
physical_volume { "/dev/hdc":
ensure => present,
unless_vg => "myvg"
}
volume_group { "myvg":
ensure => present,
physical_volumes => "/dev/hdc",
createonly => true
}
Type Documentation
filesystem
- name (Parameter) (Namevar)
- ensure (Property)
- fs_type (Parameter) - The file system type. eg. ext3.
- mkfs_cmd (Parameter) - Command to use to create the file system. Defaults to
mkswap
forfs_type=swap
, otherwisemkfs.{fs_type}
- options (Parameter) - Params for the mkfs command. eg.
-l internal,agcount=x
logical_volume
- name (Parameter) (Namevar) - The name of the logical volume. This is the unqualified name and will be automatically added to the volume group’s device path (e.g., ‘/dev/$vg/$lv’).
- ensure (Property)
- alloc (Parameter) - Selects the allocation policy when a command needs to allocate Physical Extents from the Volume Group. Allowed Values:
:anywhere
:contiguous
:cling
:inherit
:normal
- extents (Parameter) - The number of logical extents to allocate for the new logical volume. Set to undef to use all available space
- initial_size (Parameter) - The initial size of the logical volume. This will only apply to newly-created volumes
- minor (Parameter) - Set the minor number
- mirror (Property) - The number of mirrors of the volume.
- mirrorlog (Property) - How to store the mirror log (core, disk, mirrored). Allowed Values:
:core
:disk
:mirrored
- mounted - If puppet should mount the volume. This only affects what puppet will do, and not what will be mounted at boot-time.
- no_sync (Parameter) - An optimization in lvcreate, at least on Linux.
- persistent (Parameter) - Set to true to make the block device persistent
- poolmetadatasize (Parameter) - Set the initial size of the logical volume pool metadata on creation
- readahead (Parameter) - The readahead count to use for the new logical volume.
- region_size (Parameter) - A mirror is divided into regions of this size (in MB), the mirror log uses this granularity to track which regions are in sync. CAN NOT BE CHANGED on already mirrored volume. Take your mirror size in terabytes and round up that number to the next power of 2, using that number as the -R argument.
- size (Property) - The size of the logical volume. Set to undef to use all available space
- size_is_minsize (Parameter) Default value:
false
- Set to true if the ‘size’ parameter specified, is just the minimum size you need (if the LV found is larger then the size requests this is just logged not causing a FAIL) - stripes (Parameter) - The number of stripes to allocate for the new logical volume.
- stripesize (Parameter) - The stripesize to use for the new logical volume.
- thinpool (Parameter) - Default value:
false
- Set to true to create a thin pool or to pool name to create thin volume - volume_group (Parameter) - The volume group name associated with this logical volume. This will automatically set this volume group as a dependency, but it must be defined elsewhere using the volume_group resource type.
physical_volume
- name (Parameter) (Namevar)
- ensure (Property) -
- force (Parameter) Default value:
false
- Force the creation without any confirmation. Allowed Values:true
false
- unless_vg (Parameter) - Do not do anything if the VG already exists. The value should be the name of the volume group to check for.
volume_group
- name (Parameter) (Namevar) - The name of the volume group.
- ensure (Property)
- createonly (Parameter) Default value: false - If set to true the volume group will be created if it does not exist. If the volume group does exist no action will be taken. Defaults to
false
. Allowed Values:true
false
- followsymlinks (Parameter) - If set to true all current and wanted values of the physical_volumes property will be followed to their real files on disk if they are in fact symlinks. This is useful to have Puppet determine what the actual PV device is if the property value is a symlink, like '/dev/disk/by-path/xxxx -> ../../sda'. Defaults to
false
. - physical_volumes (Property) - The list of physical volumes to be included in the volume group; this will automatically set these as dependencies, but they must be defined elsewhere using the physical_volume resource type.
AIX Specific Type Documentation
There are a number of AIX specific parameters and properties. The regular parameters documented above also apply to AIX systems.
filesystem
- accounting (Parameter) - Specify accounting subsystem support, Allowed Values:
true
false
- ag_size (Parameter) - Specify the allocation group size in megabytes, Allowed Values:
/\d+/
- agblksize (Parameter) - JFS2 block size in bytes, Allowed Values:
/\d+/
- atboot (Parameter) - Specify whether the file system is mounted at boot time, Allowed Values:
true
false
- compress (Parameter) - Data compression, LZ or no. Allowed Values:
:LG
:no
- device (Parameter) - Device to create the filesystem on, this can be a device or a logical volume.
- encrypted (Parameter) - Specify and encrypted filesystem. Allowed Values:
true
false
- extended_attributes (Parameter) - Format to be used to store extended attributes. Allowed Values:
:v1
:v2
- frag (Parameter) - JFS fragment size in bytes. Allowed Values:
/\d+/
- initial_size (Parameter) - Initial size of the filesystem, Used only for resource creation, when using this option Puppet will not manage or maintain the size. To resize filesystems see the size property.
- isnapshot (Parameter) - Specify whether the filesystem supports internal snapshots, Allowed Values:
true
false
- large_files (Parameter) - Large file enabled file system. Allowed Values:
true
false
- log_partitions (Parameter) - Specify the size of the log logical volume as number of logical partitions,
- logname (Parameter) - Configure the log logical volume.
- logsize (Parameter) - Size for an inline log in MB, Allowed Values:
/\d+/
- maxext (Parameter) - Size of a file extent in file system blocks, Allowed Values:
/\d+/
- mount_options (Parameter) - Specify the options to be passed to the mount command.
- mountgroup (Parameter) - Mount group for the filesystem,
- mountguard (Parameter) - Enable the mountguard. Allowed Values:
true
false
- nbpi (Parameter) - Bytes per inode. Allowed Values:
/\d+/
- nodename (Parameter) - Specify the remote host where the filesystem resides.
- perms (Parameter) - Permissions for the filesystem, Allowed Values:
:ro
:rw
- size (Property) - Configures the size of the filesystem. Supports filesystem resizing. The size will be rounded up to the nearest multiple of the partition size.
- vix (Parameter) - Specify that the file system can allocate inode extents smaller than the default, Allowed Values:
true
false
- volume_group (Parameter) - Volume group that the file system should be greated on.
logical_volume
- range (Parameter) - Sets the inter-physical volume allocation policy. AIX only
- type (Parameter) - Configures the logical volume type. AIX only
Functions
lvm::bytes_to_size
: Converts a number of bytes to a size format that LVM can understand e.g. lvm::bytes_to_size(214748364800)
would return 200g
lvm::size_to_bytes
: Converts an LVM size to bytes, the opposite of lvm::bytes_to_size
.
Tasks
Documented in the "Tasks" tab on the forge
Plans
lvm::expand
Executes common tasks for expanding mounts, this can include:
- Creating PVs
- Adding PVs to VG
- Extending LV
- Extending filesystem
Parameters:
server
: String The target for the plan
volume_group
: String The volume group to which the logical volume belongs
logical_volume
: String The logical volume which is to be expanded
additional_size
: String How much size to add to the LV. This should be specified in LVM format i.e. "200m" or "2.5g"
disks
: Array[String] Any physical disks that should be added to the volume group as part of the expand process
resize_fs
: Boolean Whether or not to resize the filesystem
Limitations
Namespacing
Due to puppet's lack of composite keys for resources, you currently
cannot define two logical_volume
resources with the same name but
a different volume_group
.
Removing Physical Volumes
You should not remove a physical_volume
from a volume_group
without ensuring the physical volume is no longer in use by a logical
volume (and possibly doing a data migration with the pvmove
executable).
Removing a physical_volume
from a volume_group
resource will cause the
pvreduce
to be executed -- no attempt is made to ensure pvreduce
does not attempt to remove a physical volume in-use.
Resizing Logical Volumes
Logical volume size can be extended, but not reduced -- this is for safety, as manual intervention is probably required for data migration, etc.
Contributors
Bruce Williams bruce@codefluency.com
Daniel Kerwin github@reductivelabs.com
Luke Kanies luke@reductivelabs.com
Matthaus Litteken matthaus@puppetlabs.com
Michael Stahnke stahnma@puppetlabs.com
Mikael Fridh frimik@gmail.com
Tim Hawes github@reductivelabs.com
Yury V. Zaytsev yury@shurup.com
csschwe csschwe@gmail.com
windowsrefund windowsrefund@gmail.com
Adam Gibbins github@adamgibbins.com
Steffen Zieger github@saz.sh
Jason A. Smith smithj4@bnl.gov
Mathieu Bornoz mathieu.bornoz@camptocamp.com
Cédric Jeanneret cedric.jeanneret@camptocamp.com
Raphaël Pinson raphael.pinson@camptocamp.com
Garrett Honeycutt code@garretthoneycutt.com
Reference
Table of Contents
Classes
lvm
: == Class: lvm
Defined types
lvm::logical_volume
: == Define: lvm::logical_volumelvm::physical_volume
: == Define: lvm::physical_volumelvm::volume
: == Define: lvm::volume This defined type will create a logical_volume with the name of the define and ensure a physical_vlvm::volume_group
: == Define: lvm::volume_group
Resource types
filesystem
: The filesystem typelogical_volume
: The name of the logical volume. This is the unqualified name and will be automatically added to the volume group's device path (e.g., '/dev/physical_volume
: Do not do anything if the VG already exists. The value should be the name of the volume group to check for.volume_group
: The name of the volume group.
Functions
Tasks
ensure_fs
: Ensures settings on a filesystem using the type & providerensure_lv
: Ensures settings on a logical volume using the type & providerensure_pv
: Ensures settings on a physical volumes using the type & providerensure_vg
: Ensures settings on a volume group using the type & providerextend_lv
: Extends a logical volumeextend_vg
: Adds physical volumes to a volume groupmount_lv
: Mounts a logical volume
Plans
lvm::expand
: lvm::expand This plan implements an opinionated method for expanding storage on servers that use LVM. If this doesn't fit your needs, simply
Classes
lvm
== Class: lvm
Parameters
The following parameters are available in the lvm
class.
package_ensure
Data type: Enum['installed', 'present', 'latest', 'absent']
Default value: 'installed'
manage_pkg
Data type: Boolean
Default value: false
volume_groups
Data type: Hash
Default value: {}
Defined types
lvm::logical_volume
== Define: lvm::logical_volume
Parameters
The following parameters are available in the lvm::logical_volume
defined type.
volume_group
Data type: Any
size
Data type: Any
Default value: undef
initial_size
Data type: Any
Default value: undef
ensure
Data type: Enum['absent', 'present']
Default value: present
options
Data type: Any
Default value: 'defaults'
pass
Data type: Any
Default value: '2'
dump
Data type: Any
Default value: '0'
fs_type
Data type: Any
Default value: 'ext4'
mkfs_options
Data type: Any
Default value: undef
mountpath
Data type: Stdlib::Absolutepath
Default value: "/${name}"
mountpath_require
Data type: Boolean
Default value: false
mounted
Data type: Boolean
Default value: true
createfs
Data type: Boolean
Default value: true
extents
Data type: Any
Default value: undef
stripes
Data type: Any
Default value: undef
stripesize
Data type: Any
Default value: undef
readahead
Data type: Any
Default value: undef
range
Data type: Any
Default value: undef
size_is_minsize
Data type: Any
Default value: undef
type
Data type: Any
Default value: undef
thinpool
Data type: Variant[Boolean, String]
Default value: false
poolmetadatasize
Data type: Any
Default value: undef
mirror
Data type: Any
Default value: undef
mirrorlog
Data type: Any
Default value: undef
no_sync
Data type: Any
Default value: undef
region_size
Data type: Any
Default value: undef
alloc
Data type: Any
Default value: undef
lvm::physical_volume
== Define: lvm::physical_volume
Parameters
The following parameters are available in the lvm::physical_volume
defined type.
ensure
Data type: Any
Default value: present
force
Data type: Any
Default value: false
unless_vg
Data type: Any
Default value: undef
lvm::volume
== Define: lvm::volume
This defined type will create a logical_volume with the name of the define and ensure a physical_volume, volume_group, and filesystem resource have been created on the block device supplied.
=== Parameters
[ensure] Can only be set to cleaned, absent or present. A value of present will ensure that the physical_volume, volume_group, logical_volume, and filesystem resources are present for the volume. A value of cleaned will ensure that all of the resources are absent Warning this has a high potential for unexpected harm use it with caution. A value of absent will remove only the logical_volume resource from the system. [pv] The block device to ensure a physical_volume has been created on. [vg] The volume_group to ensure is created on the physical_volume provided by the pv parameter. [fstype] The type of filesystem to create on the logical volume. [size] The size the logical_voluem should be.
=== Examples
Provide some examples on how to use this type:
lvm::volume { 'lv_example0': vg => 'vg_example0', pv => '/dev/sdd1', fstype => 'ext4', size => '100GB', }
=== Copyright
See README.markdown for the module author information.
=== License
This file is part of the puppetlabs/lvm puppet module.
puppetlabs/lvm is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License.
puppetlabs/lvm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with puppetlabs/lvm. If not, see http://www.gnu.org/licenses/.
Parameters
The following parameters are available in the lvm::volume
defined type.
ensure
Data type: Any
pv
Data type: Any
vg
Data type: Any
fstype
Data type: Any
Default value: undef
size
Data type: Any
Default value: undef
extents
Data type: Any
Default value: undef
initial_size
Data type: Any
Default value: undef
lvm::volume_group
== Define: lvm::volume_group
Parameters
The following parameters are available in the lvm::volume_group
defined type.
physical_volumes
Data type: Variant[Hash, Array, String]
createonly
Data type: Boolean
Default value: false
ensure
Data type: Enum['present', 'absent']
Default value: present
logical_volumes
Data type: Hash
Default value: {}
followsymlinks
Data type: Boolean
Default value: false
Resource types
filesystem
The filesystem type
Properties
The following properties are available in the filesystem
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
size
Configures the size of the filesystem. Supports filesystem resizing. The size will be rounded up to the nearest multiple of the partition size. AIX only.
Parameters
The following parameters are available in the filesystem
type.
fs_type
The file system type. eg. ext3.
name
namevar
mkfs_cmd
Command to use to create the file system. Defaults to mkswap for fs_type=swap, otherwise mkfs.{{fs_type}}
options
Params for the mkfs command. eg. -l internal,agcount=x
initial_size
Initial size of the filesystem, Used only for resource creation, when using this option Puppet will not manage or maintain the size. To resize filesystems see the size property. AIX only.
ag_size
Valid values: %r{\d+}
Specify the allocation group size in megabytes, AIX only.
large_files
Valid values: true
, false
Large file enabled file system. AIX only
compress
Valid values: LG, no
Data compression, LZ or no. AIX only
frag
Valid values: %r{\d+}
JFS fragment size in bytes. AIX only
nbpi
Valid values: %r{\d+}
Bytes per inode. AIX only
logname
Configure the log logical volume. AIX only
logsize
Valid values: %r{\d+}
Size for an inline log in MB, AIX only
maxext
Valid values: %r{\d+}
Size of a file extent in file system blocks, AIX only
mountguard
Valid values: true
, false
Enable the mountguard. AIX only
agblksize
Valid values: %r{\d+}
JFS2 block size in bytes, AIX only.
extended_attributes
Valid values: v1, v2
Format to be used to store extended attributes. AIX only
encrypted
Valid values: true
, false
Specify and encrypted filesystem. AIX only
isnapshot
Valid values: true
, false
Specify whether the filesystem supports internal snapshots, AIX only
mount_options
Specify the options to be passed to the mount command. AIX only
vix
Valid values: true
, false
Specify that the file system can allocate inode extents smaller than the default, AIX only
log_partitions
Specify the size of the log logical volume as number of logical partitions, AIX only
nodename
Specify the remote host where the filesystem resides. AIX only
accounting
Valid values: true
, false
Specify accounting subsystem support, AIX only
mountgroup
Mount group for the filesystem, AIX only
atboot
Valid values: true
, false
Specify whether the file system is mounted at boot time, AIX only
perms
Valid values: ro, rw
Permissions for the filesystem, AIX only
device
Device to create the filesystem on, this can be a device or a logical volume. AIX only
volume_group
Volume group that the file system should be greated on. AIX only.
logical_volume
The name of the logical volume. This is the unqualified name and will be automatically added to the volume group's device path (e.g., '/dev/$vg/$lv').
Properties
The following properties are available in the logical_volume
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
volume_group
The volume group name associated with this logical volume. This will automatically set this volume group as a dependency, but it must be defined elsewhere using the volume_group resource type.
size
The size of the logical volume. Set to undef to use all available space
mirror
The number of mirrors of the volume.
mirrorlog
Valid values: core, disk, mirrored
How to store the mirror log (core, disk, mirrored).
Parameters
The following parameters are available in the logical_volume
type.
name
namevar
The name of the logical volume. This is the unqualified name and will be automatically added to the volume group's device path (e.g., '/dev/$vg/$lv').
initial_size
The initial size of the logical volume. This will only apply to newly-created volumes
extents
The number of logical extents to allocate for the new logical volume. Set to undef to use all available space
persistent
Set to true to make the block device persistent
thinpool
Set to true to create a thin pool or to pool name to create thin volume
Default value: false
poolmetadatasize
Change the size of logical volume pool metadata
minor
Set the minor number
type
Configures the logical volume type.
range
Sets the inter-physical volume allocation policy. AIX only
stripes
The number of stripes to allocate for the new logical volume.
stripesize
The stripesize to use for the new logical volume.
readahead
The readahead count to use for the new logical volume.
size_is_minsize
Set to true if the 'size' parameter specified, is just the minimum size you need (if the LV found is larger then the size requests this is just logged not causing a FAIL)
Default value: false
resize_fs
Whether or not to resize the underlying filesystem when resizing the logical volume.
Default value: true
alloc
Valid values: anywhere, contiguous, cling, inherit, normal
Selects the allocation policy when a command needs to allocate Physical Extents from the Volume Group.
no_sync
An optimization in lvcreate, at least on Linux.
region_size
physical_volume
Do not do anything if the VG already exists. The value should be the name of the volume group to check for.
Properties
The following properties are available in the physical_volume
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the physical_volume
type.
name
namevar
unless_vg
Do not do anything if the VG already exists. The value should be the name of the volume group to check for.
force
Valid values: true
, false
Force the creation without any confirmation.
Default value: false
volume_group
The name of the volume group.
Properties
The following properties are available in the volume_group
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
physical_volumes
The list of physical volumes to be included in the volume group; this will automatically set these as dependencies, but they must be defined elsewhere using the physical_volume resource type.
Parameters
The following parameters are available in the volume_group
type.
name
namevar
The name of the volume group.
followsymlinks
Valid values: true
, false
, yes, no
Aliases: "yes"=>"true", "no"=>"false"
If set to true all current and wanted values of the physical_volumes property
will be followed to their real files on disk if they are in fact symlinks. This is
useful to have Puppet determine what the actual PV device is if the property value
is a symlink, like '/dev/disk/by-path/xxxx -> ../../sda'. Defaults to False
.
Default value: false
createonly
Valid values: true
, false
, yes, no
Aliases: "yes"=>"true", "no"=>"false"
If set to true the volume group will be created if it does not exist. If the
volume group does exist no action will be taken. Defaults to false
.
Default value: false
Functions
lvm::bytes_to_size
Type: Puppet Language
The lvm::bytes_to_size function.
lvm::bytes_to_size(Numeric $size)
The lvm::bytes_to_size function.
Returns: Any
size
Data type: Numeric
lvm::size_to_bytes
Type: Puppet Language
The lvm::size_to_bytes function.
lvm::size_to_bytes(String $size)
The lvm::size_to_bytes function.
Returns: Any
size
Data type: String
Tasks
ensure_fs
Ensures settings on a filesystem using the type & provider
Supports noop? false
Parameters
fs_type
Data type: String
The file system type. eg. ext3.
name
Data type: String
Fully qualified name
mkfs_cmd
Data type: Optional[String]
Command to use to create the file system. Defaults to mkswap for fs_type=swap, otherwise mkfs.{{fs_type}}
options
Data type: Optional[String]
Params for the mkfs command. eg. -l internal,agcount=x
initial_size
Data type: Optional[String]
Initial size of the filesystem, Used only for resource creation, when using this option Puppet will not manage or maintain the size. To resize filesystems see the size property. AIX only.
size
Data type: Optional[String]
Configures the size of the filesystem. Supports filesystem resizing. The size will be rounded up to the nearest multiple of the partition size. AIX only.
ag_size
Data type: Optional[Integer]
Specify the allocation group size in megabytes, AIX only.
large_files
Data type: Optional[Boolean]
Large file enabled file system. AIX only
compress
Data type: Optional[Enum[LG,no]]
Data compression, LZ or no. AIX only
frag
Data type: Optional[Integer]
JFS fragment size in bytes. AIX only
nbpi
Data type: Optional[Integer]
Bytes per inode. AIX only
logname
Data type: Optional[String]
Configure the log logical volume. AIX only
logsize
Data type: Optional[Integer]
Size for an inline log in MB, AIX only
maxext
Data type: Optional[Integer]
Size of a file extent in file system blocks, AIX only
mountguard
Data type: Optional[Boolean]
Enable the mountguard. AIX only
agblksize
Data type: Optional[Integer]
JFS2 block size in bytes, AIX only
extended_attributes
Data type: Optional[Enum[v1,v2]]
Format to be used to store extended attributes. AIX only
encrypted
Data type: Optional[Boolean]
Specify and encrypted filesystem. AIX only
isnapshot
Data type: Optional[Boolean]
Specify whether the filesystem supports internal snapshots, AIX only
mount_options
Data type: Optional[String]
Specify the options to be passed to the mount command. AIX only
vix
Data type: Optional[Boolean]
Specify that the file system can allocate inode extents smaller than the default, AIX only
log_partitions
Data type: Optional[String]
Specify the size of the log logical volume as number of logical partitions, AIX only
nodename
Data type: Optional[String]
Specify the remote host where the filesystem resides. AIX only
accounting
Data type: Optional[Boolean]
Specify accounting subsystem support, AIX only
mountgroup
Data type: Optional[String]
Mount group for the filesystem, AIX only
atboot
Data type: Optional[Boolean]
Specify whether the file system is mounted at boot time, AIX only
perms
Data type: Optional[Enum[ro,rw]]
Permissions for the filesystem, AIX only
device
Data type: Optional[String]
Device to create the filesystem on, this can be a device or a logical volume. AIX only
volume_group
Data type: Optional[String]
Volume group that the file system should be greated on. AIX only.
ensure_lv
Ensures settings on a logical volume using the type & provider
Supports noop? false
Parameters
ensure
Data type: Enum[present,absent]
Present or absent
name
Data type: String[1]
The name of the logical volume. This is the unqualified name and will be automatically added to the volume group's device path (e.g., '/dev/$vg/$lv').
volume_group
Data type: Optional[String[1]]
The volume group name associated with this logical volume
size
Data type: Optional[Pattern[/^[0-9]+(\.[0-9]+)?[KMGTPEkmgtpe]/]]
The size of the logical volume. Set to undef to use all available space
extents
Data type: Optional[Pattern[/^\d+(%(?:vg|pvs|free|origin)?)?$/]]
The number of logical extents to allocate for the new logical volume. Set to undef to use all available space
persistent
Data type: Optional[Boolean]
Set to true to make the block device persistent
thinpool
Data type: Optional[Boolean]
Set to true to create a thin pool or to pool name to create thin volume
poolmetadatasize
Data type: Optional[Pattern[/^[0-9]+(\.[0-9]+)?[KMGTPEkmgtpe]/]]
Change the size of logical volume pool metadata
minor
Data type: Optional[Integer[0,255]]
Set the minor number
type
Data type: Optional[String[1]]
Configures the logical volume type
range
Data type: Optional[Enum[maximum,minimum]]
Sets the inter-physical volume allocation policy. AIX only
stripes
Data type: Optional[Integer]
The number of stripes to allocate for the new logical volume
stripesize
Data type: Optional[Integer]
The stripesize to use for the new logical volume
readahead
Data type: Optional[String]
The readahead count to use for the new logical volume
resize_fs
Data type: Optional[Boolean]
Whether or not to resize the underlying filesystem when resizing the logical volume
mirror
Data type: Optional[Integer[0,4]]
The number of mirrors of the volume
mirrorlog
Data type: Optional[Enum[core,disk,mirrored]]
How to store the mirror log
alloc
Data type: Optional[Enum[anywhere,contiguous,cling,inherit,normal]]
Selects the allocation policy when a command needs to allocate Physical Extents from the Volume Group
no_sync
Data type: ``
An optimization in lvcreate, at least on Linux
region_size
Data type: Optional[Integer]
A mirror is divided into regions of this size (in MB), the mirror log uses this granularity to track which regions are in sync. CAN NOT BE CHANGED on already mirrored volume. Take your mirror size in terabytes and round up that number to the next power of 2, using that number as the -R argument.
ensure_pv
Ensures settings on a physical volumes using the type & provider
Supports noop? false
Parameters
name
Data type: String[1]
The name of the physical volume
ensure
Data type: Enum[present,absent]
Present or absent
unless_vg
Data type: Optional[String]
Do not do anything if the VG already exists. The value should be the name of the volume group to check for.
force
Data type: Optional[Boolean]
Force the creation without any confirmation
ensure_vg
Ensures settings on a volume group using the type & provider
Supports noop? false
Parameters
name
Data type: String[1]
The name of the volume group
ensure
Data type: Enum[present,absent]
Present or absent
createonly
Data type: Optional[Boolean]
If set to true the volume group will be created if it does not exist. If the volume group does exist no action will be taken
followsymlinks
Data type: Optional[Boolean]
If set to true all current and wanted values of the physical_volumes property will be followed to their real files on disk if they are in fact symlinks. This is useful to have Puppet determine what the actual PV device is if the property value is a symlink, like '/dev/disk/by-path/xxxx -> ../../sda'
physical_volumes
Data type: Array[String]
The list of physical volumes to be included in the volume group
extend_lv
Extends a logical volume
Supports noop? false
Parameters
size
Data type: String[1]
Intended size or 'full'
logical_volume
Data type: String[1]
Name of the logical volume to extend
volume_group
Data type: String[1]
Name of the volume group on which the logical volume resides
extend_vg
Adds physical volumes to a volume group
Supports noop? false
Parameters
volume_group
Data type: String[1]
The name of the volume group
physical_volumes
Data type: Array[String]
The list of physical volumes to be included in the volume group
mount_lv
Mounts a logical volume
Supports noop? false
Parameters
volume_group
Data type: String[1]
The name of the volume group
logical_volume
Data type: String[1]
The name of the logical_volume to mount
mountpoint
Data type: String[1]
Where to mount the logical volume
fstype
Data type: String
The mount type. Valid values depend on the operating system. This is a required option.
options
Data type: Optional[String]
A single string containing options for the mount, as they would appear in fstab on Linux. For many platforms this is a comma-delimited string
atboot
Data type: Optional[Boolean]
Whether to mount the mount at boot. Not all platforms support this.
owner
Data type: Optional[String]
Owner for the mountpoint
group
Data type: Optional[String]
Group for the mountpoint
mode
Data type: Optional[String]
Permissions for the mountpoint
Plans
lvm::expand
lvm::expand
This plan implements an opinionated method for expanding storage on servers that use LVM. If this doesn't fit your needs, simply tie the tasks together in some way that does.
Parameters
The following parameters are available in the lvm::expand
plan.
server
Data type: String
The target for the plan
volume_group
Data type: String
The volume group to which the logical volume belongs
logical_volume
Data type: String
The logical volume which is to be expanded
additional_size
Data type: String
How much size to add to the LV. This should be specified in LVM format i.e. "200m" or "2.5g"
disks
Data type: Array[String]
Any physical disks that should be added to the volume group as part of the expand process
Default value: []
resize_fs
Data type: Boolean
Wheather or not to resize the filesystem
Default value: true
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
What are plans?
Modules can contain plans that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.4.0 (2020-02-12)
Added
Fixed
- Make lv that is a substring of a vg work #244 (genebean)
- Revert "volume_group type does not handle passing of physical_volumes as a hash" #238 (tphoney)
v1.3.0 (2019-05-31)
Fixed
Release 1.2.0
Summary
This release is a roll up of minor bugfixes.
Added
- The upper bound for the stdlib dependency has been increased to 6.0.0
- The module mount_core has been added as a dependency after having been removed from the puppet core.
- Support added for Puppet 5 and 6.
Bugfixes
- Test code left over from previous work has been removed.
- Fix added so that attempts are no longer made to run lvm commands when they are not supported.
- Rubygem version pinned on travis when ruby version less than 2.3.0.
Release 1.1.0
Summary
This is a feature release in order to add facts, functions, tasks and plans alongside some smaller bugfixes and additions.
Added
- Functions added for onverting to and from bytes.
- Tasks added for common actions that use types and providors.
- Plan for one touch expanding, expanded.
- Support has been added for LVM thin volumes.
- Facts have been structured.
- Provider modified to allow
puppet resource
to work withlogical_volumes
. - LVM providers have been confined to linux.
Bugfixes
- Redundant code removed from facts.
- Fixed issues that were causing compilation to fail in tests.
Release 1.0.1
Summary
This release is a roll up of minor bugfixes.
Fixed
- Don't execute the lvm commands when not supported.
- Fix error when creating XFS on top of another Filesystem.
- Type
Hash
added as acceptable type for physical_volumes.
Release 1.0.0
Summary
This release is a roll up of bug fixes and minor features. It also includes the introduction of Puppet 4 daya types. This release was prompted by the following issue: (MODULES-4067)
Added
createonly
option for the volumegroup- 30s Timeout for lvm support
followsymlinks
parameter- Archlinux entry to 'metadata.json'
- Puppet 4 data types
- 'swapon' command to filesystem provider (MODULES-4753)
- Allow removal of swap LVMs (MODULES-4753)
- Logic preventing a mount on fs_type swap (MODULES-4753)
- Gracefully handle blkid return code 2 (MODULES-4067)
Changed
- Set default mount option for dump to 0
- Better regexp for parsing the output of lvs
- Facter::Util::Resolution to Facter::Core::Execution
thinpool
parameter default tofalse
- stdlib requirement to >= 4.13.1
- Puppet minial version requirement to >= 4.6.1
- Provider and tests (MODULES-4753)
Removed
- 'extent size' check in logical_volume provider
- redundant swap exec resources (MODULES-4753)
Release 0.9.0
Summary
Small release that bumps up rspec version and adds a new parameter
Features
- Adds
followsymlinks
parameter
Release 0.8.0
Summary
This release includes more testing, support for ruby 2.3.1, thin provisioning and manage mirrors.
Features
- Lots of test maintenance, tests updated and improved
- Add flag to Logical_volume to not resize filesystem
- Add support for thin provisioning and setting poolmetadatasize
Bugfixes
- Add missing parameters to manage mirrors for lvm::logical_volume
- Executed command
swapoff
before unmount swap partion - Fix parsing size from lvs output
- Numerous documentation fixes
Release 0.7.0
Features
- Add a flag
mounted
to tell puppet not to mount a volume itself.
Bugfixes
- #139: fix errors under strict_variables with
manage_pkg
.
Release 0.6.0
Summary
This release includes support for new parameters, lots of unit tests, and tweaks to make sure everything works on different versions of puppet and lvm
Features
- Update .travis.yml to run puppet 3.0 and higher
- Add swap support
- Add RAL to types
- List all PVs in a VG
- Unit tests for types
- Adds
type
parameter for logical volume creation - Adds support to the resize of a logical volume with swap
Bugfixes
- Filesystem type can create journal devices
- Add persistent and minor parameters to logical volume type
- Make size_is_minsize usable
- Add support for older lvm versions
- Fixes an error in
pvcreate
produced whenforce => false
2015-04-28 - Release 0.5.0
Summary
This release contains new parameters, a number of bugfixes, and improved tests.
Features
- New parameters in
lvm::logical_volume
$readahead
$pass
$dump
- Mirror support
- Ordering of resource creation
- Allow creation of LV without a filesystem or mount points
Bugfixes
- Correctly escape dashes in LVM name
- Updates $ensure checking to be puppet4 compliant.
- Fixes filesystem detection bug
- Correctly escape dashes in VG names (MODULES-1801)
- Validates logical_volume name is not undef
2014-12-2 - Release 0.4.0
Summary
This release contains a number of new parameters, adds support for non-integer sizes, and has a number of bugfixes.
Features
- New parameters in
lvm::logical_volume
$initial_size
$mkfs_options
$stripes
$extents
$stripesize
$range
- New
size_is_minsize
parameter inlogical_volume
type - Allow non-integer sizes
Bugfixes
- Lint fixes
- Fixed volume_group to be sorted upon comparision
- Consider
fs_type
inexists?
function - Metadata fixes
2014-09-16 - Release 0.3.3
Summary
This release fixes an issue with the metadata and fixes a bug with initial_size.
Bugfixes
- Remove Modulefile and move dependencies to metadata.json
- Don't set --extents=100%FREE if initial_size is set
2014-06-25 - Release 0.3.2
Summary
This release fixes a couple of small, but important, bugs.
Bugfixes
- Fix the size comparision to be unit aware.
- Fix exec that was missing a path attribute.
- Add autorequire for the volume_group.
2014-04-11 - Release 0.3.1
Summary
This release simply adds metadata consumed by the forge for displaying operating system compatibility. No other changes.
2014-04-10 - Release 0.3.0
Summary
This release features a new base lvm class, and set of defines, that allows you
to express your volume groups through a volume_groups
parameter. This makes
it easier to hiera backend your LVM configuration.
More information about this feature can be found in the README file.
2014-02-04 - Release 0.2.0
Summary
It's been a long time since the previous release and the LVM module has seen a lot of community development. It now supports AIX, thanks to Craig Dunn, and grew an enormous number of facts, properties, and parameters. There's a fistful of bugfixes too which should help RHEL5 users.
Features
- A new
lvm_support
fact was added. - A new
lvm_vgs
fact was added. - A new
lvm_pvs
fact was added. - Dynamic facts were added for lvm_vg_N and lvm_pv_N.
- Support for lvcreate -l argument (extents)
- Added AIX providers for logical_volume and filesystem types.
- Use ensure_resources to handle multiple physical_volume in a volume_group.
- Add XFS online resizing support.
- Add
initial_size
property. - Add
extents
property. - Add
stripes
property. - Add
stripsize
property. - Huge number of parameters were added, most AIX only.
Bugfixes
- Fix messages with new_size variables in logical_volume/lvm.rb
- size 'undef' doesn't work when creating a new logical volume
- resize2fs isn't called during resizing on ruby>1.
- Allow for physical_volumes and volume_groups that change as system lives.
- On RHEL 5 family systems ext4 filesystems can not be resized using resize2fs.
- Suppress facter warnings on systems that don't support LVM.
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.13.1 < 7.0.0)
- puppetlabs/mount_core (>= 1.0.0 < 2.0.0)
GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.