Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mirrors - rc 3 #96

Merged
merged 1 commit into from
Feb 13, 2015
Merged

mirrors - rc 3 #96

merged 1 commit into from
Feb 13, 2015

Conversation

mwangel
Copy link
Contributor

@mwangel mwangel commented Feb 10, 2015

Resubmitting from a newly rebased branch with a single commit. I retracted the previous pull request which was submitted 4 months ago.

Example for mirrors:

package { "lvm2":
ensure => "installed"
}

#-----------------------------------------------------------------

LVM (Logical Volume Manager) mirrors in puppet by Martin Wangel.

Tested locally, and with Amazon EBS volumes on EC2 instances.

#-----------------------------------------------------------------
$lvm_file_system="ext4" # ext4 or xfs, xfs can not be resized by this version of this puppet module
$vgname="mmvg" # name of Volume Group
$lvname="mmlv" # name of Logical Volume
$devices=["/dev/sdb1","/dev/sdb2"] # Physical Devices
$lv_fs_size="2G" # Size of Logical Volume

physical_volume { [$devices]:
ensure => present
}
volume_group { "${vgname}":
ensure => present,
physical_volumes => $devices,
require => [ Physical_volume[$devices] ]
} ->
logical_volume { "${lvname}":
ensure => present,
volume_group => $vgname,
size => $lv_fs_size,
mirror => 1,
mirrorlog => core,
region_size => 4,
alloc => normal,
no_sync => 1
} ->
filesystem { "/dev/${vgname}/${lvname}":
ensure => present,
fs_type => $lvm_file_system,
} ->
mount { "lvm-${vgname}-${lvname}":
name => "/u",
ensure => mounted,
device => "/dev/${vgname}/${lvname}",
fstype => $lvm_file_system,
options => "defaults"
}

underscorgan pushed a commit that referenced this pull request Feb 13, 2015
@underscorgan underscorgan merged commit 202ea34 into puppetlabs:master Feb 13, 2015
@underscorgan
Copy link
Contributor

Great, thank you for your contribution @mwangel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants