Adding a second HDD to Proxmox?

This really is an odd failing that has been around since Proxmox moved to their new interface. So here are three ways you can do this, all of which involve ssh'ing into your Proxmox box. Assuming /dev/sdb is your new disk.

If you want to use LVM.
ssh into your Proxmox box and do,

pvcreate /dev/sdb
vgcreate myvolgroup /dev/sdb

At this point you can go into the Proxmox GUI, Datacenter -> Storage -> Add: LVM, and you will see your volume group show up in the drop down menu.

If you want to use ZFS (my own personal recommendation).
ssh into your Proxmox box and do,

zpool create -f myzpool /dev/sdb

At this point you can go into the Proxmox GUI, Datacenter -> Storage -> Add: ZFS, and you will see your zpool in the ZFS Pool drop down menu.

If you want to just straight up use disk partitions 1995 style
ssh into your Proxmox box and do,

cfdisk /dev/sdb
Follow the instructions to use cfdisk to create a partition on /dev/sdb so you get /dev/sdb1. Make sure to write your changes!
mkfs.ext4 /dev/sdb1
mkdir /mnt/myseconddisk
ls -lah /dev/disk/by-uuid/
Locate sdb1's UUID and copy it
Edit /etc/fstab and add an entry similar to,
UUID=yourlonguuidhere /mnt/myseconddisk ext4 defaults 0 0
Write your changes to /etc/fstab and then,
mount -a

At this point /dev/sdb1 should be mounted to /mnt/myseconddisk, and will remount automatically on reboot. Now go into your Proxmox GUI, Datacenter -> Storage -> Add: Directory. You will want to put /mnt/myseconddisk into the Directory text box, and you will now be able to put the stuff you choose onto this disk.

Edits:
Jesus christ, I should take more time writing these posts. So many errars!!!

2 Likes