puppetlabs-lvm icon indicating copy to clipboard operation
puppetlabs-lvm copied to clipboard

Allow for lvs to be created on specific pv

Open Elbandi opened this issue 1 year ago • 4 comments

Summary

This change allows the use of physical_volume as argument to logical_volume so that the new lv will be created on a specific physical volume even if the volume group consists of several physical volumes.

Sample

    physical_volume { '/dev/sdb':
        ensure => present,
    }
    physical_volume { '/dev/sdc':
        ensure => present,
    }
    physical_volume { '/dev/sdd':
        ensure => present,
    }
    volume_group { 'lvmvg':
        ensure           => present,
        physical_volumes => [ '/dev/sdb', '/dev/sdc', '/dev/sdd']
    }
    logical_volume { 'testpool':
        poolmetadatasize => '256m',
        extents => "100%FREE",
        thinpool => true,
        volume_group => "lvmvg",
        physical_volume => [ "/dev/sdc", "/dev/sdd" ]
    }

Related Issues

This is an updated and tweaked version of #212.

Elbandi avatar Apr 23 '24 15:04 Elbandi