25GB容器的快照备份OpenVZ,Proxmox

时间:2014-08-22 14:11:00

标签: openvz proxmox

有2个容器:

  • 1st - 400Mb
  • 第二 - 〜25Gb

第一个容器(400Mb)在两种备份模式(SUSPEND和SNAPSHOT)下都能正常工作。 但第二个容器(25Gb)仅在SUSPEND模式下进行备份。 SNAPSHOT模式始终失败。

两个容器都在同一个文件夹(/ backups)中进行备份。 这是pve storage config /etc/pve/storage.cfg

dir: local
    path /var/lib/vz
    content images,iso,vztmpl,rootdir
    maxfiles 0

dir: backups
    path /backups
    shared
    content backup
    maxfiles 3

/etc/pve/vzdump.cron config:

PATH="/usr/sbin:/usr/bin:/sbin:/bin"

0 4 * * 3,7         root vzdump 100 --quiet 1 --mode snapshot --node proxmox --compress lzo --storage backups
15 4 * * 3,7         root vzdump 101 --quiet 1 --mode snapshot --node proxmox --compress lzo --storage backups

这是我的存储配置: pvdisplay

  --- Physical volume ---
  PV Name               /dev/md1
  VG Name               pve1
  PV Size               930.89 GiB / not usable 4.81 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              238306
  Free PE               14060
  Allocated PE          224246
  PV UUID               7bVuGz-Bgty-Tq9f-....

lvdisplay

  --- Logical volume ---
  LV Path                /dev/pve1/swap
  LV Name                swap
  VG Name                pve1
  LV UUID                QFrmt8-FgAl-4Iz1-....
  LV Write Access        read/write
  LV Creation host, time proxmox, 2013-07-23 15:53:26 +0400
  LV Status              available
  # open                 1
  LV Size                7.00 GiB
  Current LE             1792
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/pve1/root
  LV Name                root
  VG Name                pve1
  LV UUID                LZZ4EX-QDyr-AcG9-....
  LV Write Access        read/write
  LV Creation host, time proxmox, 2013-07-23 15:53:34 +0400
  LV Status              available
  # open                 1
  LV Size                96.00 GiB
  Current LE             24576
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/pve1/data
  LV Name                data
  VG Name                pve1
  LV UUID                x1i9Wo-tdDW-RcLL-....
  LV Write Access        read/write
  LV Creation host, time proxmox, 2013-07-23 15:53:51 +0400
  LV Status              available
  # open                 1
  LV Size                522.96 GiB
  Current LE             133878
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/pve1/backup
  LV Name                backup
  VG Name                pve1
  LV UUID                Fgz6TX-XCgo-9cH5-....
  LV Write Access        read/write
  LV Creation host, time proxmox, 2014-03-28 13:10:46 +0400
  LV Status              available
  # open                 1
  LV Size                250.00 GiB
  Current LE             64000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3

自由空间已足够。 / dev / pve1 / backup具有230Gb的可用空间,并且/ dev / pve1 / data可以使用360Gb。 可能原因是SWAP分区的小尺寸(仅7Gb)?如果是这样 - 我该如何扩展呢?

谢谢!

1 个答案:

答案 0 :(得分:1)

好吧,解决方案隐藏在vzdump工具的size参数中(它为快照定义了已分配内存的值)。默认设置为500 Mb(proxmox v3.0)。将它改为4096解决了我的问题。

可以通过在/etc/vzdump.conf中添加以下行来配置它

size: 4096

或直接在cron /etc/pve/vzdump.cron中添加--size 4096键/值对。感谢。