Storage
Version 3.3 by Kevin Wiki on 2025/09/23 07:27
Adding external high speed VM storage to proxmox. Find the new drive and erase it and then format using parted:
# format drive and create partition
parted /dev/nvme0n1 mklabel gpt
parted /dev/nvme0n1 mkpart primary ext4 0% 100%
# create a ext4 filesystem
mkfs.ext4 /dev/nvme0n1p1
# create dir to mount drive to
mkdir -p /mnt/vmstorage
# add to fstab
printf "\n/dev/nvme0n1p1 /mnt/vmstorage ext4 defaults 0 0" >> /etc/fstab
# mount drives defined in fstab
mount
parted /dev/nvme0n1 mklabel gpt
parted /dev/nvme0n1 mkpart primary ext4 0% 100%
# create a ext4 filesystem
mkfs.ext4 /dev/nvme0n1p1
# create dir to mount drive to
mkdir -p /mnt/vmstorage
# add to fstab
printf "\n/dev/nvme0n1p1 /mnt/vmstorage ext4 defaults 0 0" >> /etc/fstab
# mount drives defined in fstab
mount
Add the new device in proxmox UI or in /etc/pve/storage.cfg to:
dir: nvme
path /mnt/vmstorage
content backup,rootdir,snippets,iso,vztmpl,images
prune-backups keep-all=1
shared 0
path /mnt/vmstorage
content backup,rootdir,snippets,iso,vztmpl,images
prune-backups keep-all=1
shared 0
Moving images from LVM storage
Identify the lvm disk we are after. If is was LXC container with id 401, a disk might look like /dev/mapper/pve-vm--401--disk--0.