It's bound to be sub-optimal, but I too found puppet-lvm hard to get started
with. Firstly, I took a long time to discover that I needed to set pluginsync
to get the module copied to all hosts:-
augeas { "puppet-pluginsync":
context => "/files/etc/puppet/puppet.conf/main",
changes => "set pluginsync true",
# notify => Service[puppet],
}
In this, the notify is commented out. It shouldn't be, but until I can upgrade
to 2.7, I think I am being bitten by an old bug which prevents the daemon being
restarted. I couldn't make parameterisation work.
Secondly, like another poster, my initial host setup creates system volumes
with kickstart. I use puppet to add subsequent data volumes which may be
required for a specific project. I have given up trying to parameterise this,
so it is less than flexible. One example, for a project-specific equivalent of
/tmp is split into two parts:-
class lvm_a3 {
import "puppet-lvm"
physical_volume { "/dev/sda3" :
ensure => present,
}
volume_group { "vga" :
ensure => present,
physical_volumes => "/dev/sda3",
}
Physical_volume["/dev/sda3"] -> Volume_Group["vga"]
}
class lvm_gypsy {
Volume_group["vga"] -> Logical_volume["gypsy"]
Logical_volume["gypsy"] -> Filesystem["/dev/vga/gypsy"]
Filesystem["/dev/vga/gypsy"] -> Mount["/export/space/gypsy"]
File["/export"] -> File["/export/space"]
File["/export/space"] -> File["/export/space/gypsy"]
File["/export/space/gypsy"] -> Mount["/export/space/gypsy"]
Mount["/export/space/gypsy"] -> File["/export/space/gypsy/tmp"]
logical_volume { "gypsy" :
ensure => present,
volume_group => "vga",
size => "50G",
}
filesystem { "/dev/vga/gypsy" :
ensure => present,
fs_type => "ext3",
}
file { "/export" :
ensure => directory,
mode => "644",
}
file { "/export/space" :
ensure => directory,
mode => "644",
}
file { "/export/space/gypsy" :
ensure => directory,
mode => "611",
}
mount { "/export/space/gypsy" :
atboot => true,
device => "/dev/vga/gypsy",
ensure => mounted,
fstype => "ext3",
options => "defaults,nofail",
name => "/export/space/gypsy",
dump => "0",
pass => "1",
}
file { "/export/space/gypsy/tmp" :
ensure => directory,
owner => "root",
mode => "1777",
}
tidy { "/export/space/gypsy/tmp":
age => "36h",
recurse => inf,
type => mtime,
}
import "puppet-lvm"
}
These two classes are one-per-file. You will see that the second one goes on to
tidy up stale scratch files...
Chris Ritson (Computing Officer and School Safety Officer)
Room 707, Claremont Tower, EMAIL: [email protected]
School of Computing Science, PHONE: +44 191 222 8175
Newcastle University, FAX : +44 191 222 8232
Newcastle upon Tyne, UK NE1 7RU. WEB : http://www.cs.ncl.ac.uk/
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.