Just to have it out in the open:

Here is the manifest from the lvm module

define lvm::volume($vg, $pv, $fstype = undef, $size = undef, $ensure)
{
 case $ensure {
    #
    # Clean up the whole chain.
    #
    cleaned: {
      # This may only need to exist once
      if ! defined(Physical_volume[$pv]) {
        physical_volume { $pv: ensure => present }
      }
      # This may only need to exist once
      if ! defined(Volume_group[$vg]) {
        volume_group { $vg:
          ensure           => present,
          physical_volumes => $pv,
          before           => Physical_volume[$pv]
        }

        logical_volume { $name:
          ensure       => present,
          volume_group => $vg,
          size         => $size,
          before       => Volume_group[$vg]
        }
      }
    }
    #
    # Just clean up the logical volume
    #
    absent: {
      logical_volume { $name:
        ensure       => absent,
        volume_group => $vg,
        size         => $size
      }
    }
    #
    # Create the whole chain.
    #
    present: {
      # This may only need to exist once
      if ! defined(Physical_volume[$pv]) {
        physical_volume { $pv: ensure => present }
      }

      # This may only need to exist once
      if ! defined(Volume_group[$vg]) {
        volume_group { $vg:
          ensure           => present,
          physical_volumes => $pv,
          require          => Physical_volume[$pv]
        }
      }

      logical_volume { $name:
        ensure       => present,
        volume_group => $vg,
        size         => $size,
        require      => Volume_group[$vg]
      }

      if $fstype != undef {
        filesystem { "/dev/${vg}/${name}":
          ensure  => present,
          fs_type => $fstype,
          require => Logical_volume[$name]
        }
      }

    }
    default: {
      fail ( 'lvm::volume: ensure parameter can only be set to
cleaned, absent or present' )
    }
  }
}

On Feb 3, 1:30 pm, Luke <lutay...@gmail.com> wrote:
> The PV and VG are not defined anywhere else that I can see.
>
> On Feb 3, 11:40 am, Felix Frank <felix.fr...@alumni.tu-berlin.de>
> wrote:
>
>
>
>
>
>
>
> > On 02/03/2012 03:45 PM, Luke wrote:
>
> > > root@luketest ~]# pvdisplay
>
> > Ugh, why do people insist on using this instead of pvs?
>
> > Anyway, you're right, the LV isn't there. Neither is the PV.
>
> > Are the PV and VG defined somewhere in your manifest? They should be. I
> > have no experience with this module, but maybe it silently ignores LVs
> > which it cannot create due to the missing VG.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to