Storage

Version 3.1 by Kevin Wiki on 2024/10/11 08:44

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

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