Puppet: Não é possível adicionar volume físico

1

Eu quero criar um volume físico no Puppet. Abaixo está o meu código

class lvm::crelvm {

  physical_volume { '/dev/sdb2':
  ensure    => present
}

 volume_group { 'vg_cas':
     ensure  => present,
     physical_volumes  => '/dev/sdb2',
    }

}

Mas estou recebendo o erro abaixo

  Error: Execution of '/sbin/pvcreate /dev/sdb2' returned 5: Device /dev/sdb2 not found (or  igored by filtering).
  Error: /Stage[main]/Lvm::Crelvm/Physical_volume[/dev/sdb2]/ensure: change from absent to present failed: Execution of '/sbin/pvcreate /dev/sdb2' returned 5: Device /dev/sdb2 not found (or ignored by filtering).
  Error: Execution of '/sbin/vgcreate vg_cas /dev/sdb2' returned 5: Physical volume /dev/sdb2 not found
   Device /dev/sdb2 not found (or ignored by filtering).
   Unable to add physical volume '/dev/sdb2' to volume group 'vg_cas'.
   Error: /Stage[main]/Lvm::Crelvm/Volume_group[vg_cas]/ensure: change from absent to present failed: Execution of '/sbin/vgcreate vg_cas /dev/sdb2' returned 5: Physical volume /dev/sdb2 not found
   Device /dev/sdb2 not found (or ignored by filtering).
   Unable to add physical volume '/dev/sdb2' to volume group 'vg_cas'.

Já o '/ dev / sdb1' foi criado e o grupo de volumes também foi criado em / dev / sdb1 / vg03 '

Então eu mudei meu código como abaixo

 class lvm::crelvm {

 volume_group { 'vg_cas':
 ensure  => present,
 physical_volumes  => '/dev/sdb1',
}

Quando eu compilo, recebo

 Error: Execution of '/sbin/vgcreate vg_cas /dev/sdb1' returned 5: Physical volume '/dev/sdb1' is already in volume group 'vg03'
 Unable to add physical volume '/dev/sdb1' to volume group 'vg_cas'.
 So how can I create new physical volume and add vg_cas volume group on this.

Eu sou novato em fantoche e administrador Unix.

    
por Olive 16.11.2014 / 19:29

1 resposta

0

Physical volume '/dev/sdb1' is already in volume group 'vg03' < - Esse disco é ou já fazia parte de um grupo de volumes. Remova-o do outro grupo de volume primeiro.

    
por 16.11.2014 / 21:33