Ask Your Question
1

pass variable to size attribute

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

Chutki gravatar image

Hi,

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'
size=>$temp
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
1

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

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

Stats

Asked: 2014-11-23 11:59:41 -0500

Seen: 137 times

Last updated: Nov 23 '14