Using or mount a 2nd HDD as /var/lib/vz

informant

Renowned Member
Jan 31, 2012
762
10
83
Hi all,

a little question. If i have 2 hdds in my server, 1st is a ssd for proxmox-system and 2nd HDD i would use for /var/lib/vz only. Can i configure the 2nd HDD in ISO Setup or do i must install normal and mount 2nd HDD later to directory /var/lib/vz.
Well if i would transfer a VM of a other Node to this Node i need more space in /var/lib/vz, 120 GB of SSD are to small.

I hope, you can help. thanks.
best regards
 
You have a few option to solve this:

A easy one would be to install PVE as normal on the SSD and then after the installation create a partition and format the second disk and create an mount point, it doesn't really matter where, for example chose /var/bigstorage and then in the PVE GUI add a new "Directory Storage" (Datacenter -> Storage tab), which points then to your respective mount point (e.g.: /var/bigstorage).

Another one would be to create/format the disk and then change the fstab entry so that it gets mounted at /var/lib/vz instead of the pve-data volume group entry.

Another one would be PVE on Debian where you have a more fine tuned control of the partitioning during installation, for this see:
http://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Jessie
 
Thanks for answer, ok, also mount option , well your first post does not work, well, if you would migrate a vm of a other node to this, they can not create the vm on new directory, well this is not reachable in all other nodes.

regards
 
Thanks for answer, ok, also mount option , well your first post does not work, well, if you would migrate a vm of a other node to this, they can not create the vm on new directory, well this is not reachable in all other nodes.

regards


have you enabled said Drive for the other nodes ?
Datacenter > Storage > select entry > check "shared" checkbox"

That should allow "live migration" .. afaik .. haven't used that since i discovered ceph
 
Hi yes, shared was activate, but it was a local storage, no other node have access to it, it comes a error message if we would migrate from local storage to local-b storage. i mean, it is well the 2nd local storage is not available as physical hdd on other nodes. - right...
regards
 
Hi yes, shared was activate, but it was a local storage, no other node have access to it, it comes a error message if we would migrate from local storage to local-b storage. i mean, it is well the 2nd local storage is not available as physical hdd on other nodes. - right...
regards

But the SSD local storage you mentioned is also only local available, I guess?

You could do a backup and restore process. Back the VM on the other node up and restore it on the local one with qmrestore like:
Code:
qmrestore /path/to/backup.tar.gz 120 --storage your_storage
 
Hi, restore does only works, if all virtual HDDs are in backup, but on server which i would migrate, i have one hdd with backup and 2 without backup, i can not use restore for it, you understand :)

regards
 
Hi, i have create a mountpoint in /etc/fstab:
Code:
# storage mounten
/dev/sda         /media/storage-01      ext4       rw,relatime,data=ordered,barrier=0    0    0

# storage auf /var/lib/vz mounten
/media/storage-01    /var/lib/vz           auto      bind       0 0
with mount -a it works, but if i reboot the node, the mountpoint was not mounted in /var/lib/vz, why and how can i create it correctly?

complete fstab is:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/data /var/lib/vz ext4 defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

# storage mounten
/dev/sda         /media/storage-01      ext4       rw,relatime,data=ordered,barrier=0    0    0

# storage auf /var/lib/vz mounten
/media/storage-01    /var/lib/vz           auto      bind       0 0
 
OK, i have found a solution, i hope it is right, i have comment out line
/dev/pve/data /var/lib/vz ext4 defaults 0 1
it works, i hope it is correct.

regards
 

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!