puppetlabs-lvm
puppetlabs-lvm copied to clipboard
Physical volumes for logical volumes
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.
Example: Volume Group vg00 consists of 4 physical volumes:
PV VG Fmt Attr PSize PFree
/dev/sda vg00 lvm2 a-- 1.09t 0
/dev/sdb vg00 lvm2 a-- 1.09t 0
/dev/sdc vg00 lvm2 a-- 1.09t 0
/dev/sdd vg00 lvm2 a-- 1.09t 0
Some lvs can span all 4 pvs in a raid1/mirror setup for example:
--- Logical volume ---
LV Path /dev/vg00/home
LV Name home
VG Name vg00
[...]
Mirrored volumes 4
[...]
--- Segments ---
Logical extents 0 to 2559:
Type raid1
And other volumes can be created on one specific pv of the four that are part of vg00:
--- Logical volume ---
LV Path /dev/vg00/data01
LV Name data01
VG Name vg00
[...]
--- Segments ---
Logical extents 0 to 270793:
Type linear
Physical volume /dev/sda
Example hiera code:
lvm::volume_groups:
vg00:
physical_volumes:
- '/dev/sda'
- '/dev/sdb'
- '/dev/sdc'
- '/dev/sdd'
logical_volumes:
home:
size: 10GB
fs_type: xfs
mirror: 3
type: raid1
data01:
size: ~
mountpath: '/srv/data01'
fs_type: xfs
physical_volume: '/dev/sda'
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.