How to mount SSD under Proxmox

gkovacs

Renowned Member
Dec 22, 2008
514
51
93
Budapest, Hungary
I am planning to add an SSD to one of my Proxmox hosts, so it will better cope with the high IO demand imposed by several VM's.

First I thought of reinstalling Proxmox over the SSD, but I quickly realized that during installation unnecessarily large partitions are created (like /dev/pve/root) which I want to avoid (as SSD's are very expensive I'd like to be able to use their full capacity for my virtual machines).

So my question is this: how can I mount an SSD under a running Proxmox system for VM data only?
- Is it enough to mount it under /var/lib/vz? (The name of the data partition is /dev/mapper/pve-data, so I suspect not)
- Does LVM need to be setup so the snapshot backup would work?
- Do I need to stop any daemons while mounting?
 
Last edited:
In the meantime I've found a post about specifying partition sizes during install:
http://www.proxmox.com/forum/showpost.php?p=3886&postcount=2

you can pass 2 parameters at the install cd boot prompt:

# linux maxroot=20 swapsize=4

create 20GB root and 4GB swap
Currently, my two proxmox hosts consume 6 and 2 gigabytes of space for the root partition (they are running for months now, neither is particularly new).
Am I safe with a 10-12GB root partition and a 4-8 GB swap for a foreseeable time if I choose to reinstall over the SSD?
 
Last edited:
For better storage management we have to wait some time.
If you want to use additional storage in per vm basis than you can take advantage of http://wiki.openvz.org/Bind_mounts. In this scenario you can simply mount your SSD drive to /mnt subdirectory at startup of hw node using fstab configuration. After that you can make some directories for whole vms or for some specific subdirectory of vm like sql data folder. Bind mount can be mounted right on start of vm according wiki page. This is flexible way of safe SSD drive capacity. But vm with bind mounted folder cant be live migrated easily.

Creating LVM volume by hand is simple with using commands like vgcreate and lvcreate.

Root partition don't have to be too big if you will not use scheduled backup feature of proxmox. You can do directly backups to remote storage like NFS, SAMBA or SSHFS mount too. It's better to do backups to another host. I can recommend using BackupPC service for backup all vms to backup host. BackupPC can run inside openvz container as well but it use in heavy hard links which make future migration of all backups to another hw node in cluster hard.
So I think you can make small root partition higher than 4 GB and be safe.

You can possibly create new logical volume on SSD drive and assign that to main volume group instead of original pve-data logical volume which can be renamed and mounted to another location.

I didn't try to use different drive for whole /var/lib/vz. In my case I want simply spread IO load to multiple drives. In shared environment one vm can generate pretty high load for shared disk.
 
Last edited:

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!