vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in guest

nabuhonodozor

Renowned Member
Feb 14, 2010
35
2
73
properly editing /etc/vz/conf to set VZ on second drive

Hi,
I am struggling with such problem: Ill have 2 disk mounted in Proxmox Host. I want to move and run some openVZ containers from the second drive. Its possible? If not, can I move all containers to second drive/ change config so proxmox will use second drive for containers?

Does the command from title is valid, if yes, what next?
Does changing dir /var/lib/vz/root and /var/lib/vz/private in /etc/vz/conf do the trick?

Please help as I dont know how to "bite" this issue. I am newbee to proxmox and linux.
Kind regards,
Piotr
 
Last edited:
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Hi,
I am struggling with such problem: Ill have 2 disk mounted in Proxmox Host. I want to move and run some openVZ containers from the second drive. Its possible?

Yes, simply copy the private dir and the vm configuration. Although I do not understand the title of this thread (--devnodes md0:rw)?
 
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Thank You!
Yes, simply copy the private dir and the vm configuration.
Do You mean only to move private dir and settings OR move both Private and root dir?
Kind regards,
Piotr
 
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Do You mean only to move private dir and settings

Yes, the root dir is only a mount point (maybe you need to create the dir, but without content)
 
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Dear Dietmar,
Ive duplicate 2 dirs: var/lib/vz/private/101 to data/vz/private/101 AND var/lib/vz/root/101 to data/vz/root/101

Secondly, Ive edited /etc/vz/conf/101.conf and put
Code:
# VE_ROOT="/var/lib/vz/root/$VEID"
VE_ROOT="/data/vz/root/$VEID"
# VE_PRIVATE="/var/lib/vz/private/$VEID"
VE_PRIVATE="/data/vz/private/$VEID"
Whan Ill try to start vm101 syslogs
Code:
Apr 2 09:36:41     pvedaemon    24048     starting VM 101 on node 0 (localhost)
Apr 2 09:36:41     pvedaemon    24048     VM 101 start failed -

I feel I should do something more with configuration - could You please help me?
kind regards,
Piotr
 
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Sorry, but we do not support different location for openvz data - everything need to be inside /var/lib/vz/
 
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Thank You Dietmar,
But do You think its possible to move ALL containers to different folder?
Kind ergards,
Piotr
 
Re: vzctl set <vmid> --devnodes md0:rw --save : openVZ. how to use second drive in gu

Thank You Dietmar,
But do You think its possible to move ALL containers to different folder?

No, everything need to be inside /var/lib/vz/