Ask Your Question

how to add additional space in logical volume

asked 2015-04-15 04:59:36 -0600

Chutki gravatar image

updated 2015-04-19 15:22:24 -0600

ramindk gravatar image


I have linux command lvextend -L +10M /vg_test/lv_test I am trying to convert that in puppet.

logical_volume { lv_test:
    ensure       => present,
    extents         => 1G,
    volume_group => vg_test,

My existing lv size for lv_test is 800M and I want to add 1G extra, so toltal size would be 1.8GB.

but extents attribute didnt support this. it there any other option in puppet

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-04-15 10:01:25 -0600


Have a look at puppetlabs/lvm module. This module supports growing of extents.

Cheers, Michael

edit flag offensive delete link more


I didn't find any thing relevant to extents attribute for my requirement in the above url

Chutki gravatar imageChutki ( 2015-04-19 09:44:15 -0600 )edit

answered 2015-04-19 15:21:54 -0600

ramindk gravatar image

Even if you managed to make your command work, how would you stop Puppet from adding 1GB each time it ran?

Instead thing about telling Puppet what you'd like the final state to be. In this case that's 1.8GB. If you use the puppetlabs-lvm module, it contains code that looks at current size and then decides whether to change or not.

Lastly extents are not specified as a total size of the space, but as a number which can differ though it normally represents 4MB according to the docs. It can also be specified as a percentage which is particularly useful in Puppet when you might want to allocate 100% on many different sized systems. Or 40% on a system that may do lvm snapshots.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-04-15 04:59:36 -0600

Seen: 618 times

Last updated: Apr 19 '15