Proxmox – add space/device to node

Prepare disk, volumes etc.

Identify disk where you wand create an additional directory

lsblk

Mark the device where you want to create an additional storage directory for example sdb. Next, we need to format the disk and partition so we make sure to have parted installed. Then create a filesystem on that device etc.

apt update   #update apt definitions
apt install parted     #install parted
parted /dev/sdb mklabel gpt    #format device replace sdb with you device
parted -a opt /dev/sdb mkpart primary ext4 0% 100%     #create partition replace sdb with you device
mkfs.ext4 -L storageprox /dev/sdb1     #create ext4 filesystem on new created partion, also create partition label
lsblk -fs     #check if the all changes are ok

mkdir -p /mnt/data     #create folder in /mnt/data where the new device will be mapped/mounted

Ok the file system is almost prepared, now we need to mount the device to a created folder so we need to modify fstab file.

nano /etc/fstab    #open fstab file

At the end of the file, you need to add this line

LABEL=storageprox /mnt/data ext4 defaults 0 2

Mount the volume by updated fstab

mount -a

Use the new disk as backup

mkdir -p /mnt/data/backup    #prepare folder where to store backups

Now we need continue in Proxmox GUI. Datacenter -> Storage -> Add -> Directory.

  • ID: name for your directory
  • Directory: /mnt/data/backup
  • Content: VZDump backup file

Now we can schedule backups in GUI. Datacenter -> Backups

Use the new disk for VMs

mkdir -p /mnt/data/hdd-img     #prepare folder where to store VMs

Now we need to continue in Proxmox GUI. Datacenter -> Storage -> Add -> Directory

  • ID: name for your directory
  • Directory: /mnt/data/backup
  • Content: Disk image, Container

Now you can create a new VM or move VM to this storage.