How to add SSD as additional local storage for OpenVZ?

gkovacs

Renowned Member
Dec 22, 2008
516
51
93
Budapest, Hungary
We are running Proxmox VE 3.0 on several nodes, installed on HW RAID10 arrays. General performance is fine, but there are particular containers that use extremely high IO. We could very much benefit from write-back SSD caching (bcache), but it looks like it's not going to happen anytime soon (soonest is after RHEL7 gets released).

According to the storage wiki:
OpenVZ containers must be on local storage or NFS
As these high IO containers are very latency sensitive, we should forget NFS storage, gigabit is simply not enough.

We are looking for a reliable way to add an SSD (as a locally mounted volume or directory) to an already installed Proxmox VE node to place 1-2 containers on it. Some kind of backup (not necessarily snapshot) should work on it, and preferably migrate as well.

Has anyone done this before successfully?
 
basically you just add the SSD on your host, partition with fdisk, create filesystem with mkfs.ext3/ext4 and mount it via fstab. then go to Proxmox VE gui and add this path as directory storage, only available for this host. set the container role.

if you want to be able to do LVM snapshots, you need to configure LVM on this SSD, leave enough free space for snapshots.
 
Last edited:
Thanks for the help. I have created the physical volume, volume group and logical volume via LVM, created the filesystem with mkfs and mounted it. Later I added it as directory storage in the PVE gui, and created a container on it successfully.

Now the only question remains: how do I move an existing container to it from local storage?
Alternatively, how do I migrate to it from another cluster node?
 
you can do a backup/restore.
 
Since there is a wide variety of storage options available now, I would like to see a storage selection option added to migrate... also a move to different storage function could be useful as well.
 
Last edited:
Since there is a wide variety of storage options available now, I would like to see a storage selection option added to migrate... also a move to different storage function could be useful as well.

we have this for KVM, but not for OpenVZ. not sure if there is much interest for this.
 
I did this manually by rsyncing the containers to new storage. Then edit the config for the container to point to the new location.

Sent from my Galaxy Nexus
 
we have this for KVM, but not for OpenVZ. not sure if there is much interest for this.

Where do you have this for KVM? If I press "Migrate", there is no destination selection storage option, regardless of KVM or OpenVZ...

If it's not too complex to implement, I would really welcome this feature! I guess I'm not the only one who uses different types of storages...
 
Last edited: