corrija os dados percentuais usados após o backup e a restauração do disco

0

Eu uso o Ambiente Virtual Proxmox 5.1 no KVM.

Eu uso a partição LVM e tenho um disco VM com armazenamento Thin Provision, veja:

# lvdisplay
  --- Logical volume ---
  LV Path                /dev/pve/vm-104-disk-1
  LV Name                vm-104-disk-1
  VG Name                pve
  LV UUID                WlGFQV-pvbu-6Pdz-9fhr-82z2-fhuu-ximBY6
  LV Write Access        read/write
  LV Creation host, time ded, 2017-03-03 22:10:03 +0100
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                40.00 GiB
  Mapped size            9.89%
  Current LE             10240
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:9

# lvs
  LV                                  VG   Attr       LSize   Pool Origin                            Data%  Meta%  Move Log Cpy%Sync Convert
  vm-104-disk-1                       pve  Vwi-a-tz--  40.00g data                                   9.89

Como você pode ver, 9,89% usado de 40 GiB

Depois, crio o backup e restaura o disco com dd . com estes comandos:

Backup:

# dd if=/dev/pve/vm-104-disk-1 | gzip > vm-104-disk-1.gz

Restaurar:

# gzip -dck vm-104-disk-1.gz | dd of=/dev/pve/vm-104-disk-1

Agora veja novamente:

# lvs
  --- Logical volume ---
  LV Path                /dev/pve/vm-104-disk-1
  LV Name                vm-104-disk-1
  VG Name                pve
  LV UUID                tjcIcO-jIv2-cOpg-jr7r-WCLp-ilu5-0ua5fq
  LV Write Access        read/write
  LV Creation host, time pve, 2017-11-07 05:30:23 +0330
  LV Pool name           data
  LV Status              available
  # open                 0
  LV Size                40.00 GiB
  Mapped size            100.00%
  Current LE             10240
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:10

# lvs
  LV            VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vm-104-disk-1 pve Vwi-a-tz--  40.00g data        100.00

Você pode ver que eu usei 100% de 40 GiB, mas o correto foi 9,89%.

Por que e como posso resolver esse problema?

    
por Nabi K.A.Z. 07.11.2017 / 17:18

0 respostas