Different storage division during setup

hvtilborg

New Member
Oct 25, 2011
11
0
1
Hello people,

First of all, I'm a happy man I discovered Proxmox VE, wonderful product!

I was wondering the following. I just installed Proxmox VE 1.9 on a machine with a hardware RAID-1 array, containing two 1TB disks. Nothing more, nothing less.

When installation was done, I saw that Proxmox itself made the LVM configuration and it looks as follows:

/dev/sda1 - 500M - /boot
/dev/sda2 - ~999G - physical LVM device

Volume group: pve
Logical volumes (all members of the pve volume group):
- swap - 4GB
- root - 96GB - /
- data - 827GB - /var/lib/vz

That's a bit of a pity, because of two things. I'd love to put some VMs on separate LVM logical volumes, because I believe that's the way to enable snapshots and such!? I.e. can I manually configure a disk partitioning?

Second thing, if I now try to create a backup job, it states there is no backup storage defined. When I want to define a new storage, there is of course no space free... Although, I only want to backup stuff just to the local disk (to manually put it on a USB disk). Does this mean I 'just' have to add /var/lib/vz/backup or something similar as a storage directory?
 
Hello people,

First of all, I'm a happy man I discovered Proxmox VE, wonderful product!

welcome here.

I was wondering the following. I just installed Proxmox VE 1.9 on a machine with a hardware RAID-1 array, containing two 1TB disks. Nothing more, nothing less.

When installation was done, I saw that Proxmox itself made the LVM configuration and it looks as follows:

/dev/sda1 - 500M - /boot
/dev/sda2 - ~999G - physical LVM device

Volume group: pve
Logical volumes (all members of the pve volume group):
- swap - 4GB
- root - 96GB - /
- data - 827GB - /var/lib/vz

That's a bit of a pity, because of two things. I'd love to put some VMs on separate LVM logical volumes, because I believe that's the way to enable snapshots and such!?
local storage is under /var/lib/vz and its ready for running snapshot backups.

I.e. can I manually configure a disk partitioning?
the installer always takes the whole disk. you can configure your raid controller to just have two raid volumes and then configure the second raid volume later. if your are totally unhappy with the installer, you can install Debian Lenny with custom partitioning and then Proxmox VE via apt-get.

Second thing, if I now try to create a backup job, it states there is no backup storage defined. When I want to define a new storage, there is of course no space free... Although, I only want to backup stuff just to the local disk (to manually put it on a USB disk). Does this mean I 'just' have to add /var/lib/vz/backup or something similar as a storage directory?

storing backups on the same disk than the original data is probably not the best idea. but take care, you cannot store them under /var/lib/vz - this will create an infinite loop in the case of snapshot backups. best practice: store your backups on NFS share on a remote server and finally, archive backups to tape.
 
Thanks for the quick response.

Okay, so snapshotting is dealt with using LVM snapshots over the /var/lib/vz partition/directory?

I think I'm starting to reinstall the server as you mentioned, just using Debian's netinstall. You mention Lenny because that's the main distribution for 1.9? What's the status of 2.0 (which is based on Squeeze?), is it considered stable for non-production purposes?

The Wiki mentions that you need '...take care that you have enough free space for snapshots (needed for online backup with vzdump)'. What does this exactly mean, do I need enough space within the volume group, or logical volume? So if I have a 200G volume group, and 150G allocated for all logical volumes I'm good? Or does it mean that I need a logical volume of 20G when I want to allocate 15G? That comment isn't really clear to me.

If I reinstall, would this be a good partitioning:

- sda1 - /boot - 500M
- sda2 - LVM physical volume - 149.5G
- sda3 - LVM physical volume - 850G

Volume group: pve (sda2)
Logical volumes of pve:
- swap - 2GB
- root - 48GB - /
- data - 100GB - /var/lib/vz

Volume group: storage (sda3)
Logical volumes of storage:
none right now, the volume group will be added as a storage device for Proxmox

Does this mean I can add VMs to the storage volume group, so that they will be logical volumes? Is this VM now able to use snapshot backups?
 
see this setup from a standard installation, should explain it (using a 4 TB raid volume, raid10 with 4 x 2 TB)):

Code:
root@hp4:~# vgdisplay
  --- Volume group ---
  VG Name               pve
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               3.63 TiB
  PE Size               4.00 MiB
  Total PE              952191
  Alloc PE / Size       951168 / 3.63 TiB
  Free  PE / Size       1023 / 4.00 GiB
  VG UUID               CWpkUu-RcPx-i3t2-DEm6-oymJ-Mbtd-xzEsUV


Code:
lvdisplay
  --- Logical volume ---
  LV Name                /dev/pve/swap
  VG Name                pve
  LV UUID                CvqXeo-fACz-dqIY-H6vI-Loz9-WCNW-FPMU5s
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

  --- Logical volume ---
  LV Name                /dev/pve/root
  VG Name                pve
  LV UUID                wYOcc9-xmqm-o2QD-FWEo-Vz5p-H6Zf-3lVcwT
  LV Write Access        read/write
  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 Name                /dev/pve/data
  VG Name                pve
  LV UUID                0qNaTa-8dM4-UOa7-Ogz2-Y02W-CfLe-Ycklae
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.53 TiB
  Current LE             925568
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
 
But this is the same setup as the bare installer would make, right? Now I'm still not able to write backups to local disks, am I?

So in short, you say that storing VMs as raw images on the /var/lib/vz directory is essentially the same as using separate LVM volumes to store VMs on?

I know this is not the preferred solution, but I believe writing the snapshotted backups to USB disks after the backup job is finished, is sufficient for my needs...
 
But this is the same setup as the bare installer would make, right? Now I'm still not able to write backups to local disks, am I?

you cannot do snapshot backup from files in /var/lib/vz... into /var/lib/vz....
my previous post show a standard iso install, illustration of the free space and volumes, etc.


So in short, you say that storing VMs as raw images on the /var/lib/vz directory is essentially the same as using separate LVM volumes to store VMs on?

no. raw images on a file images is not the same as using LVM volumes directly as block devices. but this is not a question for backup.

I know this is not the preferred solution, but I believe writing the snapshotted backups to USB disks after the backup job is finished, is sufficient for my needs...
 
Hi Tom,

Thanks for all the quick responses. I've reinstalled using Debian Lenny now, having the following partitioning:

/dev/sda1 - 500M - /boot
/dev/sda2 - ~999G - physical LVM device

Volume group: pve
Logical volumes (all members of the pve volume group):
- swap - 4GB
- root - 75GB - /
- data - 600GB - /var/lib/vz
- backup - 220GB - /backup

The /backup directory is set as a storage device (directory) for backups. Thanks again for the help!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!