Storing Virtual Disks/Containers not on the root drive

  • Thread starter Thread starter mattcopp
  • Start date Start date
M

mattcopp

Guest
Hello Proxmox VE community,

I recently installed Proxmox VE for the first time to review the product and see if it was right for my needs. So far I've been very impressed despite a few technical issues I had. However now I've run in to a bit of a brick wall and I was hoping someone could help.

I should tell you a bit about my hardware and install. I am attempting to store my root file system on to a compact flash card so that I have a dedicated high available root device at low cost. This means I went for the debian based install which is on 1.4 and now working fine. Also the CPU is i386 so I used Pille's i386 debs for the kernel.

Part of my problem is, of course, that the compact flash card doesn't have much space on it. But that's ok, I have a 360GB hard disk which is formatted to LVM for storing my ISOs, Templates and Virtual Machines.

However when I create a virtual machine it still creates it on the root device. I had configured it to store the minimum possible by disabling Virtual Disks, ISO Images, OpenVZ Templates, OpenVZ Containers in the Storage page. But when I press save, the checkboxes are still ticked for OpenVZ Containers and OpenVZ Templates. I solved the templates issue by symlinking the directory to the second drive, but I can't really do that with the containers and LVM.

I was wondering if this was a bug, or that I am doing something wrong. I think I am also a bit confused with the difference between Virtual Disks and Containers. Any help is appreciated.

I'm sorry if this has been answered before, but I did have a good look on Google. I might not have been using the right key words.

Thanks.
 
Hello Proxmox VE community,

I recently installed Proxmox VE for the first time to review the product and see if it was right for my needs. So far I've been very impressed despite a few technical issues I had. However now I've run in to a bit of a brick wall and I was hoping someone could help.

I should tell you a bit about my hardware and install. I am attempting to store my root file system on to a compact flash card so that I have a dedicated high available root device at low cost. This means I went for the debian based install which is on 1.4 and now working fine. Also the CPU is i386 so I used Pille's i386 debs for the kernel.

Part of my problem is, of course, that the compact flash card doesn't have much space on it. But that's ok, I have a 360GB hard disk which is formatted to LVM for storing my ISOs, Templates and Virtual Machines.

However when I create a virtual machine it still creates it on the root device. I had configured it to store the minimum possible by disabling Virtual Disks, ISO Images, OpenVZ Templates, OpenVZ Containers in the Storage page. But when I press save, the checkboxes are still ticked for OpenVZ Containers and OpenVZ Templates. I solved the templates issue by symlinking the directory to the second drive, but I can't really do that with the containers and LVM.

I was wondering if this was a bug, or that I am doing something wrong. I think I am also a bit confused with the difference between Virtual Disks and Containers. Any help is appreciated.

I'm sorry if this has been answered before, but I did have a good look on Google. I might not have been using the right key words.

Thanks.

First, forget using i386, go for amd64 and the Proxmox VE packages.

Lets talk about containers:
all data is on /var/lib/vz (ext3 filesystem)
so you can set this mount point where you want (CLI only). if you want to use LVM snapshots, you need to configure enough free space in the volume group (best would be you install a test system from ISO and see how the partitioning should be).

KVM guest:
see http://pve.proxmox.com/wiki/Storage_Model
 
Hi,
i don't know proxmox over debian, only the normal proxmox installation.
But normal your isos, VMs (kvm+openvz) are below /var/lib/vz which is the logical volume data on the vg pve.
I think your vg on the harddisk is not pve?
If so, try pve as vg, create a data-lv (4GB free in the VG for backup) and mount this to /var/lib/vz.
I guess, that after that it runs like expected.

Udo
 
Part of my problem is, of course, that the compact flash card doesn't have much space on it. But that's ok, I have a 360GB hard disk which is formatted to LVM for storing my ISOs, Templates and Virtual Machines.

When you started from a debian install, you will miss the basic disk / filesystem layout of a standard PVE install.

...to start with, you should place your "/var/lib/vz" on a separate LVM group
(which in your case should be created on a different physical volume of course)

...and probably read the doc on the PVE storage model, here :http://pve.proxmox.com/wiki/Storage_Model

regards,
P3x-749
 
Hi everyone, thanks for your very swift replies.

I should mention that this is a test rig made out of spare hardware, which is why it contains a CPU that does not have virtualisation capabilities. This will be rectified when I build a dedicated machine as I am happy with OpenVZ without KVM for the moment.

I think your explanations are making some sense for me. It seems likely that the Debian install misses some steps that the ISO installer does. It should be possible for me to manually mount the /var/lib/vz on to the LVM partition, do you have an example of the fstab for this?

I did have a read of the storage model, but it seems light on details, possibly explained by the missing steps.

But I don't think it is an explanation for why the OpenVZ Containers and OpenVZ Templates tick box remain ticked on the storage page.

Thanks again for your help so far.
 
Hi everyone, thanks for your very swift replies.

I should mention that this is a test rig made out of spare hardware, which is why it contains a CPU that does not have virtualisation capabilities. This will be rectified when I build a dedicated machine as I am happy with OpenVZ without KVM for the moment.

I think your explanations are making some sense for me. It seems likely that the Debian install misses some steps that the ISO installer does. It should be possible for me to manually mount the /var/lib/vz on to the LVM partition, do you have an example of the fstab for this?

...

Code:
# 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               297,59 GB
  PE Size               4,00 MB
  Total PE              76182
  Alloc PE / Size       74752 / 292,00 GB
  Free  PE / Size       1430 / 5,59 GB
  VG UUID               usnMHp-Ethf-1DvS-j5uq-z1E6-4tT2-JOCPtD
   
# lvdisplay
  --- Logical volume ---
  LV Name                /dev/pve/swap
  VG Name                pve
  LV UUID                HCAIXZ-7wXN-921g-JNs3-tetn-LVAX-AitmyX
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3,00 GB
  Current LE             768
  Segments               1
  Allocation             contiguous
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0
   
  --- Logical volume ---
  LV Name                /dev/pve/root
  VG Name                pve
  LV UUID                ESDkkN-Z9Tc-n1Zn-KOf1-XBhS-7HuK-2qqrHi
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                74,00 GB
  Current LE             18944
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1
   
  --- Logical volume ---
  LV Name                /dev/pve/data
  VG Name                pve
  LV UUID                pa1hHY-TY7v-y21X-aGm3-Oz2u-3ve0-6Ty0dW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                215,00 GB
  Current LE             55040
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:2
   
# cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext3 errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext3 defaults 0 1
/dev/sda1 /boot ext3 defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
 
Hi again, thanks for your replies so far. Just for completeness I have one more question.

So if the way to store Virtual Machines, Containers, Templates, etc. is to mount a Logical Volume and map the /var/lib/vz directory to it. When is the 'Add LVM Group' option used in the Storage page?
 
Hi again, thanks for your replies so far. Just for completeness I have one more question.

So if the way to store Virtual Machines, Containers, Templates, etc. is to mount a Logical Volume and map the /var/lib/vz directory to it. When is the 'Add LVM Group' option used in the Storage page?

this applies only for KVM guests, or details see http://pve.proxmox.com/wiki/Storage_Model

in future, we plan to have this storage model also for containers.
 
Brilliant. This is all starting to line up in my head now.

I think it should possibly be made clearer that the Storage Model only applies to KVM in the wiki.

Thanks very much guys, you have been very patient :)
 
Brilliant. This is all starting to line up in my head now.

I think it should possibly be made clearer that the Storage Model only applies to KVM in the wiki.

Thanks very much guys, you have been very patient :)

if you think the wiki es not clear enough, improve it! A wiki is a community tool.
 
From the Storage model - OpenVZ: only local storage is supported (no selection)
There is any possibility to use for containers LVM with ISCSI target?
Best regards,
Gabriel