Ask Your Question

pass variable to size attribute

asked 2014-11-23 11:59:41 -0600

Chutki gravatar image


I want to extend the remaining space and assign it to logical volume. So I assigned in $tem variable passed into size attribute

  $temp= lvcreate -n lv_cas -l 100%FREE /dev/cassandra

If I run in promt its working, if I assign into size attribute getting an error message

logical_volume {'lv_cas':
 ensure => present,
path => '/dev/cassandra'
require =>Volume_group['vg_cas']

Even I tried like below

size => 'lvcreate -n lv_cas -l 100%FREE'

Still I am getting error.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-23 14:01:56 -0600

nibalizer gravatar image

What you want to do is pass extents.

logical_volume {'lv_cas':
  ensure => present,
  path => '/dev/cassandra'
  extents => '100%FREE',
  require =>Volume_group['vg_cas']
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: 2014-11-23 11:59:41 -0600

Seen: 152 times

Last updated: Nov 23 '14