Setting up an external drive on Proxmox

I use Immich as my photo server and storing files on a virtual drive is not a scalable solution. In order to get around that, I mount a USB drive to the VM to store the images.

The first thing you have to do is to first identify what drives were available on the computer.

lsblk

From here, I can tell that there are two drives available that I can use. I want to mount the drive by id as it's a more stable way of doing so.

To identify, the id of the drive, do the following:

ls -la /dev/disk/by-id

To set the drive, you have to go to the command line of the Proxmox host and type the following

qm set <vm id> <disk id> <path to disk id>

Here's an example of how it will look like

qm set 401 -scsi1 /dev/disk/by-id/usb-ST8000DM_004-2CX188_000000123AE8-0:0-part1