montando arquivo de disco vmware baseado em lvm em outra VM

montando arquivo de disco vmware baseado em lvm em outra VM

Eu tinha uma VM baseada em VMWARE que travou devido à desinstalação de algumas bibliotecas importantes.

Agora quero montar seus arquivos vmdk como disco em outra VM, mas está falhando.

O disco está visível no fdisk.

Disk /dev/sdd: 32.2 GB, 32212254720 bytes
64 heads, 32 sectors/track, 30720 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000402ed

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           2         501      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdd2             502       30720    30944256   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

Agora, quando estou tentando criar um volume físico, recebo o seguinte erro.

# pvcreate /dev/sdd2
  dev_is_mpath: failed to get device for 8:50
  Can't initialize physical volume "/dev/sdd2" of volume group "vg_mon01" without -ff

exibição de pv

# pvdisplay /dev/sdd2
  --- Physical volume ---
  PV Name               /dev/sdd2
  VG Name               vg_mon01
  PV Size               29.51 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              7554
  Free PE               0
  Allocated PE          7554
  PV UUID               mzEURV-XSSx-8I3Z-y43s-MQNk-qMo2-GsAlbt

exibição vg

#vgdisplay vg_mon01
  --- Volume group ---
  VG Name               vg_mon01
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               29.51 GiB
  PE Size               4.00 MiB
  Total PE              7554
  Alloc PE / Size       7554 / 29.51 GiB
  Free  PE / Size       0 / 0
  VG UUID               qrELxN-WtX5-y7ZB-u8bk-LIrO-3Ctp-In7gi4

lvdisplay

lvdisplay vg_mon01
  --- Logical volume ---
  LV Path                /dev/vg_mon01/lv_root
  LV Name                lv_root
  VG Name                vg_mon01
  LV UUID                owQu23-Xp1A-Sh9z-pcv9-3baB-BXcL-LVn45Y
  LV Write Access        read/write
  LV Creation host, time mon01.mfino.net, 2015-05-13 10:35:44 +0530
  LV Status              NOT available
  LV Size                27.57 GiB
  Current LE             7058
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

  --- Logical volume ---
  LV Path                /dev/vg_mon01/lv_swap
  LV Name                lv_swap
  VG Name                vg_mon01
  LV UUID                6eOpOI-eTst-i7fY-WPbr-RMtY-dWMR-7d6Awt
  LV Write Access        read/write
  LV Creation host, time mon01.mfino.net, 2015-05-13 10:35:50 +0530
  LV Status              NOT available
  LV Size                1.94 GiB
  Current LE             496
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

Aqui não sei se esta é a maneira correta de usar o disco particionado LVM existente ou estou faltando alguma coisa.

Responder1

Quando adicionei os discos, ele foi detectado pela VM, mas o status do LV eranão disponível, depois de reiniciar a VM, o status do LV mudou paradisponívele consegui montá-lo sem nenhum problema.

informação relacionada