How to Add a Disk to a Proxmox VM (Linux and Windows)
Complete guide to adding a new disk to a Proxmox VM using qm set, then partitioning and mounting it in both Linux and Windows guests.
When You Need an Additional Disk
Your VM's original disk holds the OS and applications, but you need a separate disk for data, logs, or a database. Adding a second (or third) disk to a Proxmox VM keeps your data isolated from the OS, makes backups more flexible, and simplifies future migrations. This guide covers the full process: adding the disk in Proxmox, then preparing it inside both Linux and Windows guests.
Adding the Disk in Proxmox
You can add a disk while the VM is running (hotplug) or stopped. Use qm set to attach a new disk to an available controller slot:
# Add a 100GB disk on SCSI controller, slot 1
qm set 100 --scsi1 local-lvm:100
# Or use VirtIO for better Linux performance
qm set 100 --virtio1 local-lvm:100
# Add a disk on a specific storage with cache settings
qm set 100 --scsi1 ceph-pool:100,cache=writeback
# Add a disk with specific options
qm set 100 --scsi1 local-lvm:100,discard=on,ssd=1,iothread=1
The number after the storage name is the size in gigabytes. Choose your controller type based on the guest OS:
- scsi (with virtio-scsi-pci controller) – Best for most setups. Works on Linux and Windows with the VirtIO drivers installed.
- virtio – Excellent performance on Linux. Requires VirtIO drivers on Windows.
- ide / sata – Maximum compatibility, lower performance. Use only if VirtIO drivers are not available.
Cache Settings
The cache mode affects both performance and data safety:
# No cache (default) - safest, good for most workloads
qm set 100 --scsi1 local-lvm:100,cache=none
# Write-back - best performance, risk of data loss on power failure
qm set 100 --scsi1 local-lvm:100,cache=writeback
# Write-through - safe writes, cached reads
qm set 100 --scsi1 local-lvm:100,cache=writethrough
Preparing the Disk in Linux
After adding the disk in Proxmox, log into your Linux VM and prepare it:
# List all block devices to find the new disk
lsblk
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
# sda 8:0 0 32G 0 disk
# ├─sda1 8:1 0 31G 0 part /
# └─sda2 8:2 0 1G 0 part [SWAP]
# sdb 8:16 0 100G 0 disk <-- new disk
# Create a partition table and partition
fdisk /dev/sdb
# Type: g (GPT partition table)
# Type: n (new partition, accept defaults for full disk)
# Type: w (write changes)
# Or use parted for scripted partitioning
parted /dev/sdb --script mklabel gpt mkpart primary ext4 0% 100%
# Format the partition
mkfs.ext4 /dev/sdb1
# Or for XFS:
# mkfs.xfs /dev/sdb1
# Create mount point and mount
mkdir -p /mnt/data
mount /dev/sdb1 /mnt/data
# Verify
df -h /mnt/data
# /dev/sdb1 98G 61M 93G 1% /mnt/data
Making It Persistent with fstab
The mount must be added to /etc/fstab to survive reboots. Always use UUIDs instead of device names, since /dev/sdb might change after adding more disks:
# Get the UUID of the new partition
blkid /dev/sdb1
# /dev/sdb1: UUID="a1b2c3d4-e5f6-7890-abcd-ef1234567890" TYPE="ext4"
# Add to fstab
echo "UUID=a1b2c3d4-e5f6-7890-abcd-ef1234567890 /mnt/data ext4 defaults,noatime 0 2" >> /etc/fstab
# Test that fstab is correct (unmount and remount)
umount /mnt/data
mount -a
# Verify it mounted correctly
df -h /mnt/data
Preparing the Disk in Windows
For Windows guests, the process uses Disk Management or diskpart:
Using Disk Management (GUI)
- Open Disk Management (right-click Start > Disk Management)
- The new disk appears as "Not Initialized" — right-click it and select Initialize Disk
- Choose GPT partition style (recommended for disks over 2TB or modern systems)
- Right-click the unallocated space and select New Simple Volume
- Follow the wizard: assign a drive letter, format as NTFS, set volume label
Using diskpart (Command Line)
REM Open Command Prompt as Administrator
diskpart
DISKPART> list disk
DISKPART> select disk 1
DISKPART> online disk
DISKPART> attributes disk clear readonly
DISKPART> convert gpt
DISKPART> create partition primary
DISKPART> format fs=ntfs label="Data" quick
DISKPART> assign letter=D
DISKPART> exit
If the disk does not appear in Windows at all, make sure you have the VirtIO drivers installed. Download the latest VirtIO ISO from the Fedora project and install the storage drivers (vioscsi or viostor).
Verifying the Disk from Proxmox
After everything is set up, confirm the configuration from the Proxmox side:
# View all disks attached to the VM
qm config 100 | grep -E "scsi|virtio|ide|sata"
# scsi0: local-lvm:vm-100-disk-0,size=32G
# scsi1: local-lvm:vm-100-disk-1,discard=on,size=100G,ssd=1
# Check disk usage via QEMU guest agent (if installed)
qm agent 100 get-fsinfo
Tips and Considerations
- Hotplug support – SCSI and VirtIO disks can be added while the VM is running if hotplug is enabled (
qm set 100 --hotplug disk). IDE disks require a VM restart. - Discard/TRIM – Add
discard=onwhen using SSDs or thin-provisioned storage so deleted blocks are reclaimed. - IO threads – For high-IOPS workloads, enable
iothread=1on the disk to dedicate a thread to I/O processing. - Monitoring – Keep an eye on disk usage across your VMs. ProxmoxR can show you disk allocation and usage for all your VMs from your phone, helping you catch capacity issues early.
Adding disks to Proxmox VMs is a routine operation that becomes second nature after the first time. The key is choosing the right controller type, setting appropriate cache and discard options, and always using UUIDs in your fstab entries.
Take Proxmox management mobile
All the features discussed in this guide — accessible from your phone with ProxmoxR. Real-time monitoring, power control, firewall management, and more.