lvm
: Manage LVM
lvm::logical_volume
: Manage a logical volume.lvm::physical_volume
: Manage a physical volumelvm::volume
: Manage a logical_volume.lvm::volume_group
: Manage a volume group.
filesystem
: The filesystem typelogical_volume
: Logical volume resource typephysical_volume
: Physical volume resource typevolume_group
: Volume group resource type
lvm::bytes_to_size
: Convert a number of bytes to a size format that LVM can understandlvm::size_to_bytes
: Convert an LVM size to bytes, the opposite oflvm::bytes_to_size
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
lvm::expand
: An opinionated method for expanding storage on machines that use LVM. If this doesn't fit your needs, simply tie the tasks together in some way that does.
Manage LVM
The following parameters are available in the lvm
class:
Data type: Enum['installed', 'present', 'latest', 'absent']
Ensure value for the lvm2 package.
Default value: 'installed'
Data type: Boolean
Whether to manage the lvm2 package.
Default value: false
Data type: Hash
Hash of lvm::volume_group resources to create.
Default value: {}
This will automatically set this volume group as a dependency, but it must be defined elsewhere using the volume_group resource type.
the partition size.
(if the LV found is larger then the size requests this is just logged not causing a FAIL)
are in sync. Cannot 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
The following parameters are available in the lvm::logical_volume
defined type:
volume_group
size
initial_size
ensure
options
pass
dump
fs_type
mkfs_options
mountpath
mountpath_require
mounted
createfs
extents
stripes
stripesize
readahead
range
size_is_minsize
type
thinpool
poolmetadatasize
mirror
mirrorlog
no_sync
region_size
alloc
yes_flag
Data type: String[1]
The volume group name associated with this logical volume.
Data type: Optional[String[1]]
Configures the size of the filesystem. Supports filesystem resizing. The size will be rounded up to the nearest multiple of
Default value: undef
Data type: Optional[String[1]]
The initial size of the logical volume. This will only apply to newly-created volumes
Default value: undef
Data type: Enum['absent', 'present']
Default value: present
Data type: String[1]
Params for the mkfs command
Default value: 'defaults'
Data type: Variant[String[1], Integer]
Default value: '2'
Data type: Variant[String[1], Integer]
Default value: '0'
Data type: String[1]
The file system type. eg. ext3.
Default value: 'ext4'
Data type: Optional[String[1]]
Default value: undef
Data type: Stdlib::Absolutepath
Default value: "/${name}"
Data type: Boolean
Default value: false
Data type: Boolean
If puppet should mount the volume. This only affects what puppet will do, and not what will be mounted at boot-time.
Default value: true
Data type: Boolean
Default value: true
Data type: Optional[String[1]]
The number of logical extents to allocate for the new logical volume. Set to undef to use all available space
Default value: undef
Data type: Optional[Variant[String[1], Integer]]
The number of stripes to allocate for the new logical volume.
Default value: undef
Data type: Optional[Variant[String[1], Integer]]
The stripesize to use for the new logical volume.
Default value: undef
Data type: Optional[Variant[String[1], Integer]]
The readahead count to use for the new logical volume.
Default value: undef
Data type: Optional[Enum['maximum', 'minimum']]
- Set to true if the ‘size’ parameter specified, is just the minimum size you need
Default value: undef
Data type: Optional[Boolean]
Lists strings for access control for connection method, users, databases, IPv4 addresses;
Default value: undef
Data type: Optional[String[1]]
Configures the logical volume type. AIX only
Default value: undef
Data type: Variant[Boolean, String]
- Set to true to create a thin pool or to pool name to create thin volume
Default value: false
Data type: Optional[Integer[0, 4]]
Set the initial size of the logical volume pool metadata on creation
Default value: undef
Data type: Optional[String[1]]
The number of mirrors of the volume.
Default value: undef
Data type: Optional[Enum['core', 'disk', 'mirrored']]
How to store the mirror log (Allowed values: core, disk, mirrored).
Default value: undef
Data type: Optional[Boolean]
An optimization in lvcreate, at least on Linux.
Default value: undef
Data type: Optional[Variant[String[1], Integer]]
A mirror is divided into regions of this size (in MB), the mirror log uses this granularity to track which regions
Default value: undef
Data type: Optional[Enum['anywhere', 'contiguous', 'cling', 'inherit', 'normal']]
The allocation policy when a command needs to allocate Physical Extents from the Volume Group.
Default value: undef
Data type: Boolean
If set to true, do not prompt for confirmation interactively but always assume the answer yes.
Default value: false
Manage a physical volume
The following parameters are available in the lvm::physical_volume
defined type:
Data type: Enum['present', 'absent']
ensures phycial volume is present or absent
Default value: present
Data type: Boolean
Whether to force the creation without any confirmation.
Default value: false
Data type: Optional[String[1]]
Do not do anything if the VG already exists. The value should be the name of the volume group to check for.
Default value: undef
Ensures a physical_volume, volume_group, and filesystem resource have been created on the block device supplied in the pv parameter.
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, so use it with caution. A value of absent will remove only the logical_volume resource from the system.
volume.
Set to undef to use all available space
This will only apply to newly-created volumes
lvm::volume { 'lv_example0':
vg => 'vg_example0',
pv => '/dev/sdd1',
fstype => 'ext4',
size => '100GB',
}
The following parameters are available in the lvm::volume
defined type:
Data type: Enum['present', 'absent', 'cleaned']
Can only be set to cleaned, absent or present. A value of present will ensure that the
Data type: Optional[String[1]]
The type of filesystem to create on the logical
Default value: undef
Data type: Stdlib::Absolutepath
path to physcial volume
Data type: String[1]
value of volume group
Data type: Optional[String[1]]
The size the logical_voluem should be.
Default value: undef
Data type: Optional[Variant[String[1], Integer]]
The number of logical extents to allocate for the new logical volume.
Default value: undef
Data type: Optional[String[1]]
The initial size of the logical volume.
Default value: undef
Manage a volume group.
The following parameters are available in the lvm::volume_group
defined type:
Data type: Variant[Hash, Array, String]
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.
Data type: Boolean
If true, the volume group will be created if it does not exist. If the volume group does exist, no action will be taken.
Default value: false
Data type: Enum['present', 'absent']
Whether this volume group should be present or absent.
Default value: present
Data type: Hash
A hash of lvm::logical_volume resources to create in this volume group.
Default value: {}
Data type: Boolean
If 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
.
Default value: false
The filesystem type
The following properties are available in the filesystem
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
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.
The following parameters are available in the filesystem
type.
accounting
ag_size
agblksize
atboot
compress
device
encrypted
extended_attributes
frag
fs_type
initial_size
isnapshot
large_files
log_partitions
logname
logsize
maxext
mkfs_cmd
mount_options
mountgroup
mountguard
name
nbpi
nodename
options
perms
provider
vix
volume_group
Valid values: true
, false
Specify accounting subsystem support, AIX only
Valid values: %r{\d+}
Specify the allocation group size in megabytes, AIX only.
Valid values: %r{\d+}
JFS2 block size in bytes, AIX only.
Valid values: true
, false
Specify whether the file system is mounted at boot time, AIX only
Valid values: LG
, no
Data compression, LZ or no. AIX only
Device to create the filesystem on, this can be a device or a logical volume. AIX only
Valid values: true
, false
Specify and encrypted filesystem. AIX only
Valid values: v1
, v2
Format to be used to store extended attributes. AIX only
Valid values: %r{\d+}
JFS fragment size in bytes. AIX only
The file system type. eg. ext3.
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.
Valid values: true
, false
Specify whether the filesystem supports internal snapshots, AIX only
Valid values: true
, false
Large file enabled file system. AIX only
Specify the size of the log logical volume as number of logical partitions, AIX only
Configure the log logical volume. AIX only
Valid values: %r{\d+}
Size for an inline log in MB, AIX only
Valid values: %r{\d+}
Size of a file extent in file system blocks, AIX only
Command to use to create the file system. Defaults to mkswap for fs_type=swap, otherwise mkfs.{{fs_type}}
Specify the options to be passed to the mount command. AIX only
Mount group for the filesystem, AIX only
Valid values: true
, false
Enable the mountguard. AIX only
namevar
Resource name
Valid values: %r{\d+}
Bytes per inode. AIX only
Specify the remote host where the filesystem resides. AIX only
Params for the mkfs command. eg. -l internal,agcount=x
Valid values: ro
, rw
Permissions for the filesystem, AIX only
The specific backend to use for this filesystem
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
Valid values: true
, false
Specify that the file system can allocate inode extents smaller than the default, AIX only
Volume group that the file system should be created on. AIX only.
Logical volume resource type
The following properties are available in the logical_volume
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The number of mirrors of the volume.
Valid values: core
, disk
, mirrored
How to store the mirror log (core, disk, mirrored).
The size of the logical volume. Set to undef to use all available space
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.
The following parameters are available in the logical_volume
type.
alloc
extents
initial_size
minor
name
no_sync
persistent
poolmetadatasize
provider
range
readahead
region_size
resize_fs
size_is_minsize
stripes
stripesize
thinpool
type
yes_flag
Valid values: anywhere
, contiguous
, cling
, inherit
, normal
Selects the allocation policy when a command needs to allocate Physical Extents from the Volume Group.
The number of logical extents to allocate for the new logical volume. Set to undef to use all available space
The initial size of the logical volume. This will only apply to newly-created volumes
Set the minor number
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').
An optimization in lvcreate, at least on Linux.
Set to true to make the block device persistent
Change the size of logical volume pool metadata
The specific backend to use for this logical_volume
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Sets the inter-physical volume allocation policy. AIX only
The readahead count to use for the new logical volume.
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.
Whether or not to resize the underlying filesystem when resizing the logical volume.
Default value: true
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
The number of stripes to allocate for the new logical volume.
The stripesize to use for the new logical volume.
Set to true to create a thin pool or to pool name to create thin volume
Default value: false
Configures the logical volume type.
If set to true, do not prompt for confirmation interactively but always assume the answer yes.
Default value: false
Physical volume resource type
The following properties are available in the physical_volume
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the physical_volume
type.
Valid values: true
, false
Force the creation without any confirmation.
Default value: false
namevar
Resource name
The specific backend to use for this physical_volume
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Do not do anything if the VG already exists. The value should be the name of the volume group to check for.
Volume group resource type
The following properties are available in the volume_group
type.
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
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.
The following parameters are available in the volume_group
type.
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
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
namevar
The name of the volume group.
The specific backend to use for this volume_group
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Type: Puppet Language
Convert a number of bytes to a size format that LVM can understand
lvm::bytes_to_size(214748364800)
The lvm::bytes_to_size function.
Returns: Any
LVM-formatted size
lvm::bytes_to_size(214748364800)
Data type: Numeric
Type: Puppet Language
Convert an LVM size to bytes, the opposite of lvm::bytes_to_size
The lvm::size_to_bytes function.
Returns: Any
byte value of LVM-formatted size
Data type: String
Ensures settings on a filesystem using the type & provider
Supports noop? false
Data type: String
The file system type. eg. ext3.
Data type: String
Fully qualified name
Data type: Optional[String]
Command to use to create the file system. Defaults to mkswap for fs_type=swap, otherwise mkfs.{{fs_type}}
Data type: Optional[String]
Params for the mkfs command. eg. -l internal,agcount=x
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.
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.
Data type: Optional[Integer]
Specify the allocation group size in megabytes, AIX only.
Data type: Optional[Boolean]
Large file enabled file system. AIX only
Data type: Optional[Enum[LG,no]]
Data compression, LZ or no. AIX only
Data type: Optional[Integer]
JFS fragment size in bytes. AIX only
Data type: Optional[Integer]
Bytes per inode. AIX only
Data type: Optional[String]
Configure the log logical volume. AIX only
Data type: Optional[Integer]
Size for an inline log in MB, AIX only
Data type: Optional[Integer]
Size of a file extent in file system blocks, AIX only
Data type: Optional[Boolean]
Enable the mountguard. AIX only
Data type: Optional[Integer]
JFS2 block size in bytes, AIX only
Data type: Optional[Enum[v1,v2]]
Format to be used to store extended attributes. AIX only
Data type: Optional[Boolean]
Specify and encrypted filesystem. AIX only
Data type: Optional[Boolean]
Specify whether the filesystem supports internal snapshots, AIX only
Data type: Optional[String]
Specify the options to be passed to the mount command. AIX only
Data type: Optional[Boolean]
Specify that the file system can allocate inode extents smaller than the default, AIX only
Data type: Optional[String]
Specify the size of the log logical volume as number of logical partitions, AIX only
Data type: Optional[String]
Specify the remote host where the filesystem resides. AIX only
Data type: Optional[Boolean]
Specify accounting subsystem support, AIX only
Data type: Optional[String]
Mount group for the filesystem, AIX only
Data type: Optional[Boolean]
Specify whether the file system is mounted at boot time, AIX only
Data type: Optional[Enum[ro,rw]]
Permissions for the filesystem, AIX only
Data type: Optional[String]
Device to create the filesystem on, this can be a device or a logical volume. AIX only
Data type: Optional[String]
Volume group that the file system should be created on. AIX only.
Ensures settings on a logical volume using the type & provider
Supports noop? false
Data type: Enum[present,absent]
Present or absent
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').
Data type: Optional[String[1]]
The volume group name associated with this logical volume
Data type: Optional[Pattern[/^[0-9]+(\.[0-9]+)?[KMGTPEkmgtpe]/]]
The size of the logical volume. Set to undef to use all available space
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
Data type: Optional[Boolean]
Set to true to make the block device persistent
Data type: Optional[Boolean]
Set to true to create a thin pool or to pool name to create thin volume
Data type: Optional[Pattern[/^[0-9]+(\.[0-9]+)?[KMGTPEkmgtpe]/]]
Change the size of logical volume pool metadata
Data type: Optional[Integer[0,255]]
Set the minor number
Data type: Optional[String[1]]
Configures the logical volume type
Data type: Optional[Enum[maximum,minimum]]
Sets the inter-physical volume allocation policy. AIX only
Data type: Optional[Integer]
The number of stripes to allocate for the new logical volume
Data type: Optional[Integer]
The stripesize to use for the new logical volume
Data type: Optional[String]
The readahead count to use for the new logical volume
Data type: Optional[Boolean]
Whether or not to resize the underlying filesystem when resizing the logical volume
Data type: Optional[Integer[0,4]]
The number of mirrors of the volume
Data type: Optional[Enum[core,disk,mirrored]]
How to store the mirror log
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
Data type: ``
An optimization in lvcreate, at least on Linux
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.
Data type: Boolean
If set to true, do not prompt for confirmation interactively but always assume the answer yes.
Ensures settings on a physical volumes using the type & provider
Supports noop? false
Data type: String[1]
The name of the physical volume
Data type: Enum[present,absent]
Present or absent
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.
Data type: Optional[Boolean]
Force the creation without any confirmation
Ensures settings on a volume group using the type & provider
Supports noop? false
Data type: String[1]
The name of the volume group
Data type: Enum[present,absent]
Present or absent
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
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'
Data type: Array[String]
The list of physical volumes to be included in the volume group
Extends a logical volume
Supports noop? false
Data type: String[1]
Intended size or 'full'
Data type: String[1]
Name of the logical volume to extend
Data type: String[1]
Name of the volume group on which the logical volume resides
Adds physical volumes to a volume group
Supports noop? false
Data type: String[1]
The name of the volume group
Data type: Array[String]
The list of physical volumes to be included in the volume group
Mounts a logical volume
Supports noop? false
Data type: String[1]
The name of the volume group
Data type: String[1]
The name of the logical_volume to mount
Data type: String[1]
Where to mount the logical volume
Data type: String
The mount type. Valid values depend on the operating system. This is a required option.
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
Data type: Optional[Boolean]
Whether to mount the mount at boot. Not all platforms support this.
Data type: Optional[String]
Owner for the mountpoint
Data type: Optional[String]
Group for the mountpoint
Data type: Optional[String]
Permissions for the mountpoint
An opinionated method for expanding storage on machines that use LVM. If this doesn't fit your needs, simply tie the tasks together in some way that does.
The following parameters are available in the lvm::expand
plan:
Data type: String
The target for the plan
Data type: String
The volume group to which the logical volume belongs
Data type: String
The logical volume which is to be expanded
Data type: String
How much size to add to the LV. This should be specified in LVM format i.e. "200m" or "2.5g"
Data type: Array[String]
Any physical disks that should be added to the volume group as part of the expand process
Default value: []
Data type: Boolean
Wheather or not to resize the filesystem
Default value: true